summaryrefslogtreecommitdiff
path: root/net/mac80211/spectmgmt.c
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2017-05-16 12:23:10 +0300
committerJohannes Berg <johannes.berg@intel.com>2017-05-19 14:25:52 +0300
commit5d55371b2193774979b90a3d09e8a2e0572a8162 (patch)
tree9399680dfa0bc9aa9906716ead37caaedf7236d9 /net/mac80211/spectmgmt.c
parent484a54c2e597dbc4ace79c1687022282905afba0 (diff)
downloadlinux-5d55371b2193774979b90a3d09e8a2e0572a8162.tar.xz
mac80211: mesh: mark channel as unusable if a regulatory MESH CSA is received
In the Mesh Channel Switch Parameters (8.4.2.105) the reason is specified to WLAN_REASON_MESH_CHAN_REGULATORY in the case that a regulatory limitation was the cause for the switch. This means another station detected a radar event. Mark the channel as unusable if this happens. Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net> [sw: style cleanup, rebase] Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/spectmgmt.c')
-rw-r--r--net/mac80211/spectmgmt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 0782e486fe89..d2ea0017c79d 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -76,6 +76,11 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
csa_ie->mode = elems->mesh_chansw_params_ie->mesh_flags;
csa_ie->pre_value = le16_to_cpu(
elems->mesh_chansw_params_ie->mesh_pre_value);
+
+ if (elems->mesh_chansw_params_ie->mesh_flags &
+ WLAN_EID_CHAN_SWITCH_PARAM_REASON)
+ csa_ie->reason_code = le16_to_cpu(
+ elems->mesh_chansw_params_ie->mesh_reason);
}
new_freq = ieee80211_channel_to_frequency(new_chan_no, new_band);