Commit ba4a14e1 authored by Thomas Pedersen's avatar Thomas Pedersen Committed by John W. Linville

mac80211: notify peer when shutting down peer link

Send a Mesh Peering Close frame when we deactivate a mesh peer link.
Signed-off-by: default avatarThomas Pedersen <thomas@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6f2d9335
...@@ -43,6 +43,10 @@ enum plink_event { ...@@ -43,6 +43,10 @@ enum plink_event {
CLS_IGNR CLS_IGNR
}; };
static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
enum ieee80211_self_protected_actioncode action,
u8 *da, __le16 llid, __le16 plid, __le16 reason);
static inline static inline
void mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata) void mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata)
{ {
...@@ -133,6 +137,10 @@ void mesh_plink_deactivate(struct sta_info *sta) ...@@ -133,6 +137,10 @@ void mesh_plink_deactivate(struct sta_info *sta)
spin_lock_bh(&sta->lock); spin_lock_bh(&sta->lock);
deactivated = __mesh_plink_deactivate(sta); deactivated = __mesh_plink_deactivate(sta);
sta->reason = cpu_to_le16(WLAN_REASON_MESH_PEER_CANCELED);
mesh_plink_frame_tx(sdata, WLAN_SP_MESH_PEERING_CLOSE,
sta->sta.addr, sta->llid, sta->plid,
sta->reason);
spin_unlock_bh(&sta->lock); spin_unlock_bh(&sta->lock);
if (deactivated) if (deactivated)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment