public inbox for ath12k@lists.infradead.org
 help / color / mirror / Atom feed
From: Mihai Moldovan <ionic@ionic.de>
To: Kang Yang <quic_kangyang@quicinc.com>, ath12k@lists.infradead.org
Subject: Re: [PATCH v6 0/4] wifi: ath12k: store and send country code to firmware after recovery
Date: Fri, 29 Nov 2024 13:18:14 +0100	[thread overview]
Message-ID: <303a0926-e622-4fa2-ada7-05c7d758b778@ionic.de> (raw)
In-Reply-To: <20241017030927.1695-1-quic_kangyang@quicinc.com>


[-- Attachment #1.1: Type: text/plain, Size: 3469 bytes --]

* 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  parent reply	other threads:[~2024-11-29 12:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17  3:09 [PATCH v6 0/4] wifi: ath12k: store and send country code to firmware after recovery Kang Yang
2024-10-17  3:09 ` [PATCH v6 1/4] wifi: ath12k: add configure country code for WCN7850 Kang Yang
2024-10-17  3:09 ` [PATCH v6 2/4] wifi: ath12k: add 11d scan offload support Kang Yang
2024-10-17  3:09 ` [PATCH v6 3/4] wifi: ath12k: use correct WMI command to set country code for WCN7850 Kang Yang
2024-10-17  3:09 ` [PATCH v6 4/4] wifi: ath12k: store and send country code to firmware after recovery Kang Yang
2024-10-17 18:55 ` [PATCH v6 0/4] " Jeff Johnson
2024-11-20 16:50   ` Mihai Moldovan
2024-11-21 11:03     ` Kalle Valo
2024-11-22 20:17       ` Mihai Moldovan
2024-11-29 12:18 ` Mihai Moldovan [this message]
2024-12-02  1:53   ` Kang Yang
2024-12-02  8:47     ` Mihai Moldovan
2024-12-09 21:47       ` [RFC] [PATCH] wifi: ath12k: wait for chan update in reg_notifier Mihai Moldovan
2024-12-09 22:00         ` Ionic
2024-12-11  2:18           ` Kang Yang
2024-12-11 16:14             ` Mihai Moldovan
2024-12-10 23:19         ` [RFC] [PATCH v2] " Mihai Moldovan
2024-12-11  4:32       ` [PATCH v6 0/4] wifi: ath12k: store and send country code to firmware after recovery Kang Yang
2024-12-11 16:22         ` Mihai Moldovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=303a0926-e622-4fa2-ada7-05c7d758b778@ionic.de \
    --to=ionic@ionic.de \
    --cc=ath12k@lists.infradead.org \
    --cc=quic_kangyang@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox