Compare commits

...

244 Commits

Author SHA1 Message Date
Sebastian Huang
6060d2389f WIFI-14751: EAP112 LTE to reconnect automatically after reboot
1. Copy modemmanager to feeds/ucentral.
2. Add function to find the device sysfs path when protocol is "wwan".
3. Call ifup when modem is ready for connection.
4. Add trigger to restart modemmanager when network uci is updated.

Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-07-10 15:22:39 +08:00
YenLin Pan
f67a2c404b qca-wifi-7: change patches-zyxel_nwa130be path
The original path cannot be patched

Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-07-09 06:42:18 +02:00
John Crispin
974351335f ucentral-schema: update to latest HEAD
f3d1356 add reenroll command

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 10:25:21 +02:00
Justin.Guo
311b1a620c cig-device-boot: update WF672A configuration
* Reduce the i2c frequency to enable the encryption chip to be recognized
* Add USB xr Serial driver and init gps uart param
* Factory reset when switching wifi mode
* SFP gpio should be input mode

Fixes: WIFI-14789
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-07-08 09:47:15 +02:00
John Crispin
066b442247 ucentral-client: prevent client from starting before cloud was discovered
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 09:42:57 +02:00
John Crispin
f2b69ce972 est_client: fix reenroll call
the wrong certificate was being used

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 09:41:12 +02:00
John Crispin
88830b2537 ucentral-client: update to latest HEAD
69829f6 Revert "Cloud Package Manager"
c3a3e05 remove certupdate from proto.c
4c4710a add reenroll to proto.c

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 09:40:30 +02:00
John Crispin
842b21fb5e certificates: add an explicit uci commit call
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 09:40:06 +02:00
John Crispin
8f8eb63ac4 ubus: fix PKG_MIRROR_HASH
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 08:45:48 +02:00
Justin.Guo
367a919d67 qca-wifi-7: WF-189w/h add temperature control
1.Change the WiFi temperature threshold.
2.Use single antenna when temperature is too high.

Fixes: WIFI-14788
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-07-08 08:14:39 +02:00
Jesse Wu
919fe12372 ipq807x: add EMPLUS WAP380C support
Fixes: WIFI-14791
Signed-off-by: Jesse Wu <Jesse.Wu@emplustech.com>
2025-07-08 08:13:39 +02:00
John Crispin
d6d22433c5 ucentral-schema: update to latest HEAD
50ba97e allow sta-authorized and ft-finish to wifi-frames enum

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-07 16:43:35 +02:00
John Crispin
eff579f3ec ucentral-schema: update to latest HEAD
e062b7c properly detect 320MHz channel width

Fixes: WIFI-14607
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-07 07:55:49 +02:00
John Crispin
0768008764 ucentral-schema: update to latest HEAD
2819f87 HaLow: fix channel 8/24/40 cannot be set
3b04c09 HaLow: set default channel to avoid HaLow not working when no channel set by JSON

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-07 07:53:19 +02:00
John Crispin
53c45dfaeb udevmand: update to latest HEAD
e56be31 udevmand: fix segmentation fault during iface flushing

Fixes: WIFI-14752
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-04 08:39:43 +02:00
John Crispin
7e3f851788 ucentral-schema: update to latest HEAD
2b8a58b dont crash if udevmand does not reply
985f3cb WIFI-14588: Cloud Package Manager

Fixes: WIFI-14752
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-04 08:39:26 +02:00
John Crispin
205484080e Revert "netifd: add gcmp-256 as a cipher suite when SAE is enabled on HE/EHT"
This reverts commit b17db16c15.

Signed-off-by: John Crispin <john@phrozen.org>
2025-07-03 16:46:02 +02:00
cpchangemplu
f1fc99ccbe ipq50xx: Add back emplus,wap385c
Signed-off-by: cpchangemplu <cp.chang@emplustech.com>
2025-07-03 14:26:46 +02:00
jackcybertan
db36e09553 ipq50xx : add sonicfi rap630e
Fixes: WIFI-14728
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-07-03 14:23:37 +02:00
John Crispin
b3174a0434 ubus: bump to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-03 09:21:59 +02:00
John Crispin
5f8c4d31cc cloud_discovery: use the correct certificte for CDS
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
aa78f40843 certificates: add support for tar file based certificate storage
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
721fb4cc4d est_client: fixup typo
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
f75a36f89f est_client: prevent downgrades to FW not supporting EST
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
a375b9f774 est_client: add reenroll support
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
16d029f10f cloud_discovery: split EST code out into its own tool
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
bb45e09e8b cloud_discovery: place intermediate files into the /tmp folder
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
2798088cec cloud_discovery: rtrim() the extracted subject
this removes trailing \n\n characters

Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
470703a490 luci-mod-ucentral: update certupdate for insta birth certificates
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
c56d60b2d3 certificates: do not check for cas.pem when mounting certs
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
1178c3b6f1 certificates: set new certs inside UCI
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
0db44ca55b cloud_discovery: add insta EST support
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
ae5015424b cloud_discovery: add initial ubus status call
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
32c7a7ff1d cloud_discovery: add support for hostname_validation
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
39e601cbd4 luci-mod-ucentral: remove digicert specific files
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
ce9c896371 cloud_discovery: depend on the certificates package
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
0008cb20dd cloud_discovery: add option 138 support
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
701242ed25 netifd: drop dhcp option 138 patch
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
67dd4bfca7 cloud_discovery: remove pki2 env lookup
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
John Crispin
88fb4cafbc firstcontact: remove now unused digicert client
Fixes: WIFI-14694
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-01 07:18:54 +02:00
Justin.Guo
feb410ddc3 cig-poe-judgment: add package
Support reading WAN PoE type from /proc/poe_info for WF189/WF189W/WF189H/WF672A

Fixes: WIFI-14697
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-06-27 12:39:58 +02:00
jackcybertan
43a8dd1303 poe: add userland helpers scripts/tools
Support user to control PSE on/off (chip: tps23861) via ucentral config file.
Use uci-default to write poe's uci default file.

Fixes: WIFI-14724
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-06-27 12:38:19 +02:00
Ian Chen
188f6b33e0 netifd-morse: fix HaLow client cannot access network
add wds_bridge in hostapd for HaLow radio

Fixes: WIFI-14615
Signed-off-by: Ian Chen <ian77_chen@accton.com>
2025-06-27 12:37:20 +02:00
John Crispin
27e4eb3685 ucentral-client: update to latest HEAD
08a842d Cloud Package Manager

Fixes: WIFI-14588
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-27 09:41:44 +02:00
John Crispin
cd8294eca0 ucentral-schema: update to latest HEAD
125a148 add PoE support for client ports
17b6c18 Cloud Package Manager
a86b8b0 Fix typo in enhanced MPSK property name
57852ed update schema.json to 4.1.0
e155483 command: update upgrade and factory commands to handle new operational certs

Signed-off-by: John Crispin <john@phrozen.org>
2025-06-27 07:39:52 +02:00
Kumiko18
e12ecf831e cpm: Cloud Package Manager
Added cpm init.d file to list installed package on remote APs

Fixes: WIFI-14588
Signed-off-by: Kumiko18 <alex18_huang@accton.com>
2025-06-27 07:38:23 +02:00
Marek Kwaczynski
1213182012 mpskd: fix incorrect MPSK value assignment
If MPSK is enabled on any interface, `ssid.mpsk` should be true.
Prevents overwriting true with a false value when multiple interfaces
share the same SSID.

Also allow handling of the 'reload' event even when MPSK is not enabled,
to ensure config reloads are not skipped, e.g. when configuration is empty.

Fixes: WIFI-14484

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-06-27 07:37:20 +02:00
Sundareswar P
d5df71619a qca-wifi7: hostapd: Fix for roaming failure during PSK2-RADIUS configuration
After roaming to EAP105, the roaming frames were exchanged successfully,
but the STA sent a deauthentication frame to the AP with an "INVALID IE" error.

The RSNXE subfield in the FTIE was set in the Reassociation Response frame.
The STA validated the Reassociation frame and was unable to process the
RSNXE subfield.

Modified SAE options (sae_pwe=4 and sae_require_pmf=0).

Fixes: WIFI-14544
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-06-27 07:37:20 +02:00
John Crispin
a177884893 .github/workflows/build-dev.yml: add cig_wf660a
Fixes: WIFI-14630
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-26 11:38:08 +02:00
Jesse Wu
1f7d8a7bb7 ipq50xx: add EMPLUS WAP385C support
Signed-off-by: Jesse Wu <Jesse.Wu@emplustech.com>
2025-06-18 07:01:49 +02:00
jackcybertan
dc02d2722a ipq807x_v5.4: update BDF for SonicFi RAP650C
Fixes: WIFI-14574
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-06-18 06:58:41 +02:00
jackcybertan
13ac9166ef ipq807x_v5.4: change SonicFi RAP650C Wi-Fi MAC address sequence
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-06-18 06:58:41 +02:00
John Crispin
3d6f360cb6 ucentral-client: set version.json to 4.1.0
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-13 08:19:37 +02:00
John Crispin
6659e77bd0 qca-wifi-7/ipq53xx: consolidate phy_quirk handling
Fixes: WIFI-14680
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-13 08:19:37 +02:00
wingate5678
b061cc55ce ipq807x_v5.4: cooling daemon with configuration file support
Fixes: WIFI-14682
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-06-13 08:19:37 +02:00
John Crispin
b17db16c15 netifd: add gcmp-256 as a cipher suite when SAE is enabled on HE/EHT
Fixes: WIFI-14594
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 14:26:29 +02:00
John Crispin
d36866301f feeds/hostapd: fix/improve rssi_threshold handling
* add an ucentral-event
* turn thresholds into bss options

Fixes: WIFI-14679
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 09:18:09 +02:00
John Crispin
ffccb65d1b qca-wifi-7/hostapd: fix/improve rssi_threshold handling
* add an ucentral-event
* turn thresholds into bss options

Fixes: WIFI-14679
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 09:18:07 +02:00
John Crispin
af165342ed ipq807x_v5.4/hostapd: fix/improve rssi_threshold handling
* add an ucentral-event
* turn thresholds into bss options

Fixes: WIFI-14679
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 09:18:04 +02:00
John Crispin
ed62236d31 ucentral-schema: update to latest HEAD
ac3a1c7 convert rssi threshold to interface options

Fixes: WIFI-14679
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-11 09:17:55 +02:00
wingate5678
346bdd9c16 qca-wifi-7: sonicfi rap7110c-341x change BDF
Fixes: WIFI-14661
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-06-10 10:53:33 +02:00
Jesse Wu
dc41a0fd0c ipq60xx: Support EMPLUS WAP386V2 model
Device specifications:
======================

SoC: Qualcomm IPQ6018
RAM: 1 x 1G DDR4 RAM
Flash: NAND 128MB
Radio: 2T2R@2.4GHz, 2T2R@5GHz
Ethernet: 1 x 1GbE PHY
Reset Button: 1
Power Source: AC, Standard PoE 802.3af/at
LED Indicator: 4 x Single-color LED indicator (GPIO Control)

Signed-off-by: Jesse Wu <Jesse.Wu@emplustech.com>
2025-06-10 10:46:38 +02:00
cpchangemplu
2b26a4e68a mediatek: Add thermal protection for EMPLUS WAP588M model
Signed-off-by: cpchangemplu <cp.chang@emplustech.com>
2025-06-10 10:43:53 +02:00
cpchangemplu
fa96b2b24d mediatek: Fix image upgrade fail for EMPLUS WAP588M
Signed-off-by: cpchangemplu <cp.chang@emplustech.com>
2025-06-10 08:55:54 +02:00
John Crispin
36f00adc7a ucentral-schema: update to latest HEAD
827ccc2 setting probe_request_rssi incorrectly turned the SSID into a hidden one

Fixes: WIFI-14678
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-10 08:52:16 +02:00
Tanya Singh
5314a752bd mediatek: Enable dualboot for EAP111 and EAP112 by default
Fixes: WIFI-14579
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-06-10 07:39:11 +02:00
Marek Kwaczynski
0f6683f31e iwinfo.uc: Fix access to undefined htmode object
iwinfo command failed due to undefined htmode object

Fixes: WIFI-14666
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-06-10 07:10:57 +02:00
Paul White
8ee96c36c9 ipq807x: fix silent reboot caused by broken printk
A printk() was previously introduced that is passing the log level as the first argument
instead of prefixing the format with the level.  Given this code path, this is causing a
kernel fault and CPU reboot without any kernel panic/stack trace, since it's crashing
inside of printk().

CPU:0 ts:206871944795 ffffffc008dcf828  ffffffc008dfe914  cleanup_module [batman_adv] <- cfg80211_vendor_cmd_reply+0x7ff4/0xa064 [cfg80211]
CPU:0 ts:206871944800 ffffffc0108e69d0  ffffffc008dcf80c  printk <- cleanup_module+0xb22c/0xa20 [batman_adv]
CPU:0 ts:206871944802 ffffffc0101173c0  ffffffc0108e6a08  vprintk_func <- printk+0x60/0x6c
CPU:0 ts:206871944806 ffffffc010115e44  ffffffc0101160ec  vprintk_emit <- vprintk_default+0x4c/0x60
CPU:0 ts:206871944809 ffffffc0101172d0  ffffffc010115e88  __printk_safe_enter <- vprintk_emit+0x84/0x29c
CPU:0 ts:206871944812 ffffffc010115c20  ffffffc010115ec4  vprintk_store <- vprintk_emit+0xc0/0x29c
CPU:0 ts:206871944816 ffffffc0100a53a4  ffffffc010080fb4  do_translation_fault <- do_mem_abort+0x54/0xb0
CPU:0 ts:206871944819 ffffffc0100a4eb4  ffffffc0100a5448  do_page_fault <- do_translation_fault+0xc8/0xe0
CPU:0 ts:206871944821 ffffffc0100a4d08  ffffffc0100a5038  __do_kernel_fault <- do_page_fault+0x1a8/0x4f0
CPU:0 ts:206871944837 ffffffc0100a4c88  ffffffc0100a4df0  die_kernel_fault <- __do_kernel_fault+0x110/0x1b0

After applying the fix, we can see this code path is being hit:
    [26799.175166] cfg80211_calculate_bitrate_he: invalid rate->nss: 0

This still doesn't fix the original issue triggering this code path, which is why a nss value
of 0 is being reported.

Fixes: eb9cbaec7 ("ipq807x: Shorten the kernel backtrace warning msg for ieee80211_bss_get_elem")
Fixes: WIFI-14677
Signed-off-by: Paul White <paul@shasta.cloud>
2025-06-10 06:53:50 +02:00
Arif Alam
89789900f5 ath11k: fix roaming firmware crash
Fix the case where firmware crashes when STA sends AUTH with same
MAC address to multiple SSIDs on the same radio.

Fixes: WIFI-13276
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-06-10 06:46:41 +02:00
Ken
6add44ae27 qca-wifi-7: fix invalid port mapping due to syntax error in 02_network
issue was introduced by edfd2883f5

Fixes: WIFI-14650
Signed-off-by: Ken <xshi@actiontec.com>
2025-05-30 07:24:33 +02:00
John Crispin
14a0c2d272 qca-wifi-7: add missing Kbuild symbols
Signed-off-by: John Crispin <john@phrozen.org>
2025-05-27 13:48:08 +02:00
John Crispin
9e769c85cb .github/workflows/: add more boards
Signed-off-by: John Crispin <john@phrozen.org>
2025-05-27 10:39:57 +02:00
mike_ding
d6e1008c7a Support dual image and fix reset button does not work issue
Signed-off-by: mike_ding <mike_ding@sdc.sercomm.com>
2025-05-27 10:39:57 +02:00
John Crispin
0a4c10d6cc ucentral-schema: update to latest HEAD
b4cfdc6 cmd_upgrade: implement secure download

Signed-off-by: John Crispin <john@phrozen.org>
2025-05-26 16:23:17 +02:00
jackcybertan
edfd2883f5 qca-wifi-7: Support for CyberTAN RAP750E-S AP
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-05-26 16:23:17 +02:00
Tanya Singh
f6ac6f791e mediatek: Fix typo in the name of the /etc/init.d/bootcount script
Fixes: WIFI-14579
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-05-26 16:23:17 +02:00
Tanya Singh
88fe15a985 mediatek: include patched hostapd for EAP112
Fixes: WIFI-14645
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-05-26 16:23:17 +02:00
Justin.Guo
a9f47c9e1e qca-wifi-7: CIG WiFi7 WF-672A bring up
* bring up wf672a
* add drivers lsm303agr rtl8221d ilps22qs
* add cig-wifi-mode-sw for switching radio to 2 bands or 3 bands

Fixes: WIFI-14509
Signed-off-by: Justin.Guo <guoxijun@actiontec.com>
2025-05-26 16:23:17 +02:00
Marek Kwaczynski
f17314a2d3 qca-wifi-7: hostapd: fix missing PSK assignment for EMPSK
When using psk2-radius in combination with enhanced MPSK,
the passphrase was not properly propagated to user scripts
via the ucode interface, because the PSK field was not set
in the connected station context.

This patch fixes that by copying the passphrase into the
psk field.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-05-26 16:23:17 +02:00
Marek Kwaczynski
29739ebd13 qca-wifi-7: EAP-105: Derive WLAN MAC addresses from WAN MAC
For the Edgecore EAP-105 platform, configure the 2.4GHz, 5GHz,
and 6GHz WLAN interfaces to use MAC addresses derived
from the base WAN MAC address.

Fixes: WIFI-14624

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-05-26 16:23:17 +02:00
Sundareswar
3caba52dba EAP105: Roaming failed, if MPSK (AAA server) is configured (#515)
* While Roaming the AP couldn't find the wildcard R0KH and R1KH ids,
which are required by Fast transistion.
* Issue caused by the placement of conf parser in the invalid location.

Fixes: WIFI-14544

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-05-26 16:23:17 +02:00
Ken
44bcc50815 qcom-wifi-7: Default TC fq_codel queue on GRE cause low GRE RX throughput
Fixes: WIFI-14603
Signed-off-by: Ken <xshi@actiontec.com>
2025-05-26 16:23:17 +02:00
Ken
942d7c15b4 ipq807x: WF188n/WF196 lost the certificates files after upgrade
Fixes: WIFI-14623
Signed-off-by: Ken <xshi@actiontec.com>
2025-05-26 16:23:17 +02:00
John Crispin
25be7aef1a ucentral-schema: update to latest HEAD
b4635dc add 138 to default requested DHCP options

Signed-off-by: John Crispin <john@phrozen.org>
2025-05-26 16:23:17 +02:00
800246@emplustech.com
a2e1ffe089 mediatek: Swiitch LAN and WAN port for EMPLUS WAP588M
Signed-off-by: 800246@emplustech.com <cp.chang@emplustech.com>
2025-05-19 06:11:46 +02:00
polun
911f8eaa4c qca-wifi-7: Add Zyxel NWA130BE model
Signed-off-by: YenLin Pan <YenLin.Pan@zyxel.com.tw>
2025-05-19 06:11:20 +02:00
Tanya Singh
590ee6d514 mediatek: Update ethernet driver to support PHY AN8801 on Edgecore EAP111
Fixes: WIFI-14576
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-05-19 06:10:35 +02:00
Ken
5054a71062 qca-wifi-7: WF189 Save crash log into pstore
Fixes: WIFI-14582
Signed-off-by: Ken <xshi@actiontec.com>
2025-05-19 06:09:53 +02:00
John Crispin
d69c1c3176 ucentral-schema: update to latest HEAD
9710867 (HEAD -> main, origin/main, origin/HEAD) make the MTU configurable on GRE tunnels
4dd0904 SSH IdleTimeout can be configured from JSON config
6faaa1f HaLow: Extend ucentral schema & state for HaLow

Signed-off-by: John Crispin <john@phrozen.org>
2025-05-19 06:09:01 +02:00
John Crispin
8d0da5a086 ucentral-schema: update to latest HEAD
6faaa1f HaLow: Extend ucentral schema & state for HaLow
aa9cac5 dhcp_inject: Use same keyword "dhcp-inject" in config file

Signed-off-by: John Crispin <john@phrozen.org>
2025-05-12 10:45:38 +02:00
Wingate Chi
eb66feb5c5 qca-wifi-7: Support Sonicfi RAP750E-H
Fixes: WIFI-14563
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-05-12 10:45:38 +02:00
800246@emplustech.com
89b6ebd518 mediatek: Add EMPLUS WAP588M model
Specifications:
SoC: MediaTek MT7981B
RF Chipset: MT7976C @2.4GHz 2T2R
MT7976C @5ghz 2T2R
RAM: 512MB DDR4 RAM
Flash: SPI-NAND 128 MiB
Ethernet: 2 x 1GbE PHY
Reset Button: 1
Power on/off switch dip: 1
Power Source: Standard PoE 802.3af/at
LED Indicator: 5x Single-color LED indicator (GPIO Control)

Signed-off-by: 800246@emplustech.com <cp.chang@emplustech.com>
2025-05-12 10:45:38 +02:00
Tanya Singh
e3dfe5ea74 rrmd: RRM with Channel Utilization - update radio status check
Fixes: WIFI-14575
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-05-12 10:45:38 +02:00
ian77_chen
f39339564a mediatek-sdk: Support HaLow on EAP112
1. porting MorseMicro HaLow driver to support HaLow on EAP112
2. Only support FCC regulation because of hardware limitation
3. Add /etc/init.d/halow-gpio-reset to initialize HaLow chip in early stage
4. Add /etc/uci-defaults/aaa-fix-phy0-to-morse to correct the default uci for HaLow radio.

Signed-off-by: Ian Chen <ian77_chen@accton.com>
2025-05-12 10:45:38 +02:00
John Crispin
adac3818a4 ucentral-schema: update to latest HEAD
52afdf8 fix wifi-scan on wifi-7 devices

Fixes: WIFI-14541
Fixes: WIFI-14537
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-30 08:03:26 +02:00
Ken
a516b035ab qca-wifi-7: WF189 10G PHY code optimization
* add "limit_rtlphy_10g_ablity" in DTS , no side effect on other product.
* disable 10G capability if DTS defined limit_rtlphy_10g_ablity , no side effect on other product.
* revert the last 0006-qca-ssdk-Fix-10G-rtl-phy-driver-for-c45-mdio-read-wr.patch and based on 0005 patch.

Fixes: WIFI-14567
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-29 08:25:22 +02:00
Ken
29b088ef21 qca-wifi-7: fix WF189 WAN port link issues
Fixes: WIFI-14546
Signed-off-by: Ken <xshi@actiontec.com>
2025-04-28 17:06:48 +02:00
John Crispin
10b875d42c ucentral-schema: update to latest HEAD
3b88fc1 dhcp_inject: Multiple ssids sometime didn't display dhcp option 82 rules

Fixes: WIFI-14564
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-28 12:35:34 +02:00
alex18_huang
1f0a24a941 udhcpinject: Multiple ssids sometime didn't display dhcp option 82 rules
Added check when parsing ssid info retrieved from iwinfo.
Program will exit if expected interface count and iwinfo entry count mismatch.

Fixes: WIFI-14564
Signed-off-by: alex18_huang <alex18_huang@accton.com>
2025-04-28 12:33:00 +02:00
Marek Kwaczynski
ea3afcda56 qca-wifi-7: hostapd.sh: add missed functionality from ipq807x_v5.4
The main reason was adding missed functionality for Radius
configuration which caused rejecting WiFi clients on
authentication level.

Still some changes not included:
* AFC,
* hs20_release,
* multiple_bssid,
* he_co_locate

Fixes: WIFI-14459
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-04-25 08:16:02 +02:00
mike_ding
b5987cc2a7 qca-wifi-7: Support for AP72TIP and AP72TIP-v4 on APNOS v4.x
Signed-off-by: mike_ding <mike_ding@sdc.sercomm.com>
2025-04-25 08:15:00 +02:00
jackcybertan
fc700364d1 ipq807x: add sonicfi rap650c
Fixes: WIFI-14494
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-04-25 08:14:14 +02:00
Tanya Singh
f2fec9dd87 rrmd : Update file names from /tmp dir in rrmd init script that need to be removed when rrmd (re)starts
Fixes: WIFI-14560
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-04-25 08:13:22 +02:00
Ken
2de57bf167 qca-wifi-7: WF189 Reset button does not work
Fixes: WIFI-14538
Signed-off-by: Ken <xshi@actiontec.com>
2025-04-22 06:30:39 +02:00
John Crispin
7d31bebdb0 ucentral-schema: update to latest HEAD
048a53d state.uc: Fix the calculation of Channel Utilization (chanUtil) in statistics

Fixes: WIFI-14531
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-18 07:56:34 +02:00
Tanya Singh
fcb5a972cf rrmd: Update Channel Utilization Calculation in RRM
- avoid calculated Channel Utilization value to be 'infinity' from cycle_count_delta being '0'

Fixes: WIFI-14536
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-04-18 07:52:11 +02:00
Wingate Chi
082d04025c qca-wifi-7: change RAP750W-311A LED to PWM mode
Fixes: WIFI-14530
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-04-17 13:33:56 +02:00
alex18_huang
9ef7d2c227 udhcpinjecti: missing from the package list in ucentral-ap.yml
Add package udhcpinject into profiles/ucentral-ap.yml

Fixes: WIFI-14529
Signed-off-by: Alex Huang <alex18_huang@accton.com>
2025-04-17 13:32:37 +02:00
Ken
e0d61cb0fb qca-wifi-7: WF189/W/H Add 189H support
Fixes: WIFI-14524
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-17 13:31:56 +02:00
Ken
ed2795b30b qca-wifi-7: CIG smp affinity for supporting 53XX platform with wikiki and pebble
Fixes: WIFI-14526
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-17 13:30:45 +02:00
alex18_huang
4b31e481ec udhcpinject: qdisk didn't create successfully for some interfaces while using dhcpinject
Program sometimes did not setup tc qdisc on some interfaces when creating SSID with dhcpinject enabled initially.

Added delayed startup.

Fixes: WIFI-14522
Signed-off-by: alex18_huang <alex18_huang@accton.com>
2025-04-10 16:17:34 +02:00
John Crispin
ba10a88ab3 ucentral-schema: update to latest HEAD
5a6d23b fix/improve swconfig detection

Fixes: WIFI-14525
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 16:13:58 +02:00
John Crispin
b85bc5db9c ipq50xx: fix swconfig setup to align with latest schema changes
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 16:13:26 +02:00
John Crispin
e998711444 ipq807x/hostapd: backport FT VLAN fix
The bug was in the upstream hostapd codebase, backport/rebase the fix

--> ba150059d1ec964add8f29eb2c92dd6dfde97308

Fixes: WIFI-14508
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 14:26:04 +02:00
John Crispin
2d6bea18df Revert "ipq53xx: add smp-affinity for wifi IRQs"
This reverts commit e5bcda17e7.

The patch was causing crashes

Fixes: WIFI-14523
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 13:06:05 +02:00
John Crispin
1bf9e40987 ucentral-schema: update to latest HEAD
43c7375 default max-inactivity to 300

Fixes: WIFI-14520
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 09:46:30 +02:00
John Crispin
a20b96eb31 ucentral-schema: update to latest HEAD
7624d43 set generate_local_psk to false if roaming and multi_psk are enabled

Fixes: WIFI-14484
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 09:10:45 +02:00
John Crispin
c83ac67492 cloud_discovery: make use of the new TIP cloud discovery server
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 08:30:15 +02:00
John Crispin
2b0c600fb3 ucentral-schema: update to latest HEAD
246873b add max-inactivity to ssid config
3b5a5c4 Allow option 82 DHCP fields to be transparently injected into client DHCP requests

Signed-off-by: John Crispin <john@phrozen.org>
2025-04-10 08:25:21 +02:00
alex18_huang
c5793bae3a udhcpinject: Allow option 82 DHCP fields to be transparently injected into client DHCP requests
1. Added userspace application udhcpinject to inject DHCP option 82 transparently
2. Added README.md for example usage

Fixes: WIFI-14018
Signed-off-by: alex18_huang <alex18_huang@accton.com>
2025-04-10 07:56:13 +02:00
Marek Kwaczynski
6afbb92dec qca-wifi-7: hostapd.sh: add psk2-radius encryption
Fixes: WIFI-14459
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-04-10 07:55:37 +02:00
John Crispin
89cb9d63bd ucentral-schema: update to latest HEAD
10b5c36 extend swconfig support for dual cpu port swconfig switches

Signed-off-by: John Crispin <john@phrozen.org>
2025-04-09 09:36:43 +02:00
Ken Shi
16963c997f qca-ssdk: increase number of vlans on qca8337
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-09 09:22:41 +02:00
Ken Shi
f7a9ad770d ipq533x: add CIG WF189W support
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-09 09:14:50 +02:00
Ken Shi
dcdccc7ba0 ath12k-firmware: add miami pebble pebble firmware
Signed-off-by: Ken <xshi@actiontec.com>
2025-04-09 09:07:51 +02:00
Rick Sommerville
b67f97f213 hostapd: proxy arp: fail gracefully
Disable proxy arp and continue if snoop interface setup fail.

Fixes: WIFI-14507
Signed-off-by: Rick Sommerville <rick.sommerville@netexperience.com>
2025-04-09 08:53:01 +02:00
jackcybertan
e9dcf3d953 mediatek: RAP630W-211G change ethernet label and led behavior
Fixes: WIFI-14519
Signed-off-by: Jack Tsai <jack.tsai@cybertan.com.tw>
2025-04-08 14:26:19 +02:00
John Crispin
cc5edd4446 ucentral-schema: update to latest HEAD
0683d04 Add pdev_stats and channel utilization for each radio in the statistics

Fixes: WIFI-14460
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-08 07:25:33 +02:00
Marek Kwaczynski
79adece623 mediatek/hostap: fix roaming ASSOC REJECT
During roaming validation, an issue was detected with
the ASSOC-REJECT event, which had a status code of 55.

To resolve this, the SNonce from the Auth Request Frame
was copied, and the random ANonce is now used
only when expired.

Fixes: WIFI-14326

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-04-08 06:55:15 +02:00
John Crispin
49b64ec93f feed.conf.default: use the github.com based trees
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-07 18:10:23 +02:00
Marek Kwaczynski
b1e3686124 ipq807x_v5.4/mac80211: ath11k: fix peer addition/deletion error on sta band migration
Fix removing rhash when station is roaming between radios and
apply logic from opensource driver during adding/removing
peer.

Fixes: 7374c39d ("ath11k: fix STA roaming between radios")
Fixes: WIFI-14457

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-04-07 16:32:04 +02:00
John Crispin
e5bcda17e7 ipq53xx: add smp-affinity for wifi IRQs
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-07 13:32:14 +02:00
Ken Shi
7c04ed76bd ipq53xx: fix CIF WF189 MDIO clock speed
Fixes: WIFI-14510
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-07 12:46:06 +02:00
John Crispin
04a5cc67e0 ipq53xx: fix rap750w-311a calibration data and memory profile
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-07 11:42:53 +02:00
Wingate Chi
80b2c6d080 WIFI-14511 support Sonicfi RAP750W-311A
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-04-07 10:47:47 +02:00
Ken
c683f19b7c ipq60xx: WF188n update the BDF to support FCC/CE/MY/AU/ES/SE/FR
Fixes: WIFI-14512
Signed-off-by: Ken Shi <xshi@actiontec.com>
2025-04-07 10:07:14 +02:00
John Crispin
1b10507cf1 busybox: the DHCP client would sometimes send a superflous port unreachable frame
Fixes: WIFI-14149
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-01 13:26:24 +02:00
John Crispin
50abd015b3 ucentral-schema: update to latest HEAD
a2133a8 always regenerate the default /e/c/wireless config
505e1a1 ssh: add IdleTimeout=60

Fixes: WIFI-14473
Fixes: WIFI-14470
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-28 09:44:37 +01:00
Tanya Singh
5dd212829f WIFI-14502: Add wlan-ucentral-schema revision hash to /etc/openwrt_release
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-03-28 08:06:00 +01:00
Sebastian Huang
3abc947f8f WIFI-14503: Update BDF (EEPROM file) for Edgecore EAP112
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-03-28 08:05:38 +01:00
John Crispin
5f42e9db58 mac80211: AP VLAN interfaces did not inheret the HE capabilities correctly
Fixes: WIFI-14491
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-28 08:04:28 +01:00
Ken
b181add059 WIFI-14490 WF189 eth1 and eth0 swapped on 12.5
Signed-off-by: Ken <xshi@actiontec.com>
2025-03-26 14:56:43 +01:00
Tanya Singh
7eae0397f1 WIFI-14500: Fixes for Edgecore OAP103 1. Support bluetooth 2. Allow certificate loading on dual boot 3. Support RRM with Channel Utilization 4. Remove EAP102 from supported devices
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-03-26 14:56:31 +01:00
Tanya Singh
1033a63140 WIFI-14180: Update BDF for Edgecore EAP111
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-03-26 14:56:21 +01:00
Tanya Singh
954108d742 WIFI-14460: Update RRM using Channel Utilization script - Improve policy_chanutil.uc script - Improve scripts reading pdev_stats - Support 6G radio AP - Support WiFi7 AP
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-03-26 07:42:03 +01:00
John Crispin
caee55a61f hostapd: correctly set the sta->psk_id on 6G band
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-26 07:40:55 +01:00
John Crispin
502727ad6d qca-wifi7: add DVLAN multicast too unicast workaround
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 11:56:50 +01:00
Venkat Chimata
1868e369d3 WIFI-14489: Adding Edgecore OAP103 to the list of supported APs
1. Integrated WiFi boarddata
2. Integrated LEDs
3. sysupgrade changes are integrated
4. Network ports are enumerated
5. A new profile is added under profiles

Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2025-03-24 11:56:34 +01:00
John Crispin
5a597c912d ipq807x/hostapd: merge missing e-mspk sta/psk index patch
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 10:47:05 +01:00
John Crispin
82ae3766fa ucentral-schema: update to latest HEAD
d183922 WIFI-14477: Get switch carrier, speed & duplex info from swconfig command

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 10:08:24 +01:00
John Crispin
d250f91bb3 ipq95xx: drop ATH12.3 support
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 08:11:43 +01:00
John Crispin
76d112144f ucentral-client: update version.json to 4.0.0
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 08:11:14 +01:00
John Crispin
d218c15419 ucentral-schema: update to latest HEAD
c2338ad snmp: fix schema/yaml syntax
50c4ead set schema version to 4.0.0
d8260f8 add property that allows disabling MPSK

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 08:09:40 +01:00
John Crispin
2bf2093305 github/workflow: re-enable CIG WF189
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 08:05:59 +01:00
John Crispin
c548edfe89 qca-wifi-7: update CIG WF189 BDF files
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 07:37:39 +01:00
John Crispin
82a6e24e91 qca-wifi-7: add RTK phy fixes from CIG
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 07:36:09 +01:00
Wingate Chi
c0e6b523c4 WIFI-14488 RAP7110C-341X enable PWM LED config.
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-03-24 07:30:25 +01:00
steven.lin
195fc01d06 mediatek: Add SENAO IAP2300M model
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-03-24 07:29:55 +01:00
John Crispin
19959d016b ucentral-schema: update to latest HEAD
5a39d23 remove beacon-interval option

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-24 07:28:40 +01:00
John Crispin
03b34b062e ucentral-schema: update to latest HEAD
1c11c1b WIFI-14284: Use swconfig to get the correct port to VLAN ID mapping for statistics

Fixes: WIFI-14284
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-17 12:09:37 +01:00
Wingate Chi
076bc0712e ipq807x_v5.4: change RAP630W-312G and RAP63XC vendor name
Fixes: WIFI-14471
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-03-14 10:55:22 +01:00
John Crispin
486cc7983a qca-wifi-7: re-enable CIG wf189 support
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-14 08:41:43 +01:00
John Crispin
80343e9dad dropbear: update to upstream version
Fixes: WIFI-14466
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-14 08:40:51 +01:00
steven.lin
dd14c1c6d1 mediatek: Add SENAO models into mount_certs scripts
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-03-14 08:06:21 +01:00
John Crispin
71748f4cd4 ucentral-schema: update to latest HEAD
481fd77 WIFI-14472: JSON config should allow to set channels above 196 to support channels in 6G band

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-14 07:40:01 +01:00
Wingate Chi
49c51594a3 WIFI-14452 Fix Crash Observed on Cybertan rap7110c-341x with TIP dbdc168 image
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-03-14 07:35:49 +01:00
John Crispin
739b6b29b2 ucentral-schema: update to latest HEAD
d2ff805 Change realtime events type from enum to string
a518b02 schema, ssid: add mpsk-radius encryption

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-11 10:27:27 +01:00
John Crispin
7e393c4831 qca-wifi-7: add preliminary support for rap750w_311a
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-11 10:26:33 +01:00
Marek Kwaczynski
1149cd41aa ucentral: Add example for mpsk-radius config
Create example how to configure EMPSK with AAA using
new crypto method: mpsk-radius.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
18bb47be4d hostapd: mpskd: use mpsk from wireless config
In MPSK AAA need to use mpsk info to block scans
becasue keys are not configured.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
7847e1778e netifd: hostapd.sh add multi_psk param
Notification about enabling multi_psk for specific
wireless network.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
57735bcd18 hostapd: mpskd: fix checking addr in ssid_cache
Fix ucode syntax.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
376072ad97 hostapd: mpskd: minor: remove white spaces end of the line
Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:09:12 +01:00
Marek Kwaczynski
afa7e2bbb3 rrmd: scan: fix setting center_freq1 in params
Add casting center frequency to int, previosly was used
string.

{
	"dev": "wlan1",
	"wiphy_freq": "5180",
	"measurement_duration": "70",
	"center_freq1": "518030",
	"scan_ssids": [
		""
	],
	"scan_flags": 4
}

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:45 +01:00
Marek Kwaczynski
52f2e31892 rrmd: Update scanning for WiFi 7 devices
Update scan module to support WiFi 7 devices
which have virtual phys defined. Scanning on
the different virtual phys but on the same physical
phy isn't allowed.
Add NL CBs to notify about scanning progress.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:45 +01:00
Marek Kwaczynski
b791a723ca qca-wifi-7/mac80211: Add tip patch to fix scanning on WiFi 7 devices
Need to unblock chandef as scanning definitions which
is used by TIP modules for scanning trigger.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:45 +01:00
Marek Kwaczynski
a9e0e16a80 rrmd: phy: Use wiphy_name if exists
When wiphy_name is defined should be used instead of
creating name using wiphy index.

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:45 +01:00
Marek Kwaczynski
4d55d427d7 ucentral-event: fix null pointers checking in channel switch
Invalid logical operator was used for checking null
pointers in channel_switch function: AND instead OR

Fixes: 7477963b ("ucentral-event: add channel switch handler")

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-03-11 10:08:44 +01:00
John Crispin
53ff49eb6f Revert "ath11k: fix STA roaming between radios"
This reverts commit 7374c39dea.

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-07 09:38:38 +01:00
John Crispin
1a3c87cf35 .github/workflows: remove aercom ap72 from CI
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-07 09:38:07 +01:00
John Crispin
75df7bb794 ath12k-wifi: use SDK BDF for rap7110c_341x
Use the SDK BDF for now until the ODM provides a fixed version.

Signed-off-by: John Crispin <john@phrozen.org>
2025-03-07 09:36:52 +01:00
Tanya Singh
b61850ff18 WIFI-14462: hostapd_cli command missing from Wifi7 AP
Signed-off-by: Tanya Singh <tanya.singh@4ipnet.com>
2025-03-07 09:35:54 +01:00
Venkat Chimata
3738f5b884 mac80211: workaround: Send multicast frames as multiple unicast frames in DVLAN mode
Broadcast / Multciast transmission is not working in DVLAN mode in the driver.
If we send the frames as unicast frames, it works. This is a workaround for now.
Need to rollback once we add a clean fix.

Fixes: WIFI-14441
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
2025-03-04 06:51:45 +01:00
John Crispin
708895e7ae ucentral-schema: update to latest HEAD
39e380e enforce PMF for sae-mixed mode

Fixes: WIFI-14450
Signed-off-by: John Crispin <john@phrozen.org>
2025-03-03 15:40:27 +01:00
John Crispin
dbdc16804d ipq5322: update rap7110c_341x to ATH12.5.5
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 15:54:48 +01:00
John Crispin
98375061da .github/workflows/: disable wf189 until we have an updated BDF
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:53 +01:00
John Crispin
e3edb1fdd5 qca: drop ath12.4 support
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:53 +01:00
John Crispin
68cf54d9f7 qca-wifi-7: update to ath12.5.5
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:52 +01:00
John Crispin
28161aff6e ucentral-schema: update to latest HEAD
90aa0ee system: Fix the delta_counters for dynamic vlan stations

Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 09:47:06 +01:00
steven.lin
c2ea273bea WIFI-14432: Fix MAC address assignment on SENAO IAP4300M
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-02-27 09:43:32 +01:00
Tanya Singh
9d611028fd WIFI-14438: Fix LAN port issue in Edgecore EAP105
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-27 09:43:15 +01:00
steven.lin
24dbba4c5a WIFI-14424: Add SENAO models into auto build list
Signed-off-by: steven.lin <steven.lin@senao.com>
2025-02-12 13:31:42 +01:00
John Crispin
4c84a3dbdd mac80211/hostapd: more wifi bringup fixes
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-11 11:06:38 +01:00
John Crispin
664fa78572 hostapd: only enforce multiple bssid on 6G
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 17:10:15 +01:00
John Crispin
26e782627b rrmd: the daemon was crashing on wifi-7 devices.
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 12:05:45 +01:00
John Crispin
9105d688b9 mac80211: fix typo that caused device entry duplication
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-10 12:05:27 +01:00
Wingate Chi
a9694847cd WIFI-14410: Wifi7 driver with RAP7110C-341X support
Signed-off-by: Wingate Chi <wingate.chi@cybertan.com.tw>
2025-02-06 08:33:33 +01:00
Tanya Singh
426943c1c0 WIFI-14411: Fix typo in bootcount script for Edgecore EAP104
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:31:36 +01:00
John Crispin
6014103032 ucentral-schema: update to latest HEAD
Fixes: WIFI-14409
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:39 +01:00
John Crispin
56eee37052 iwinfo: move ucode based version into a feed
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:36 +01:00
Arif Alam
7374c39dea ath11k: fix STA roaming between radios
Fixes: WIFI-14396
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-02-06 08:22:35 +01:00
Tanya Singh
b77e80cf14 WIFI-14404: Enable dual boot support on EAP105 and certificate loading on dual boot for EAP104 and OAP101 series
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:22:35 +01:00
Tanya Singh
7544c1921b WIFI-14406: Fix MAC address assignment on Edgecore EAP105
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-02-06 08:22:35 +01:00
John Crispin
2d45944ba3 hostapd: add script support for acs_exclude_6ghz_non_psc
Fixes: WIFI-14187
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:34 +01:00
John Crispin
58d0932dee hostapd: fix ubus handler crash during teardown
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:34 +01:00
John Crispin
4f0f25ad05 hostapd: improve multi radio ACS
Fixes: WIFI-14402
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:33 +01:00
John Crispin
b74f824b3a mac80211: multiple_bssid is mandatory on 6e when using 11be
Fixes: WIFI-14343
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-06 08:22:32 +01:00
John Crispin
3e7fd62fc2 hostapd: fix wifi-7 e-mpsk
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 14:26:00 +01:00
John Crispin
4050db8ed6 ipq53xx: disable ujail
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 13:01:41 +01:00
John Crispin
8b5a449f6d ucentral-schema: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-03 11:43:33 +01:00
John Crispin
55e3e90513 ucode: fix none wifi-7 builds
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
Ken
0d1ea98328 WIFI-14357 WF189 enable dual image support on wifi7 platform
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-30 13:08:28 +01:00
John Crispin
aaaef76d7d ath12k: fix race condition when generating shadow config for wireless
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
4b09108f72 iwinfo: use new ucode based code for wifi-7
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
c02b5922d9 base-files: add ucidef_set_wireless_macaddr_base()
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
9d54cda767 ipq53xx: fix ethernet link issues
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
1f10af2355 base-files: do not generate default interfaces on firstboot
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
0df07d514e ipq53xx: fix cig wf189 eth MAC addr assignment
Fixes: WIFI-14313
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:28 +01:00
John Crispin
9587fb3fee only build new ATH12.4 images
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-30 13:08:27 +01:00
John Crispin
4d4d356c1f qcom: fixes
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
64b1f96721 ucentral-schema: update to latest HEAD
61e5802 add multi radio support

Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
f3f070acb1 unetd: do not build on wifi-7 AP
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
aa909d9ab8 ucentral-event: fix phy name splitting
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
1de1426a80 kernel-6.1: add checksums
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
8279bae9db ucode: add multi-radio support
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
3554480103 ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
John Crispin
e4b535f6cb ath12.4-cs1: update to latest SDK
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-27 07:02:57 +01:00
Ken
ed7e047514 WIFI-14371 WF660A reset button for 5.4 kernel
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-27 07:00:38 +01:00
wingate5678
7ced0ea2cc WIFI-14350 add platfrom into auto build list
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 07:00:05 +01:00
wingate5678
a3a957f688 WIFI-14350 RAP630W-311G fix wifi data memory region
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 07:00:05 +01:00
wingate5678
afcaa6dea2 WIFI-14348 RAP630W-312G fix interface mdio bus assign error
Signed-off-by: wingate5678 <wingate.chi@cybertan.com.tw>
2025-01-27 06:59:44 +01:00
Tanya Singh
605406e191 WIFI-14170: Update BDF for Edgecore EAP104
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-01-27 06:59:20 +01:00
Jaspreet Sachdev
d639c02ec1 Reverting to ubuntu-22.04
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2025-01-06 10:50:33 -05:00
Jaspreet Sachdev
cf45b65214 Fix the docker removal of images
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2025-01-06 10:32:52 -05:00
John Crispin
258c26e7e6 ipq60xx: disable sdhci LEDs
Fixes: WIFI-14340
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-06 11:49:40 +01:00
John Crispin
ed4f03a1a9 ipq60xx: make LEDs work on CIG WF660
Signed-off-by: John Crispin <john@phrozen.org>
2025-01-06 11:38:59 +01:00
Marek Kwaczynski
7477963b1f ucentral-event: add channel switch handler
Add channel switch handler to update hapd object
with new frequency and channel info.

Fixes: WIFI-14336

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-01-06 11:02:08 +01:00
Tanya Singh
1cf48ae6d9 mediatek: Set GPIO pins to reset the LTE module on Edgecore EAP112
Fixes: WIFI-14098
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-01-06 11:01:34 +01:00
Firas Shaari
77144209e9 ucentral-schema: Fix typo qos.json
"bandwidth_up", and "bandwidth_down" had typos. The correct attributes are
"bandwidth-up", and "bandwidth-down"

Signed-off-by: Firas Shaari <firas.shaari@shaariconsultancy.com>
2025-01-06 11:00:46 +01:00
Ken
71315b140a ipq807x: WF188n/WF196 dual image support
Fixes: WIFI-14339
Signed-off-by: Ken <xshi@actiontec.com>
2025-01-06 10:59:16 +01:00
Jaspreet Sachdev
8332ba86e1 Removed WallysTech target builds
Signed-off-by: Jaspreet Sachdev <jaspreet.sachdev@kinarasystems.com>
2024-12-30 18:03:21 -05:00
John Crispin
6a94323a59 udevmand: update to latest HEAD
be0f45e udevmand: fix segmentation fault during deinit

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-19 06:49:31 +01:00
John Crispin
3d43f4fc95 Revert "mediatek-sdk: update SDK to mp2.3 final"
This reverts commit 5f1d562f61.

Signed-off-by: John Crispin <john@phrozen.org>
2024-12-19 06:42:47 +01:00
Tanya Singh
ee80309fc3 mediatek: Fix MAC assignment for eth ports on Edgecore EAP112
Fixes: WIFI-14319
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2024-12-12 08:40:45 +01:00
8962 changed files with 419704 additions and 1315028 deletions

View File

@@ -15,21 +15,20 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
x64_vm_image_name: ${{ steps.package_and_upload_image.outputs.x64_vm_image_name }}
strategy:
fail-fast: false
matrix:
target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf196', 'cig_wf189', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'cybertan_rap63xc-211g','sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'sercomm_ap72tip', 'udaya_a6-id2', 'udaya_a6-od2', 'wallys_dr5018', 'wallys_dr6018', 'wallys_dr6018-v4', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
target: [ 'cig_wf189h', 'cig_wf189w', 'cig_wf660a', 'cig_wf672', 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf189', 'cig_wf196', 'cig_wf196', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'sonicfi_rap630w-312g', 'sonicfi_rap63xc-211g', 'sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'sonicfi_rap650c', 'sonicfi_rap7110c-341x', 'sonicfi_rap750e-h', 'sonicfi_rap750e-s', 'sonicfi_rap750w-311a', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'edgecore_oap103', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'senao_iap4300m', 'senao_iap2300m', 'senao_jeap6500', 'udaya_a6-id2', 'udaya_a6-od2', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655', 'emplus_wap588m', 'zyxel_nwa130be', 'sercomm_ap72tip-v4' ]
steps:
- uses: actions/checkout@v3
# Clean unnecessary files to save disk space
- name: clean unncessary files to save space
run: |
docker rmi `docker images -q`
docker rmi `docker images -q` || true
- name: Build image for ${{ matrix.target }}
id: build
@@ -81,7 +80,7 @@ jobs:
fi
trigger-testing:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
@@ -94,7 +93,7 @@ jobs:
client-payload: '{"ref": "${GITHUB_REF#refs/tags/}", "sha": "${{ github.sha }}"}'
create-x64_vm-ami:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:

View File

@@ -6,7 +6,8 @@ boot() {
. /lib/functions/system.sh
case $(board_name) in
edgecore,eap102|\
edgecore,oap102)
edgecore,oap102|\
edgecore,oap103)
echo 54 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio54/direction
echo 0 > /sys/class/gpio/gpio54/value

View File

@@ -117,8 +117,6 @@ hostapd_common_add_device_config() {
config_add_boolean legacy_rates
config_add_int cell_density
config_add_int rts_threshold
config_add_int rssi_reject_assoc_rssi
config_add_int rssi_ignore_probe_request
config_add_int maxassoc
config_add_boolean maxassoc_ignore_probe
@@ -162,7 +160,7 @@ hostapd_prepare_device_config() {
json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \
rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \
rts_threshold beacon_rate maxassoc \
multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \
maxassoc_ignore_probe band
@@ -261,8 +259,6 @@ hostapd_prepare_device_config() {
hostapd_add_rate brlist "$br"
done
[ -n "$rssi_reject_assoc_rssi" ] && append base_cfg "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N"
[ -n "$rssi_ignore_probe_request" ] && append base_cfg "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N"
[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N"
[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N"
[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N"
@@ -471,6 +467,9 @@ hostapd_common_add_bss_config() {
config_add_string uci_section
config_add_boolean dynamic_probe_resp
config_add_int rssi_reject_assoc_rssi
config_add_int rssi_ignore_probe_request
}
hostapd_set_vlan_file() {
@@ -724,7 +723,8 @@ hostapd_set_bss_options() {
airtime_bss_weight airtime_bss_limit airtime_sta_weight \
multicast_to_unicast_all proxy_arp per_sta_vif \
eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \
vendor_elements fils uci_section dynamic_probe_resp
vendor_elements fils uci_section dynamic_probe_resp \
rssi_reject_assoc_rssi rssi_ignore_probe_request
set_default fils 0
set_default isolate 0
@@ -778,6 +778,8 @@ hostapd_set_bss_options() {
append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"
append bss_conf "utf8_ssid=$utf8_ssid" "$N"
append bss_conf "multi_ap=$multi_ap" "$N"
[ -n "$rssi_reject_assoc_rssi" ] && append bss_conf "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N"
[ -n "$rssi_ignore_probe_request" ] && append bss_conf "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N"
[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N"
[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N"

View File

@@ -0,0 +1,14 @@
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -934,8 +934,10 @@ void handle_probe_req(struct hostapd_dat
int ubus_response;
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
- ssi_signal < hapd->iconf->rssi_ignore_probe_request)
+ ssi_signal < hapd->iconf->rssi_ignore_probe_request) {
+ hostapd_ubus_notify_rssi(hapd, "rssi-ignore-probe", mgmt->sa, ssi_signal);
return;
+ }
if (len < IEEE80211_HDRLEN)
return;

View File

@@ -0,0 +1,46 @@
Index: hostapd-2023-09-08-e5ccbfc6/src/ap/wpa_auth_ft.c
===================================================================
--- hostapd-2023-09-08-e5ccbfc6.orig/src/ap/wpa_auth_ft.c
+++ hostapd-2023-09-08-e5ccbfc6/src/ap/wpa_auth_ft.c
@@ -3293,6 +3297,8 @@ static int wpa_ft_process_auth_req(struc
size_t identity_len = 0, radius_cui_len = 0;
size_t pmk_r1_len, kdk_len, len;
int retval = WLAN_STATUS_UNSPECIFIED_FAILURE;
+ struct os_reltime now;
+ struct rsn_ftie *ftie;
*resp_ies = NULL;
*resp_ies_len = 0;
@@ -3324,6 +3330,9 @@ static int wpa_ft_process_auth_req(struc
goto out;
}
+ ftie = (struct rsn_ftie *) parse.ftie;
+ os_memcpy(sm->SNonce, ftie->snonce, WPA_NONCE_LEN);
+
if (parse.r0kh_id == NULL) {
wpa_printf(MSG_DEBUG, "FT: Invalid FTIE - no R0KH-ID");
retval = WLAN_STATUS_INVALID_FTIE;
@@ -3424,10 +3433,18 @@ pmk_r1_derived:
os_memcpy(sm->pmk_r1, pmk_r1, pmk_r1_len);
sm->pmk_r1_len = pmk_r1_len;
- if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) {
- wpa_printf(MSG_DEBUG, "FT: Failed to get random data for "
- "ANonce");
- goto out;
+ if (os_get_reltime(&now) < 0 ||
+ os_reltime_expired(&now, &sm->ANonce_time, 1)) {
+ if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) {
+ wpa_printf(MSG_DEBUG, "FT: Failed to get random data for "
+ "ANonce");
+ return WLAN_STATUS_UNSPECIFIED_FAILURE;
+ }
+ sm->ANonce_time.sec = now.sec;
+ sm->ANonce_time.usec = now.usec;
+ wpa_printf(MSG_INFO, "FT: ANonce was randomized");
+ } else {
+ wpa_printf(MSG_INFO, "FT: ANonce has not expired");
}
/* Now that we know the correct PMK-R1 length and as such, the length

View File

@@ -1944,6 +1944,21 @@ void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
}
void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi)
{
if (!hapd->ubus.obj.has_subscribers)
return;
if (!addr)
return;
blob_buf_init(&b, 0);
blobmsg_add_macaddr(&b, "address", addr);
blobmsg_add_u32(&b, "rssi", rssi);
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
}
void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq)
{
if (!hapd->ubus.obj.has_subscribers)

View File

@@ -56,6 +56,7 @@ void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd,
size_t len);
void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency,
int chan_width, int cf1, int cf2);
void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi);
void hostapd_ubus_notify_bss_transition_response(
struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code,

View File

@@ -32,7 +32,6 @@ ALLWIFIBOARDS:= \
cybertan-eww622-a1 \
cybertan-eww631-a1 \
cybertan-eww631-b1 \
cybertan-rap630w-312g \
edgecore-eap101 \
gl-ax1800 \
gl-axt1800 \
@@ -40,7 +39,12 @@ ALLWIFIBOARDS:= \
sercomm-wallaby \
edgecore-eap102 \
edgecore-oap102 \
edgecore-oap103 \
edgecore-eap104 \
emplus-wap380c \
emplus-wap385c \
emplus-wap386v2 \
emplus-wap581 \
liteon-wpx8324 \
indio-um-310ax-v1 \
indio-um-510axp-v1 \
@@ -52,6 +56,9 @@ ALLWIFIBOARDS:= \
wallys-dr6018-v4 \
sonicfi-rap630c-311g \
sonicfi-rap630w-311g \
sonicfi-rap630w-312g \
sonicfi-rap650c \
sonicfi-rap630e \
tplink-ex227 \
tplink-ex447 \
yuncore-ax840 \
@@ -394,20 +401,27 @@ $(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww622-a1,CyberTan EWW622 A1))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww631-a1,CyberTan EWW631 A1))
$(eval $(call generate-ath11k-wifi-package,cybertan-eww631-b1,CyberTan EWW631 B1))
$(eval $(call generate-ath11k-wifi-package,cybertan-rap630w-312g,CyberTan RAP630W 312G))
$(eval $(call generate-ath11k-wifi-package,sercomm-wallaby,Sercomm Kiwi))
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018,Wallys DR6018))
$(eval $(call generate-ath11k-wifi-package,wallys-dr6018-v4,Wallys DR6018 V4))
$(eval $(call generate-ath11k-wifi-package,edgecore-eap101,EdgeCore EAP101))
$(eval $(call generate-ath11k-wifi-package,edgecore-eap102,Edgecore EAP102))
$(eval $(call generate-ath11k-wifi-package,edgecore-oap102,Edgecore OAP102))
$(eval $(call generate-ath11k-wifi-package,edgecore-oap103,Edgecore OAP103))
$(eval $(call generate-ath11k-wifi-package,edgecore-eap104,Edgecore EAP104))
$(eval $(call generate-ath11k-wifi-package,emplus-wap380c,Emplus WAP380C))
$(eval $(call generate-ath11k-wifi-package,emplus-wap385c,Emplus WAP385C))
$(eval $(call generate-ath11k-wifi-package,emplus-wap386v2,Emplus WAP386 V2))
$(eval $(call generate-ath11k-wifi-package,emplus-wap581,Emplus WAP581))
$(eval $(call generate-ath11k-wifi-package,liteon-wpx8324,Liteon WPX8324))
$(eval $(call generate-ath11k-wifi-package,indio-um-310ax-v1,Indio UM-310AX V1))
$(eval $(call generate-ath11k-wifi-package,indio-um-510axp-v1,Indio UM-510AXP V1))
$(eval $(call generate-ath11k-wifi-package,indio-um-510axm-v1,Indio UM-510AXM V1))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630c-311g,Sonicfi RAP630C 311G))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630w-311g,Sonicfi RAP630W 311G))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630w-312g,Sonicfi RAP630W 312G))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap650c,SonicFi RAP650C))
$(eval $(call generate-ath11k-wifi-package,sonicfi-rap630e,SonicFi RAP630E))
$(eval $(call generate-ath11k-wifi-package,tplink-ex227,TP-Link EX227))
$(eval $(call generate-ath11k-wifi-package,tplink-ex447,TP-Link EX447))
$(eval $(call generate-ath11k-wifi-package,yuncore-ax840,YunCore AX840))

View File

@@ -18,9 +18,11 @@ start() {
[ "$enabled" -gt 0 ] || return 1
case "$board" in
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g)
service_start /usr/sbin/cooling
sonicfi,rap630c-311g)
service_start /usr/sbin/cooling -c /etc/cooling/sonicfi-rap630c-311g-cooling.conf
;;
sonicfi,rap630w-311g)
service_start /usr/sbin/cooling -c /etc/cooling/sonicfi-rap630w-311g-cooling.conf
;;
esac

View File

@@ -28,143 +28,270 @@
#define CUR_STATE_PATH "/sys/devices/virtual/thermal/cooling_device%i/cur_state"
#define TEMPER_PATH "/sys/devices/virtual/thermal/thermal_zone%i/temp"
#define CPU_FREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/%s"
#define PATH_MAX 256
#define BUF_MAX 8
#define THERSHOLD_MAX 20
#define BUF_MAX 32
#define PHY0 0
#define PHY1 1
#define NUM_VALUES 4
int load_config_file=0;
//#define ULOG_INFO(fmt, ...) ulog(LOG_INFO, fmt, ## __VA_ARGS__)
typedef unsigned char u8;
typedef unsigned long u32;
u8 w2g_threshold_level=0;
u8 w5g_threshold_level=0;
u8 w2g_cur_temper=0;
u8 w5g_cur_temper=0;
u32 level_cpu_freq=1008000;
/* default value of wifi thresholds*/
#ifdef PLATFORM_RAP630C_311G
u8 level_2g_lo[4]={0, 105, 110, 115};
u8 level_2g_hi[4]={105, 110, 115, 120};
u8 level_2g_limit[4]={0, 35, 50, 70};
u8 level_5g_lo[4]={0, 105, 110, 115};
u8 level_5g_hi[4]={105, 110, 115, 120};
u8 level_5g_limit[4]={0, 20, 30, 50};
u8 level_2g_high[4]={105, 110, 115, 120};
u8 level_2g_low[4]={0, 105, 110, 115};
u8 level_2g_mitigation[4]={0, 35, 50, 70};
u8 level_5g_high[4]={105, 110, 115, 120};
u8 level_5g_low[4]={0, 105, 110, 115};
u8 level_5g_mitigation[4]={0, 20, 30, 50};
u32 level_cpu_frequency[4]={1008000, 800000, 800000, 800000};
#endif
#ifdef PLATFORM_RAP630W_311G
u8 level_2g_lo[4]={0, 105, 110, 115};
u8 level_2g_hi[4]={105, 110, 115, 120};
u8 level_2g_limit[4]={0, 20, 50, 70};
u8 level_5g_lo[4]={0, 105, 110, 115};
u8 level_5g_hi[4]={105, 110, 115, 120};
u8 level_5g_limit[4]={0, 20, 50, 70};
u8 level_2g_high[4]={105, 110, 115, 120};
u8 level_2g_low[4]={0, 105, 110, 115};
u8 level_2g_mitigation[4]={0, 20, 50, 70};
u8 level_5g_high[4]={105, 110, 115, 120};
u8 level_5g_low[4]={0, 105, 110, 115};
u8 level_5g_mitigation[4]={0, 20, 50, 70};
u32 level_cpu_frequency[4]={1008000, 800000, 800000, 800000};
#endif
static char *config_file = NULL;
char temp[4][BUF_MAX];
#define ULOG_DBG(fmt, ...) ulog(LOG_DEBUG, fmt, ## __VA_ARGS__)
typedef struct {
int thresholds_high[NUM_VALUES];
int thresholds_low[NUM_VALUES];
int mitigation[NUM_VALUES];
int cpu_freq[NUM_VALUES];
} WifiConfig;
static void write_cur_state (char *filename, int state) {
WifiConfig wifi2g = {0}, wifi5g = {0};
static void set_cpu_freq (int freq) {
FILE * fp;
char filename[PATH_MAX];
snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "scaling_governor");
fp = fopen(filename, "w");
if (!fp) {
ULOG_ERR("open scaling_governor error\n");
}
fprintf(fp, "%s", "userspace");
fclose(fp);
snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "scaling_setspeed");
fp = fopen(filename, "w");
if (!fp) {
ULOG_ERR("open scaling_setspeed error\n");
}
fprintf(fp, "%d", freq);
fclose(fp);
}
void parse_line(const char* line, const char* key, int* array) {
char label[64];
int values[NUM_VALUES];
int i;
if (sscanf(line, "%s %d %d %d %d %d", label, &values[0], &values[1], &values[2], &values[3], &values[4]) == 5) {
for (i = 0; i < NUM_VALUES; ++i) {
array[i] = values[i];
}
}
}
int load_config() {
FILE * fp = fopen(config_file, "r");
if (!fp) {
ULOG_ERR("open config file error\n");
return 1;
}
WifiConfig* current_config = NULL;
char line[256];
while (fgets(line, sizeof(line), fp)) {
if (strstr(line, "[wifi2g]")) {
current_config = &wifi2g;
} else if (strstr(line, "[wifi5g]")) {
current_config = &wifi5g;
} else if (current_config) {
if (strstr(line, "thresholds_high")) {
parse_line(line, "thresholds_high", current_config->thresholds_high);
} else if (strstr(line, "thresholds_low")) {
parse_line(line, "thresholds_low", current_config->thresholds_low);
} else if (strstr(line, "mitigation")) {
parse_line(line, "mitigation", current_config->mitigation);
} else if (strstr(line, "CPU_freq")) {
parse_line(line, "CPU_freq", current_config->cpu_freq);
}
}
}
fclose(fp);
set_cpu_freq(wifi5g.cpu_freq[0]);
return 0;
}
int load_default_config(){
int i=0;
set_cpu_freq(1008000);
for (i = 0; i < NUM_VALUES; i++) {
wifi2g.thresholds_high[i]=level_2g_high[i];
wifi2g.thresholds_low[i]=level_2g_low[i];
wifi2g.mitigation[i]=level_2g_mitigation[i];
wifi2g.cpu_freq[i]=level_cpu_frequency[i];
wifi5g.thresholds_high[i]=level_5g_high[i];
wifi5g.thresholds_low[i]=level_5g_low[i];
wifi5g.mitigation[i]=level_5g_mitigation[i];
wifi5g.cpu_freq[i]=level_cpu_frequency[i];
}
return 0;
}
static void write_cur_state (const char *filename, int state) {
FILE * fp;
ULOG_DBG("write_cur_state filename=[%s] [%d]\n", filename, state);
fp = fopen(filename, "w");
if (!fp){
ULOG_ERR("some kind of error write cur_state\n");
ULOG_ERR("open %s file error\n",filename);
}
fprintf(fp, "%d", state);
fclose(fp);
}
static void read_cur_state (char *filename, char *buffer) {
FILE * fp;
int read_cur_state(const char *filename, char *buf, size_t buffer) {
FILE *fp;
fp = fopen(filename, "r");
if (!fp){
ULOG_ERR("some kind of error write cur_state\n");
if (!fp) {
ULOG_ERR("open %s file error\n",filename);
return -1;
}
if (0 == fread(buffer, sizeof(char), 3, fp)) {
ULOG_ERR("some kind of error read value\n");
if (!fgets(buf, buffer, fp)) {
ULOG_ERR("Failed to read %s file\n", filename);
fclose(fp);
return -1;
}
fclose(fp);
return 0;
}
static void wifi_get_temperature() {
char filename[PATH_MAX];
FILE * fp;
int i = 0;
char buffer[BUF_MAX];
int i = 0;
// ULOG_INFO("=================================\n");
/* read cpuinfo_cur_freq*/
snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "cpuinfo_cur_freq");
memset(buffer, 0, BUF_MAX);
read_cur_state(filename, buffer, sizeof(buffer));
// ULOG_INFO("CPU current frequency: %s\n", buffer);
/* get current phy cooling state*/
for (i=0 ; i <= 1; i++ ) {
for (i=0; i <= 1; i++) {
memset(buffer, 0, BUF_MAX);
snprintf(filename, PATH_MAX, CUR_STATE_PATH, i);
read_cur_state(filename, buffer);
ULOG_DBG("read from Phy%i cur_state is %s\n", i, buffer);
read_cur_state(filename, buffer, sizeof(buffer));
// ULOG_INFO("Phy%i cur_state is: %s\n", i, buffer);
}
for (i=0 ; i <= 3; i++ ) {
for (i=0; i <= 3; i++) {
memset(buffer, 0, BUF_MAX);
snprintf(filename, PATH_MAX, TEMPER_PATH, i);
fp = fopen(filename, "r");
if (!fp) {
ULOG_ERR("some kind of error open value\n");
}
memset(temp[i], 0, BUF_MAX);
if (0 == fread(temp[i], sizeof(char), 3, fp)) {
ULOG_ERR("some kind of error read value\n");
}
fclose(fp);
ULOG_DBG("thermal_zone%i cur_temp is %s\n", i, temp[i]);
read_cur_state(filename, buffer, sizeof(buffer));
// ULOG_INFO("thermal_zone%i cur_temp is: %s\n", i, buffer);
if (i == 0)
w2g_cur_temper=atoi(buffer);
else if (i == 3)
w5g_cur_temper=atoi(buffer);
}
w2g_cur_temper=atoi(temp[0]);
w5g_cur_temper=atoi(temp[3]);
if (w5g_cur_temper >= 120)
{
ULOG_ERR("!! Temperature is over %d degree, system will reboot\n", w5g_cur_temper);
sync();
if ( -1 != system("reboot &") ){
printf("sysyem reboot...\n");
}
}
}
static void wifi_set_cooling() {
char filename[PATH_MAX];
int level;
for (level=0 ; level<=3 ; level++) {
if (w2g_cur_temper >= level_2g_lo[level] && w2g_cur_temper < level_2g_hi[level]) {
ULOG_DBG("2G at level %d , %d degree\n" ,level, w2g_cur_temper);
for (level = 0; level <= 3; level++) {
if (w2g_cur_temper >= wifi2g.thresholds_low[level] && w2g_cur_temper < wifi2g.thresholds_high[level]) {
// ULOG_INFO("2G at level %d , %d degree\n" ,level, w2g_cur_temper);
if (w2g_threshold_level != level) {
ULOG_DBG("setting 2G reduce %d percent\n" ,level_2g_limit[level]);
// ULOG_INFO("setting 2G reduce %d percent\n" ,wifi2g.mitigation[level]);
snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY0);
write_cur_state(filename, level_2g_limit[level]);
write_cur_state(filename, wifi2g.mitigation[level]);
w2g_threshold_level = level;
}
}
if (w5g_cur_temper >= level_5g_lo[level] && w5g_cur_temper < level_5g_hi[level]) {
ULOG_DBG("5G at level %d , %d degree\n" ,level, w5g_cur_temper);
if (w5g_cur_temper >= wifi5g.thresholds_low[level] && w5g_cur_temper < wifi5g.thresholds_high[level]) {
// ULOG_INFO("5G at level %d , %d degree\n" ,level, w5g_cur_temper);
if (w5g_threshold_level != level) {
ULOG_DBG("setting 5G reduce %d percent\n" ,level_5g_limit[level]);
// ULOG_INFO("setting 5G reduce %d percent\n" ,wifi5g.mitigation[level]);
snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY1);
write_cur_state(filename, level_5g_limit[level]);
write_cur_state(filename, wifi5g.mitigation[level]);
w5g_threshold_level = level;
set_cpu_freq(wifi5g.cpu_freq[level]);
}
}
}
}
static void cooling_init() {
char filename[256];
int i;
char filename[PATH_MAX];
int i,result=0;
for (i=0 ; i <= 1; i++) {
snprintf(filename, PATH_MAX, CUR_STATE_PATH, i);
write_cur_state(filename, 0);
}
if(load_config_file)
result = load_config();
if (result == 1 || load_config_file == 0)
load_default_config();
}
void print_usage(void)
{
printf("\nWifi-cooling daemon usage\n");
printf("Optional arguments:\n");
printf(" -c <file> config file\n");
printf(" -d debug output\n");
printf(" -c <file> setting with config file\n");
printf(" -d default setting\n");
printf(" -h this usage screen\n");
}
@@ -185,17 +312,18 @@ int main(int argc, char *argv[])
setpriority(PRIO_PROCESS, getpid(), -20);
ulog_open(ULOG_STDIO | ULOG_SYSLOG, LOG_DAEMON, "cooling");
ulog_threshold(LOG_INFO);
ulog_threshold(LOG_ERR);
// ulog_threshold(LOG_INFO);
while ((ch = getopt(argc, argv, "c:dh")) != -1) {
while ((ch = getopt(argc, argv, "c:dh")) != -1) {
switch (ch) {
case 'c':
printf("wifi-cooling load configuration file %s\n", optarg);
config_file = optarg;
load_config_file=1;
break;
case 'd':
printf("wifi-cooling ulog_threshold set to debug level\n");
ulog_threshold(LOG_DEBUG);
printf("wifi-cooling set to default value\n");
break;
case 'h':
default:
@@ -212,4 +340,4 @@ int main(int argc, char *argv[])
uloop_done();
return 0;
}
}

View File

@@ -1,15 +1,11 @@
sampling 5000
[wifi2g]
thresholds_high 105 110 115 120
thresholds_low 0 105 110 115
mitigation 0 35 50 70
CPU_freq 1008000 800000 800000 800000
[tsens_tz_sensor1]
sampling 5000
thresholds 105 110 115 119 120
thresholds_clr 0 100 105 110 115
actions cooling cooling cooling cooling shutdown
action_info 0 35 50 70 800000
[tsens_tz_sensor4]
sampling 5000
thresholds 105 110 115 119 120
thresholds_clr 0 100 105 110 115
actions cooling cooling cooling cooling shutdown
action_info 0 20 30 50 800000
[wifi5g]
thresholds_high 105 110 115 120
thresholds_low 0 105 110 115
mitigation 0 20 30 50
CPU_freq 1008000 800000 800000 800000

View File

@@ -1,15 +1,11 @@
sampling 5000
[wifi2g]
thresholds_high 105 110 115 120
thresholds_low 0 105 110 115
mitigation 0 20 50 70
CPU_freq 1008000 800000 800000 800000
[tsens_tz_sensor1]
sampling 5000
thresholds 105 115 119 125
thresholds_clr 0 105 110 120
actions cooling cooling cooling cooling
action_info 0 20 50 70
[tsens_tz_sensor4]
sampling 5000
thresholds 105 115 119 125
thresholds_clr 0 105 110 120
actions cooling cooling cooling cooling
action_info 0 20 50 70
[wifi5g]
thresholds_high 105 110 115 120
thresholds_low 0 105 110 115
mitigation 0 20 50 70
CPU_freq 1008000 800000 800000 800000

View File

@@ -117,8 +117,6 @@ hostapd_common_add_device_config() {
config_add_boolean legacy_rates
config_add_int cell_density
config_add_int rts_threshold
config_add_int rssi_reject_assoc_rssi
config_add_int rssi_ignore_probe_request
config_add_int maxassoc
config_add_boolean maxassoc_ignore_probe
@@ -162,7 +160,7 @@ hostapd_prepare_device_config() {
json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \
rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \
rts_threshold beacon_rate maxassoc \
multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \
maxassoc_ignore_probe band
@@ -261,8 +259,6 @@ hostapd_prepare_device_config() {
hostapd_add_rate brlist "$br"
done
[ -n "$rssi_reject_assoc_rssi" ] && append base_cfg "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N"
[ -n "$rssi_ignore_probe_request" ] && append base_cfg "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N"
[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N"
[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N"
[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N"
@@ -340,6 +336,7 @@ hostapd_common_add_bss_config() {
wpa_group_rekey wpa_pair_rekey wpa_master_rekey
config_add_boolean wpa_strict_rekey
config_add_boolean wpa_disable_eapol_key_retries
config_add_boolean multi_psk
config_add_boolean tdls_prohibit
@@ -471,6 +468,9 @@ hostapd_common_add_bss_config() {
config_add_string uci_section
config_add_boolean dynamic_probe_resp
config_add_int rssi_reject_assoc_rssi
config_add_int rssi_ignore_probe_request
}
hostapd_set_vlan_file() {
@@ -724,7 +724,8 @@ hostapd_set_bss_options() {
airtime_bss_weight airtime_bss_limit airtime_sta_weight \
multicast_to_unicast_all proxy_arp per_sta_vif \
eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \
vendor_elements fils uci_section dynamic_probe_resp
vendor_elements fils uci_section dynamic_probe_resp multi_psk \
rssi_reject_assoc_rssi rssi_ignore_probe_request
set_default fils 0
set_default isolate 0
@@ -737,6 +738,7 @@ hostapd_set_bss_options() {
set_default wmm 1
set_default uapsd 1
set_default wpa_disable_eapol_key_retries 0
set_default multi_psk $multi_psk
set_default tdls_prohibit 0
set_default eapol_version $((wpa & 1))
set_default acct_port 1813
@@ -778,6 +780,8 @@ hostapd_set_bss_options() {
append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"
append bss_conf "utf8_ssid=$utf8_ssid" "$N"
append bss_conf "multi_ap=$multi_ap" "$N"
[ -n "$rssi_reject_assoc_rssi" ] && append bss_conf "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N"
[ -n "$rssi_ignore_probe_request" ] && append bss_conf "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N"
[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N"
[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N"

View File

@@ -26,11 +26,12 @@ function event_cb_6g(req) {
return 0;
let ssid = iface.ssid;
if (!ssid || !length(ssids[ssid].keys))
if (!ssid || !ssids[ssid].mpsk)
return 0;
let ssid_cache = cache[ssid];
if (ssid_cache && ssid_cache[addr])
if (ssid_cache && addr in ssid_cache)
return 0;
if (req.type == 'probe') {
@@ -53,15 +54,15 @@ function event_cb(req) {
return 0;
let ssid = iface.ssid;
if (!ssid || !length(ssids[ssid].keys))
if (!ssid || !ssids[ssid].mpsk)
return 0;
let ssid_cache = cache[ssid];
if (ssid_cache && ssid_cache[addr])
if (ssid_cache && addr in ssid_cache)
return 0;
printf(`reply to ${req.type} on ${req.data.ifname} from ${addr} without 6G RNR\n`);
return 2;
return 2;
}
function create_6g_subscriber() {
@@ -143,6 +144,7 @@ function netifd_reload() {
push(ssid.interfaces, iface.ifname);
ssid.bands[band] = iface.ifname;
ssid.mpsk = ssid?.mpsk ? true : config.multi_psk;
for (let sta in iface.stations) {
let stacfg = sta.config;
@@ -174,6 +176,20 @@ function iface_ssid(ifname) {
return iface.ssid;
}
function is_ssid_mpsk(ifname) {
let ssid = iface_ssid(ifname);
if (!ssid)
return false;
if (!ssids[ssid])
return false;
if (!ssids[ssid]?.mpsk)
return false;
return ssids[ssid].mpsk;
}
function sta_cache_entry_get(ssid, addr) {
let ssid_cache = cache[ssid] ?? {};
@@ -295,12 +311,15 @@ function auth_cb(msg) {
printf(`Event ${msg.type}: ${msg.data}\n`);
switch (msg.type) {
case 'sta_auth':
if (!is_ssid_mpsk(data.iface))
return;
return {
psk: sta_auth_psk(data.iface, data.sta),
force_psk: true,
};
case 'sta_connected':
if (data.psk_idx == null)
if (data.psk_idx == null || !is_ssid_mpsk(data.iface))
return;
return sta_auth_cache(data.iface, data.sta, data.psk_idx, data.psk);
case 'reload':

View File

@@ -606,12 +606,13 @@
for (pw = hapd->conf->sae_passwords; pw; pw = pw->next) {
if (!is_broadcast_ether_addr(pw->peer_addr) &&
os_memcmp(pw->peer_addr, sta->addr, ETH_ALEN) != 0)
@@ -519,6 +525,31 @@ static const char * sae_get_password(str
@@ -519,6 +525,33 @@ static const char * sae_get_password(str
pt = hapd->conf->ssid.pt;
}
+use_sta_psk:
+ if (!password && sta) {
+ sta->psk_idx = 0;
+ for (psk = sta->psk; psk; psk = psk->next) {
+ if (!psk->is_passphrase)
+ continue;
@@ -620,6 +621,7 @@
+ if (!sta->use_sta_psk)
+ break;
+
+ sta->psk_idx = 1;
+ if (sta->sae_pt) {
+ pt = sta->sae_pt;
+ break;
@@ -638,7 +640,7 @@
if (pw_entry)
*pw_entry = pw;
if (s_pt)
@@ -3698,6 +3729,12 @@ static void handle_auth(struct hostapd_d
@@ -3698,6 +3731,12 @@ static void handle_auth(struct hostapd_d
goto fail;
}
@@ -686,15 +688,15 @@
char *radius_cui; /* Chargeable-User-Identity from RADIUS */
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -337,6 +337,7 @@ static const u8 * hostapd_wpa_auth_get_p
struct sta_info *sta = ap_get_sta(hapd, addr);
const u8 *psk;
@@ -355,6 +355,7 @@ static const u8 * hostapd_wpa_auth_get_p
}
#endif /* CONFIG_SAE */
+ sta->psk_idx = 0;
if (vlan_id)
*vlan_id = 0;
if (psk_len)
@@ -381,13 +382,18 @@ static const u8 * hostapd_wpa_auth_get_p
#ifdef CONFIG_OWE
if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) &&
sta && sta->owe_pmk) {
@@ -381,12 +382,17 @@ static const u8 * hostapd_wpa_auth_get_p
* returned psk which should not be returned again.
* logic list (all hostapd_get_psk; all sta->psk)
*/
@@ -702,28 +704,26 @@
+ psk = NULL;
if (sta && sta->psk && !psk) {
struct hostapd_sta_wpa_psk_short *pos;
+ int psk_idx;
+ int psk_idx = 1;
if (vlan_id)
*vlan_id = 0;
psk = sta->psk->psk;
+ sta->psk_idx = psk_idx = 1;
+ if (vlan_id)
+ sta->psk_idx = psk_idx;
for (pos = sta->psk; pos; pos = pos->next) {
+ psk_idx++;
if (pos->is_passphrase) {
pbkdf2_sha1(pos->passphrase,
hapd->conf->ssid.ssid,
@@ -396,10 +402,14 @@ static const u8 * hostapd_wpa_auth_get_p
pos->is_passphrase = 0;
@@ -397,9 +403,13 @@ static const u8 * hostapd_wpa_auth_get_p
}
if (pos->psk == prev_psk) {
+ sta->psk_idx = psk_idx;
psk = pos->next ? pos->next->psk : NULL;
+ if (vlan_id)
+ sta->psk_idx = psk_idx + 1;
break;
}
}
+
+ if (!psk)
+ if (vlan_id && !psk)
+ sta->psk_idx = 0;
}
return psk;

View File

@@ -0,0 +1,27 @@
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -1527,19 +1527,15 @@ int hostapd_setup_bss(struct hostapd_dat
if (x_snoop_init(hapd)) {
wpa_printf(MSG_ERROR,
"Generic snooping infrastructure initialization failed");
- return -1;
- }
-
- if (dhcp_snoop_init(hapd)) {
+ conf->proxy_arp = 0;
+ } else if (dhcp_snoop_init(hapd)) {
wpa_printf(MSG_ERROR,
"DHCP snooping initialization failed");
- return -1;
- }
-
- if (ndisc_snoop_init(hapd)) {
+ conf->proxy_arp = 0;
+ } else if (ndisc_snoop_init(hapd)) {
wpa_printf(MSG_ERROR,
"Neighbor Discovery snooping initialization failed");
- return -1;
+ conf->proxy_arp = 0;
}
}

View File

@@ -0,0 +1,411 @@
From: Jouni Malinen <quic_jouni@quicinc.com>
Date: Tue, 14 Feb 2023 11:29:30 +0200
Subject: [PATCH] FT: Store PMK-R0/PMK-R1 after EAPOL-Key msg 2/4 MIC
validation
hostapd was previously storing the derived PMK-R0 and PMK-R1 as soon as
these keys were derived. While that is fine for most purposes, it is
unnecessary to do that so quickly and if anything were to fail before
the supplicant is able to return a valid EAPOL-Key msg 2/4, there would
not really be any real use for the derived keys.
For the special case of FT-PSK and VLAN determination based on the
wpa_psk file, the VLAN information is set in the per-STA data structures
only after the EAPOL-Key msg 2/4 MIC has been verified. This ended up
storing the PMK-R0/PMK-R1 entries without correct VLAN assignment and as
such, any use of the FT protocol would not be able to transfer the VLAN
information through RRB.
Split local storing of the FT key hierarchy for the cases using the FT
4-way handshake so that PMK-R0 and PMK-R1 are first derived and then
stored as a separate step after having verified the MIC in the EAPOL-Key
msg 2/4 (i.e., after having confirmed the per-STA passphrase/PSK was
selected) and VLAN update. This fixes VLAN information for the
wpa_psk_file cases with FT-PSK.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
---
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -58,7 +58,9 @@ static int wpa_group_config_group_keys(s
struct wpa_group *group);
static int wpa_derive_ptk(struct wpa_state_machine *sm, const u8 *snonce,
const u8 *pmk, unsigned int pmk_len,
- struct wpa_ptk *ptk, int force_sha256);
+ struct wpa_ptk *ptk, int force_sha256,
+ u8 *pmk_r0, u8 *pmk_r1, u8 *pmk_r0_name,
+ size_t *key_len);
static void wpa_group_free(struct wpa_authenticator *wpa_auth,
struct wpa_group *group);
static void wpa_group_get(struct wpa_authenticator *wpa_auth,
@@ -940,6 +942,10 @@ static int wpa_try_alt_snonce(struct wpa
const u8 *pmk = NULL;
size_t pmk_len;
int vlan_id = 0;
+ u8 pmk_r0[PMK_LEN_MAX], pmk_r0_name[WPA_PMK_NAME_LEN];
+ u8 pmk_r1[PMK_LEN_MAX];
+ size_t key_len;
+ int ret = -1;
os_memset(&PTK, 0, sizeof(PTK));
for (;;) {
@@ -961,8 +967,8 @@ static int wpa_try_alt_snonce(struct wpa
pmk_len = sm->pmk_len;
}
- if (wpa_derive_ptk(sm, sm->alt_SNonce, pmk, pmk_len, &PTK, 0) <
- 0)
+ if (wpa_derive_ptk(sm, sm->alt_SNonce, pmk, pmk_len, &PTK, 0,
+ pmk_r0, pmk_r1, pmk_r0_name, &key_len) < 0)
break;
if (wpa_verify_key_mic(sm->wpa_key_mgmt, pmk_len, &PTK,
@@ -983,7 +989,7 @@ static int wpa_try_alt_snonce(struct wpa
if (!ok) {
wpa_printf(MSG_DEBUG,
"WPA: Earlier SNonce did not result in matching MIC");
- return -1;
+ goto fail;
}
wpa_printf(MSG_DEBUG,
@@ -992,14 +998,26 @@ static int wpa_try_alt_snonce(struct wpa
if (vlan_id && wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) &&
wpa_auth_update_vlan(sm->wpa_auth, sm->addr, vlan_id) < 0)
- return -1;
+ goto fail;
+
+#ifdef CONFIG_IEEE80211R_AP
+ if (wpa_key_mgmt_ft(sm->wpa_key_mgmt) && !sm->ft_completed) {
+ wpa_printf(MSG_DEBUG, "FT: Store PMK-R0/PMK-R1");
+ wpa_auth_ft_store_keys(sm, pmk_r0, pmk_r1, pmk_r0_name,
+ key_len);
+ }
+#endif /* CONFIG_IEEE80211R_AP */
os_memcpy(sm->SNonce, sm->alt_SNonce, WPA_NONCE_LEN);
os_memcpy(&sm->PTK, &PTK, sizeof(PTK));
forced_memzero(&PTK, sizeof(PTK));
sm->PTK_valid = true;
- return 0;
+ ret = 0;
+fail:
+ forced_memzero(pmk_r0, sizeof(pmk_r0));
+ forced_memzero(pmk_r1, sizeof(pmk_r1));
+ return ret;
}
@@ -2283,7 +2301,9 @@ SM_STATE(WPA_PTK, PTKSTART)
static int wpa_derive_ptk(struct wpa_state_machine *sm, const u8 *snonce,
const u8 *pmk, unsigned int pmk_len,
- struct wpa_ptk *ptk, int force_sha256)
+ struct wpa_ptk *ptk, int force_sha256,
+ u8 *pmk_r0, u8 *pmk_r1, u8 *pmk_r0_name,
+ size_t *key_len)
{
const u8 *z = NULL;
size_t z_len = 0, kdk_len;
@@ -2311,7 +2331,8 @@ static int wpa_derive_ptk(struct wpa_sta
sm->pairwise,
kdk_len);
}
- return wpa_auth_derive_ptk_ft(sm, ptk);
+ return wpa_auth_derive_ptk_ft(sm, ptk, pmk_r0, pmk_r1,
+ pmk_r0_name, key_len);
}
#endif /* CONFIG_IEEE80211R_AP */
@@ -2934,6 +2955,9 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
struct wpa_eapol_ie_parse kde;
int vlan_id = 0;
int owe_ptk_workaround = !!wpa_auth->conf.owe_ptk_workaround;
+ u8 pmk_r0[PMK_LEN_MAX], pmk_r0_name[WPA_PMK_NAME_LEN];
+ u8 pmk_r1[PMK_LEN_MAX];
+ size_t key_len;
SM_ENTRY_MA(WPA_PTK, PTKCALCNEGOTIATING, wpa_ptk);
sm->EAPOLKeyReceived = false;
@@ -2972,7 +2996,8 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
}
if (wpa_derive_ptk(sm, sm->SNonce, pmk, pmk_len, &PTK,
- owe_ptk_workaround == 2) < 0)
+ owe_ptk_workaround == 2, pmk_r0, pmk_r1,
+ pmk_r0_name, &key_len) < 0)
break;
if (mic_len &&
@@ -3021,7 +3046,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
sm->last_rx_eapol_key,
sm->last_rx_eapol_key_len);
sm->waiting_radius_psk = 1;
- return;
+ goto out;
}
if (!ok) {
@@ -3029,7 +3054,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
"invalid MIC in msg 2/4 of 4-Way Handshake");
if (psk_found)
wpa_auth_psk_failure_report(sm->wpa_auth, sm->addr);
- return;
+ goto out;
}
/*
@@ -3043,12 +3068,12 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
key_data_length = WPA_GET_BE16(mic + mic_len);
if (key_data_length > sm->last_rx_eapol_key_len - sizeof(*hdr) -
sizeof(*key) - mic_len - 2)
- return;
+ goto out;
if (wpa_parse_kde_ies(key_data, key_data_length, &kde) < 0) {
wpa_auth_vlogger(wpa_auth, sm->addr, LOGGER_INFO,
"received EAPOL-Key msg 2/4 with invalid Key Data contents");
- return;
+ goto out;
}
if (kde.rsn_ie) {
eapol_key_ie = kde.rsn_ie;
@@ -3075,7 +3100,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
/* MLME-DEAUTHENTICATE.request */
wpa_sta_disconnect(wpa_auth, sm->addr,
WLAN_REASON_PREV_AUTH_NOT_VALID);
- return;
+ goto out;
}
if ((!sm->rsnxe && kde.rsnxe) ||
(sm->rsnxe && !kde.rsnxe) ||
@@ -3091,7 +3116,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
/* MLME-DEAUTHENTICATE.request */
wpa_sta_disconnect(wpa_auth, sm->addr,
WLAN_REASON_PREV_AUTH_NOT_VALID);
- return;
+ goto out;
}
#ifdef CONFIG_OCV
if (wpa_auth_uses_ocv(sm)) {
@@ -3103,14 +3128,14 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
if (wpa_channel_info(wpa_auth, &ci) != 0) {
wpa_auth_logger(wpa_auth, sm->addr, LOGGER_INFO,
"Failed to get channel info to validate received OCI in EAPOL-Key 2/4");
- return;
+ goto out;
}
if (get_sta_tx_parameters(sm,
channel_width_to_int(ci.chanwidth),
ci.seg1_idx, &tx_chanwidth,
&tx_seg1_idx) < 0)
- return;
+ goto out;
res = ocv_verify_tx_params(kde.oci, kde.oci_len, &ci,
tx_chanwidth, tx_seg1_idx);
@@ -3127,7 +3152,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
OCV_FAILURE "addr=" MACSTR
" frame=eapol-key-m2 error=%s",
MAC2STR(sm->addr), ocv_errorstr);
- return;
+ goto out;
}
}
#endif /* CONFIG_OCV */
@@ -3135,7 +3160,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
if (ft && ft_check_msg_2_of_4(wpa_auth, sm, &kde) < 0) {
wpa_sta_disconnect(wpa_auth, sm->addr,
WLAN_REASON_PREV_AUTH_NOT_VALID);
- return;
+ goto out;
}
#endif /* CONFIG_IEEE80211R_AP */
#ifdef CONFIG_P2P
@@ -3171,7 +3196,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
"DPP: Peer indicated it supports PFS and local configuration allows this, but PFS was not negotiated for the association");
wpa_sta_disconnect(wpa_auth, sm->addr,
WLAN_REASON_PREV_AUTH_NOT_VALID);
- return;
+ goto out;
}
}
#endif /* CONFIG_DPP2 */
@@ -3191,7 +3216,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
sm->sup_pmk_r1_name, WPA_PMK_NAME_LEN);
wpa_hexdump(MSG_DEBUG, "FT: Derived PMKR1Name",
sm->pmk_r1_name, WPA_PMK_NAME_LEN);
- return;
+ goto out;
}
}
#endif /* CONFIG_IEEE80211R_AP */
@@ -3200,7 +3225,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
wpa_auth_update_vlan(wpa_auth, sm->addr, vlan_id) < 0) {
wpa_sta_disconnect(wpa_auth, sm->addr,
WLAN_REASON_PREV_AUTH_NOT_VALID);
- return;
+ goto out;
}
sm->pending_1_of_4_timeout = 0;
@@ -3216,9 +3241,20 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
sm->MICVerified = true;
+#ifdef CONFIG_IEEE80211R_AP
+ if (wpa_key_mgmt_ft(sm->wpa_key_mgmt) && !sm->ft_completed) {
+ wpa_printf(MSG_DEBUG, "FT: Store PMK-R0/PMK-R1");
+ wpa_auth_ft_store_keys(sm, pmk_r0, pmk_r1, pmk_r0_name,
+ key_len);
+ }
+#endif /* CONFIG_IEEE80211R_AP */
+
os_memcpy(&sm->PTK, &PTK, sizeof(PTK));
forced_memzero(&PTK, sizeof(PTK));
sm->PTK_valid = true;
+out:
+ forced_memzero(pmk_r0, sizeof(pmk_r0));
+ forced_memzero(pmk_r1, sizeof(pmk_r1));
}
--- a/src/ap/wpa_auth_ft.c
+++ b/src/ap/wpa_auth_ft.c
@@ -2175,13 +2175,13 @@ int wpa_ft_store_pmk_fils(struct wpa_sta
}
-int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, struct wpa_ptk *ptk)
+int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, struct wpa_ptk *ptk,
+ u8 *pmk_r0, u8 *pmk_r1, u8 *pmk_r0_name,
+ size_t *key_len)
{
- u8 pmk_r0[PMK_LEN_MAX], pmk_r0_name[WPA_PMK_NAME_LEN];
size_t pmk_r0_len = wpa_key_mgmt_sha384(sm->wpa_key_mgmt) ?
SHA384_MAC_LEN : PMK_LEN;
size_t pmk_r1_len = pmk_r0_len;
- u8 pmk_r1[PMK_LEN_MAX];
u8 ptk_name[WPA_PMK_NAME_LEN];
const u8 *mdid = sm->wpa_auth->conf.mobility_domain;
const u8 *r0kh = sm->wpa_auth->conf.r0_key_holder;
@@ -2189,13 +2189,6 @@ int wpa_auth_derive_ptk_ft(struct wpa_st
const u8 *r1kh = sm->wpa_auth->conf.r1_key_holder;
const u8 *ssid = sm->wpa_auth->conf.ssid;
size_t ssid_len = sm->wpa_auth->conf.ssid_len;
- int psk_local = sm->wpa_auth->conf.ft_psk_generate_local;
- int expires_in = sm->wpa_auth->conf.r0_key_lifetime;
- struct vlan_description vlan;
- struct rate_description rate;
- const u8 *identity, *radius_cui;
- size_t identity_len, radius_cui_len;
- int session_timeout;
const u8 *mpmk;
size_t mpmk_len;
@@ -2211,10 +2204,41 @@ int wpa_auth_derive_ptk_ft(struct wpa_st
return -1;
}
+ *key_len = pmk_r0_len;
+ if (wpa_derive_pmk_r0(mpmk, mpmk_len, ssid, ssid_len, mdid,
+ r0kh, r0kh_len, sm->addr,
+ pmk_r0, pmk_r0_name,
+ pmk_r0_len == SHA384_MAC_LEN) < 0 ||
+ wpa_derive_pmk_r1(pmk_r0, pmk_r0_len, pmk_r0_name, r1kh, sm->addr,
+ pmk_r1, sm->pmk_r1_name) < 0)
+ return -1;
+
+ return wpa_pmk_r1_to_ptk(pmk_r1, pmk_r1_len, sm->SNonce, sm->ANonce,
+ sm->addr, sm->wpa_auth->addr, sm->pmk_r1_name,
+ ptk, ptk_name, sm->wpa_key_mgmt, sm->pairwise,
+ 0);
+}
+
+
+void wpa_auth_ft_store_keys(struct wpa_state_machine *sm, const u8 *pmk_r0,
+ const u8 *pmk_r1, const u8 *pmk_r0_name,
+ size_t key_len)
+{
+ int psk_local = sm->wpa_auth->conf.ft_psk_generate_local;
+ int expires_in = sm->wpa_auth->conf.r0_key_lifetime;
+ struct vlan_description vlan;
+ struct rate_description rate;
+ const u8 *identity, *radius_cui;
+ size_t identity_len, radius_cui_len;
+ int session_timeout;
+
+ if (psk_local && wpa_key_mgmt_ft_psk(sm->wpa_key_mgmt))
+ return;
+
if (wpa_ft_get_vlan(sm->wpa_auth, sm->addr, &vlan) < 0) {
wpa_printf(MSG_DEBUG, "FT: vlan not available for STA " MACSTR,
MAC2STR(sm->addr));
- return -1;
+ return;
}
wpa_ft_get_rate_limit(sm->wpa_auth, sm->addr, &rate);
@@ -2224,32 +2248,16 @@ int wpa_auth_derive_ptk_ft(struct wpa_st
&radius_cui);
session_timeout = wpa_ft_get_session_timeout(sm->wpa_auth, sm->addr);
- if (wpa_derive_pmk_r0(mpmk, mpmk_len, ssid, ssid_len, mdid,
- r0kh, r0kh_len, sm->addr,
- pmk_r0, pmk_r0_name,
- wpa_key_mgmt_sha384(sm->wpa_key_mgmt)) < 0)
- return -1;
- if (!psk_local || !wpa_key_mgmt_ft_psk(sm->wpa_key_mgmt))
- wpa_ft_store_pmk_r0(sm->wpa_auth, sm->addr, pmk_r0, pmk_r0_len,
- pmk_r0_name,
- sm->pairwise, &vlan, expires_in,
- session_timeout, identity, identity_len,
- radius_cui, radius_cui_len, &rate);
-
- if (wpa_derive_pmk_r1(pmk_r0, pmk_r0_len, pmk_r0_name, r1kh, sm->addr,
- pmk_r1, sm->pmk_r1_name) < 0)
- return -1;
- if (!psk_local || !wpa_key_mgmt_ft_psk(sm->wpa_key_mgmt))
- wpa_ft_store_pmk_r1(sm->wpa_auth, sm->addr, pmk_r1, pmk_r1_len,
- sm->pmk_r1_name, sm->pairwise, &vlan,
- expires_in, session_timeout, identity,
- identity_len, radius_cui, radius_cui_len,
- &rate);
-
- return wpa_pmk_r1_to_ptk(pmk_r1, pmk_r1_len, sm->SNonce, sm->ANonce,
- sm->addr, sm->wpa_auth->addr, sm->pmk_r1_name,
- ptk, ptk_name, sm->wpa_key_mgmt, sm->pairwise,
- 0);
+ wpa_ft_store_pmk_r0(sm->wpa_auth, sm->addr, pmk_r0, key_len,
+ pmk_r0_name,
+ sm->pairwise, &vlan, expires_in,
+ session_timeout, identity, identity_len,
+ radius_cui, radius_cui_len, &rate);
+
+ wpa_ft_store_pmk_r1(sm->wpa_auth, sm->addr, pmk_r1, key_len,
+ sm->pmk_r1_name, sm->pairwise, &vlan,
+ expires_in, session_timeout, identity,
+ identity_len, radius_cui, radius_cui_len, &rate);
}
--- a/src/ap/wpa_auth_i.h
+++ b/src/ap/wpa_auth_i.h
@@ -302,7 +302,12 @@ int wpa_write_ftie(struct wpa_auth_confi
const u8 *anonce, const u8 *snonce,
u8 *buf, size_t len, const u8 *subelem,
size_t subelem_len, int rsnxe_used);
-int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, struct wpa_ptk *ptk);
+int wpa_auth_derive_ptk_ft(struct wpa_state_machine *sm, struct wpa_ptk *ptk,
+ u8 *pmk_r0, u8 *pmk_r1, u8 *pmk_r0_name,
+ size_t *key_len);
+void wpa_auth_ft_store_keys(struct wpa_state_machine *sm, const u8 *pmk_r0,
+ const u8 *pmk_r1, const u8 *pmk_r0_name,
+ size_t key_len);
struct wpa_ft_pmk_cache * wpa_ft_pmk_cache_init(void);
void wpa_ft_pmk_cache_deinit(struct wpa_ft_pmk_cache *cache);
void wpa_ft_install_ptk(struct wpa_state_machine *sm, int retry);

View File

@@ -0,0 +1,14 @@
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -934,8 +934,10 @@ void handle_probe_req(struct hostapd_dat
int ubus_response;
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
- ssi_signal < hapd->iconf->rssi_ignore_probe_request)
+ ssi_signal < hapd->iconf->rssi_ignore_probe_request) {
+ hostapd_ubus_notify_rssi(hapd, "rssi-ignore-probe", mgmt->sa, ssi_signal);
return;
+ }
if (len < IEEE80211_HDRLEN)
return;

View File

@@ -1944,6 +1944,21 @@ void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
}
void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi)
{
if (!hapd->ubus.obj.has_subscribers)
return;
if (!addr)
return;
blob_buf_init(&b, 0);
blobmsg_add_macaddr(&b, "address", addr);
blobmsg_add_u32(&b, "rssi", rssi);
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1);
}
void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq)
{
if (!hapd->ubus.obj.has_subscribers)

View File

@@ -56,6 +56,7 @@ void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd,
size_t len);
void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency,
int chan_width, int cf1, int cf2);
void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi);
void hostapd_ubus_notify_bss_transition_response(
struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code,

View File

@@ -24,7 +24,7 @@ cybertan,eww631-a1|\
cybertan,eww631-b1)
ucidef_set_led_default "power" "POWER" "sys:blue" "on"
;;
cybertan,rap630w-312g)
sonicfi,rap630w-312g)
ucidef_set_led_default "power" "POWER" "red:power" "on"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy1tpt"
@@ -33,6 +33,11 @@ sonicfi,rap630c-311g|\
sonicfi,rap630w-311g)
ucidef_set_led_default "power" "POWER" "pwm:blue" "on"
;;
sonicfi,rap630e)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy1tpt"
ucidef_set_led_default "power" "POWER" "green:power" "on"
;;
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
@@ -40,6 +45,11 @@ edgecore,oap101e-6e)
ucidef_set_led_netdev "wan" "wan" "red:ethernet" "eth1"
ucidef_set_led_default "power" "POWER" "blue:management" "on"
;;
emplus,wap385c)
ucidef_set_led_default "ledr" "LEDR" "sys:red" "on"
ucidef_set_led_default "ledg" "LEDG" "sys:green" "on"
ucidef_set_led_default "ledb" "LEDB" "sys:blue" "on"
;;
hfcl,ion4x_w|\
hfcl,ion4xi_w)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"

View File

@@ -13,10 +13,10 @@ qcom_setup_interfaces()
case $board in
cig,wf186w)
ucidef_add_switch "switch0" "4:wan" "0:lan" "1:lan" "2:lan" "3:lan" "6@eth0"
ucidef_add_switch "switch0" "4:wan" "0:lan" "1:lan" "2:lan" "3:lan" "6u@eth0"
;;
cig,wf186h)
ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "6@eth0"
ucidef_add_switch "switch0" "4:wan" "1:lan" "2:lan" "6u@eth0"
;;
sonicfi,rap630c-311g|\
cybertan,eww631-a1)
@@ -25,11 +25,7 @@ qcom_setup_interfaces()
;;
sonicfi,rap630w-311g|\
cybertan,eww631-b1)
ucidef_add_switch "switch1" "5:wan" "2:lan" "3:lan" "4:lan" "6@eth0"
;;
cybertan,rap630w-312g)
ucidef_add_switch "switch1" \
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
ucidef_add_switch "switch1" "5:wan" "2:lan" "3:lan" "4:lan" "6u@eth0"
;;
udaya,a6-id2)
ucidef_set_interface_wan "eth1"
@@ -50,8 +46,9 @@ qcom_setup_interfaces()
edgecore,eap104)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch1" \
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
"6u@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
;;
emplus,wap385c|\
hfcl,ion4x_w|\
hfcl,ion4xi_w)
ucidef_set_interface_wan "eth0"
@@ -63,12 +60,19 @@ qcom_setup_interfaces()
ucidef_set_interface_wan "eth0"
ucidef_set_interface_lan "eth1"
;;
sonicfi,rap630w-312g|\
yuncore,fap655)
ucidef_add_switch "switch1" \
"6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
"6u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
glinet,b3000)
ucidef_add_switch "switch1" "6@eth1" "1:wan" "2:lan" "3:lan"
ucidef_add_switch "switch1" "6u@eth1" "1:wan" "2:lan" "3:lan"
;;
sonicfi,rap630e)
ucidef_set_interface_wan "eth1"
ucidef_set_interface_lan "eth0"
emplus,wap581)
ucidef_set_interface_wan "eth0 eth1"
;;
esac
}
@@ -106,6 +110,16 @@ qcom_setup_macs()
wan_mac=$(cat /sys/class/net/eth1/address)
lan_mac=$(macaddr_add "$wan_mac" 2)
;;
sonicfi,rap630e)
mac=$(fw_printenv -n BaseMacAddress)
[ -z "$mac" ] && return;
lan_mac=$(macaddr_canonicalize $mac)
wan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth1 $wan_mac
ucidef_set_network_device_mac eth0 $lan_mac
ip link set eth1 address $wan_mac
ip link set eth0 address $lan_mac
;;
*)
wan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_add "$wan_mac" 1)

View File

@@ -94,6 +94,15 @@ ath11k_generate_macs_gl_b3000() {
}
}
ath11k_generate_macs_rap630e() {
touch /lib/firmware/ath11k-macs
eth=$(cat /sys/class/net/eth0/address)
mac1=$(macaddr_add $eth 2)
mac2=$(macaddr_add $eth 3)
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
}
caldata_die() {
echo "caldata: " "$*"
exit 1
@@ -121,14 +130,16 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
cig,wf186h|\
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g|\
sonicfi,rap630w-312g|\
sonicfi,rap630e|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
cybertan,rap630w-312g|\
edgecore,eap104|\
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
edgecore,oap101e-6e|\
emplus,wap385c|\
hfcl,ion4x_w|\
hfcl,ion4xi_w|\
optimcloud,d60|\
@@ -139,6 +150,7 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
udaya,a6-od2|\
wallys,dr5018|\
yuncore,fap655|\
emplus,wap581|\
glinet,b3000)
caldata_extract "0:ART" 0x1000 0x20000
;;
@@ -150,17 +162,20 @@ ath11k/qcn6122/hw1.0/caldata_1.bin)
cig,wf186h|\
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g|\
sonicfi,rap630w-312g|\
sonicfi,rap630e|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
cybertan,rap630w-312g|\
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
edgecore,oap101e-6e|\
emplus,wap385c|\
udaya,a6-id2|\
udaya,a6-od2|\
hfcl,ion4xi_w|\
wallys,dr5018|\
emplus,wap581|\
yuncore,fap655)
caldata_extract "0:ART" 0x26800 0x20000
;;
@@ -176,6 +191,7 @@ ath11k/qcn6122/hw1.0/caldata_2.bin)
;;
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g|\
sonicfi,rap630e|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
glinet,b3000)
@@ -211,6 +227,9 @@ ath11k-macs)
cybertan,eww631-b1)
ath11k_generate_macs_eww631_b1
;;
sonicfi,rap630e)
ath11k_generate_macs_rap630e
;;
edgecore,eap104|\
edgecore,oap101|\
edgecore,oap101-6e|\
@@ -219,7 +238,7 @@ ath11k-macs)
optimcloud,d60-5g|\
optimcloud,d50|\
optimcloud,d50-5g|\
cybertan,rap630w-312g|\
sonicfi,rap630w-312g|\
yuncore,fap655)
ath11k_generate_macs
;;

View File

@@ -6,26 +6,27 @@ board=$(board_name)
case "$board" in
"edgecore,eap101")
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
;;
"edgecore,eap102")
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
"edgecore,eap102"|\
"edgecore,oap103")
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
;;
"edgecore,oap101e-6e"|\
"edgecore,oap101-6e")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy6g
;;
"edgecore,oap101e"|\
"edgecore,oap101")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
;;
"edgecore,eap104")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
;;
esac

View File

@@ -72,10 +72,12 @@ platform_check_image() {
cig,wf186h|\
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g|\
sonicfi,rap630w-312g|\
sonicfi,rap630e|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
cybertan,rap630w-312g|\
edgecore,eap104|\
emplus,wap385c|\
wallys,dr5018|\
hfcl,ion4x_w|\
hfcl,ion4xi_w|\
@@ -90,6 +92,7 @@ platform_check_image() {
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
emplus,wap581|\
edgecore,oap101e-6e)
[ "$magic_long" = "73797375" ] && return 0
;;
@@ -129,6 +132,7 @@ platform_do_upgrade() {
;;
cig,wf186w|\
cig,wf186h|\
emplus,wap385c|\
udaya,a6-id2|\
udaya,a6-od2|\
wallys,dr5018|\
@@ -136,6 +140,7 @@ platform_do_upgrade() {
optimcloud,d60-5g|\
optimcloud,d50|\
optimcloud,d50-5g|\
emplus,wap581|\
yuncore,fap655)
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)"
@@ -143,11 +148,12 @@ platform_do_upgrade() {
}
nand_upgrade_tar "$1"
;;
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g|\
cybertan,eww631-a1|\
cybertan,eww631-b1|\
cybertan,rap630w-312g)
sonicfi,rap630c-311g|\
sonicfi,rap630w-311g|\
sonicfi,rap630w-312g|\
sonicfi,rap630e)
boot_part=$(fw_printenv bootfrom | cut -d = -f2)
echo "Current bootfrom is $boot_part"
if [[ $boot_part == 1 ]]; then

View File

@@ -450,6 +450,8 @@ CONFIG_GPIO_DEVRES=y
# CONFIG_GPIO_SAMA5D2_PIOBU is not set
CONFIG_GPIO_SYSFS=y
# CONFIG_GPIO_USB_DETECT is not set
CONFIG_GPIO_WATCHDOG=y
CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y
# CONFIG_GSI is not set
# CONFIG_HABANA_AI is not set
CONFIG_HANDLE_DOMAIN_IRQ=y

View File

@@ -0,0 +1,760 @@
/dts-v1/;
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "ipq5018.dtsi"
#include <dt-bindings/input/input.h>
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Emplus WAP385C";
compatible = "emplus,wap385c", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
interrupt-parent = <&intc>;
aliases {
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
serial0 = &blsp1_uart1;
serial1 = &blsp1_uart2;
ethernet1 = "/soc/dp1";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
bootargs-append = " swiotlb=1 coherent_pool=2M";
stdout-path = "serial0";
};
reserved-memory {
#ifdef __IPQ_MEM_PROFILE_256_MB__
/* 256 MB Profile
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 8MB |
* +----------+--------------+-------------------------+
* | Linux | 0x40800000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D300000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E000000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E100000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E200000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4EF00000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F000000 | 1MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4100000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x1400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 {
no-map;
reg = <0x0 0x4E000000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 {
no-map;
reg = <0x0 0x4E100000 0x0 0x100000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 {
no-map;
reg = <0x0 0x4EF00000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 {
no-map;
reg = <0x0 0x4F000000 0x0 0x100000>;
};
#else
/* 512MB/1GB Profiles
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 16MB |
* +----------+--------------+-------------------------+
* | Linux | 0x41000000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 01400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
#endif
};
soc {
serial@78af000 {
status = "ok";
};
qpic_bam: dma@7984000{
status = "ok";
};
nand: qpic-nand@79b0000 {
pinctrl-0 = <&qspi_nand_pins>;
pinctrl-names = "default";
status = "ok";
};
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
pinctrl-0 = <&blsp0_spi_pins>;
pinctrl-names = "default";
cs-select = <0>;
status = "ok";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "n25q128a11";
linux,modalias = "m25p80", "n25q128a11";
spi-max-frequency = <50000000>;
use-default-sizes;
};
};
mdio0: mdio@88000 {
status = "ok";
ethernet-phy@0 {
reg = <7>;
};
};
mdio1: mdio@90000 {
status = "ok";
pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 23 0>;
ethernet-phy@0 {
reg = <24>;
};
};
ess-instance {
num_devices = <0x1>;
ess-switch@0x39c00000 {
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <7>;
mdiobus = <&mdio0>;
};
port@1 {
port_id = <2>;
phy_address = <0x18>;
mdiobus = <&mdio1>;
port_mac_sel = "QGMAC_PORT";
};
};
led_source@0 {
source = <0>;
mode = "normal";
speed = "all";
blink_en = "enable";
active = "high";
};
};
};
wifi0: wifi@c000000 {
status = "ok";
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <1>;
reg = <0x39C00000 0x10000>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <7>;
mdio-bus = <&mdio0>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x18>;
mdiobus = <&mdio1>;
};
lpass: lpass@0xA000000{
status = "disabled";
};
pcm_lb: pcm_lb@0 {
status = "disabled";
};
};
qcom,test@0 {
status = "ok";
};
thermal-zones {
status = "ok";
};
};
&tlmm {
pinctrl-0 = <&blsp0_uart_pins>;
pinctrl-names = "default";
blsp0_uart_pins: uart_pins {
blsp0_uart_rx_tx {
pins = "gpio20", "gpio21";
function = "blsp0_uart0";
bias-disable;
};
};
blsp0_spi_pins: blsp0_spi_pins {
mux {
pins = "gpio10", "gpio11", "gpio12", "gpio13";
function = "blsp0_spi";
drive-strength = <2>;
bias-disable;
};
};
qspi_nand_pins: qspi_nand_pins {
qspi_clock {
pins = "gpio9";
function = "qspi_clk";
drive-strength = <8>;
bias-disable;
};
qspi_cs {
pins = "gpio8";
function = "qspi_cs";
drive-strength = <8>;
bias-disable;
};
qspi_data {
pins = "gpio4", "gpio5", "gpio6", "gpio7";
function = "qspi_data";
drive-strength = <8>;
bias-disable;
};
};
mdio1_pins: mdio_pinmux {
mux_0 {
pins = "gpio36";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio37";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
poe_dc_pins: poe_dc_pins {
T2P_DET {
pins = "gpio31";
function = "gpio";
drive-strength = <8>;
bias-disable;
};
12V_DET {
pins = "gpio32";
function = "gpio";
drive-strength = <8>;
bias-disable;
};
};
button_pins: button_pins {
reset_button {
pins = "gpio27";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
leds_pins: leds_pinmux {
linux,phandle = <0x4d>;
phandle = <0x4d>;
led_G {
pins = "gpio24";
function = "gpio";
bias-pull-down;
drive-strength = <0x08>;
};
led_B {
pins = "gpio28";
function = "gpio";
bias-pull-down;
drive-strength = <0x08>;
};
led_R {
pins = "gpio38";
function = "gpio";
bias-pull-down;
drive-strength = <0x08>;
};
};
};
&soc {
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
button@1 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led@24 {
label = "sys:green";
gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led@28 {
label = "sys:blue";
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_power: led@38 {
label = "sys:red";
gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "wap385c:sys:red";
default-state = "on";
};
};
};
&q6v5_wcss {
compatible = "qcom,ipq5018-q6-mpd";
#address-cells = <1>;
#size-cells = <1>;
ranges;
firmware = "IPQ5018/q6_fw.mdt";
reg = <0x0cd00000 0x4040>,
<0x1938000 0x8>,
<0x193d204 0x4>;
reg-names = "qdsp6",
"tcsr-msip",
"tcsr-q6";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_Q6_BCR>;
reset-names = "wcss_aon_reset",
"wcss_q6_reset";
clocks = <&gcc GCC_Q6_AXIS_CLK>,
<&gcc GCC_WCSS_ECAHB_CLK>,
<&gcc GCC_Q6_AXIM_CLK>,
<&gcc GCC_Q6_AXIM2_CLK>,
<&gcc GCC_Q6_AHB_CLK>,
<&gcc GCC_Q6_AHB_S_CLK>,
<&gcc GCC_WCSS_AXI_S_CLK>;
clock-names = "gcc_q6_axis_clk",
"gcc_wcss_ecahb_clk",
"gcc_q6_axim_clk",
"gcc_q6_axim2_clk",
"gcc_q6_ahb_clk",
"gcc_q6_ahb_s_clk",
"gcc_wcss_axi_s_clk";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
#else
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
<&q6_caldb_region>;
#endif
qcom,rproc = <&q6v5_wcss>;
qcom,bootargs_smem = <507>;
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
<0x2 0x4 0x2 0x12 0x0 0x0>;
status = "ok";
q6_wcss_pd1: remoteproc_pd1@4ab000 {
compatible = "qcom,ipq5018-wcss-ahb-mpd";
reg = <0x4ab000 0x20>;
reg-names = "rmb";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "IPQ5018/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 8 0>,
<&wcss_smp2p_in 9 0>,
<&wcss_smp2p_in 12 0>,
<&wcss_smp2p_in 11 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_BCR>,
<&gcc GCC_CE_BCR>;
reset-names = "wcss_aon_reset",
"wcss_reset",
"ce_reset";
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
<&gcc GCC_WCSS_ACMT_CLK>,
<&gcc GCC_WCSS_AXI_M_CLK>;
clock-names = "gcc_wcss_ahb_s_clk",
"gcc_wcss_acmt_clk",
"gcc_wcss_axi_m_clk";
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
qcom,smem-states = <&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
<&wcss_smp2p_out 10>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>;
#else
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>, <&q6_caldb_region>;
#endif
};
q6_wcss_pd2: remoteproc_pd2 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "qcn6122/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 16 0>,
<&wcss_smp2p_in 17 0>,
<&wcss_smp2p_in 20 0>,
<&wcss_smp2p_in 19 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 16>,
<&wcss_smp2p_out 17>,
<&wcss_smp2p_out 18>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>;
#else
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
#endif
};
};
&wifi0 {
/* IPQ5018 */
qcom,multipd_arch;
qcom,rproc = <&q6_wcss_pd1>;
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else
memory-region = <&q6_ipq5018_data>;
#endif
status = "ok";
};
&wifi1 {
/* QCN6122 5G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
qcom,rproc = <&q6_wcss_pd2>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x60>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4D500000 0x4D500000 0x4D300000 0x0 0x0>;
qcom,caldb-addr = <0x4E400000 0x4E400000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data1>;
#else
memory-region = <&q6_qcn6122_data1>;
#endif
status = "ok";
};
&dwc_0 {
/delete-property/ #phy-cells;
/delete-property/ phys;
/delete-property/ phy-names;
};
&hs_m31phy_0 {
status = "ok";
};
&eud {
status = "ok";
};
&pcie_x1 {
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
};
&pcie_x2 {
perst-gpio = <&tlmm 15 GPIO_ACTIVE_LOW>;
};
&pcie_x1_rp {
status = "disabled";
mhi_0: qcom,mhi@0 {
reg = <0 0 0 0 0 >;
};
};
&pcie_x2_rp {
status = "disabled";
mhi_1: qcom,mhi@1 {
reg = <0 0 0 0 0 >;
};
};
&qfprom {
status = "ok";
};
&tsens {
status = "ok";
};

View File

@@ -0,0 +1,831 @@
/dts-v1/;
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "ipq5018.dtsi"
#include <dt-bindings/input/input.h>
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Emplus WAP581";
compatible = "emplus,wap581", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
interrupt-parent = <&intc>;
aliases {
serial0 = &blsp1_uart1;
ethernet0 = "/soc/dp1";
ethernet1 = "/soc/dp2";
};
chosen {
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
bootargs-append = " swiotlb=1 coherent_pool=2M";
stdout-path = "serial0";
};
reserved-memory {
#ifdef __IPQ_MEM_PROFILE_256_MB__
/* 256 MB Profile
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 8MB |
* +----------+--------------+-------------------------+
* | Linux | 0x40800000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D300000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E000000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E100000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E200000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4EF00000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F000000 | 1MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4100000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x1400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 {
no-map;
reg = <0x0 0x4E000000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 {
no-map;
reg = <0x0 0x4E100000 0x0 0x100000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 {
no-map;
reg = <0x0 0x4EF00000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 {
no-map;
reg = <0x0 0x4F000000 0x0 0x100000>;
};
#else
/* 512MB/1GB Profiles
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 16MB |
* +----------+--------------+-------------------------+
* | Linux | 0x41000000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 01400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
#endif
};
soc {
serial@78af000 {
status = "ok";
};
qpic_bam: dma@7984000{
status = "ok";
};
nand: qpic-nand@79b0000 {
pinctrl-0 = <&qspi_nand_pins>;
pinctrl-names = "default";
status = "ok";
};
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
pinctrl-0 = <&blsp0_spi_pins>;
pinctrl-names = "default";
cs-select = <0>;
status = "ok";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "n25q128a11";
linux,modalias = "m25p80", "n25q128a11";
spi-max-frequency = <50000000>;
use-default-sizes;
};
};
mdio0: mdio@88000 {
status = "ok";
ethernet-phy@0 {
reg = <7>;
};
};
mdio1: mdio@90000 {
status = "ok";
pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 39 0>;
ethernet-phy@0 {
reg = <0>;
};
ethernet-phy@1 {
reg = <1>;
};
ethernet-phy@2 {
reg = <2>;
};
ethernet-phy@3 {
reg = <3>;
};
ethernet-phy@4 {
reg = <4>;
};
};
ess-instance {
num_devices = <0x2>;
ess-switch@0x39c00000 {
compatible = "qcom,ess-switch-ipq50xx";
device_id = <0>;
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <7>;
};
port@1 {
port_id = <2>;
forced-speed = <1000>;
forced-duplex = <1>;
};
};
led_source@0 {
source = <0>;
mode = "normal";
speed = "all";
blink_en = "enable";
active = "high";
};
};
ess-switch1@1 {
compatible = "qcom,ess-switch-qca83xx";
device_id = <1>;
switch_access_mode = "mdio";
mdio-bus = <&mdio1>;
reset_gpio = <&tlmm 0x27 0>;
switch_cpu_bmp = <0x40>; /* cpu port bitmap */
switch_lan_bmp = <0x3e>; /* lan port bitmap */
switch_wan_bmp = <0x0>; /* wan port bitmap */
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x80 /* PAD6_MODE */
0x00010 0x2613a0 /* PORT6 FORCE MODE*/
0x000e4 0xaa545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <0>;
};
port@1 {
port_id = <2>;
phy_address = <1>;
};
port@2 {
port_id = <3>;
phy_address = <2>;
};
port@3 {
port_id = <4>;
phy_address = <3>;
};
port@4 {
port_id = <5>;
phy_address = <4>;
};
};
};
};
wifi0: wifi@c000000 {
status = "ok";
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <1>;
reg = <0x39C00000 0x10000>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <7>;
mdio-bus = <&mdio0>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
qcom,rx-page-mode = <0>;
};
dp2 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <2>;
reg = <0x39D00000 0x10000>;
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
qcom,rx-page-mode = <0>;
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led@28 {
label = "led_blue";
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
led@38 {
label = "led_red";
gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
led@46 {
label = "led_green";
gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x1c>;
mdiobus = <&mdio1>;
};
lpass: lpass@0xA000000{
status = "disabled";
};
pcm_lb: pcm_lb@0 {
status = "disabled";
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
button@1 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
};
qcom,test@0 {
status = "ok";
};
thermal-zones {
status = "ok";
};
};
&tlmm {
pinctrl-0 = <&blsp0_uart_pins>;
pinctrl-names = "default";
blsp0_uart_pins: uart_pins {
blsp0_uart_rx_tx {
pins = "gpio20", "gpio21";
function = "blsp0_uart0";
bias-disable;
};
};
blsp0_spi_pins: blsp0_spi_pins {
mux {
pins = "gpio10", "gpio11", "gpio12", "gpio13";
function = "blsp0_spi";
drive-strength = <2>;
bias-disable;
};
};
qspi_nand_pins: qspi_nand_pins {
qspi_clock {
pins = "gpio9";
function = "qspi_clk";
drive-strength = <8>;
bias-disable;
};
qspi_cs {
pins = "gpio8";
function = "qspi_cs";
drive-strength = <8>;
bias-disable;
};
qspi_data {
pins = "gpio4", "gpio5", "gpio6", "gpio7";
function = "qspi_data";
drive-strength = <8>;
bias-disable;
};
};
mdio1_pins: mdio_pinmux {
mux_0 {
pins = "gpio36";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio37";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
i2c_pins: i2c_pins {
i2c_scl {
pins = "gpio25";
function = "blsp2_i2c1";
drive-strength = <8>;
bias-disable;
};
i2c_sda {
pins = "gpio26";
function = "blsp2_i2c1";
drive-strength = <8>;
bias-disable;
};
};
button_pins: button_pins {
reset_button {
pins = "gpio27";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
leds_pins: leds_pins {
led_blue {
pins = "gpio28";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_red { /* POWER_LED */
pins = "gpio38";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_green { /* 2G_LED */
pins = "gpio46";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
};
&soc {
};
&q6v5_wcss {
compatible = "qcom,ipq5018-q6-mpd";
#address-cells = <1>;
#size-cells = <1>;
ranges;
firmware = "IPQ5018/q6_fw.mdt";
reg = <0x0cd00000 0x4040>,
<0x1938000 0x8>,
<0x193d204 0x4>;
reg-names = "qdsp6",
"tcsr-msip",
"tcsr-q6";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_Q6_BCR>;
reset-names = "wcss_aon_reset",
"wcss_q6_reset";
clocks = <&gcc GCC_Q6_AXIS_CLK>,
<&gcc GCC_WCSS_ECAHB_CLK>,
<&gcc GCC_Q6_AXIM_CLK>,
<&gcc GCC_Q6_AXIM2_CLK>,
<&gcc GCC_Q6_AHB_CLK>,
<&gcc GCC_Q6_AHB_S_CLK>,
<&gcc GCC_WCSS_AXI_S_CLK>;
clock-names = "gcc_q6_axis_clk",
"gcc_wcss_ecahb_clk",
"gcc_q6_axim_clk",
"gcc_q6_axim2_clk",
"gcc_q6_ahb_clk",
"gcc_q6_ahb_s_clk",
"gcc_wcss_axi_s_clk";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
#else
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
<&q6_caldb_region>;
#endif
qcom,rproc = <&q6v5_wcss>;
qcom,bootargs_smem = <507>;
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
<0x2 0x4 0x2 0x12 0x0 0x0>;
status = "ok";
q6_wcss_pd1: remoteproc_pd1@4ab000 {
compatible = "qcom,ipq5018-wcss-ahb-mpd";
reg = <0x4ab000 0x20>;
reg-names = "rmb";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "IPQ5018/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 8 0>,
<&wcss_smp2p_in 9 0>,
<&wcss_smp2p_in 12 0>,
<&wcss_smp2p_in 11 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_BCR>,
<&gcc GCC_CE_BCR>;
reset-names = "wcss_aon_reset",
"wcss_reset",
"ce_reset";
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
<&gcc GCC_WCSS_ACMT_CLK>,
<&gcc GCC_WCSS_AXI_M_CLK>;
clock-names = "gcc_wcss_ahb_s_clk",
"gcc_wcss_acmt_clk",
"gcc_wcss_axi_m_clk";
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
qcom,smem-states = <&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
<&wcss_smp2p_out 10>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>;
#else
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>, <&q6_caldb_region>;
#endif
};
q6_wcss_pd2: remoteproc_pd2 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "qcn6122/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 16 0>,
<&wcss_smp2p_in 17 0>,
<&wcss_smp2p_in 20 0>,
<&wcss_smp2p_in 19 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 16>,
<&wcss_smp2p_out 17>,
<&wcss_smp2p_out 18>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>;
#else
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
#endif
};
};
&i2c_0 {
pinctrl-0 = <&i2c_pins>;
pinctrl-names = "default";
};
&wifi0 {
/* IPQ5018 */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
qcom,rproc = <&q6_wcss_pd1>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x23>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else
memory-region = <&q6_ipq5018_data>;
#endif
status = "ok";
};
&wifi1 {
/* QCN6122 5G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd2";
qcom,rproc = <&q6_wcss_pd2>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x50>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4D500000 0x4D500000 0x4D300000 0x0 0x0>;
qcom,caldb-addr = <0x4E400000 0x4E400000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data1>;
#else
memory-region = <&q6_qcn6122_data1>;
#endif
status = "ok";
};
&dwc_0 {
/delete-property/ #phy-cells;
/delete-property/ phys;
/delete-property/ phy-names;
};
&hs_m31phy_0 {
status = "ok";
};
&eud {
status = "ok";
};
&pcie_x1 {
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
};
&pcie_x2 {
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
status = "disabled";
};
&pcie_x1_rp {
status = "disabled";
mhi_0: qcom,mhi@0 {
reg = <0 0 0 0 0 >;
};
};
&pcie_x2_rp {
status = "disabled";
mhi_1: qcom,mhi@1 {
reg = <0 0 0 0 0 >;
};
};
&qfprom {
status = "ok";
};
&tsens {
status = "ok";
};

View File

@@ -817,10 +817,9 @@
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
1235
#else
memory-region = <&q6_ipq5018_data>;
#endif

View File

@@ -173,40 +173,40 @@
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 14MB |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D200000 | 1MB |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D300000 | 1MB |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D400000 | 2MB |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D600000 | 16MB |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E600000 | 1MB |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E700000 | 1MB |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E800000 | 5MB |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4ED00000 | 16MB |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4FD00000 | 1MB |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4FE00000 | 1MB |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4FF00000 | 5MB |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
@@ -215,7 +215,7 @@
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x5400000>;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
@@ -225,62 +225,62 @@
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xE00000>;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D200000 {
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D300000 {
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x100000>;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_caldb_region: q6_caldb_region@4D400000 {
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D400000 0x0 0x200000>;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4D600000 0x0 0x1000000>;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E600000 0x0 0x100000>;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E700000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
no-map;
reg = <0x0 0x4E800000 0x0 0x500000>;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
no-map;
reg = <0x0 0x4ED00000 0x0 0x1000000>;
reg = <0x0 0x4E900000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
no-map;
reg = <0x0 0x4FD00000 0x0 0x100000>;
reg = <0x0 0x4F600000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
no-map;
reg = <0x0 0x4FE00000 0x0 0x100000>;
reg = <0x0 0x4F700000 0x0 0x100000>;
};
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
no-map;
reg = <0x0 0x4FF00000 0x0 0x500000>;
reg = <0x0 0x4F800000 0x0 0x500000>;
};
#endif
@@ -883,8 +883,8 @@
#endif
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else

View File

@@ -816,10 +816,9 @@
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
1235
#else
memory-region = <&q6_ipq5018_data>;
#endif

View File

@@ -0,0 +1,893 @@
/dts-v1/;
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "ipq5018.dtsi"
#include <dt-bindings/input/input.h>
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Sonicfi RAP630E";
compatible = "sonicfi,rap630e", "qcom,ipq5018-mp03.5", "qcom,ipq5018";
interrupt-parent = <&intc>;
aliases {
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
serial0 = &blsp1_uart1;
serial1 = &blsp1_uart2;
ethernet0 = "/soc/dp1";
ethernet1 = "/soc/dp2";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
bootargs-append = " swiotlb=1 coherent_pool=2M";
stdout-path = "serial0";
};
reserved-memory {
#ifdef __IPQ_MEM_PROFILE_256_MB__
/* 256 MB Profile
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 8MB |
* +----------+--------------+-------------------------+
* | Linux | 0x40800000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D300000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E000000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E100000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E200000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4EF00000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F000000 | 1MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4100000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x1400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 {
no-map;
reg = <0x0 0x4E000000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 {
no-map;
reg = <0x0 0x4E100000 0x0 0x100000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 {
no-map;
reg = <0x0 0x4EF00000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 {
no-map;
reg = <0x0 0x4F000000 0x0 0x100000>;
};
#else
/* 512MB/1GB Profiles
* +==========+==============+=========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +----------+--------------+-------------------------+
* | NSS | 0x40000000 | 16MB |
* +----------+--------------+-------------------------+
* | Linux | 0x41000000 | Depends on total memory |
* +----------+--------------+-------------------------+
* | uboot | 0x4A600000 | 4MB |
* +----------+--------------+-------------------------+
* | SBL | 0x4AA00000 | 1MB |
* +----------+--------------+-------------------------+
* | smem | 0x4AB00000 | 1MB |
* +----------+--------------+-------------------------+
* | TZ | 0x4AC00000 | 4MB |
* +----------+--------------+-------------------------+
* | Q6 | | |
* | code/ | 0x4B000000 | 20MB |
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
* | |
* +===================================================+
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 01400000>;
};
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
no-map;
reg = <0x0 0x4E900000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
no-map;
reg = <0x0 0x4F600000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
no-map;
reg = <0x0 0x4F700000 0x0 0x100000>;
};
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
no-map;
reg = <0x0 0x4F800000 0x0 0x500000>;
};
ramoops: ramoops@50400000 {
compatible = "ramoops";
reg = <0x0 0x50400000 0x0 0x80000>; // 512KB
record-size = <0x20000>;
console-size = <0x20000>;
pmsg-size = <0x20000>;
no-map;
};
#endif
};
soc {
serial@78af000 {
status = "ok";
};
blsp1_uart2: serial@78b0000 {
pinctrl-0 = <&blsp1_uart_pins>;
pinctrl-names = "default";
};
qpic_bam: dma@7984000{
status = "ok";
};
nand: qpic-nand@79b0000 {
pinctrl-0 = <&qspi_nand_pins>;
pinctrl-names = "default";
status = "ok";
};
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
pinctrl-0 = <&blsp0_spi_pins>;
pinctrl-names = "default";
cs-select = <0>;
status = "ok";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "n25q128a11";
linux,modalias = "m25p80", "n25q128a11";
spi-max-frequency = <50000000>;
use-default-sizes;
};
};
mdio0: mdio@88000 {
status = "ok";
ethernet-phy@0 {
reg = <7>;
};
};
mdio1: mdio@90000 {
status = "ok";
pinctrl-0 = <&mdio1_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 39 0>;
ethernet-phy@0 {
reg = <28>;
};
};
ess-instance {
num_devices = <0x1>;
ess-switch@0x39c00000 {
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <7>;
mdiobus = <&mdio0>;
};
port@1 {
port_id = <2>;
phy_address = <0x1c>;
mdiobus = <&mdio1>;
port_mac_sel = "QGMAC_PORT";
};
};
led_source@0 {
source = <0>;
mode = "normal";
speed = "all";
blink_en = "enable";
active = "high";
};
};
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <1>;
reg = <0x39C00000 0x10000>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <7>;
mdio-bus = <&mdio0>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
qcom,rx-page-mode = <0>;
};
dp2 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <2>;
reg = <0x39D00000 0x10000>;
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <28>;
mdio-bus = <&mdio1>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
qcom,rx-page-mode = <0>;
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x1c>;
mdiobus = <&mdio1>;
};
pcm: pcm@0xA3C0000{
pinctrl-0 = <&audio_pins>;
pinctrl-names = "default";
};
};
qcom,test@0 {
status = "ok";
};
thermal-zones {
status = "ok";
};
};
&tlmm {
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
pinctrl-names = "default";
blsp0_uart_pins: uart_pins {
blsp0_uart_rx_tx {
pins = "gpio20", "gpio21";
function = "blsp0_uart0";
bias-disable;
};
};
blsp1_uart_pins: blsp1_uart_pins {
blsp1_uart_rx_tx {
pins = "gpio22", "gpio24", "gpio23", "gpio25";
function = "blsp1_uart2";
bias-disable;
};
};
blsp0_spi_pins: blsp0_spi_pins {
mux {
pins = "gpio10", "gpio11", "gpio12", "gpio13";
function = "blsp0_spi";
drive-strength = <2>;
bias-disable;
};
};
qspi_nand_pins: qspi_nand_pins {
qspi_clock {
pins = "gpio9";
function = "qspi_clk";
drive-strength = <8>;
bias-disable;
};
qspi_cs {
pins = "gpio8";
function = "qspi_cs";
drive-strength = <8>;
bias-disable;
};
qspi_data {
pins = "gpio4", "gpio5", "gpio6", "gpio7";
function = "qspi_data";
drive-strength = <8>;
bias-disable;
};
};
mdio1_pins: mdio_pinmux {
mux_0 {
pins = "gpio36";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio37";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
phy_led_pins: phy_led_pins {
gephy_led_pin {
pins = "gpio46";
function = "led0";
drive-strength = <8>;
bias-pull-down;
};
};
i2c_pins: i2c_pins {
i2c_scl {
pins = "gpio25";
function = "blsp2_i2c1";
drive-strength = <8>;
bias-disable;
};
i2c_sda {
pins = "gpio26";
function = "blsp2_i2c1";
drive-strength = <8>;
bias-disable;
};
};
button_pins: button_pins {
reset_button {
pins = "gpio38";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
audio_pins: audio_pinmux {
};
leds_pins: leds_pins {
led_5g {
pins = "gpio34";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_2g {
pins = "gpio33";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_sys {
pins = "gpio26";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_onekey {
pins = "gpio28";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
};
&soc {
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
button@1 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led34 {
label = "green:wifi5";
gpios = <&tlmm 34 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
default-state = "on";
};
led33 {
label = "green:wifi2";
gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
default-state = "on";
};
led_power: led26 {
label = "green:power";
gpios = <&tlmm 26 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
default-state = "on";
};
led@28 {
label = "led_onekey";
gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
linux,default-trigger = "led_onekey";
default-state = "off";
};
};
gpio-watchdog {
compatible = "linux,wdt-gpio";
gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
hw_algo = "toggle";
hw_margin_ms = <5000>;
start-at-boot;
always-running;
status = "okay";
};
};
&q6v5_wcss {
compatible = "qcom,ipq5018-q6-mpd";
#address-cells = <1>;
#size-cells = <1>;
ranges;
firmware = "IPQ5018/q6_fw.mdt";
reg = <0x0cd00000 0x4040>,
<0x1938000 0x8>,
<0x193d204 0x4>;
reg-names = "qdsp6",
"tcsr-msip",
"tcsr-q6";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_Q6_BCR>;
reset-names = "wcss_aon_reset",
"wcss_q6_reset";
clocks = <&gcc GCC_Q6_AXIS_CLK>,
<&gcc GCC_WCSS_ECAHB_CLK>,
<&gcc GCC_Q6_AXIM_CLK>,
<&gcc GCC_Q6_AXIM2_CLK>,
<&gcc GCC_Q6_AHB_CLK>,
<&gcc GCC_Q6_AHB_S_CLK>,
<&gcc GCC_WCSS_AXI_S_CLK>;
clock-names = "gcc_q6_axis_clk",
"gcc_wcss_ecahb_clk",
"gcc_q6_axim_clk",
"gcc_q6_axim2_clk",
"gcc_q6_ahb_clk",
"gcc_q6_ahb_s_clk",
"gcc_wcss_axi_s_clk";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_mem_regions>, <&q6_etr_region>;
#else
memory-region = <&q6_mem_regions>, <&q6_etr_region>,
<&q6_caldb_region>;
#endif
qcom,rproc = <&q6v5_wcss>;
qcom,bootargs_smem = <507>;
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
<0x2 0x4 0x2 0x12 0x0 0x0>;
status = "ok";
q6_wcss_pd1: remoteproc_pd1@4ab000 {
compatible = "qcom,ipq5018-wcss-ahb-mpd";
reg = <0x4ab000 0x20>;
reg-names = "rmb";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "IPQ5018/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 8 0>,
<&wcss_smp2p_in 9 0>,
<&wcss_smp2p_in 12 0>,
<&wcss_smp2p_in 11 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
resets = <&gcc GCC_WCSSAON_RESET>,
<&gcc GCC_WCSS_BCR>,
<&gcc GCC_CE_BCR>;
reset-names = "wcss_aon_reset",
"wcss_reset",
"ce_reset";
clocks = <&gcc GCC_WCSS_AHB_S_CLK>,
<&gcc GCC_WCSS_ACMT_CLK>,
<&gcc GCC_WCSS_AXI_M_CLK>;
clock-names = "gcc_wcss_ahb_s_clk",
"gcc_wcss_acmt_clk",
"gcc_wcss_axi_m_clk";
qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>;
qcom,smem-states = <&wcss_smp2p_out 8>,
<&wcss_smp2p_out 9>,
<&wcss_smp2p_out 10>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>;
#else
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
<&q6_etr_region>, <&q6_caldb_region>;
#endif
};
q6_wcss_pd2: remoteproc_pd2 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
m3_firmware = "qcn6122/m3_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 16 0>,
<&wcss_smp2p_in 17 0>,
<&wcss_smp2p_in 20 0>,
<&wcss_smp2p_in 19 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 16>,
<&wcss_smp2p_out 17>,
<&wcss_smp2p_out 18>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>;
#else
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
#endif
};
q6_wcss_pd3: remoteproc_pd3 {
compatible = "qcom,ipq5018-wcss-pcie-mpd";
firmware = "IPQ5018/q6_fw.mdt";
interrupts-extended = <&wcss_smp2p_in 24 0>,
<&wcss_smp2p_in 25 0>,
<&wcss_smp2p_in 28 0>,
<&wcss_smp2p_in 27 0>;
interrupt-names = "fatal",
"ready",
"spawn-ack",
"stop-ack";
qcom,smem-states = <&wcss_smp2p_out 24>,
<&wcss_smp2p_out 25>,
<&wcss_smp2p_out 26>;
qcom,smem-state-names = "shutdown",
"stop",
"spawn";
#ifdef __IPQ_MEM_PROFILE_256_MB__
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
<&q6_qcn6122_etr_2>;
#else
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
<&q6_qcn6122_etr_2>, <&q6_qcn6122_caldb_2>;
#endif
};
};
&i2c_0 {
pinctrl-0 = <&i2c_pins>;
pinctrl-names = "default";
};
&wifi0 {
/* IPQ5018 */
qcom,multipd_arch;
qcom,rproc = <&q6_wcss_pd1>;
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else
memory-region = <&q6_ipq5018_data>;
#endif
nss-radio-priority = <0>;
status = "ok";
};
&wifi1 {
/* QCN6122 5G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
qcom,rproc = <&q6_wcss_pd3>;
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x60>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4E900000 0x4E900000 0x4E200000 0x0 0x0>;
qcom,caldb-addr = <0x4F800000 0x4F800000 0 0 0>;
qcom,caldb-size = <0x500000>;
mem-region = <&q6_qcn6122_data2>;
#else
memory-region = <&q6_qcn6122_data2>;
#endif
nss-radio-priority = <1>;
status = "ok";
};
&wifi2 {
/* QCN6122 6G */
qcom,multipd_arch;
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
#ifdef __IPQ_MEM_PROFILE_256_MB__
qcom,tgt-mem-mode = <2>;
#else
qcom,tgt-mem-mode = <1>;
#endif
qcom,board_id = <0x60>;
qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
#ifdef __CNSS2__
qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
#else
qcom,caldb-addr = <0x4FF00000>;
m3-dump-addr = <0x4FD00000>;
nss-radio-priority = <1>;
#endif
mem-region = <&q6_qcn6122_data2>;
qcom,caldb-size = <0x500000>;
status = "disabled";
};
&dwc_0 {
/delete-property/ #phy-cells;
/delete-property/ phys;
/delete-property/ phy-names;
};
&hs_m31phy_0 {
status = "ok";
};
&eud {
status = "disabled";
};
&pcie_x1 {
perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>;
};
&pcie_x2 {
perst-gpio = <&tlmm 15 GPIO_ACTIVE_LOW>;
};
&pcie_x1_rp {
status = "disabled";
mhi_0: qcom,mhi@0 {
reg = <0 0 0 0 0 >;
};
};
&pcie_x2_rp {
status = "disabled";
mhi_1: qcom,mhi@1 {
reg = <0 0 0 0 0 >;
};
};

View File

@@ -175,40 +175,40 @@
* | data | | |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | data | 0x4C400000 | 14MB |
* | data | 0x4C400000 | 13MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | M3 Dump | 0x4D200000 | 1MB |
* | M3 Dump | 0x4D100000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | QDSS | 0x4D300000 | 1MB |
* | QDSS | 0x4D200000 | 1MB |
* +----------+--------------+-------------------------+
* | IPQ5018 | | |
* | Caldb | 0x4D400000 | 2MB |
* | Caldb | 0x4D300000 | 2MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | data | 0x4D600000 | 16MB |
* | data | 0x4D500000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | M3 Dump | 0x4E600000 | 1MB |
* | M3 Dump | 0x4E200000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | QDSS | 0x4E700000 | 1MB |
* | QDSS | 0x4E300000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_1| | |
* | Caldb | 0x4E800000 | 5MB |
* | Caldb | 0x4E400000 | 5MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | data | 0x4ED00000 | 16MB |
* | data | 0x4E900000 | 13MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | M3 Dump | 0x4FD00000 | 1MB |
* | M3 Dump | 0x4F600000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | QDSS | 0x4FE00000 | 1MB |
* | QDSS | 0x4F700000 | 1MB |
* +----------+--------------+-------------------------+
* | QCN6122_2| | |
* | Caldb | 0x4FF00000 | 5MB |
* | Caldb | 0x4F800000 | 5MB |
* +----------+--------------+-------------------------+
* | |
* | Rest of the memory for Linux |
@@ -217,7 +217,7 @@
*/
q6_mem_regions: q6_mem_regions@4B000000 {
no-map;
reg = <0x0 0x4B000000 0x0 0x5400000>;
reg = <0x0 0x4B000000 0x0 0x4D00000>;
};
q6_code_data: q6_code_data@4B000000 {
@@ -227,62 +227,62 @@
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
no-map;
reg = <0x0 0x4C400000 0x0 0xE00000>;
reg = <0x0 0x4C400000 0x0 0xD00000>;
};
m3_dump: m3_dump@4D200000 {
m3_dump: m3_dump@4D100000 {
no-map;
reg = <0x0 0x4D100000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D200000 {
no-map;
reg = <0x0 0x4D200000 0x0 0x100000>;
};
q6_etr_region: q6_etr_dump@4D300000 {
q6_caldb_region: q6_caldb_region@4D300000 {
no-map;
reg = <0x0 0x4D300000 0x0 0x100000>;
reg = <0x0 0x4D300000 0x0 0x200000>;
};
q6_caldb_region: q6_caldb_region@4D400000 {
q6_qcn6122_data1: q6_qcn6122_data1@4D500000 {
no-map;
reg = <0x0 0x4D400000 0x0 0x200000>;
reg = <0x0 0x4D500000 0x0 0xD00000>;
};
q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
no-map;
reg = <0x0 0x4D600000 0x0 0x1000000>;
reg = <0x0 0x4E200000 0x0 0x100000>;
};
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
no-map;
reg = <0x0 0x4E600000 0x0 0x100000>;
reg = <0x0 0x4E300000 0x0 0x100000>;
};
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 {
no-map;
reg = <0x0 0x4E700000 0x0 0x100000>;
};
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
no-map;
reg = <0x0 0x4E800000 0x0 0x500000>;
reg = <0x0 0x4E400000 0x0 0x500000>;
};
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
no-map;
reg = <0x0 0x4ED00000 0x0 0x1000000>;
reg = <0x0 0x4E900000 0x0 0xD00000>;
};
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F600000 {
no-map;
reg = <0x0 0x4FD00000 0x0 0x100000>;
reg = <0x0 0x4F600000 0x0 0x100000>;
};
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F700000 {
no-map;
reg = <0x0 0x4FE00000 0x0 0x100000>;
reg = <0x0 0x4F700000 0x0 0x100000>;
};
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4F800000 {
no-map;
reg = <0x0 0x4FF00000 0x0 0x500000>;
reg = <0x0 0x4F800000 0x0 0x500000>;
};
#endif
@@ -894,8 +894,8 @@
#endif
qcom,board_id = <0x24>;
#ifdef __CNSS2__
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0 0>;
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>;
qcom,caldb-size = <0x200000>;
mem-region = <&q6_ipq5018_data>;
#else

View File

@@ -22,16 +22,15 @@
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Cybertan RAP630W-312G";
compatible = "cybertan,rap630w-312g", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
model = "Sonicfi RAP630W-312G";
compatible = "sonicfi,rap630w-312g", "qcom,ipq5018-mp03.3", "qcom,ipq5018";
interrupt-parent = <&intc>;
aliases {
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
serial0 = &blsp1_uart1;
serial1 = &blsp1_uart2;
ethernet0 = "/soc/dp1";
ethernet1 = "/soc/dp2";
ethernet1 = "/soc/dp1";
led-boot = &led_power;
led-failsafe = &led_power;
@@ -375,7 +374,7 @@
port_id = <1>;
phy_address = <7>;
phy_dac = <0x10 0x10>;
mdiobus = <&mdio0>;
mdio-bus = <&mdio0>;
};
port@1 {
mdio-bus = <&mdio0>;
@@ -441,22 +440,6 @@
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
clock-names = "nss-snoc-gmac-axi-clk";
qcom,id = <1>;
reg = <0x39C00000 0x10000>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
qcom,mactype = <2>;
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <7>;
mdio-bus = <&mdio0>;
local-mac-address = [000000000000];
phy-mode = "sgmii";
};
dp2 {
device_type = "network";
compatible = "qcom,nss-dp";
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;

View File

@@ -40,16 +40,16 @@ define Device/cybertan_eww631_b1
endef
TARGET_DEVICES += cybertan_eww631_b1
define Device/cybertan_rap630w_312g
DEVICE_TITLE := CyberTan RAP630W-312G
define Device/sonicfi_rap630w_312g
DEVICE_TITLE := Sonicfi RAP630W-312G
DEVICE_DTS := qcom-ipq5018-rap630w-312g
SUPPORTED_DEVICES := cybertan,rap630w-312g
DEVICE_PACKAGES := ath11k-wifi-cybertan-rap630w-312g ath11k-firmware-ipq50xx-map-spruce \
SUPPORTED_DEVICES := sonicfi,rap630w-312g
DEVICE_PACKAGES := ath11k-wifi-sonicfi-rap630w-312g ath11k-firmware-ipq50xx-map-spruce \
-kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3 \
kmod-usb-uas kmod-fs-msdos kmod-fs-ntfs
DEVICE_DTS_CONFIG := config@mp03.3
endef
TARGET_DEVICES += cybertan_rap630w_312g
TARGET_DEVICES += sonicfi_rap630w_312g
define Device/sonicfi_rap630c_311g
DEVICE_TITLE := Sonicfi RAP630C-311G
@@ -73,6 +73,17 @@ define Device/sonicfi_rap630w_311g
endef
TARGET_DEVICES += sonicfi_rap630w_311g
define Device/sonicfi_rap630e
DEVICE_TITLE := Sonicfi RAP630E
DEVICE_DTS := qcom-ipq5018-rap630e
SUPPORTED_DEVICES := sonicfi,rap630e
DEVICE_PACKAGES := ath11k-wifi-sonicfi-rap630e ath11k-firmware-ipq50xx-spruce ath11k-firmware-qcn6122
DEVICE_DTS_CONFIG := config@mp03.5-c1
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
IMAGE/nand-factory.ubi := append-ubi
endef
TARGET_DEVICES += sonicfi_rap630e
define Device/edgecore_eap104
DEVICE_TITLE := EdgeCore EAP104
DEVICE_DTS := qcom-ipq5018-eap104
@@ -154,6 +165,15 @@ define Device/edgecore_oap101e_6e
endef
TARGET_DEVICES += edgecore_oap101e_6e
define Device/emplus_wap385c
DEVICE_TITLE := Emplus WAP385C
DEVICE_DTS := qcom-ipq5018-emplus-wap385c
SUPPORTED_DEVICES := emplus,wap385c
DEVICE_PACKAGES := ath11k-wifi-emplus-wap385c ath11k-firmware-ipq50xx-map-spruce
DEVICE_DTS_CONFIG := config@mp03.3
endef
TARGET_DEVICES += emplus_wap385c
define Device/hfcl_ion4x_w
DEVICE_TITLE := HFCL ION4x_w
DEVICE_DTS := qcom-ipq5018-hfcl-ion4x_w
@@ -219,3 +239,16 @@ define Device/glinet_b3000
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
endef
TARGET_DEVICES += glinet_b3000
define Device/emplus_wap581
DEVICE_TITLE := Emplus WAP581
DEVICE_DTS := qcom-ipq5018-emplus-wap581
SUPPORTED_DEVICES := emplus,wap581
DEVICE_PACKAGES := ath11k-wifi-emplus-wap581 ath11k-firmware-ipq50xx-map-spruce
DEVICE_DTS_CONFIG := config@mp03.3
IMAGES := sysupgrade.tar nand-factory.bin
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
endef
TARGET_DEVICES += emplus_wap581

View File

@@ -15,6 +15,9 @@ cig,wf188n)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
ucidef_set_led_default "power" "POWER" "green:power" "on"
;;
cig,wf660a)
ucidef_set_led_default "power" "POWER" "status:blue" "on"
;;
edgecore,eap101)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
@@ -23,6 +26,12 @@ edgecore,eap101)
ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
ucidef_set_led_default "power" "POWER" "green:led_pwr" "on"
;;
emplus,wap386v2)
ucidef_set_led_default "power" "POWER" "red:power" "on"
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0" "tx rx link"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
;;
hfcl,ion4xi|\
hfcl,ion4x|\
hfcl,ion4x_2|\

View File

@@ -34,10 +34,10 @@ qcom_setup_interfaces()
ucidef_set_interface_lan "eth1"
ucidef_set_interface_wan "eth0"
;;
cig,wf660a)
cig,wf660a|\
emplus,wap386v2)
ucidef_set_interface_wan "eth0"
;;
yuncore,fap650)
ucidef_set_interface_lan "eth3 eth2 eth1 eth0"
ucidef_set_interface_wan "eth4"
@@ -76,6 +76,9 @@ qcom_setup_macs()
ucidef_set_network_device_mac eth0 $wan_mac
ip link set eth0 address $wan_mac
;;
emplus,wap386v2)
wan_mac=$(cat /sys/class/net/eth0/address)
;;
yuncore,ax840)
wan_mac=$(cat /sys/class/net/eth1/address)
lan_mac=$(macaddr_add "$wan_mac" 1)

View File

@@ -76,6 +76,7 @@ case "$FIRMWARE" in
cig,wf188n|\
cig,wf660a|\
edgecore,eap101|\
emplus,wap386v2|\
hfcl,ion4xi|\
hfcl,ion4x|\
hfcl,ion4x_2|\
@@ -109,7 +110,8 @@ ath11k-macs)
edgecore,eap101)
ath11k_generate_macs_eap101
;;
cig,wf188n)
cig,wf188n|\
emplus,wap386v2)
ath11k_generate_macs
;;
cig,wf660a)

View File

@@ -6,26 +6,27 @@ board=$(board_name)
case "$board" in
"edgecore,eap101")
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
;;
"edgecore,eap102")
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
"edgecore,eap102"|\
"edgecore,oap103")
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
;;
"edgecore,oap101e-6e"|\
"edgecore,oap101-6e")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy6g
;;
"edgecore,oap101e"|\
"edgecore,oap101")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
;;
"edgecore,eap104")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
;;
esac

View File

@@ -7,11 +7,12 @@ boot() {
hfcl,ion4xe|\
hfcl,ion4xi)
fw_setenv boot_count 0
;;
;;
edgecore,eap101|\
edgecore,eap102|\
edgecore,oap102|\
edgecore.eap104)
edgecore,oap103|\
edgecore,eap104)
avail=$(fw_printenv -n upgrade_available)
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
fw_setenv bootcount 0

View File

@@ -122,6 +122,7 @@ platform_check_image() {
wallys,dr6018|\
wallys,dr6018-v4|\
edgecore,eap101|\
emplus,wap386v2|\
hfcl,ion4xi|\
hfcl,ion4x|\
hfcl,ion4x_2|\
@@ -146,6 +147,13 @@ platform_do_upgrade() {
spi_nor_emmc_do_upgrade_bootconfig $1
;;
cig,wf188n|\
emplus,wap386v2)
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)"
CI_BOOTCFG=1
}
nand_upgrade_tar "$1"
;;
glinet,ax1800|\
glinet,axt1800|\
wallys,dr6018|\

View File

@@ -11,7 +11,6 @@
#include "ipq6018-cpr-regulator.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
/ {
compatible = "cig,wf660a", "qcom,ipq6018-ap-cp01", "qcom,ipq6018";
@@ -29,6 +28,11 @@
ethernet2 = "/soc/dp3";
ethernet3 = "/soc/dp4";
ethernet4 = "/soc/dp5";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
@@ -155,6 +159,21 @@
drive-strength = <8>;
bias-pull-up;
};
button_pins: button_pins {
wps_button {
pins = "gpio9";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
reset_button {
pins = "gpio19";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
mdio_pins: mdio_pinmux {
mux_0 {
@@ -181,20 +200,20 @@
};
};
pwm_pins: pwm_pinmux {
led_pins: led_pins {
mux_1 {
pins = "gpio22";
function = "pwm02";
function = "gpio";
drive-strength = <8>;
};
mux_2 {
pins = "gpio23";
function = "pwm12";
function = "gpio";
drive-strength = <8>;
};
mux_3 {
pins = "gpio24";
function = "pwm22";
function = "gpio";
drive-strength = <8>;
};
};
@@ -208,27 +227,6 @@
};
};
leds_pins: leds_pins {
led_5g {
pins = "gpio35";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_2g {
pins = "gpio37";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_usb0 {
pins = "gpio50";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
btcoex_pins: btcoex_pins {
mux_0 {
pins = "gpio51";
@@ -390,36 +388,38 @@
mdiobus = <&mdio>;
};
pwm {
pinctrl-0 = <&pwm_pins>;
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
used-pwm-indices = <1>, <1>, <1>, <0>;
dft-pwm-status = <0>, <1>, <0>, <0>;
status = "ok";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
led@35 {
label = "led_5g";
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "led_5g";
default-state = "off";
led_power: led@22 {
label = "status:blue";
gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
};
led@37 {
label = "led_2g";
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "led_2g";
default-state = "off";
led@23 {
label = "status:green";
gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
};
led@50 {
label = "led_usb0";
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "usb-host";
default-state = "off";
led@24 {
label = "status:red";
gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
};
};
};

View File

@@ -0,0 +1,356 @@
/*
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/dts-v1/;
#include "ipq6018.dtsi"
#include "ipq6018-cpr-regulator.dtsi"
#include <dt-bindings/input/input.h>
/ {
model = "Emplus WAP386 v2";
compatible = "emplus,wap386v2", "qcom,ipq6018-cp03", "qcom,ipq6018";
aliases {
/*
* Aliases as required by u-boot
* to patch MAC addresses
*/
ethernet0 = "/soc/dp1";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
stdout-path = "serial0:115200n8";
bootargs-append = " swiotlb=1 coherent_pool=2M";
};
/*
* +=========+==============+========================+
* | | | |
* | Region | Start Offset | Size |
* | | | |
* +--------+--------------+-------------------------+
* | | | |
* | | | |
* | | | |
* | | | |
* | Linux | 0x41000000 | 139MB |
* | | | |
* | | | |
* | | | |
* +--------+--------------+-------------------------+
* | TZ App | 0x49B00000 | 6MB |
* +--------+--------------+-------------------------+
*
* From the available 145 MB for Linux in the first 256 MB,
* we are reserving 6 MB for TZAPP.
*
* Refer arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi
* for memory layout.
*/
/* TZAPP is enabled only in default memory profile */
#if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__)
reserved-memory {
tzapp:tzapp@49B00000 { /* TZAPPS */
no-map;
reg = <0x0 0x49B00000 0x0 0x00600000>;
};
};
#endif
};
&tlmm {
gpio-reserved-ranges = <20 1>;
uart_pins: uart_pins {
mux {
pins = "gpio44", "gpio45";
function = "blsp2_uart";
drive-strength = <8>;
bias-pull-down;
};
};
spi_0_pins: spi_0_pins {
mux {
pins = "gpio38", "gpio39", "gpio40", "gpio41";
function = "blsp0_spi";
drive-strength = <8>;
bias-pull-down;
};
};
button_pins: button_pins {
reset_button {
pins = "gpio9";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
mdio_pins: mdio_pinmux {
mux_0 {
pins = "gpio64";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio65";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
mux_2 {
pins = "gpio75";
function = "gpio";
bias-pull-up;
};
};
leds_pins: leds_pins {
led_5g {
pins = "gpio31";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_2g {
pins = "gpio30";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
};
&soc {
mdio@90000 {
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 75 0>;
status = "ok";
phy0: ethernet-phy@0 {
reg = <3>;
};
phy1: ethernet-phy@1 {
reg = <4>;
};
};
ess-switch@3a000000 {
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
switch_lan_bmp = <0x08>; /* lan port bitmap */
switch_wan_bmp = <0x10>; /* wan port bitmap */
switch_inner_bmp = <0xc0>; /*inner port bitmap*/
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
qcom,port_phyinfo {
port@0 {
port_id = <2>;
phy_address = <3>;
};
port@1 {
port_id = <3>;
phy_address = <4>;
};
};
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
qcom,id = <3>;
reg = <0x3a001400 0x200>;
qcom,mactype = <0>;
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <4>;
phy-mode = "sgmii";
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
button@9 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led_power: led@28 {
label = "red:power";
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "wap386v2:red:power";
default-state = "on";
};
led@29 {
label = "blue:wan";
gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "wap386v2:blue:eth";
default-state = "on";
};
led@30 {
label = "blue:wifi2";
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "wap386v2:blue:2g";
default-state = "on";
};
led@31 {
label = "blue:wifi5";
gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "wap386v2:blue:5g";
default-state = "on";
};
};
};
&blsp1_uart3 {
pinctrl-0 = <&uart_pins>;
pinctrl-names = "default";
status = "ok";
};
&spi_0 {
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
cs-select = <0>;
status = "ok";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "n25q128a11";
linux,modalias = "m25p80", "n25q128a11";
spi-max-frequency = <50000000>;
use-default-sizes;
};
};
&wifi0 {
qcom,board_id = <0x30>;
};
&pcie_phy {
status = "ok";
};
&pcie0 {
#if defined(__CNSS2__)
status = "ok";
#endif
};
&qpic_bam {
status = "ok";
};
&qpic_nand {
status = "ok";
nand@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
nand-ecc-strength = <4>;
nand-ecc-step-size = <512>;
nand-bus-width = <8>;
};
};
&ssphy_0 {
status = "ok";
};
&nss_crypto {
status = "ok";
};
&CPU0 {
operating-points = <
/* kHz uV (fixed) */
864000 1100000
1056000 1100000
1320000 1100000
1440000 1100000
1608000 1100000
1800000 1100000
>;
clock-latency = <200000>;
};
&CPU1 {
operating-points = <
/* kHz uV (fixed) */
864000 1100000
1056000 1100000
1320000 1100000
1440000 1100000
1608000 1100000
1800000 1100000
>;
clock-latency = <200000>;
};
&CPU2 {
operating-points = <
/* kHz uV (fixed) */
864000 1100000
1056000 1100000
1320000 1100000
1440000 1100000
1608000 1100000
1800000 1100000
>;
clock-latency = <200000>;
};
&CPU3 {
operating-points = <
/* kHz uV (fixed) */
864000 1100000
1056000 1100000
1320000 1100000
1440000 1100000
1608000 1100000
1800000 1100000
>;
clock-latency = <200000>;
};
&rpm_glink {
status = "disabled";
};

View File

@@ -76,6 +76,15 @@ define Device/edgecore_eap101
endef
TARGET_DEVICES += edgecore_eap101
define Device/emplus_wap386v2
DEVICE_TITLE := Emplus WAP386v2
DEVICE_DTS := qcom-ipq6018-emplus-wap386v2
DEVICE_DTS_CONFIG := config@cp03-c1
SUPPORTED_DEVICES := emplus,wap386v2
DEVICE_PACKAGES := ath11k-wifi-qcom-ipq6018 uboot-env
endef
TARGET_DEVICES += emplus_wap386v2
define Device/indio_um-310ax-v1
DEVICE_TITLE := Indio UM-310AX V1
DEVICE_DTS := qcom-ipq6018-indio-um-310ax-v1

View File

@@ -0,0 +1,11 @@
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -367,7 +367,7 @@ static void __sdhci_led_deactivate(struc
sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
}
-#if IS_REACHABLE(CONFIG_LEDS_CLASS)
+#if 0
static void sdhci_led_control(struct led_classdev *led,
enum led_brightness brightness)
{

View File

@@ -13,13 +13,21 @@ cig,wf194c4)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
;;
edgecore,eap102|\
edgecore,oap102)
edgecore,oap102|\
edgecore,oap103)
ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
ucidef_set_led_wlan "power" "POWER" "green:power" "default-on"
;;
emplus,wap380c)
ucidef_set_led_default "power" "POWER" "ipq::led0" "on"
ucidef_set_led_netdev "wan" "WAN" "ipq::led1" "eth0"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "ipq::led2" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "ipq::led3" "phy0tpt"
;;
sonicfi,rap630w-311g|\
sonicfi,rap650c|\
cybertan,eww631-b1)
ucidef_set_led_default "power" "POWER" "sys:blue" "on"
;;

View File

@@ -12,6 +12,7 @@ qcom_setup_interfaces()
ucidef_add_switch_attr "switch0" "reset" "false"
case $board in
emplus,wap380c|\
tplink,ex227|\
tplink,ex447)
ucidef_set_interface_wan "eth0"
@@ -23,6 +24,8 @@ qcom_setup_interfaces()
;;
edgecore,eap102|\
edgecore,oap102|\
edgecore,oap103|\
sonicfi,rap650c|\
cig,wf196)
ucidef_set_interface_lan "eth1"
ucidef_set_interface_wan "eth0"
@@ -49,6 +52,16 @@ qcom_setup_macs()
ip link set eth1 address $lan_mac
ucidef_set_label_macaddr $wan_mac
;;
sonicfi,rap650c)
mac=$(fw_printenv -n BaseMacAddress)
[ -z "$mac" ] && return;
wan_mac=$(macaddr_canonicalize $mac)
lan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth0 $wan_mac
ucidef_set_network_device_mac eth1 $lan_mac
ip link set eth0 address $wan_mac
ip link set eth1 address $lan_mac
;;
*)
wan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_add "$wan_mac" 1)

View File

@@ -16,6 +16,20 @@ ath11k_generate_macs() {
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
}
ath11k_generate_macs_rap650c() {
mac=$(fw_printenv -n BaseMacAddress)
[ -z "$mac" ] && return;
touch /lib/firmware/ath11k-macs
eth=$(macaddr_canonicalize $mac)
mac1=$(macaddr_add $eth 3)
mac2=$(macaddr_add $eth 2)
mac3=$(macaddr_add $eth 4)
echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs
echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs
}
ath11k_generate_macs_wf196() {
touch /lib/firmware/ath11k-macs
mac=$(grep BaseMacAddress= /dev/mtd18 | cut -dx -f2)
@@ -56,12 +70,15 @@ case "$FIRMWARE" in
cig,wf196|\
edgecore,eap102 |\
edgecore,oap102 |\
edgecore,oap103 |\
edgecore,eap106 |\
emplus,wap380c|\
qcom,ipq807x-hk01|\
qcom,ipq807x-hk14|\
tplink,ex227|\
tplink,ex447|\
yuncore,ax840|\
sonicfi,rap650c|\
sercomm,wallaby)
caldata_extract "0:ART" 0x1000 0x20000
;;
@@ -89,12 +106,16 @@ ath11k-macs)
case "$board" in
edgecore,eap102|\
edgecore,oap102|\
edgecore,oap103|\
edgecore,eap106)
ath11k_generate_macs
;;
cig,wf196)
ath11k_generate_macs_wf196
;;
sonicfi,rap650c)
ath11k_generate_macs_rap650c
;;
esac
;;
ath11k/IPQ8074/hw2.0/board.bin)

View File

@@ -6,26 +6,28 @@ board=$(board_name)
case "$board" in
"edgecore,eap101")
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/ipq6018\ hw1.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
;;
"edgecore,eap102")
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy1
"edgecore,eap102"|\
"edgecore,oap103"|\
"sonicfi,rap650c")
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/ipq8074\ hw2.0/mac1/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
;;
"edgecore,oap101e-6e"|\
"edgecore,oap101-6e")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy6g
;;
"edgecore,oap101e"|\
"edgecore,oap101")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_1/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
;;
"edgecore,eap104")
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy0
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy1
ln -s /sys/kernel/debug/ath11k/ipq5018\ hw1.0/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy2g
ln -s /sys/kernel/debug/ath11k/qcn6122_2/mac0/fw_stats/pdev_stats /tmp/pdev_stats_phy5g
;;
esac

View File

@@ -11,7 +11,8 @@ boot() {
edgecore,eap101|\
edgecore,eap102|\
edgecore,oap102|\
edgecore.eap104)
edgecore,oap103|\
edgecore,eap104)
avail=$(fw_printenv -n upgrade_available)
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
fw_setenv bootcount 0

View File

@@ -27,7 +27,10 @@ platform_check_image() {
cig,wf196|\
edgecore,eap102|\
edgecore,oap102|\
edgecore,oap103|\
edgecore,eap106|\
emplus,wap380c|\
sonicfi,rap650c|\
tplink,ex227|\
tplink,ex447)
[ "$magic_long" = "73797375" ] && return 0
@@ -46,8 +49,15 @@ platform_do_upgrade() {
tplink,ex227)
qca_do_upgrade "$1"
;;
cig,wf194c4|\
cig,wf196|\
emplus,wap380c)
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)"
CI_BOOTCFG=1
}
nand_upgrade_tar "$1"
;;
cig,wf194c4|\
tplink,ex447)
nand_upgrade_tar "$1"
;;
@@ -57,7 +67,8 @@ platform_do_upgrade() {
nand_upgrade_tar "$1"
;;
edgecore,eap102|\
edgecore,oap102)
edgecore,oap102|\
edgecore,oap103)
if [ "$(find_mtd_chardev rootfs)" ]; then
CI_UBIPART="rootfs"
else
@@ -75,5 +86,17 @@ platform_do_upgrade() {
fi
nand_upgrade_tar "$1"
;;
sonicfi,rap650c)
boot_part=$(fw_printenv -n bootfrom)
[ ${#boot_part} -eq 0 ] && boot_part=0
echo "Current bootfrom is $boot_part"
if [[ $boot_part == 1 ]]; then
CI_UBIPART="rootfs"
CI_FWSETENV="bootfrom 0"
elif [[ $boot_part == 0 ]]; then
CI_UBIPART="rootfs_1"
CI_FWSETENV="bootfrom 1"
fi
nand_upgrade_tar "$1"
esac
}

View File

@@ -0,0 +1,736 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/* Copyright (c) 2020 The Linux Foundation. All rights reserved.
*/
#include "ipq8074.dtsi"
#include "ipq8074-ac-cpu.dtsi"
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Edgecore OAP103";
compatible = "edgecore,oap103", "qcom,ipq807x-ac02", "qcom,ipq807x";
qcom,msm-id = <0x178 0x0>;
interrupt-parent = <&intc>;
aliases {
serial0 = &blsp1_uart5;
/* Aliases as required by u-boot to patch MAC addresses */
ethernet1 = "/soc/dp5";
ethernet0 = "/soc/dp6";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
stdout-path = "serial0";
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
mcu-enable {
gpio-export,name = "mcu-enable";
gpio-export,output = <0>;
gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
};
usb-hub-enable {
gpio-export,name = "usb-hub-enable";
gpio-export,output = <1>;
gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;
};
usb-rear-power {
gpio-export,name = "usb-rear-power";
gpio-export,output = <1>;
gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
};
usb-side-power {
gpio-export,name = "usb-side-power";
gpio-export,output = <1>;
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
};
};
soc {
pinctrl@1000000 {
pinctrl-0 = <&mcu_rst &mcu_rsv &usb_rear_pwr &usb_side_pwr &usb_hub_rst>;
pinctrl-names = "default";
mcu_rst: mcu_rst_pins {
pins = "gpio54";
function = "gpio";
drive-strength = <8>;
bias-disable;
output-low;
};
mcu_rsv: mcu_rsv_pins {
pins = "gpio56";
function = "gpio";
drive-strength = <8>;
bias-disable;
};
usb_rear_pwr: usb_rear_pwr_pins {
pins = "gpio29";
function = "gpio";
drive-strength = <8>;
bias-disable;
output-high;
};
usb_side_pwr: usb_side_pwr_pins {
pins = "gpio30";
function = "gpio";
drive-strength = <8>;
bias-disable;
output-high;
};
usb_hub_rst: usb_hub_rst_pins {
pins = "gpio55";
function = "gpio";
drive-strength = <8>;
bias-disable;
output-high;
};
button_pins: button_pins {
reset_button {
pins = "gpio66";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
mdio_pins: mdio_pinmux {
mux_0 {
pins = "gpio68";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio69";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
mux_2 {
pins = "gpio33";
function = "gpio";
bias-pull-up;
};
mux_3 {
pins = "gpio44";
function = "gpio";
bias-pull-up;
};
};
led_pins: led_pins {
led_2g {
pins = "gpio42";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_5g {
pins = "gpio43";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
};
serial@78b3000 {
status = "ok";
};
spi@78b5000 {
status = "ok";
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
cs-select = <0>;
m25p80@0 {
compatible = "n25q128a11";
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
spi-max-frequency = <50000000>;
};
};
dma@7984000 {
status = "ok";
};
nand@79b0000 {
status = "ok";
nand@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
nand-ecc-strength = <4>;
nand-ecc-step-size = <512>;
nand-bus-width = <8>;
};
};
qusb@79000 {
status = "ok";
};
ssphy@78000 {
status = "ok";
};
usb3@8A00000 {
status = "ok";
};
usb3@8C00000 {
status = "ok";
};
qusb@59000 {
status = "ok";
};
ssphy@58000 {
status = "ok";
};
usb3@8C00000 {
status = "ok";
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
status = "ok";
button@1 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 66 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
mdio: mdio@90000 {
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 37 0 &tlmm 25 1 &tlmm 44 1>;
phy0: ethernet-phy@0 {
reg = <0>;
};
phy1: ethernet-phy@1 {
reg = <1>;
};
phy2: ethernet-phy@2 {
reg = <2>;
};
phy3: ethernet-phy@3 {
reg = <3>;
};
phy4: ethernet-phy@4 {
reg = <24>;
};
phy5: ethernet-phy@5 {
reg = <28>;
};
};
ess-switch@3a000000 {
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
switch_lan_bmp = <0x3e>; /* lan port bitmap */
switch_wan_bmp = <0x40>; /* wan port bitmap */
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/
switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
bm_tick_mode = <0>; /* bm tick mode */
tm_tick_mode = <0>; /* tm tick mode */
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <0>;
};
port@1 {
port_id = <2>;
phy_address = <1>;
};
port@2 {
port_id = <3>;
phy_address = <2>;
};
port@3 {
port_id = <4>;
phy_address = <3>;
};
port@4 {
port_id = <5>;
phy_address = <24>;
port_mac_sel = "QGMAC_PORT";
};
port@5 {
port_id = <6>;
phy_address = <28>;
port_mac_sel = "QGMAC_PORT";
};
};
port_scheduler_resource {
port@0 {
port_id = <0>;
ucast_queue = <0 143>;
mcast_queue = <256 271>;
l0sp = <0 35>;
l0cdrr = <0 47>;
l0edrr = <0 47>;
l1cdrr = <0 7>;
l1edrr = <0 7>;
};
port@1 {
port_id = <1>;
ucast_queue = <144 159>;
mcast_queue = <272 275>;
l0sp = <36 39>;
l0cdrr = <48 63>;
l0edrr = <48 63>;
l1cdrr = <8 11>;
l1edrr = <8 11>;
};
port@2 {
port_id = <2>;
ucast_queue = <160 175>;
mcast_queue = <276 279>;
l0sp = <40 43>;
l0cdrr = <64 79>;
l0edrr = <64 79>;
l1cdrr = <12 15>;
l1edrr = <12 15>;
};
port@3 {
port_id = <3>;
ucast_queue = <176 191>;
mcast_queue = <280 283>;
l0sp = <44 47>;
l0cdrr = <80 95>;
l0edrr = <80 95>;
l1cdrr = <16 19>;
l1edrr = <16 19>;
};
port@4 {
port_id = <4>;
ucast_queue = <192 207>;
mcast_queue = <284 287>;
l0sp = <48 51>;
l0cdrr = <96 111>;
l0edrr = <96 111>;
l1cdrr = <20 23>;
l1edrr = <20 23>;
};
port@5 {
port_id = <5>;
ucast_queue = <208 223>;
mcast_queue = <288 291>;
l0sp = <52 55>;
l0cdrr = <112 127>;
l0edrr = <112 127>;
l1cdrr = <24 27>;
l1edrr = <24 27>;
};
port@6 {
port_id = <6>;
ucast_queue = <224 239>;
mcast_queue = <292 295>;
l0sp = <56 59>;
l0cdrr = <128 143>;
l0edrr = <128 143>;
l1cdrr = <28 31>;
l1edrr = <28 31>;
};
port@7 {
port_id = <7>;
ucast_queue = <240 255>;
mcast_queue = <296 299>;
l0sp = <60 63>;
l0cdrr = <144 159>;
l0edrr = <144 159>;
l1cdrr = <32 35>;
l1edrr = <32 35>;
};
};
port_scheduler_config {
port@0 {
port_id = <0>;
l1scheduler {
group@0 {
sp = <0 1>; /*L0 SPs*/
/*cpri cdrr epri edrr*/
cfg = <0 0 0 0>;
};
};
l0scheduler {
group@0 {
/*unicast queues*/
ucast_queue = <0 4 8>;
/*multicast queues*/
mcast_queue = <256 260>;
/*sp cpri cdrr epri edrr*/
cfg = <0 0 0 0 0>;
};
group@1 {
ucast_queue = <1 5 9>;
mcast_queue = <257 261>;
cfg = <0 1 1 1 1>;
};
group@2 {
ucast_queue = <2 6 10>;
mcast_queue = <258 262>;
cfg = <0 2 2 2 2>;
};
group@3 {
ucast_queue = <3 7 11>;
mcast_queue = <259 263>;
cfg = <0 3 3 3 3>;
};
};
};
port@1 {
port_id = <1>;
l1scheduler {
group@0 {
sp = <36>;
cfg = <0 8 0 8>;
};
group@1 {
sp = <37>;
cfg = <1 9 1 9>;
};
};
l0scheduler {
group@0 {
ucast_queue = <144>;
ucast_loop_pri = <16>;
mcast_queue = <272>;
mcast_loop_pri = <4>;
cfg = <36 0 48 0 48>;
};
};
};
port@2 {
port_id = <2>;
l1scheduler {
group@0 {
sp = <40>;
cfg = <0 12 0 12>;
};
group@1 {
sp = <41>;
cfg = <1 13 1 13>;
};
};
l0scheduler {
group@0 {
ucast_queue = <160>;
ucast_loop_pri = <16>;
mcast_queue = <276>;
mcast_loop_pri = <4>;
cfg = <40 0 64 0 64>;
};
};
};
port@3 {
port_id = <3>;
l1scheduler {
group@0 {
sp = <44>;
cfg = <0 16 0 16>;
};
group@1 {
sp = <45>;
cfg = <1 17 1 17>;
};
};
l0scheduler {
group@0 {
ucast_queue = <176>;
ucast_loop_pri = <16>;
mcast_queue = <280>;
mcast_loop_pri = <4>;
cfg = <44 0 80 0 80>;
};
};
};
port@4 {
port_id = <4>;
l1scheduler {
group@0 {
sp = <48>;
cfg = <0 20 0 20>;
};
group@1 {
sp = <49>;
cfg = <1 21 1 21>;
};
};
l0scheduler {
group@0 {
ucast_queue = <192>;
ucast_loop_pri = <16>;
mcast_queue = <284>;
mcast_loop_pri = <4>;
cfg = <48 0 96 0 96>;
};
};
};
port@5 {
port_id = <5>;
l1scheduler {
group@0 {
sp = <52>;
cfg = <0 24 0 24>;
};
group@1 {
sp = <53>;
cfg = <1 25 1 25>;
};
};
l0scheduler {
group@0 {
ucast_queue = <208>;
ucast_loop_pri = <16>;
mcast_queue = <288>;
mcast_loop_pri = <4>;
cfg = <52 0 112 0 112>;
};
};
};
port@6 {
port_id = <6>;
l1scheduler {
group@0 {
sp = <56>;
cfg = <0 28 0 28>;
};
group@1 {
sp = <57>;
cfg = <1 29 1 29>;
};
};
l0scheduler {
group@0 {
ucast_queue = <224>;
ucast_loop_pri = <16>;
mcast_queue = <292>;
mcast_loop_pri = <4>;
cfg = <56 0 128 0 128>;
};
};
};
port@7 {
port_id = <7>;
l1scheduler {
group@0 {
sp = <60>;
cfg = <0 32 0 32>;
};
group@1 {
sp = <61>;
cfg = <1 33 1 33>;
};
};
l0scheduler {
group@0 {
ucast_queue = <240>;
ucast_loop_pri = <16>;
mcast_queue = <296>;
cfg = <60 0 144 0 144>;
};
};
};
};
};
dp6 {
device_type = "network";
compatible = "qcom,nss-dp";
qcom,id = <6>;
reg = <0x3a001800 0x200>;
qcom,mactype = <0>;
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <28>;
phy-mode = "sgmii";
};
dp5 {
device_type = "network";
compatible = "qcom,nss-dp";
qcom,id = <5>;
reg = <0x3a001a00 0x200>;
qcom,mactype = <0>;
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <24>;
phy-mode = "sgmii";
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
led_pwr {
label = "green:wan";
gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
default-state = "off";
linux,default-trigger = "led_pwr";
};
led_2g {
label = "green:wifi2";
gpio = <&tlmm 47 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
led_5g {
label = "green:wifi5";
gpio = <&tlmm 48 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
led_power: led_bt {
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
label = "green:power";
default-state = "on";
linux,default-trigger = "led_bt";
};
};
nss-macsec0 {
compatible = "qcom,nss-macsec";
phy_addr = <0x18>;
mdiobus = <&mdio>;
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x1c>;
mdiobus = <&mdio>;
};
};
};
&apc_cpr {
/* Same CPR configuration as OAK */
compatible = "qcom,cpr4-ipq817x-apss-regulator";
thread@0 {
apc_vreg: regulator {
regulator-min-microvolt = <1>;
regulator-max-microvolt = <2>;
qcom,cpr-fuse-corners = <2>;
qcom,cpr-corners = <3>;
qcom,cpr-speed-bin-corners = <3>;
qcom,cpr-corner-fmax-map = <1 3>;
qcom,cpr-voltage-ceiling =
<840000 904000 944000>;
qcom,cpr-voltage-floor =
<592000 648000 712000>;
qcom,corner-frequencies =
<1017600000 1382400000 1382400000>;
qcom,cpr-open-loop-voltage-fuse-adjustment-0 =
/* Speed bin 0; CPR rev 0..7 */
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>;
qcom,cpr-open-loop-voltage-fuse-adjustment-1 =
/* Speed bin 0; CPR rev 0..7 */
< 0 0>,
< 0 0>,
< 0 0>,
< 20000 26000>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>;
qcom,cpr-open-loop-voltage-fuse-adjustment-v2-0 =
/* Speed bin 0; CPR rev 0..7 */
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>;
qcom,cpr-open-loop-voltage-fuse-adjustment-v2-1 =
/* Speed bin 0; CPR rev 0..7 */
< 0 0>,
< 0 7000>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>;
qcom,cpr-floor-to-ceiling-max-range =
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>;
};
};
};
&npu_cpr {
status = "disabled";
};
&nss0 {
qcom,low-frequency = <187200000>;
qcom,mid-frequency = <748800000>;
qcom,max-frequency = <1497600000>;
};
&nss0 {
npu-supply = <&dummy_reg>;
mx-supply = <&dummy_reg>;
};
&wifi0 {
qcom,board_id = <0x92>;
};
&wifi1 {
qcom,board_id = <0x292>;
};

View File

@@ -0,0 +1,650 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/* Copyright (c) 2020 The Linux Foundation. All rights reserved.
*/
#include "ipq8074.dtsi"
#include "ipq8074-hk-cpu.dtsi"
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "SonicFi RAP650C";
compatible = "sonicfi,rap650c", "qcom,ipq8074-ap-hk09", "qcom,ipq8074";
qcom,msm-id = <0x157 0x0>, <0x187 0x0>;
interrupt-parent = <&intc>;
aliases {
serial0 = &blsp1_uart5;
/* Aliases as required by u-boot to patch MAC addresses */
ethernet0 = "/soc/dp1";
ethernet1 = "/soc/dp2";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
stdout-path = "serial0";
};
soc {
pinctrl@1000000 {
button_pins: button_pins {
reset_button {
pins = "gpio57";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
usb_mux_sel_pins: usb_mux_pins {
mux {
pins = "gpio27";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
pcie0_pins: pcie_pins {
pcie0_rst {
pins = "gpio58";
function = "pcie0_rst";
drive-strength = <8>;
bias-pull-down;
};
pcie0_wake {
pins = "gpio59";
function = "pcie0_wake";
drive-strength = <8>;
bias-pull-down;
};
};
mdio_pins: mdio_pinmux {
mux_0 {
pins = "gpio68";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio69";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
mux_2 {
pins = "gpio25";
function = "gpio";
bias-pull-up;
};
mux_3 {
pins = "gpio44";
function = "gpio";
bias-pull-up;
};
};
led_pins: led_pins {
red {
pins = "gpio0";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
green {
pins = "gpio2";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
blue {
pins = "gpio9";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
spi_3_pins: spi_3_pins {
mux {
pins = "gpio50", "gpio52", "gpio53";
function = "blsp3_spi";
drive-strength = <8>;
bias-disable;
};
spi_cs {
pins = "gpio22";
function = "blsp3_spi2";
drive-strength = <8>;
bias-disable;
};
quartz_interrupt {
pins = "gpio47";
function = "gpio";
input;
bias-disable;
};
quartz_reset {
pins = "gpio21";
function = "gpio";
output-low;
bias-disable;
};
};
};
serial@78b3000 {
status = "ok";
};
dp1 {
device_type = "network";
compatible = "qcom,nss-dp";
qcom,id = <5>;
reg = <0x3a001800 0x200>;
qcom,mactype = <0>;
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <24>;
phy-mode = "sgmii";
};
dp2 {
device_type = "network";
compatible = "qcom,nss-dp";
qcom,id = <6>;
reg = <0x3a001a00 0x200>;
qcom,mactype = <0>;
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <28>;
phy-mode = "sgmii";
};
spi@78b5000 {
status = "ok";
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
cs-select = <0>;
m25p80@0 {
compatible = "n25q128a11";
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
spi-max-frequency = <50000000>;
};
};
spi@78b8000 {
status = "ok";
pinctrl-0 = <&spi_3_pins>;
pinctrl-names = "default";
cs-select = <2>;
quartz-reset-gpio = <&tlmm 21 1>;
spidev3: spi@3 {
compatible = "qti,spidev";
reg = <0>;
spi-max-frequency = <24000000>;
};
};
dma@7984000 {
status = "ok";
};
nand@79b0000 {
status = "ok";
nand@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
nand-ecc-strength = <4>;
nand-ecc-step-size = <512>;
nand-bus-width = <8>;
};
};
qusb@79000 {
status = "ok";
};
ssphy@78000 {
status = "ok";
};
usb3@8A00000 {
status = "ok";
};
qusb@59000 {
status = "ok";
};
ssphy@58000 {
status = "ok";
};
usb3@8C00000 {
status = "ok";
};
phy@84000 {
status = "ok";
};
phy@86000 {
status = "ok";
};
pci@20000000 {
perst-gpio = <&tlmm 58 1>;
status = "ok";
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
status = "ok";
button@1 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
red {
label = "sys:red";
gpio = <&tlmm 0 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
green {
label = "sys:green";
gpio = <&tlmm 2 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
led_power: blue {
label = "sys:blue";
gpio = <&tlmm 9 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
mdio: mdio@90000 {
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 37 0 &tlmm 25 0 &tlmm 44 0>;
phy0: ethernet-phy@0 {
reg = <0>;
};
phy1: ethernet-phy@1 {
reg = <1>;
};
phy2: ethernet-phy@2 {
reg = <2>;
};
phy3: ethernet-phy@3 {
reg = <3>;
};
phy4: ethernet-phy@4 {
reg = <24>;
};
phy5: ethernet-phy@5 {
reg = <28>;
};
};
ess-switch@3a000000 {
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
switch_lan_bmp = <0x3e>; /* lan port bitmap */
switch_wan_bmp = <0x40>; /* wan port bitmap */
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/
switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
bm_tick_mode = <0>; /* bm tick mode */
tm_tick_mode = <0>; /* tm tick mode */
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <0>;
};
port@1 {
port_id = <2>;
phy_address = <1>;
};
port@2 {
port_id = <3>;
phy_address = <2>;
};
port@3 {
port_id = <4>;
phy_address = <3>;
};
port@4 {
port_id = <5>;
phy_address = <24>;
port_mac_sel = "QGMAC_PORT";
};
port@5 {
port_id = <6>;
phy_address = <28>;
port_mac_sel = "QGMAC_PORT";
};
};
port_scheduler_resource {
port@0 {
port_id = <0>;
ucast_queue = <0 143>;
mcast_queue = <256 271>;
l0sp = <0 35>;
l0cdrr = <0 47>;
l0edrr = <0 47>;
l1cdrr = <0 7>;
l1edrr = <0 7>;
};
port@1 {
port_id = <1>;
ucast_queue = <144 159>;
mcast_queue = <272 275>;
l0sp = <36 39>;
l0cdrr = <48 63>;
l0edrr = <48 63>;
l1cdrr = <8 11>;
l1edrr = <8 11>;
};
port@2 {
port_id = <2>;
ucast_queue = <160 175>;
mcast_queue = <276 279>;
l0sp = <40 43>;
l0cdrr = <64 79>;
l0edrr = <64 79>;
l1cdrr = <12 15>;
l1edrr = <12 15>;
};
port@3 {
port_id = <3>;
ucast_queue = <176 191>;
mcast_queue = <280 283>;
l0sp = <44 47>;
l0cdrr = <80 95>;
l0edrr = <80 95>;
l1cdrr = <16 19>;
l1edrr = <16 19>;
};
port@4 {
port_id = <4>;
ucast_queue = <192 207>;
mcast_queue = <284 287>;
l0sp = <48 51>;
l0cdrr = <96 111>;
l0edrr = <96 111>;
l1cdrr = <20 23>;
l1edrr = <20 23>;
};
port@5 {
port_id = <5>;
ucast_queue = <208 223>;
mcast_queue = <288 291>;
l0sp = <52 55>;
l0cdrr = <112 127>;
l0edrr = <112 127>;
l1cdrr = <24 27>;
l1edrr = <24 27>;
};
port@6 {
port_id = <6>;
ucast_queue = <224 239>;
mcast_queue = <292 295>;
l0sp = <56 59>;
l0cdrr = <128 143>;
l0edrr = <128 143>;
l1cdrr = <28 31>;
l1edrr = <28 31>;
};
port@7 {
port_id = <7>;
ucast_queue = <240 255>;
mcast_queue = <296 299>;
l0sp = <60 63>;
l0cdrr = <144 159>;
l0edrr = <144 159>;
l1cdrr = <32 35>;
l1edrr = <32 35>;
};
};
port_scheduler_config {
port@0 {
port_id = <0>;
l1scheduler {
group@0 {
sp = <0 1>; /*L0 SPs*/
/*cpri cdrr epri edrr*/
cfg = <0 0 0 0>;
};
};
l0scheduler {
group@0 {
/*unicast queues*/
ucast_queue = <0 4 8>;
/*multicast queues*/
mcast_queue = <256 260>;
/*sp cpri cdrr epri edrr*/
cfg = <0 0 0 0 0>;
};
group@1 {
ucast_queue = <1 5 9>;
mcast_queue = <257 261>;
cfg = <0 1 1 1 1>;
};
group@2 {
ucast_queue = <2 6 10>;
mcast_queue = <258 262>;
cfg = <0 2 2 2 2>;
};
group@3 {
ucast_queue = <3 7 11>;
mcast_queue = <259 263>;
cfg = <0 3 3 3 3>;
};
};
};
port@1 {
port_id = <1>;
l1scheduler {
group@0 {
sp = <36>;
cfg = <0 8 0 8>;
};
group@1 {
sp = <37>;
cfg = <1 9 1 9>;
};
};
l0scheduler {
group@0 {
ucast_queue = <144>;
ucast_loop_pri = <16>;
mcast_queue = <272>;
mcast_loop_pri = <4>;
cfg = <36 0 48 0 48>;
};
};
};
port@2 {
port_id = <2>;
l1scheduler {
group@0 {
sp = <40>;
cfg = <0 12 0 12>;
};
group@1 {
sp = <41>;
cfg = <1 13 1 13>;
};
};
l0scheduler {
group@0 {
ucast_queue = <160>;
ucast_loop_pri = <16>;
mcast_queue = <276>;
mcast_loop_pri = <4>;
cfg = <40 0 64 0 64>;
};
};
};
port@3 {
port_id = <3>;
l1scheduler {
group@0 {
sp = <44>;
cfg = <0 16 0 16>;
};
group@1 {
sp = <45>;
cfg = <1 17 1 17>;
};
};
l0scheduler {
group@0 {
ucast_queue = <176>;
ucast_loop_pri = <16>;
mcast_queue = <280>;
mcast_loop_pri = <4>;
cfg = <44 0 80 0 80>;
};
};
};
port@4 {
port_id = <4>;
l1scheduler {
group@0 {
sp = <48>;
cfg = <0 20 0 20>;
};
group@1 {
sp = <49>;
cfg = <1 21 1 21>;
};
};
l0scheduler {
group@0 {
ucast_queue = <192>;
ucast_loop_pri = <16>;
mcast_queue = <284>;
mcast_loop_pri = <4>;
cfg = <48 0 96 0 96>;
};
};
};
port@5 {
port_id = <5>;
l1scheduler {
group@0 {
sp = <52>;
cfg = <0 24 0 24>;
};
group@1 {
sp = <53>;
cfg = <1 25 1 25>;
};
};
l0scheduler {
group@0 {
ucast_queue = <208>;
ucast_loop_pri = <16>;
mcast_queue = <288>;
mcast_loop_pri = <4>;
cfg = <52 0 112 0 112>;
};
};
};
port@6 {
port_id = <6>;
l1scheduler {
group@0 {
sp = <56>;
cfg = <0 28 0 28>;
};
group@1 {
sp = <57>;
cfg = <1 29 1 29>;
};
};
l0scheduler {
group@0 {
ucast_queue = <224>;
ucast_loop_pri = <16>;
mcast_queue = <292>;
mcast_loop_pri = <4>;
cfg = <56 0 128 0 128>;
};
};
};
port@7 {
port_id = <7>;
l1scheduler {
group@0 {
sp = <60>;
cfg = <0 32 0 32>;
};
group@1 {
sp = <61>;
cfg = <1 33 1 33>;
};
};
l0scheduler {
group@0 {
ucast_queue = <240>;
ucast_loop_pri = <16>;
mcast_queue = <296>;
cfg = <60 0 144 0 144>;
};
};
};
};
};
nss-macsec0 {
compatible = "qcom,nss-macsec";
phy_addr = <0x18>;
phy_access_mode = <0>;
mdiobus = <&mdio>;
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x1c>;
phy_access_mode = <0>;
mdiobus = <&mdio>;
};
};
};
&wifi0 {
qcom,board_id = <0x90>;
};
&wifi1 {
qcom,board_id = <0x290>;
};

View File

@@ -0,0 +1,648 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/* Copyright (c) 2020 The Linux Foundation. All rights reserved.
*/
#include "ipq8074.dtsi"
#include "ipq8074-ac-cpu.dtsi"
/ {
#address-cells = <0x2>;
#size-cells = <0x2>;
model = "Emplus WAP380C";
compatible = "emplus,wap380c", "qcom,ipq8074-ap-hk07", "qcom,ipq8074";
qcom,msm-id = <0x143 0x0>;
interrupt-parent = <&intc>;
aliases {
serial0 = &blsp1_uart5;
/* Aliases as required by u-boot to patch MAC addresses */
ethernet0 = "/soc/dp6";
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
stdout-path = "serial0";
};
soc {
qti: ledc@191E000 {
compatible = "qti,ledc";
reg = <0x191E000 0x20070>;
reg-names = "ledc_base_addr";
qti,tcsr_ledc_values = <0x0320193 0x00000000 \
0x00000000 0x00000000 \
0x00000000 0xFFFFFFFF \
0xFFFF7FFF 0xFFFFFFFF \
0x007D0820 0x00000000 \
0x10482094 0x03FFFFE1>;
qti,ledc_blink_indices_cnt = <6>;
qti,ledc_blink_indices = <15 14 13 12 11 10>;
qti,ledc_blink_idx_src_pair = <5 20>;
status = "ok";
};
pinctrl@1000000 {
button_pins: button_pins {
reset_button {
pins = "gpio52";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
mdio_pins: mdio_pinmux {
mux_0 {
pins = "gpio68";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mux_1 {
pins = "gpio69";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
mux_2 {
pins = "gpio44";
function = "gpio";
bias-pull-up;
};
};
ledc_pins: ledc_pinmux {
led_clk {
pins = "gpio18";
function = "led0";
drive-strength = <8>;
bias-pull-down;
};
led_data {
pins = "gpio19";
function = "led1";
drive-strength = <8>;
bias-pull-down;
};
led_clr {
pins = "gpio20";
function = "led2";
drive-strength = <8>;
bias-pull-up;
};
};
};
serial@78b3000 {
status = "ok";
};
spi@78b5000 {
status = "ok";
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
cs-select = <0>;
m25p80@0 {
compatible = "n25q128a11";
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
spi-max-frequency = <50000000>;
};
};
dma@7984000 {
status = "ok";
};
nand@79b0000 {
status = "ok";
nand@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
nand-ecc-strength = <4>;
nand-ecc-step-size = <512>;
nand-bus-width = <8>;
};
};
ssphy@78000 {
status = "ok";
};
ssphy@58000 {
status = "ok";
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
status = "ok";
button@1 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
debounce-interval = <60>;
};
};
mdio: mdio@90000 {
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
phy-reset-gpio = <&tlmm 43 1 &tlmm 44 1>;
phy0: ethernet-phy@0 {
reg = <0>;
};
phy1: ethernet-phy@1 {
reg = <1>;
};
phy2: ethernet-phy@2 {
reg = <2>;
};
phy3: ethernet-phy@3 {
reg = <3>;
};
phy4: ethernet-phy@4 {
reg = <4>;
};
phy5: ethernet-phy@5 {
reg = <28>;
};
};
ess-switch@3a000000 {
switch_cpu_bmp = <0x1>; /* cpu port bitmap */
switch_lan_bmp = <0x3e>; /* lan port bitmap */
switch_wan_bmp = <0x40>; /* wan port bitmap */
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
bm_tick_mode = <0>; /* bm tick mode */
tm_tick_mode = <0>; /* tm tick mode */
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <0>;
};
port@1 {
port_id = <2>;
phy_address = <1>;
};
port@2 {
port_id = <3>;
phy_address = <2>;
};
port@3 {
port_id = <4>;
phy_address = <3>;
};
port@4 {
port_id = <5>;
phy_address = <4>;
};
port@5 {
port_id = <6>;
phy_address = <28>;
port_mac_sel = "QGMAC_PORT";
};
};
port_scheduler_resource {
port@0 {
port_id = <0>;
ucast_queue = <0 143>;
mcast_queue = <256 271>;
l0sp = <0 35>;
l0cdrr = <0 47>;
l0edrr = <0 47>;
l1cdrr = <0 7>;
l1edrr = <0 7>;
};
port@1 {
port_id = <1>;
ucast_queue = <144 159>;
mcast_queue = <272 275>;
l0sp = <36 39>;
l0cdrr = <48 63>;
l0edrr = <48 63>;
l1cdrr = <8 11>;
l1edrr = <8 11>;
};
port@2 {
port_id = <2>;
ucast_queue = <160 175>;
mcast_queue = <276 279>;
l0sp = <40 43>;
l0cdrr = <64 79>;
l0edrr = <64 79>;
l1cdrr = <12 15>;
l1edrr = <12 15>;
};
port@3 {
port_id = <3>;
ucast_queue = <176 191>;
mcast_queue = <280 283>;
l0sp = <44 47>;
l0cdrr = <80 95>;
l0edrr = <80 95>;
l1cdrr = <16 19>;
l1edrr = <16 19>;
};
port@4 {
port_id = <4>;
ucast_queue = <192 207>;
mcast_queue = <284 287>;
l0sp = <48 51>;
l0cdrr = <96 111>;
l0edrr = <96 111>;
l1cdrr = <20 23>;
l1edrr = <20 23>;
};
port@5 {
port_id = <5>;
ucast_queue = <208 223>;
mcast_queue = <288 291>;
l0sp = <52 55>;
l0cdrr = <112 127>;
l0edrr = <112 127>;
l1cdrr = <24 27>;
l1edrr = <24 27>;
};
port@6 {
port_id = <6>;
ucast_queue = <224 239>;
mcast_queue = <292 295>;
l0sp = <56 59>;
l0cdrr = <128 143>;
l0edrr = <128 143>;
l1cdrr = <28 31>;
l1edrr = <28 31>;
};
port@7 {
port_id = <7>;
ucast_queue = <240 255>;
mcast_queue = <296 299>;
l0sp = <60 63>;
l0cdrr = <144 159>;
l0edrr = <144 159>;
l1cdrr = <32 35>;
l1edrr = <32 35>;
};
};
port_scheduler_config {
port@0 {
port_id = <0>;
l1scheduler {
group@0 {
sp = <0 1>; /*L0 SPs*/
/*cpri cdrr epri edrr*/
cfg = <0 0 0 0>;
};
};
l0scheduler {
group@0 {
/*unicast queues*/
ucast_queue = <0 4 8>;
/*multicast queues*/
mcast_queue = <256 260>;
/*sp cpri cdrr epri edrr*/
cfg = <0 0 0 0 0>;
};
group@1 {
ucast_queue = <1 5 9>;
mcast_queue = <257 261>;
cfg = <0 1 1 1 1>;
};
group@2 {
ucast_queue = <2 6 10>;
mcast_queue = <258 262>;
cfg = <0 2 2 2 2>;
};
group@3 {
ucast_queue = <3 7 11>;
mcast_queue = <259 263>;
cfg = <0 3 3 3 3>;
};
};
};
port@1 {
port_id = <1>;
l1scheduler {
group@0 {
sp = <36>;
cfg = <0 8 0 8>;
};
group@1 {
sp = <37>;
cfg = <1 9 1 9>;
};
};
l0scheduler {
group@0 {
ucast_queue = <144>;
ucast_loop_pri = <16>;
mcast_queue = <272>;
mcast_loop_pri = <4>;
cfg = <36 0 48 0 48>;
};
};
};
port@2 {
port_id = <2>;
l1scheduler {
group@0 {
sp = <40>;
cfg = <0 12 0 12>;
};
group@1 {
sp = <41>;
cfg = <1 13 1 13>;
};
};
l0scheduler {
group@0 {
ucast_queue = <160>;
ucast_loop_pri = <16>;
mcast_queue = <276>;
mcast_loop_pri = <4>;
cfg = <40 0 64 0 64>;
};
};
};
port@3 {
port_id = <3>;
l1scheduler {
group@0 {
sp = <44>;
cfg = <0 16 0 16>;
};
group@1 {
sp = <45>;
cfg = <1 17 1 17>;
};
};
l0scheduler {
group@0 {
ucast_queue = <176>;
ucast_loop_pri = <16>;
mcast_queue = <280>;
mcast_loop_pri = <4>;
cfg = <44 0 80 0 80>;
};
};
};
port@4 {
port_id = <4>;
l1scheduler {
group@0 {
sp = <48>;
cfg = <0 20 0 20>;
};
group@1 {
sp = <49>;
cfg = <1 21 1 21>;
};
};
l0scheduler {
group@0 {
ucast_queue = <192>;
ucast_loop_pri = <16>;
mcast_queue = <284>;
mcast_loop_pri = <4>;
cfg = <48 0 96 0 96>;
};
};
};
port@5 {
port_id = <5>;
l1scheduler {
group@0 {
sp = <52>;
cfg = <0 24 0 24>;
};
group@1 {
sp = <53>;
cfg = <1 25 1 25>;
};
};
l0scheduler {
group@0 {
ucast_queue = <208>;
ucast_loop_pri = <16>;
mcast_queue = <288>;
mcast_loop_pri = <4>;
cfg = <52 0 112 0 112>;
};
};
};
port@6 {
port_id = <6>;
l1scheduler {
group@0 {
sp = <56>;
cfg = <0 28 0 28>;
};
group@1 {
sp = <57>;
cfg = <1 29 1 29>;
};
};
l0scheduler {
group@0 {
ucast_queue = <224>;
ucast_loop_pri = <16>;
mcast_queue = <292>;
mcast_loop_pri = <4>;
cfg = <56 0 128 0 128>;
};
};
};
port@7 {
port_id = <7>;
l1scheduler {
group@0 {
sp = <60>;
cfg = <0 32 0 32>;
};
group@1 {
sp = <61>;
cfg = <1 33 1 33>;
};
};
l0scheduler {
group@0 {
ucast_queue = <240>;
ucast_loop_pri = <16>;
mcast_queue = <296>;
cfg = <60 0 144 0 144>;
};
};
};
};
};
dp6 {
device_type = "network";
compatible = "qcom,nss-dp";
qcom,id = <6>;
reg = <0x3a001800 0x200>;
qcom,mactype = <0>;
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <28>;
phy-mode = "sgmii";
};
nss-macsec1 {
compatible = "qcom,nss-macsec";
phy_addr = <0x1c>;
mdiobus = <&mdio>;
};
};
};
&apc_cpr {
/* Same CPR configuration as OAK */
compatible = "qcom,cpr4-ipq817x-apss-regulator";
thread@0 {
apc_vreg: regulator {
regulator-min-microvolt = <1>;
regulator-max-microvolt = <2>;
qcom,cpr-fuse-corners = <2>;
qcom,cpr-corners = <3>;
qcom,cpr-speed-bin-corners = <3>;
qcom,cpr-corner-fmax-map = <1 3>;
qcom,cpr-voltage-ceiling =
<840000 904000 944000>;
qcom,cpr-voltage-floor =
<592000 648000 712000>;
qcom,corner-frequencies =
<1017600000 1382400000 1382400000>;
qcom,cpr-open-loop-voltage-fuse-adjustment-0 =
/* Speed bin 0; CPR rev 0..7 */
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>;
qcom,cpr-open-loop-voltage-fuse-adjustment-1 =
/* Speed bin 0; CPR rev 0..7 */
< 0 0>,
< 0 0>,
< 0 0>,
< 20000 26000>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>;
qcom,cpr-open-loop-voltage-fuse-adjustment-v2-0 =
/* Speed bin 0; CPR rev 0..7 */
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>;
qcom,cpr-open-loop-voltage-fuse-adjustment-v2-1 =
/* Speed bin 0; CPR rev 0..7 */
< 0 0>,
< 0 7000>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>,
< 0 0>;
qcom,cpr-floor-to-ceiling-max-range =
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>,
< 40000 40000 40000>;
};
};
};
&npu_cpr {
status = "disabled";
};
&nss0 {
qcom,low-frequency = <187200000>;
qcom,mid-frequency = <748800000>;
qcom,max-frequency = <1497600000>;
};
&nss0 {
npu-supply = <&dummy_reg>;
mx-supply = <&dummy_reg>;
};
&wifi0 {
qcom,board_id = <0x92>;
};
&wifi1 {
qcom,board_id = <0x290>;
};
&ledc {
pinctrl-0 = <&ledc_pins>;
pinctrl-names = "default";
status = "ok";
led_power: led0 {
label = "ipq::led0";
linux,default-trigger = "default-on";
};
wan: led1 {
label = "ipq::led1";
linux,default-trigger = "netdev";
};
wifi2g: led2 {
label = "ipq::led2";
linux,default-trigger = "phy1tpt";
};
wifi5g: led3 {
label = "ipq::led3";
linux,default-trigger = "phy0tpt";
};
led4 {
label = "ipq::led4";
linux,default-trigger = "none";
};
led5 {
label = "ipq::led5";
linux,default-trigger = "none";
};
};

View File

@@ -39,6 +39,15 @@ define Device/edgecore_oap102
endef
TARGET_DEVICES += edgecore_oap102
define Device/edgecore_oap103
DEVICE_TITLE := Edgecore OAP103
DEVICE_DTS := qcom-ipq807x-oap103
DEVICE_DTS_CONFIG=config@ac02
SUPPORTED_DEVICES := edgecore,oap103
DEVICE_PACKAGES := ath11k-wifi-edgecore-oap103 kmod-usb2 kmod-usb3 uboot-envtools
endef
TARGET_DEVICES += edgecore_oap103
define Device/edgecore_eap106
DEVICE_TITLE := Edgecore EAP106
DEVICE_DTS := qcom-ipq807x-eap106
@@ -48,6 +57,26 @@ define Device/edgecore_eap106
endef
#TARGET_DEVICES += edgecore_eap106
define Device/emplus_wap380c
DEVICE_TITLE := Emplus WAP380C
DEVICE_DTS := qcom-ipq807x-wap380c
DEVICE_DTS_CONFIG=config@hk07
SUPPORTED_DEVICES := emplus,wap380c
DEVICE_PACKAGES := ath11k-wifi-emplus-wap380c uboot-envtools
endef
TARGET_DEVICES += emplus_wap380c
define Device/sonicfi_rap650c
DEVICE_TITLE := SonicFi RAP650C
DEVICE_DTS := qcom-ipq807x-rap650c
DEVICE_DTS_CONFIG=config@hk09
SUPPORTED_DEVICES := sonicfi,rap650c
DEVICE_PACKAGES := ath11k-wifi-sonicfi-rap650c uboot-envtools
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
IMAGE/nand-factory.ubi := append-ubi
endef
TARGET_DEVICES += sonicfi_rap650c
define Device/tplink_ex227
DEVICE_TITLE := TP-Link EX227
DEVICE_DTS := qcom-ipq807x-ex227

View File

@@ -6,7 +6,7 @@
return 0;
- if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8))
+ if (rate->nss < 1 || rate->nss > 8) {
+ printk_once(1, "invalid rate->nss: %d\n", rate->nss);
+ printk_once(KERN_WARNING "cfg80211_calculate_bitrate_he: invalid rate->nss: %d\n", rate->nss);
return 0;
-
+ }

View File

@@ -0,0 +1,116 @@
Index: backports-20210222_001-5.4.164-b157d2276/drivers/net/wireless/ath/ath11k/peer.c
===================================================================
--- backports-20210222_001-5.4.164-b157d2276.orig/drivers/net/wireless/ath/ath11k/peer.c
+++ backports-20210222_001-5.4.164-b157d2276/drivers/net/wireless/ath/ath11k/peer.c
@@ -789,8 +789,6 @@ int ath11k_peer_delete(struct ath11k *ar
#endif
lockdep_assert_held(&ar->conf_mutex);
- reinit_completion(&ar->peer_delete_done);
-
ath11k_nss_peer_delete(ar->ab, vdev_id, addr);
#ifdef CCPTCFG_ATH11K_NSS_SUPPORTPTCFG_ATH11K_NSS_SUPPORT
mutex_lock(&ar->ab->base_ast_lock);
@@ -799,33 +797,60 @@ int ath11k_peer_delete(struct ath11k *ar
spin_lock_bh(&ar->ab->base_lock);
peer = ath11k_peer_find_by_addr(ar->ab, addr);
- if (peer) {
+ /* Check if the found peer is what we want to remove.
+ * While the sta is transitioning to another band we may
+ * have 2 peer with the same addr assigned to different
+ * vdev_id. Make sure we are deleting the correct peer.
+ */
+ if (peer && peer->vdev_id == vdev_id)
+ ath11k_peer_rhash_delete(ar->ab, peer);
+
+ /* Fallback to peer list search if the correct peer can't be found.
+ * Skip the deletion of the peer from the rhash since it has already
+ * been deleted in peer add.
+ */
+ if (!peer)
+ peer = ath11k_peer_find(ar->ab, vdev_id, addr);
+
+
+ if (!peer) {
+ spin_unlock_bh(&ar->ab->base_lock);
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
- peer->delete_in_progress = true;
- if (peer->self_ast_entry) {
- ath11k_peer_del_ast(ar, peer->self_ast_entry);
- peer->self_ast_entry = NULL;
- }
+ mutex_unlock(&ar->ab->base_ast_lock);
+#endif
+ ath11k_warn(ar->ab,
+ "failed to find peer vdev_id %d addr %pM in delete\n",
+ vdev_id, addr);
+ return -EINVAL;
+ }
+
+#ifdef CPTCFG_ATH11K_NSS_SUPPORT
+ peer->delete_in_progress = true;
+ if (peer->self_ast_entry) {
+ ath11k_peer_del_ast(ar, peer->self_ast_entry);
+ peer->self_ast_entry = NULL;
+ }
- list_for_each_entry_safe(ast_entry, tmp_ast,
- &peer->ast_entry_list, ase_list)
- if ((ast_entry->type == ATH11K_AST_TYPE_WDS) ||
- (ast_entry->type == ATH11K_AST_TYPE_MEC)) {
- if (!list_empty(&ast_entry->wmi_list)) {
- ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
- "%s deleting unprocessed ast entry %pM of peer %pM from wmi list\n",
- __func__, ast_entry->addr, addr);
- list_del_init(&ast_entry->wmi_list);
- }
+ list_for_each_entry_safe(ast_entry, tmp_ast,
+ &peer->ast_entry_list, ase_list)
+ if ((ast_entry->type == ATH11K_AST_TYPE_WDS) ||
+ (ast_entry->type == ATH11K_AST_TYPE_MEC)) {
+ if (!list_empty(&ast_entry->wmi_list)) {
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
+ "%s deleting unprocessed ast entry %pM of peer %pM from wmi list\n",
+ __func__, ast_entry->addr, addr);
+ list_del_init(&ast_entry->wmi_list);
}
+ }
#endif
- ath11k_peer_rhash_delete(ar->ab, peer);
- }
spin_unlock_bh(&ar->ab->base_lock);
mutex_unlock(&ar->ab->tbl_mtx_lock);
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
mutex_unlock(&ar->ab->base_ast_lock);
#endif
+ reinit_completion(&ar->peer_delete_done);
+
ret = ath11k_wmi_send_peer_delete_cmd(ar, addr, vdev_id);
if (ret) {
ath11k_warn(ar->ab,
@@ -866,14 +891,20 @@ int ath11k_peer_create(struct ath11k *ar
"failed to create peer due to insufficient peer entry resource in firmware\n");
return -ENOBUFS;
}
-
+ mutex_lock(&ar->ab->tbl_mtx_lock);
spin_lock_bh(&ar->ab->base_lock);
peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
if (peer) {
- spin_unlock_bh(&ar->ab->base_lock);
- return -EINVAL;
+ if (peer->vdev_id == param->vdev_id) {
+ spin_unlock_bh(&ar->ab->base_lock);
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
+ return -EINVAL;
+ }
+ ath11k_peer_rhash_delete(ar->ab, peer);
}
+
spin_unlock_bh(&ar->ab->base_lock);
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
ret = ath11k_wmi_send_peer_create_cmd(ar, param);
if (ret) {

View File

@@ -0,0 +1,36 @@
From 93d02017c444d9bcb5e319ba6d9dac5794529cdd Mon Sep 17 00:00:00 2001
From: Venkat Chimata <venkata@shasta.cloud>
Date: Fri, 19 Jul 2024 18:43:19 +0530
Subject: [PATCH] mac80211: workaround: Send multicast frames as multiple
unicast frames in DVLAN mode
Broadcast / Multciast transmission is not working in DVLAN mode in the driver.
If we send the frames as unicast frames, it works. This is a workaround for now.
Need to rollback once we add a clean fix.
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
---
net/mac80211/tx.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 9e978f9..6ebf9c2 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4197,11 +4197,8 @@ static bool ieee80211_multicast_to_unicast(struct sk_buff *skb,
switch (sdata->vif.type) {
case NL80211_IFTYPE_AP_VLAN:
- if (sdata->u.vlan.sta)
- return false;
- if (sdata->wdev.use_4addr)
- return false;
- fallthrough;
+ // For now always enable multicast_to_unicast in DVLAN
+ return true;
case NL80211_IFTYPE_AP:
/* check runtime toggle for this bss */
if (!sdata->bss->multicast_to_unicast)
--
2.34.1

View File

@@ -0,0 +1,119 @@
--- a/drivers/net/wireless/ath/ath11k/peer.c
+++ b/drivers/net/wireless/ath/ath11k/peer.c
@@ -819,10 +819,7 @@ int ath11k_peer_delete(struct ath11k *ar
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
mutex_unlock(&ar->ab->base_ast_lock);
#endif
- ath11k_warn(ar->ab,
- "failed to find peer vdev_id %d addr %pM in delete\n",
- vdev_id, addr);
- return -EINVAL;
+ return 0;
}
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
@@ -883,6 +880,7 @@ int ath11k_peer_create(struct ath11k *ar
struct ieee80211_vif *vif = arvif->vif;
struct ath11k_sta *arsta;
int ret, fbret;
+ u8 vdev_id = 0;
lockdep_assert_held(&ar->conf_mutex);
@@ -891,20 +889,21 @@ int ath11k_peer_create(struct ath11k *ar
"failed to create peer due to insufficient peer entry resource in firmware\n");
return -ENOBUFS;
}
+
mutex_lock(&ar->ab->tbl_mtx_lock);
spin_lock_bh(&ar->ab->base_lock);
peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
+ if (peer)
+ vdev_id = peer->vdev_id;
+ spin_unlock_bh(&ar->ab->base_lock);
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
+
if (peer) {
- if (peer->vdev_id == param->vdev_id) {
- spin_unlock_bh(&ar->ab->base_lock);
- mutex_unlock(&ar->ab->tbl_mtx_lock);
+ if (vdev_id == param->vdev_id)
return -EINVAL;
- }
- ath11k_peer_rhash_delete(ar->ab, peer);
- }
- spin_unlock_bh(&ar->ab->base_lock);
- mutex_unlock(&ar->ab->tbl_mtx_lock);
+ ath11k_peer_delete(ar, vdev_id, param->peer_addr);
+ }
ret = ath11k_wmi_send_peer_create_cmd(ar, param);
if (ret) {
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -28,7 +28,7 @@ void ath11k_dp_peer_cleanup(struct ath11
spin_lock_bh(&ab->base_lock);
peer = ath11k_peer_find(ab, vdev_id, addr);
if (!peer) {
- ath11k_warn(ab, "failed to lookup peer %pM on vdev %d\n",
+ ath11k_dbg(ab, ATH11K_DBG_MAC, "failed to lookup peer %pM on vdev %d\n",
addr, vdev_id);
spin_unlock_bh(&ab->base_lock);
return;
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -1204,9 +1204,9 @@ int ath11k_dp_rx_ampdu_stop(struct ath11
peer = ath11k_peer_find(ab, vdev_id, params->sta->addr);
if (!peer) {
- ath11k_warn(ab, "failed to find the peer to stop rx aggregation\n");
+ ath11k_dbg(ab, ATH11K_DBG_MAC, "failed to find the peer to stop rx aggregation\n");
spin_unlock_bh(&ab->base_lock);
- return -ENOENT;
+ return 0;
}
paddr = peer->rx_tid[params->tid].paddr;
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -4075,7 +4075,7 @@ static int ath11k_clear_peer_keys(struct
peer = ath11k_peer_find(ab, arvif->vdev_id, addr);
if (!peer) {
spin_unlock_bh(&ab->base_lock);
- return -ENOENT;
+ return 0;
}
for (i = 0; i < ARRAY_SIZE(keys); i++) {
keys[i]= peer->keys[i];
@@ -4325,6 +4325,10 @@ static int ath11k_mac_op_set_key(struct
spin_lock_bh(&ab->base_lock);
peer = ath11k_peer_find(ab, arvif->vdev_id, peer_addr);
+ if (!peer && cmd == DISABLE_KEY) {
+ ret = 0;
+ goto unlock;
+ }
/* TODO: Check if vdev specific security cfg is mandatory */
ret = ath11k_nss_vdev_set_cmd(arvif, ATH11K_NSS_WIFI_VDEV_SECURITY_TYPE_CMD, key->cipher);
@@ -5961,7 +5965,7 @@ static void ath11k_mac_op_sta_rc_update(
peer = ath11k_peer_find(ar->ab, arvif->vdev_id, sta->addr);
if (!peer) {
spin_unlock_bh(&ar->ab->base_lock);
- ath11k_warn(ar->ab, "mac sta rc update failed to find peer %pM on vdev %i\n",
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac sta rc update failed to find peer %pM on vdev %i\n",
sta->addr, arvif->vdev_id);
return;
}
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -8425,7 +8425,7 @@ static void ath11k_peer_sta_kickout_even
peer = ath11k_peer_find_by_addr(ab, arg.mac_addr);
if (!peer) {
spin_unlock_bh(&ab->base_lock);
- ath11k_warn(ab, "peer not found %pM\n",
+ ath11k_dbg(ab, ATH11K_DBG_WMI, "peer not found %pM\n",
arg.mac_addr);
goto exit;
}

View File

@@ -0,0 +1,12 @@
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -543,6 +543,9 @@ ieee80211_get_sband_iftype_data(const st
if (WARN_ON(iftype >= NL80211_IFTYPE_MAX))
return NULL;
+ if (iftype == NL80211_IFTYPE_AP_VLAN)
+ iftype = NL80211_IFTYPE_AP;
+
for (i = 0; i < sband->n_iftype_data; i++) {
const struct ieee80211_sband_iftype_data *data =
&sband->iftype_data[i];

View File

@@ -1,37 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ath11k-firmware
PKG_SOURCE_PROTO:=git
PKG_BRANCH:=main
PKG_SOURCE_URL:=https://github.com/quic/upstream-wifi-fw.git
PKG_MIRROR_HASH:=557505744764b0442c887be3f5bb0ce924323d785b6d207899f19fad992a6020
PKG_SOURCE_VERSION:=3417bb86645c5ff4c58258db7cc33e43260b4222
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
include $(INCLUDE_DIR)/package.mk
define Package/ath11k-firmware-default
SECTION:=firmware
CATEGORY:=Firmware
URL:=$(PKG_SOURCE_URL)
DEPENDS:=
endef
define Package/ath11k-firmware-ipq95xx
$(Package/ath11k-firmware-default)
TITLE:=ath11k firmware for IPQ95xx devices
DEPENDS:=@TARGET_ipq95xx
endef
define Build/Compile
endef
define Package/ath11k-firmware-ipq95xx/install
$(INSTALL_DIR) $(1)/lib/firmware/IPQ9574/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ath11k-firmware/IPQ9574/hw1.0/2.9.0.1/WLAN.HK.2.9.0.1-01890-QCAHKSWPL_SILICONZ-1/* \
$(1)/lib/firmware/IPQ9574/
endef
$(eval $(call BuildPackage,ath11k-firmware-ipq95xx))

View File

@@ -1,36 +0,0 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=ath11k-wifi
PKG_RELEASE:=1
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Compile
endef
define Package/ath11k-wifi-default
SUBMENU:=ath11k Board-Specific Overrides
SECTION:=firmware
CATEGORY:=Firmware
DEPENDS:=@TARGET_ipq95xx
TITLE:=Custom Board
endef
define Package/ath11k-wifi-qcom-ipq95xx
$(call Package/ath11k-wifi-default)
TITLE:=board-2.bin for QCOM IPQ9574 eval kits
endef
define Package/ath11k-wifi-qcom-ipq95xx/install
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ9574/hw1.0/
$(INSTALL_DATA) ./board-2.bin.IPQ9574 $(1)/lib/firmware/ath11k/IPQ9574/hw1.0/board-2.bin
endef
$(eval $(call BuildPackage,ath11k-wifi-qcom-ipq95xx))

View File

@@ -1,76 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ath12k-firmware
PKG_MIRROR_HASH:=a325f86b1d613f713d2e015abca4a9ff86c8448d4cd540fa022866da2c5aa042
PKG_SOURCE_PROTO:=git
PKG_BRANCH:=main
PKG_SOURCE_URL:=https://github.com/quic/upstream-wifi-fw.git
PKG_SOURCE_VERSION:=e90d32aaa149800ea79760639cb5ac9ddcfc8281
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
include $(INCLUDE_DIR)/package.mk
define Package/ath12k-firmware-default
SECTION:=firmware
CATEGORY:=Firmware
URL:=$(PKG_SOURCE_URL)
DEPENDS:=
endef
define Package/ath12k-firmware-qcn92xx-split-phy
$(Package/ath12k-firmware-default)
TITLE:=ath12k firmware for qcn92xx split phy devices
DEPENDS:=@(TARGET_ipq95xx||TARGET_ipq53xx)
endef
define Package/ath12k-firmware-qcn92xx
$(Package/ath12k-firmware-default)
TITLE:=ath12k firmware for qcn92xx devices
DEPENDS:=@(TARGET_ipq95xx||TARGET_ipq53xx)
endef
define Package/ath12k-firmware-ipq53xx
$(Package/ath12k-firmware-default)
TITLE:=ath12k firmware for ipq53xx devices
DEPENDS:=@TARGET_ipq53xx
endef
define Package/ath12k-firmware-ipq53xx-wk-wk
$(Package/ath12k-firmware-default)
TITLE:=ath12k firmware for ipq53xx + wk + wk devices
DEPENDS:=@TARGET_ipq53xx
endef
define Build/Compile
endef
define Package/ath12k-firmware-qcn92xx-split-phy/install
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/QCN9274/hw2.0_split_phy/1.2.1/WLAN.WBE.1.2.1-00148-QCAHKSWPL_SILICONZ-1/* \
$(1)/lib/firmware/ath12k/QCN92XX/hw1.0
endef
define Package/ath12k-firmware-qcn92xx/install
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/QCN9274/hw2.0/1.2.1/WLAN.WBE.1.2.1-00201-QCAHKSWPL_SILICONZ-1/* \
$(1)/lib/firmware/ath12k/QCN92XX/hw1.0
endef
define Package/ath12k-firmware-ipq53xx/install
$(INSTALL_DIR) $(1)/lib/firmware/IPQ5332/
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware//IPQ5322/hw1.0/1.2.1/WLAN.WBE.1.2.1-00201-QCAHKSWPL_SILICONZ-1/* \
$(1)/lib/firmware/IPQ5332/
endef
define Package/ath12k-firmware-ipq53xx-wk-wk/install
$(INSTALL_DIR) $(1)/lib/firmware/IPQ5332/
$(CP) $(PKG_BUILD_DIR)/ath12k-firmware/IPQ5322_QCN6432_QCN6432/hw1.0/testing/1.3/WLAN.WBE.1.3-02907-QCAHKSWPL_SILICONZ-1/* \
$(1)/lib/firmware/IPQ5332/
endef
$(eval $(call BuildPackage,ath12k-firmware-qcn92xx))
$(eval $(call BuildPackage,ath12k-firmware-qcn92xx-split-phy))
$(eval $(call BuildPackage,ath12k-firmware-ipq53xx))
$(eval $(call BuildPackage,ath12k-firmware-ipq53xx-wk-wk))

View File

@@ -1,78 +0,0 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=ath12k-wifi
PKG_RELEASE:=1
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Compile
endef
define Package/ath12k-wifi-default
SUBMENU:=ath12k Board-Specific Overrides
SECTION:=firmware
CATEGORY:=Firmware
DEPENDS:=@(TARGET_qcn9274||TARGET_ipq53xx)
TITLE:=Custom Board
endef
define Package/ath12k-wifi-qcom-qcn9274
$(call Package/ath12k-wifi-default)
TITLE:=board-2.bin for QCOM QCN9274 eval kits
endef
define Package/ath12k-wifi-qcom-qcn9274/install
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN9274/hw1.0/
$(INSTALL_DATA) ./board-2.bin.QCN9274 $(1)/lib/firmware/ath12k/QCN9274/hw1.0/board-2.bin
endef
define Package/ath12k-wifi-cig-wf189
$(call Package/ath12k-wifi-default)
TITLE:=board.bin for CIG WF189
endef
define Package/ath12k-wifi-edgecore-eap105
$(call Package/ath12k-wifi-default)
TITLE:=board.bin for Edgecore EAP105
endef
define Package/ath12k-wifi-sercomm-ap72tip
$(call Package/ath12k-wifi-default)
TITLE:=board.bin for Sercomm WIFI-7
endef
define Package/ath12k-wifi-cig-wf189/install
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0 $(1)/lib/firmware/ath12k/IPQ5332/hw1.0
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/
$(INSTALL_DATA) ./board-cig-wf189.bin.qcn9224 $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/board.bin
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/
$(INSTALL_DATA) ./board-cig-wf189.bin.ipq53xx $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/board.bin
endef
define Package/ath12k-wifi-edgecore-eap105/install
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0 $(1)/lib/firmware/ath12k/IPQ5332/hw1.0
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/
$(INSTALL_DATA) ./board-edgecore-eap105.bin.qcn9224 $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/board.bin
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/
$(INSTALL_DATA) ./board-edgecore-eap105.bin.ipq53xx $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/board.bin
endef
define Package/ath12k-wifi-sercomm-ap72tip/install
$(INSTALL_DIR) $(1)/lib/firmware/ath12k/QCN92XX/hw1.0 $(1)/lib/firmware/ath12k/IPQ5332/hw1.0
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/
$(INSTALL_DATA) ./board-sercomm-ap72tip.bin.qcn9224 $(1)/lib/firmware/ath12k/QCN92XX/hw1.0/board.bin
$(INSTALL_DATA) ./regdb.bin $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/
$(INSTALL_DATA) ./board-sercomm-ap72tip.bin.ipq53xx $(1)/lib/firmware/ath12k/IPQ5332/hw1.0/board.bin
endef
$(eval $(call BuildPackage,ath12k-wifi-qcom-qcn9274))
$(eval $(call BuildPackage,ath12k-wifi-cig-wf189))
$(eval $(call BuildPackage,ath12k-wifi-edgecore-eap105))
$(eval $(call BuildPackage,ath12k-wifi-sercomm-ap72tip))

Binary file not shown.

View File

@@ -1,88 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2007-2019 B.A.T.M.A.N. contributors:
#
# Marek Lindner, Simon Wunderlich
#
# B.A.T.M.A.N meshing protocol
#
config BATMAN_ADV_BATMAN_V
bool "B.A.T.M.A.N. V protocol"
depends on PACKAGE_kmod-batman-adv
default y
help
This option enables the B.A.T.M.A.N. V protocol, the successor
of the currently used B.A.T.M.A.N. IV protocol. The main
changes include splitting of the OGM protocol into a neighbor
discovery protocol (Echo Location Protocol, ELP) and a new OGM
Protocol OGMv2 for flooding protocol information through the
network, as well as a throughput based metric.
B.A.T.M.A.N. V is currently considered experimental and not
compatible to B.A.T.M.A.N. IV networks.
config BATMAN_ADV_BLA
bool "Bridge Loop Avoidance"
depends on PACKAGE_kmod-batman-adv
select PACKAGE_kmod-lib-crc16
default y
help
This option enables BLA (Bridge Loop Avoidance), a mechanism
to avoid Ethernet frames looping when mesh nodes are connected
to both the same LAN and the same mesh. If you will never use
more than one mesh node in the same LAN, you can safely remove
this feature and save some space.
config BATMAN_ADV_DAT
bool "Distributed ARP Table"
depends on PACKAGE_kmod-batman-adv
default y
help
This option enables DAT (Distributed ARP Table), a DHT based
mechanism that increases ARP reliability on sparse wireless
mesh networks. If you think that your network does not need
this option you can safely remove it and save some space.
config BATMAN_ADV_NC
bool "Network Coding"
depends on PACKAGE_kmod-batman-adv
help
This option enables network coding, a mechanism that aims to
increase the overall network throughput by fusing multiple
packets in one transmission.
Note that interfaces controlled by batman-adv must be manually
configured to have promiscuous mode enabled in order to make
network coding work.
If you think that your network does not need this feature you
can safely disable it and save some space.
config BATMAN_ADV_MCAST
bool "Multicast optimisation"
depends on PACKAGE_kmod-batman-adv
default y
help
This option enables the multicast optimisation which aims to
reduce the air overhead while improving the reliability of
multicast messages.
config BATMAN_ADV_DEBUG
bool "B.A.T.M.A.N. debugging"
depends on PACKAGE_kmod-batman-adv
help
This is an option for use by developers; most people should
say N here. This enables compilation of support for
outputting debugging information to the debugfs log or tracing
buffer. The output is controlled via the batadv netdev specific
log_level setting.
config BATMAN_ADV_TRACING
bool "B.A.T.M.A.N. tracing support"
depends on PACKAGE_kmod-batman-adv
select KERNEL_FTRACE
select KERNEL_ENABLE_DEFAULT_TRACERS
help
This is an option for use by developers; most people should
say N here. Select this option to gather traces like the debug
messages using the generic tracing infrastructure of the kernel.
BATMAN_ADV_DEBUG must also be selected to get trace events for
batadv_dbg.

View File

@@ -1,101 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
include $(TOPDIR)/rules.mk
PKG_NAME:=batman-adv
PKG_VERSION:=2022.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
PKG_HASH:=49338705bc207709ac84d766688e702571009c827c0a320788ea51fb887714aa
PKG_EXTMOD_SUBDIRS:=net/batman-adv
PKG_MAINTAINER:=Simon Wunderlich <sw@simonwunderlich.de>
PKG_LICENSE:=GPL-2.0-only MIT
PKG_LICENSE_FILES:=LICENSES/preferred/GPL-2.0 LICENSES/preferred/MIT
PKG_BUILD_PARALLEL:=1
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
PKG_CONFIG_DEPENDS += \
CONFIG_BATMAN_ADV_BATMAN_V \
CONFIG_BATMAN_ADV_BLA \
CONFIG_BATMAN_ADV_DAT \
CONFIG_BATMAN_ADV_NC \
CONFIG_BATMAN_ADV_MCAST \
CONFIG_BATMAN_ADV_DEBUG \
CONFIG_BATMAN_ADV_TRACING
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
define KernelPackage/batman-adv
SUBMENU:=Network Support
TITLE:=B.A.T.M.A.N. Adv
URL:=https://www.open-mesh.org/
DEPENDS:=+BATMAN_ADV_BLA:kmod-lib-crc16 +kmod-lib-crc32c +kmod-cfg80211 +batctl
FILES:=$(PKG_BUILD_DIR)/net/batman-adv/batman-adv.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoProbe,batman-adv)
endef
define KernelPackage/batman-adv/description
B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is
a routing protocol for multi-hop ad-hoc mesh networks. The
networks may be wired or wireless. See
https://www.open-mesh.org/ for more information and user space
tools. This package builds version $(PKG_VERSION) of the kernel
module.
endef
define KernelPackage/batman-adv/config
source "$(SOURCE)/Config.in"
endef
define Package/kmod-batman-adv/conffiles
/etc/config/batman-adv
endef
PKG_EXTRA_KCONFIG:= \
CONFIG_BATMAN_ADV=m \
CONFIG_BATMAN_ADV_DEBUG=$(if $(CONFIG_BATMAN_ADV_DEBUG),y,n) \
CONFIG_BATMAN_ADV_BLA=$(if $(CONFIG_BATMAN_ADV_BLA),y,n) \
CONFIG_BATMAN_ADV_DAT=$(if $(CONFIG_BATMAN_ADV_DAT),y,n) \
CONFIG_BATMAN_ADV_MCAST=$(if $(CONFIG_BATMAN_ADV_MCAST),y,n) \
CONFIG_BATMAN_ADV_NC=$(if $(CONFIG_BATMAN_ADV_NC),y,n) \
CONFIG_BATMAN_ADV_BATMAN_V=$(if $(CONFIG_BATMAN_ADV_BATMAN_V),y,n) \
CONFIG_BATMAN_ADV_TRACING=$(if $(CONFIG_BATMAN_ADV_TRACING),y,n) \
PKG_EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
NOSTDINC_FLAGS = \
$(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR)/net/batman-adv \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
-I$(STAGING_DIR)/usr/include/mac80211 \
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
-I$(PKG_BUILD_DIR)/include/ \
-include backport/autoconf.h \
-include backport/backport.h \
-include $(PKG_BUILD_DIR)/compat-hacks.h \
-DBATADV_SOURCE_VERSION=\\\"$(PKG_VERSION)-openwrt-$(PKG_RELEASE)\\\"
define Build/Compile
$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)/net/batman-adv" \
$(PKG_EXTRA_KCONFIG) \
EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
endef
define KernelPackage/batman-adv/install
$(CP) ./files/. $(1)/
endef
$(eval $(call KernelPackage,batman-adv))

View File

@@ -1,97 +0,0 @@
#!/bin/sh
# This UCI-Defaults script will split the batadv proto network interfaces
# in batadv_hardif and batadv proto. The configuration options from
# /etc/config/batman-adv will be moved to the latter.
. /lib/functions.sh
proto_batadv_to_batadv_hardif() {
local section="$1"
local proto
local mesh
local routing_algo
config_get proto "${section}" proto
config_get mesh "${section}" mesh
config_get routing_algo "${section}" routing_algo
if [ -z "$mesh" -o "${proto}" != "batadv" ]; then
continue
fi
uci set network."${section}".proto="batadv_hardif"
uci rename network."${section}".mesh="master"
uci delete network."${section}".routing_algo
# create new section or adjust existing one
uci set network."${mesh}"=interface
uci set network."${mesh}".proto=batadv
[ -n "${routing_algo}" ] && uci set network."${mesh}".routing_algo="${routing_algo}"
}
mv_batadv_config_section() {
local section="$1"
local aggregated_ogms
local ap_isolation
local bonding
local bridge_loop_avoidance
local distributed_arp_table
local fragmentation
local gw_bandwidth
local gw_mode
local gw_sel_class
local hop_penalty
local isolation_mark
local log_level
local multicast_mode
local network_coding
local orig_interval
config_get aggregated_ogms "${section}" aggregated_ogms
config_get ap_isolation "${section}" ap_isolation
config_get bonding "${section}" bonding
config_get bridge_loop_avoidance "${section}" bridge_loop_avoidance
config_get distributed_arp_table "${section}" distributed_arp_table
config_get fragmentation "${section}" fragmentation
config_get gw_bandwidth "${section}" gw_bandwidth
config_get gw_mode "${section}" gw_mode
config_get gw_sel_class "${section}" gw_sel_class
config_get hop_penalty "${section}" hop_penalty
config_get isolation_mark "${section}" isolation_mark
config_get log_level "${section}" log_level
config_get multicast_mode "${section}" multicast_mode
config_get network_coding "${section}" network_coding
config_get orig_interval "${section}" orig_interval
# update section in case it exists
[ -n "${aggregated_ogms}" ] && uci set network."${section}".aggregated_ogms="${aggregated_ogms}"
[ -n "${ap_isolation}" ] && uci set network."${section}".ap_isolation="${ap_isolation}"
[ -n "${bonding}" ] && uci set network."${section}".bonding="${bonding}"
[ -n "${bridge_loop_avoidance}" ] && uci set network."${section}".bridge_loop_avoidance="${bridge_loop_avoidance}"
[ -n "${distributed_arp_table}" ] && uci set network."${section}".distributed_arp_table="${distributed_arp_table}"
[ -n "${fragmentation}" ] && uci set network."${section}".fragmentation="${fragmentation}"
[ -n "${gw_bandwidth}" ] && uci set network."${section}".gw_bandwidth="${gw_bandwidth}"
[ -n "${gw_mode}" ] && uci set network."${section}".gw_mode="${gw_mode}"
[ -n "${gw_sel_class}" ] && uci set network."${section}".gw_sel_class="${gw_sel_class}"
[ -n "${hop_penalty}" ] && uci set network."${section}".hop_penalty="${hop_penalty}"
[ -n "${isolation_mark}" ] && uci set network."${section}".isolation_mark="${isolation_mark}"
[ -n "${log_level}" ] && uci set network."${section}".log_level="${log_level}"
[ -n "${multicast_mode}" ] && uci set network."${section}".multicast_mode="${multicast_mode}"
[ -n "${network_coding}" ] && uci set network."${section}".network_coding="${network_coding}"
[ -n "${orig_interval}" ] && uci set network."${section}".orig_interval="${orig_interval}"
}
if [ -f /etc/config/batman-adv ]; then
config_load network
config_foreach proto_batadv_to_batadv_hardif 'interface'
uci commit network
config_load batman-adv
config_foreach mv_batadv_config_section 'mesh'
uci commit network
rm -f /etc/config/batman-adv
fi
exit 0

View File

@@ -1,123 +0,0 @@
#!/bin/sh
[ -n "$INCLUDE_ONLY" ] || {
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
}
proto_batadv_init_config() {
no_device=1
available=1
proto_config_add_boolean 'aggregated_ogms:bool'
proto_config_add_boolean 'ap_isolation:bool'
proto_config_add_boolean 'bonding:bool'
proto_config_add_boolean 'bridge_loop_avoidance:bool'
proto_config_add_boolean 'distributed_arp_table:bool'
proto_config_add_boolean 'fragmentation:bool'
proto_config_add_string 'gw_bandwidth'
proto_config_add_string 'gw_mode'
proto_config_add_int 'gw_sel_class'
proto_config_add_int 'hop_penalty'
proto_config_add_string 'isolation_mark'
proto_config_add_string 'log_level'
proto_config_add_int 'multicast_fanout'
proto_config_add_boolean 'multicast_mode:bool'
proto_config_add_boolean 'network_coding:bool'
proto_config_add_int 'orig_interval'
proto_config_add_string 'routing_algo'
}
proto_batadv_setup() {
local config="$1"
local iface="$config"
local aggregated_ogms
local ap_isolation
local bonding
local bridge_loop_avoidance
local distributed_arp_table
local fragmentation
local gw_bandwidth
local gw_mode
local gw_sel_class
local hop_penalty
local isolation_mark
local log_level
local multicast_fanout
local multicast_mode
local network_coding
local orig_interval
local routing_algo
json_get_vars aggregated_ogms
json_get_vars ap_isolation
json_get_vars bonding
json_get_vars bridge_loop_avoidance
json_get_vars distributed_arp_table
json_get_vars fragmentation
json_get_vars gw_bandwidth
json_get_vars gw_mode
json_get_vars gw_sel_class
json_get_vars hop_penalty
json_get_vars isolation_mark
json_get_vars log_level
json_get_vars multicast_fanout
json_get_vars multicast_mode
json_get_vars network_coding
json_get_vars orig_interval
json_get_vars routing_algo
set_default routing_algo 'BATMAN_IV'
batctl routing_algo "$routing_algo"
batctl meshif "$iface" interface create
[ -n "$aggregated_ogms" ] && batctl meshif "$iface" aggregation "$aggregated_ogms"
[ -n "$ap_isolation" ] && batctl meshif "$iface" ap_isolation "$ap_isolation"
[ -n "$bonding" ] && batctl meshif "$iface" bonding "$bonding"
[ -n "$bridge_loop_avoidance" ] && batctl meshif "$iface" bridge_loop_avoidance "$bridge_loop_avoidance" 2>&-
[ -n "$distributed_arp_table" ] && batctl meshif "$iface" distributed_arp_table "$distributed_arp_table" 2>&-
[ -n "$fragmentation" ] && batctl meshif "$iface" fragmentation "$fragmentation"
case "$gw_mode" in
server)
if [ -n "$gw_bandwidth" ]; then
batctl meshif "$iface" gw_mode "server" "$gw_bandwidth"
else
batctl meshif "$iface" gw_mode "server"
fi
;;
client)
if [ -n "$gw_sel_class" ]; then
batctl meshif "$iface" gw_mode "client" "$gw_sel_class"
else
batctl meshif "$iface" gw_mode "client"
fi
;;
*)
batctl meshif "$iface" gw_mode "off"
;;
esac
[ -n "$hop_penalty" ] && batctl meshif "$iface" hop_penalty "$hop_penalty"
[ -n "$isolation_mark" ] && batctl meshif "$iface" isolation_mark "$isolation_mark"
[ -n "$multicast_fanout" ] && batctl meshif "$iface" multicast_fanout "$multicast_fanout"
[ -n "$multicast_mode" ] && batctl meshif "$iface" multicast_mode "$multicast_mode" 2>&-
[ -n "$network_coding" ] && batctl meshif "$iface" network_coding "$network_coding" 2>&-
[ -n "$log_level" ] && batctl meshif "$iface" loglevel "$log_level" 2>&-
[ -n "$orig_interval" ] && batctl meshif "$iface" orig_interval "$orig_interval"
proto_init_update "$iface" 1
proto_send_update "$config"
}
proto_batadv_teardown() {
local config="$1"
local iface="$config"
batctl meshif "$iface" interface destroy
}
add_protocol batadv

View File

@@ -1,53 +0,0 @@
#!/bin/sh
[ -n "$INCLUDE_ONLY" ] || {
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
}
proto_batadv_hardif_init_config() {
proto_config_add_int 'elp_interval'
proto_config_add_int 'hop_penalty'
proto_config_add_string "master"
proto_config_add_string 'throughput_override'
}
proto_batadv_hardif_setup() {
local config="$1"
local iface="$2"
local elp_interval
local hop_penalty
local master
local throughput_override
json_get_vars elp_interval
json_get_vars hop_penalty
json_get_vars master
json_get_vars throughput_override
( proto_add_host_dependency "$config" '' "$master" )
batctl meshif "$master" interface -M add "$iface"
[ -n "$elp_interval" ] && batctl hardif "$iface" elp_interval "$elp_interval"
[ -n "$hop_penalty" ] && batctl hardif "$iface" hop_penalty "$hop_penalty"
[ -n "$throughput_override" ] && batctl hardif "$iface" throughput_override "$throughput_override"
proto_init_update "$iface" 1
proto_send_update "$config"
}
proto_batadv_hardif_teardown() {
local config="$1"
local iface="$2"
local master
json_get_vars master
batctl meshif "$master" interface -M del "$iface" || true
}
add_protocol batadv_hardif

View File

@@ -1,25 +0,0 @@
#!/bin/sh
. /lib/functions.sh
. ../netifd-proto.sh
init_proto "$@"
proto_batadv_vlan_init_config() {
proto_config_add_boolean 'ap_isolation:bool'
}
proto_batadv_vlan_setup() {
local config="$1"
local iface="$2"
# batadv_vlan options
local ap_isolation
json_get_vars ap_isolation
[ -n "$ap_isolation" ] && batctl vlan "$iface" ap_isolation "$ap_isolation"
proto_init_update "$iface" 1
proto_send_update "$config"
}
add_protocol batadv_vlan

View File

@@ -1,128 +0,0 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Sat, 24 Oct 2020 22:51:23 +0200
Subject: Revert "batman-adv: genetlink: move to smaller ops wherever possible"
The netlink genl_ops interface was splitted into two parts for Linux 5.10.
The batman-adv code changed to the new one because it doesn't use the more
complex policy handling of genl_ops. But the backports-5.8-1 version in
OpenWrt doesn't yet support the new genl_small_ops.
This patch must be dropped directly when OpenWrt switches to backports-5.10
or newer - otherwise it will not work as expected.
This reverts commit 725b4ef5be840cfcd0ca33b9393c14dee40c10f7.
--- a/compat-include/net/genetlink.h
+++ b/compat-include/net/genetlink.h
@@ -31,17 +31,15 @@ void batadv_genl_dump_check_consistent(s
#endif /* LINUX_VERSION_IS_LESS(4, 15, 0) */
-#if LINUX_VERSION_IS_LESS(5, 10, 0)
-
#if LINUX_VERSION_IS_LESS(5, 2, 0)
+
enum genl_validate_flags {
GENL_DONT_VALIDATE_STRICT = BIT(0),
GENL_DONT_VALIDATE_DUMP = BIT(1),
GENL_DONT_VALIDATE_DUMP_STRICT = BIT(2),
};
-#endif /* LINUX_VERSION_IS_LESS(5, 2, 0) */
-struct batadv_genl_small_ops {
+struct batadv_genl_ops {
int (*doit)(struct sk_buff *skb,
struct genl_info *info);
int (*dumpit)(struct sk_buff *skb,
@@ -70,9 +68,9 @@ struct batadv_genl_family {
struct genl_info *info);
void (*post_doit)(const struct genl_ops *ops, struct sk_buff *skb,
struct genl_info *info);
- const struct batadv_genl_small_ops *small_ops;
+ const struct batadv_genl_ops *ops;
const struct genl_multicast_group *mcgrps;
- unsigned int n_small_ops;
+ unsigned int n_ops;
unsigned int n_mcgrps;
struct module *module;
@@ -96,32 +94,24 @@ static inline int batadv_genl_register_f
family->family.pre_doit = family->pre_doit;
family->family.post_doit = family->post_doit;
family->family.mcgrps = family->mcgrps;
- family->family.n_ops = family->n_small_ops;
+ family->family.n_ops = family->n_ops;
family->family.n_mcgrps = family->n_mcgrps;
family->family.module = family->module;
- ops = kzalloc(sizeof(*ops) * family->n_small_ops, GFP_KERNEL);
+ ops = kzalloc(sizeof(*ops) * family->n_ops, GFP_KERNEL);
if (!ops)
return -ENOMEM;
for (i = 0; i < family->family.n_ops; i++) {
- ops[i].doit = family->small_ops[i].doit;
- ops[i].dumpit = family->small_ops[i].dumpit;
- ops[i].done = family->small_ops[i].done;
- ops[i].cmd = family->small_ops[i].cmd;
- ops[i].internal_flags = family->small_ops[i].internal_flags;
- ops[i].flags = family->small_ops[i].flags;
-#if LINUX_VERSION_IS_GEQ(5, 2, 0)
- ops[i].validate = family->small_ops[i].validate;
-#else
+ ops[i].doit = family->ops[i].doit;
+ ops[i].dumpit = family->ops[i].dumpit;
+ ops[i].done = family->ops[i].done;
+ ops[i].cmd = family->ops[i].cmd;
+ ops[i].internal_flags = family->ops[i].internal_flags;
+ ops[i].flags = family->ops[i].flags;
ops[i].policy = family->policy;
-#endif
}
-#if LINUX_VERSION_IS_GEQ(5, 2, 0)
- family->family.policy = family->policy;
-#endif
-
family->family.ops = ops;
family->copy_ops = ops;
@@ -136,7 +126,7 @@ typedef struct genl_ops batadv_genl_ops_
#define batadv_post_doit(__x, __y, __z) \
batadv_post_doit(const batadv_genl_ops_old *ops, __y, __z)
-#define genl_small_ops batadv_genl_small_ops
+#define genl_ops batadv_genl_ops
#define genl_family batadv_genl_family
#define genl_register_family(family) \
@@ -160,6 +150,6 @@ batadv_genl_unregister_family(struct bat
genlmsg_multicast_netns(&(_family)->family, _net, _skb, _portid, \
_group, _flags)
-#endif /* LINUX_VERSION_IS_LESS(5, 10, 0) */
+#endif /* LINUX_VERSION_IS_LESS(5, 2, 0) */
#endif /* _NET_BATMAN_ADV_COMPAT_NET_GENETLINK_H_ */
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -1357,7 +1357,7 @@ static void batadv_post_doit(const struc
}
}
-static const struct genl_small_ops batadv_netlink_ops[] = {
+static const struct genl_ops batadv_netlink_ops[] = {
{
.cmd = BATADV_CMD_GET_MESH,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -1491,8 +1491,8 @@ struct genl_family batadv_netlink_family
.pre_doit = batadv_pre_doit,
.post_doit = batadv_post_doit,
.module = THIS_MODULE,
- .small_ops = batadv_netlink_ops,
- .n_small_ops = ARRAY_SIZE(batadv_netlink_ops),
+ .ops = batadv_netlink_ops,
+ .n_ops = ARRAY_SIZE(batadv_netlink_ops),
.mcgrps = batadv_netlink_mcgrps,
.n_mcgrps = ARRAY_SIZE(batadv_netlink_mcgrps),
};

View File

@@ -1,116 +0,0 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Thu, 28 Jan 2021 21:06:51 +0100
Subject: Revert "batman-adv: Add new include for min/max helpers"
The OpenWrt kernel sources and backports sources are currently missing this
header.
This reverts commit 1810de05310d5c5e9140f870ac21052f38bc06b8.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
--- a/compat-include/linux/minmax.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_
-
-#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(5, 10, 0)
-#include_next <linux/minmax.h>
-#else
-#include <linux/kernel.h>
-#endif
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_MINMAX_H_ */
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -15,7 +15,6 @@
#include <linux/jiffies.h>
#include <linux/kref.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/netlink.h>
#include <linux/rculist.h>
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -18,7 +18,6 @@
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/kref.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/nl80211.h>
#include <linux/prandom.h>
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -18,7 +18,6 @@
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/lockdep.h>
-#include <linux/minmax.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
#include <linux/prandom.h>
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -14,8 +14,8 @@
#include <linux/gfp.h>
#include <linux/if_ether.h>
#include <linux/jiffies.h>
+#include <linux/kernel.h>
#include <linux/lockdep.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -17,7 +17,6 @@
#include <linux/kref.h>
#include <linux/limits.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
#include <linux/printk.h>
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -23,7 +23,6 @@
#include <linux/kobject.h>
#include <linux/kref.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/printk.h>
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -23,7 +23,6 @@
#include <linux/kernel.h>
#include <linux/limits.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/netlink.h>
#include <linux/printk.h>
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -23,7 +23,6 @@
#include <linux/kthread.h>
#include <linux/limits.h>
#include <linux/list.h>
-#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/param.h>
#include <linux/printk.h>

View File

@@ -1,34 +0,0 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Fri, 14 May 2021 19:34:35 +0200
Subject: batman-adv: Fix build of multicast code against Linux < 5.13
Fixes: 007b4c4b031f ("batman-adv: convert ifmcaddr6 to RCU")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -422,9 +422,14 @@ batadv_mcast_mla_softif_get_ipv6(struct
return 0;
}
+#if LINUX_VERSION_IS_LESS(5, 13, 0)
+ read_lock_bh(&in6_dev->lock);
+ for (pmc6 = in6_dev->mc_list; pmc6; pmc6 = pmc6->next) {
+#else
for (pmc6 = rcu_dereference(in6_dev->mc_list);
pmc6;
pmc6 = rcu_dereference(pmc6->next)) {
+#endif
if (IPV6_ADDR_MC_SCOPE(&pmc6->mca_addr) <
IPV6_ADDR_SCOPE_LINKLOCAL)
continue;
@@ -453,6 +458,9 @@ batadv_mcast_mla_softif_get_ipv6(struct
hlist_add_head(&new->list, mcast_list);
ret++;
}
+#if LINUX_VERSION_IS_LESS(5, 13, 0)
+ read_unlock_bh(&in6_dev->lock);
+#endif
rcu_read_unlock();
return ret;

View File

@@ -1,19 +0,0 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Tue, 14 Sep 2021 21:02:10 +0200
Subject: Revert "batman-adv: Switch to kstrtox.h for kstrtou64"
This header is only available after Linux 5.14
This reverts commit c9a69cb4048ebef3a4d91835669011a26d9b7dab.
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -10,7 +10,7 @@
#include <linux/atomic.h>
#include <linux/byteorder/generic.h>
#include <linux/errno.h>
-#include <linux/kstrtox.h>
+#include <linux/kernel.h>
#include <linux/limits.h>
#include <linux/math64.h>
#include <linux/netdevice.h>

View File

@@ -1,19 +0,0 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Tue, 14 Sep 2021 21:07:34 +0200
Subject: Revert "batman-adv: use Linux's stdarg.h"
This header is only available since Linux 5.15
This reverts commit 36d059797a14f0e373fdc3c79df7b467435925ad.
--- a/net/batman-adv/log.c
+++ b/net/batman-adv/log.c
@@ -7,7 +7,7 @@
#include "log.h"
#include "main.h"
-#include <linux/stdarg.h>
+#include <stdarg.h>
#include "trace.h"

View File

@@ -1,27 +0,0 @@
From: Eric Dumazet <edumazet@google.com>
Date: Wed, 2 Mar 2022 20:05:13 +0100
Subject: batman-adv: make mc_forwarding atomic
This fixes minor data-races in ip6_mc_input() and
batadv_mcast_mla_rtr_flags_softif_get_ipv6()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[sven@narfation.org: Add ugly hack to get it building with old kernels]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/56db7c0540e733a1f063ccd6bab1b537a80857eb
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -134,7 +134,11 @@ static u8 batadv_mcast_mla_rtr_flags_sof
{
struct inet6_dev *in6_dev = __in6_dev_get(dev);
+#if LINUX_VERSION_IS_GEQ(5, 18, 0) // UGLY_HACK_NEW
+ if (in6_dev && atomic_read(&in6_dev->cnf.mc_forwarding))
+#else // UGLY_HACK_OLD
if (in6_dev && in6_dev->cnf.mc_forwarding)
+#endif // UGLY_HACK_STOP
return BATADV_NO_FLAGS;
else
return BATADV_MCAST_WANT_NO_RTR6;

View File

@@ -1,23 +0,0 @@
From: Sven Eckelmann <sven@narfation.org>
Date: Fri, 15 Apr 2022 15:12:45 +0200
Subject: batman-adv: compat: Add atomic mc_fowarding support for stable kernels
Fixes: 56db7c0540e7 ("batman-adv: make mc_forwarding atomic")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/350adcaec82fbaa358a2406343b6130ac8dad126
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -134,7 +134,11 @@ static u8 batadv_mcast_mla_rtr_flags_sof
{
struct inet6_dev *in6_dev = __in6_dev_get(dev);
-#if LINUX_VERSION_IS_GEQ(5, 18, 0) // UGLY_HACK_NEW
+#if (LINUX_VERSION_IS_GEQ(5, 4, 189) && LINUX_VERSION_IS_LESS(5, 5, 0)) || /* UGLY_HACK */ \
+ (LINUX_VERSION_IS_GEQ(5, 10, 111) && LINUX_VERSION_IS_LESS(5, 11, 0)) || /* UGLY_HACK */ \
+ (LINUX_VERSION_IS_GEQ(5, 15, 34) && LINUX_VERSION_IS_LESS(5, 16, 0)) || /* UGLY_HACK */ \
+ (LINUX_VERSION_IS_GEQ(5, 16, 20) && LINUX_VERSION_IS_LESS(5, 17, 0)) || /* UGLY_HACK */ \
+ LINUX_VERSION_IS_GEQ(5, 17, 3) // UGLY_HACK_NEW
if (in6_dev && atomic_read(&in6_dev->cnf.mc_forwarding))
#else // UGLY_HACK_OLD
if (in6_dev && in6_dev->cnf.mc_forwarding)

Some files were not shown because too many files have changed in this diff Show More