summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJavier Cardona2011-05-04 01:57:11 +0200
committerJohn W. Linville2011-05-11 20:44:46 +0200
commit9c3990aaec0ad9f686ef6480f6861f2df89b2a7a (patch)
tree5e073ffce0ce0aed45e9dfeb9f41efc140c770f7 /net/mac80211/cfg.c
parentcfg80211: Use capability info to detect mesh beacons. (diff)
downloadkernel-qcow2-linux-9c3990aaec0ad9f686ef6480f6861f2df89b2a7a.tar.gz
kernel-qcow2-linux-9c3990aaec0ad9f686ef6480f6861f2df89b2a7a.tar.xz
kernel-qcow2-linux-9c3990aaec0ad9f686ef6480f6861f2df89b2a7a.zip
nl80211: Let userspace drive the peer link management states.
Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 18c2555e04e6..51f775772d9e 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -734,15 +734,27 @@ static void sta_apply_parameters(struct ieee80211_local *local,
params->ht_capa,
&sta->sta.ht_cap);
- if (ieee80211_vif_is_mesh(&sdata->vif) && params->plink_action) {
- switch (params->plink_action) {
- case PLINK_ACTION_OPEN:
- mesh_plink_open(sta);
- break;
- case PLINK_ACTION_BLOCK:
- mesh_plink_block(sta);
- break;
- }
+ if (ieee80211_vif_is_mesh(&sdata->vif)) {
+ if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED)
+ switch (params->plink_state) {
+ case PLINK_LISTEN:
+ case PLINK_ESTAB:
+ case PLINK_BLOCKED:
+ sta->plink_state = params->plink_state;
+ break;
+ default:
+ /* nothing */
+ break;
+ }
+ else
+ switch (params->plink_action) {
+ case PLINK_ACTION_OPEN:
+ mesh_plink_open(sta);
+ break;
+ case PLINK_ACTION_BLOCK:
+ mesh_plink_block(sta);
+ break;
+ }
}
}