[PATCH] mac80211: Add 802.11h CSA support
Wen Gong
quic_wgong at quicinc.com
Tue Nov 1 20:26:08 PDT 2022
On 1/6/2009 11:58 AM, Sujith wrote:
> Move to the advertised channel on reception of
> a CSA element. This is needed for 802.11h compliance.
>
> Signed-off-by: Sujith <Sujith.Manoharan at atheros.com>
> ---
> v2
> --
> * Add a new variable to hold the CSA channel
> * Use msecs_to_jiffies for calculating expiration time
> * Add a check to drop beacons in case of a frequency mismatch
>
> v3
> --
> * Add a BSSID check when handling CSA action frame
>
> net/mac80211/ieee80211_i.h | 11 ++++++-
> net/mac80211/iface.c | 2 +
> net/mac80211/mlme.c | 13 +++++++
> net/mac80211/rx.c | 20 +++++++++++
> net/mac80211/spectmgmt.c | 77 ++++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 122 insertions(+), 1 deletions(-)
>
> ...
> +void ieee80211_process_chanswitch(struct ieee80211_sub_if_data *sdata,
> + struct ieee80211_channel_sw_ie *sw_elem,
> + struct ieee80211_bss *bss)
> +{
> + struct ieee80211_channel *new_ch;
> + struct ieee80211_if_sta *ifsta = &sdata->u.sta;
> + int new_freq = ieee80211_channel_to_frequency(sw_elem->new_ch_num);
> +
> + /* FIXME: Handle ADHOC later */
> + if (sdata->vif.type != NL80211_IFTYPE_STATION)
> + return;
> +
> + if (ifsta->state != IEEE80211_STA_MLME_ASSOCIATED)
> + return;
> +
> + if (sdata->local->sw_scanning || sdata->local->hw_scanning)
> + return;
> +
May I know why channel switch should not go ahead while it is doing scan?
It lead channel switch fail sometimes.
For example, channel switch count is 10, then it has 10 becaons with
channel switch IE
in the 1 second, if it is doing a hw scan(time cost is more than 1
second) at that moment,
the channel switch of 10 beacons will not be handle, and lead channel
switch fail.
Currently it is changed like this in net/mac80211/mlme.c
ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
...
if (local->scanning)
return;
...
More information about the ath11k
mailing list