summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorChun-Yeow Yeoh2013-11-08 08:09:43 +0100
committerJohannes Berg2013-11-25 16:50:13 +0100
commit3f718fd8401d7db86b9efc3ea1cdf5df41354b9f (patch)
tree62221339cdbf9612427669850a7d1429e982e2d0 /net/mac80211/cfg.c
parentmac80211: don't attempt to reorder multicast frames (diff)
downloadkernel-qcow2-linux-3f718fd8401d7db86b9efc3ea1cdf5df41354b9f.tar.gz
kernel-qcow2-linux-3f718fd8401d7db86b9efc3ea1cdf5df41354b9f.tar.xz
kernel-qcow2-linux-3f718fd8401d7db86b9efc3ea1cdf5df41354b9f.zip
mac80211: fix the mesh channel switch support
Mesh STA receiving the mesh CSA action frame is not able to trigger the mesh channel switch due to the incorrect handling and comparison of mesh channel switch parameters element (MCSP)'s TTL. Make sure the MCSP's TTL is updated accordingly before calling the ieee80211_mesh_process_chnswitch. Also, we update the beacon before forwarding the CSA action frame, so MCSP's precedence value and initiator flag need to be updated prior to this. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 9e7e68d7b1a7..364ce0c5962f 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3119,9 +3119,17 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
params->chandef.chan->band)
return -EINVAL;
+ ifmsh->chsw_init = true;
+ if (!ifmsh->pre_value)
+ ifmsh->pre_value = 1;
+ else
+ ifmsh->pre_value++;
+
err = ieee80211_mesh_csa_beacon(sdata, params, true);
- if (err < 0)
+ if (err < 0) {
+ ifmsh->chsw_init = false;
return err;
+ }
break;
#endif
default: