mbox series

[RFC,0/2] Handle BSS critical update procedure for probe

Message ID 20240318053607.1056739-1-quic_rrchinan@quicinc.com (mailing list archive)
Headers show
Series Handle BSS critical update procedure for probe | expand

Message

Rathees Kumar R Chinannan March 18, 2024, 5:36 a.m. UTC
When a critical update occurs to any of elements inside beacon frame, AP
shall increment BSS Parameters Change Count(BPCC) subfield and set the
Critical Update flag subfield of the Capability Information to notify
client that the critical update occurred on AP. Refer section "35.3.10
BSS parameter critical update procedure" on IEEE P802.11be D4.0 for
details.

On beacon offload case, change in CU parameters should be sent to user
space either before or along with probe or assoc request frame receive
to ensure that user space uses latest CU values and BPCC while generating
response to the received frames. So, add the critical update parameters
as a new attribute to existing NL80211_CMD_FRAME command instead of
sending this on a separate NL80211 event.

Add an ieee80211_critical_update() API to send the parameters to cfg80211
and call it when event received from firmware to update critical
parameters to user space.

Driver (ath12k) changes that utilize this will be posted in the future
versions.

Rathees Kumar R Chinannan (2):
  wifi: nl80211: Add attribute to send critical update params
  wifi: mac80211: Indicate ongoing critical update parameters

 include/net/cfg80211.h       |  10 +++
 include/net/mac80211.h       |  13 ++++
 include/uapi/linux/nl80211.h |  98 +++++++++++++++++++++++++++++
 net/mac80211/cfg.c           |  35 ++++++++++-
 net/mac80211/rx.c            |  12 ++++
 net/mac80211/tx.c            |   5 ++
 net/wireless/nl80211.c       | 117 ++++++++++++++++++++++++++++++++++-
 7 files changed, 288 insertions(+), 2 deletions(-)

Comments

Johannes Berg March 18, 2024, 9:55 a.m. UTC | #1
On Mon, 2024-03-18 at 11:06 +0530, Rathees Kumar R Chinannan wrote:
> 
> Add an ieee80211_critical_update() API to send the parameters to cfg80211
> and call it when event received from firmware to update critical
> parameters to user space.
> 

I'm confused, _why_? What does the firmware do that changes the beacon
that doesn't _already_ need hostapd to know about it?!

johannes
Rathees Kumar R Chinannan March 19, 2024, 4:37 a.m. UTC | #2
Hi Johannes,

FW is doing the below additional changes on beacon, that requires to get 
the critical and BPCC values from FW.

1. Host driver sets critical bit on beacon template WMI command in 
impacted link, but FW is taking care of synchronization among partner 
links like updating critical bits and BPCC on partner link BMLE perSTA 
profile.
If hostapd and mac80211 does CU and BPCC count changes on beacons,
then synchronization of the same across links is cumbersome since FW 
knows when next beacon on partner link will be sent.
After sending beacon template, host is not aware of when actually the 
beacon sent out with updated critical/BPCC values on all links
and if probe/assoc request frame received in between time,  hostapd 
generated probe/assoc response frame could have different
values compared to that of values in beacon. To avoid this issue, these 
values are obtained from FW.

2. In some cases like Target Wake Time (TWT), FW will add TWT element IE 
on beacon and it is a critical update that hostapd is not aware of.

3. Critical bit should be cleared after DTIM interval and currently 
hostapd is not running any timer for DTIM period to clear these flags.

4. In case of Channel switch /BSS color code change, kernel should have 
switch counts, but hostapd has to provide multiple offsets to update
the count on CSA/BCCA element added on BMLE perSTA profile of partner 
links and RNR element. To avoid adding multiple offsets , these values
are passed to hostapd.

Thanks,
Rathees Kumar

On 3/18/2024 3:25 PM, Johannes Berg wrote:
> On Mon, 2024-03-18 at 11:06 +0530, Rathees Kumar R Chinannan wrote:
>>
>> Add an ieee80211_critical_update() API to send the parameters to cfg80211
>> and call it when event received from firmware to update critical
>> parameters to user space.
>>
> 
> I'm confused, _why_? What does the firmware do that changes the beacon
> that doesn't _already_ need hostapd to know about it?!
> 
> johannes