[PATCH v6 0/4] wifi: ath12k: store and send country code to firmware after recovery
Mihai Moldovan
ionic at ionic.de
Fri Nov 29 04:18:14 PST 2024
* On 10/17/24 05:09, Kang Yang wrote:
> This patch-set mainly does four things:
> 1. Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID to firmware.
> 2. Implement 11d scan offload, and report country code to firmware by
> WMI command WMI_SET_CURRENT_COUNTRY_CMDID.
> 3. Use WMI_SET_CURRENT_COUNTRY_CMDID to set country code for WCN7850.
> 4. Store country code, and update it to firmware after device recovery.
>
> With this patch-set, WCN7850 can do 11d offload scan and update country
> code to firmware successfully.
>
> Note: This patch-set is an old patch-set in public review written by
> Wen Gong. Just resend it for him.
> Link: https://patchwork.kernel.org/project/linux-wireless/cover/20230914090746.23560-1-quic_wgong@quicinc.com/
Have you tested this in AP mode or was testing limited to STA mode?
Even with this patch set, hostapd fails to start on a channel that is disabled
in the default regdomain, even if 11d is enabled and a CC specified, even after
a CC update is requested and CHANEL_LIST_UPDATE is being received.
---
1732881245.637059: wifibe: interface state UNINITIALIZED->COUNTRY_UPDATE
1732881245.637268: Previous country code na, new country code DEI
1732881245.637283: Continue interface setup after channel list update
1732881245.637291: ctrl_iface not configured!
1732881245.637318: RTM_NEWLINK: ifi_index=6 ifname=wifibe operstate=0 linkmode=0
ifi_family=0 ifi_flags=0x1043 ([UP][RUNNING])
1732881245.637371: RTM_NEWLINK: ifi_index=6 ifname=wifibe operstate=2 linkmode=0
ifi_family=0 ifi_flags=0x1003 ([UP])
1732881245.637404: RTM_NEWLINK: ifi_index=6 ifname=wifibe operstate=2 linkmode=0
master=5 ifi_family=0 ifi_flags=0x1003 ([UP])
1732881245.637434: RTM_NEWLINK: ifi_index=6 ifname=wifibe operstate=2 linkmode=0
master=5 ifi_family=0 ifi_flags=0x1003 ([UP])
1732881245.637464: RTM_NEWLINK: ifi_index=6 ifname=wifibe master=5 operstate=2
ifi_family=7 ifi_flags=0x1003 ([UP])
1732881245.637505: nl80211: Add ifindex 5 for bridge brvswitch
1732881245.637514: nl80211: Add own interface ifindex 5 (ifidx_reason 6)
1732881245.637521: nl80211: ifindex 5 already in the list
1732881245.637540: nl80211: Event message available
1732881245.637563: nl80211: Drv Event 36 (NL80211_CMD_REG_CHANGE) received for
wifibe
1732881245.637574: nl80211: Regulatory domain change
1732881245.637580: * initiator=1
1732881245.637590: * type=0
1732881245.637595: * alpha2=DE
1732881245.637609: wifibe: Event CHANNEL_LIST_CHANGED (27) received
1732881245.637619: Channel list updated - continue setup
1732881245.638475: nl80211: Regulatory information - country=na
1732881245.638499: nl80211: 2402-2472 @ 40 MHz 20 mBm
1732881245.638512: nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
[...]
---
Interestingly, iw reg get shows the new CC/regdomain after hostapd terminates,
so I suspect a race condition:
---
phy#0 (self-managed)
country DE: DFS-ETSI
---
Starting hostapd again after it failed the first time around works, since the CC
+ regdomain are correctly updated by that time.
You recently re-submitted a patch set for ath11k by Wen Gong[0] that is supposed
to fix a race condition during reg updates and this smells like the same issue.
I'll try to port it to ath12k on top of this patch set to see if it fixes this
issue.
Mihai
[0] https://lore.kernel.org/ath11k/20241129070714.226-1-quic_kangyang@quicinc.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/ath12k/attachments/20241129/ae2ed72d/attachment.sig>
More information about the ath12k
mailing list