summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorMarco Porsch <marco@cozybit.com>2013-01-07 16:04:49 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-01-16 22:40:56 +0100
commit1617bab8db81427392d424f2c7ffb5a3282c417c (patch)
tree6c94fa75f1d0d5498ab8743e6b0248de75ebae40 /net/mac80211/cfg.c
parentea54fba20985b7a0cb8e1c8e2760a0865ee47763 (diff)
downloadlinux-1617bab8db81427392d424f2c7ffb5a3282c417c.tar.gz
linux-1617bab8db81427392d424f2c7ffb5a3282c417c.tar.bz2
linux-1617bab8db81427392d424f2c7ffb5a3282c417c.zip
mac80211: update mesh peer link counter during userspace peering
The established peer link count is indicated in mesh beacons and used for other internal tasks. Previously it was not updated when authenticated peering is performed in userspace. Signed-off-by: Marco Porsch <marco@cozybit.com> Acked-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 817992b51fe7..8a91dd22d571 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1243,18 +1243,33 @@ static int sta_apply_parameters(struct ieee80211_local *local,
if (ieee80211_vif_is_mesh(&sdata->vif)) {
#ifdef CONFIG_MAC80211_MESH
- if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED)
+ if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED) {
+ u32 changed = 0;
+
switch (params->plink_state) {
- case NL80211_PLINK_LISTEN:
case NL80211_PLINK_ESTAB:
+ if (sta->plink_state != NL80211_PLINK_ESTAB)
+ changed = mesh_plink_inc_estab_count(
+ sdata);
+ sta->plink_state = params->plink_state;
+ break;
+ case NL80211_PLINK_LISTEN:
case NL80211_PLINK_BLOCKED:
+ case NL80211_PLINK_OPN_SNT:
+ case NL80211_PLINK_OPN_RCVD:
+ case NL80211_PLINK_CNF_RCVD:
+ case NL80211_PLINK_HOLDING:
+ if (sta->plink_state == NL80211_PLINK_ESTAB)
+ changed = mesh_plink_dec_estab_count(
+ sdata);
sta->plink_state = params->plink_state;
break;
default:
/* nothing */
break;
}
- else
+ ieee80211_bss_info_change_notify(sdata, changed);
+ } else {
switch (params->plink_action) {
case PLINK_ACTION_OPEN:
mesh_plink_open(sta);
@@ -1263,6 +1278,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
mesh_plink_block(sta);
break;
}
+ }
#endif
}