diff options
author | Thomas Pedersen <thomas@cozybit.com> | 2011-09-20 16:43:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-21 16:19:41 -0400 |
commit | ba4a14e1024fd783f0e56d96538a959a44651897 (patch) | |
tree | 638fed1f879c37625ca9270b17d68824d13f5823 /net/mac80211/mesh_plink.c | |
parent | 6f2d93353a48af4d5b6ea2a79994d7c9a94b356a (diff) |
mac80211: notify peer when shutting down peer link
Send a Mesh Peering Close frame when we deactivate a mesh peer link.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r-- | net/mac80211/mesh_plink.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 4396906175ae..1213a23ff0fa 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -43,6 +43,10 @@ enum plink_event { | |||
43 | CLS_IGNR | 43 | CLS_IGNR |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | ||
47 | enum ieee80211_self_protected_actioncode action, | ||
48 | u8 *da, __le16 llid, __le16 plid, __le16 reason); | ||
49 | |||
46 | static inline | 50 | static inline |
47 | void mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata) | 51 | void mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata) |
48 | { | 52 | { |
@@ -133,6 +137,10 @@ void mesh_plink_deactivate(struct sta_info *sta) | |||
133 | 137 | ||
134 | spin_lock_bh(&sta->lock); | 138 | spin_lock_bh(&sta->lock); |
135 | deactivated = __mesh_plink_deactivate(sta); | 139 | deactivated = __mesh_plink_deactivate(sta); |
140 | sta->reason = cpu_to_le16(WLAN_REASON_MESH_PEER_CANCELED); | ||
141 | mesh_plink_frame_tx(sdata, WLAN_SP_MESH_PEERING_CLOSE, | ||
142 | sta->sta.addr, sta->llid, sta->plid, | ||
143 | sta->reason); | ||
136 | spin_unlock_bh(&sta->lock); | 144 | spin_unlock_bh(&sta->lock); |
137 | 145 | ||
138 | if (deactivated) | 146 | if (deactivated) |