On 6/26/24 18:05, Johannes Berg wrote:
On Wed, 2024-06-26 at 10:22 +0530, Aditya Kumar Singh wrote:
Hence, in order to support DFS with MLO, do the following changes -
* Add channel pointer as an argument to the function
ieee80211_radar_detected(). During MLO, drivers would have to pass on
which channel radar is detected.
Makes sense, maybe?
* In order to pass on this channel information to the radar detected
worker later on, introduce a linked list 'radar_info' in the structure
local.
* When driver calls radar detected, a node is created and added to this
list and work is scheduled. The work handler takes care to process each
node and take further action.
Not sure I like that so much, it adds book-keeping and all kinds of
extra things.
Couldn't we just have a flag in the channel context or so - there must
be one, after all? And perhaps pass the chanctx from the driver instead
of the channel?
Not really. So this linked list thing came into picture for drivers
supporting split-band 5 GHz wiphy and both of them are grouped together
for MLO. Now, each one of them will use different chanctx as such and
there is a possibility of radar being detected simultaneously.
Actually, we're already having to do a channel/chanctx lookup in
ieee80211_dfs_radar_detected_work() so it seems pretty weird to add more
complex logic to it...
Please consider just passing the chanctx, and then we can set a flag
there, and not have any of this.
Could do but, logic in worker will be little bit complex?
for each ctx in local:
if ctx radar_detected flag is set:
append to local ctx list/array
num_ctx++
if num_ctx > 1 :
if wiphy supports mlo:
for each local ctx list/array:
call cfg80211_radar_event with the ctx chandef
else:
warn that mulit channel is not supported
else:
call cfg80211_radar_event with the first element in local ctx
list/array chandef
-----
This is because, in split-band devices, ieee80211_radar_detected can be
called simultaneously with different channel contexts and then there is
a possibility that before worker gets a chance to execute, both of the
calls have marked their chanctx radar detected flags.
- Aditya