[PATCH] mac80211: Add 802.11h CSA support
Johannes Berg
johannes at sipsolutions.net
Tue Nov 22 13:26:33 PST 2022
On Wed, 2022-11-02 at 11:26 +0800, Wen Gong wrote:
> 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?
I don't remember, sorry.
johannes
More information about the ath11k
mailing list