From b9cc81d827ed13502ca9c8523361be26ca1d7220 Mon Sep 17 00:00:00 2001 From: Sara Sharon Date: Wed, 6 Feb 2019 13:17:10 +0200 Subject: mac80211: abort CSA if beacon does not include CSA IEs In case we receive a beacon without CSA IE while we are in the middle of channel switch - abort the operation. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg --- net/mac80211/driver-ops.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'net/mac80211/driver-ops.h') diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index ba3c07b10cd0..e069122595d0 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1052,6 +1052,20 @@ drv_post_channel_switch(struct ieee80211_sub_if_data *sdata) return ret; } +static inline void +drv_abort_channel_switch(struct ieee80211_sub_if_data *sdata) +{ + struct ieee80211_local *local = sdata->local; + + if (!check_sdata_in_driver(sdata)) + return; + + trace_drv_abort_channel_switch(local, sdata); + + if (local->ops->abort_channel_switch) + local->ops->abort_channel_switch(&local->hw, &sdata->vif); +} + static inline int drv_join_ibss(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata) { -- cgit v1.2.3-59-g8ed1b