aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorChun-Yeow Yeoh <yeohchunyeow@cozybit.com>2013-10-17 18:55:02 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-10-28 10:05:30 -0400
commitb8456a14e9d2770846fcf74de18ff95b676149a3 (patch)
tree858ae69cd2d695116afc582377984070f645ff01 /net/mac80211/cfg.c
parentc6da674aff9425dc41255bcb7f7586a656843f2d (diff)
{nl,cfg,mac}80211: implement mesh channel switch userspace API
Implement the required procedures for mesh channel switching as defined in the IEEE Std 802.11-2012 section 10.9.8.4.3 and also handle the CSA and MCSP elements as followed: * Add the function for updating the beacon and probe response frames with CSA and MCSP elements during the period of switching to the new channel. Both CSA and MCSP elements must be included in beacon and probe response frames until the intended channel switch time. * The ifmsh->csa_settings is set to NULL and the CSA and MCSP elements will then be removed from the beacon or probe response frames once the new channel is switched to. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 8cdbd29cbc45..5b1ccb4e0271 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2994,6 +2994,13 @@ void ieee80211_csa_finalize_work(struct work_struct *work)
2994 case NL80211_IFTYPE_ADHOC: 2994 case NL80211_IFTYPE_ADHOC:
2995 ieee80211_ibss_finish_csa(sdata); 2995 ieee80211_ibss_finish_csa(sdata);
2996 break; 2996 break;
2997#ifdef CONFIG_MAC80211_MESH
2998 case NL80211_IFTYPE_MESH_POINT:
2999 err = ieee80211_mesh_finish_csa(sdata);
3000 if (err < 0)
3001 return;
3002 break;
3003#endif
2997 default: 3004 default:
2998 WARN_ON(1); 3005 WARN_ON(1);
2999 return; 3006 return;
@@ -3113,7 +3120,7 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
3113 params->chandef.chan->band) 3120 params->chandef.chan->band)
3114 return -EINVAL; 3121 return -EINVAL;
3115 3122
3116 err = ieee80211_send_action_csa(sdata, params); 3123 err = ieee80211_mesh_csa_beacon(sdata, params, true);
3117 if (err < 0) 3124 if (err < 0)
3118 return err; 3125 return err;
3119 break; 3126 break;