X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=net%2Fmac80211%2Fsta_info.c;h=81c4e3392f40a1c5ebebbef20acb1d44d7d6fca5;hb=902acc7896d7649fb30e4b22bd4e643c7f34b02c;hp=1f3c9eb985009c5453cebb895472e9b82f074b28;hpb=f7a921443740d7dafc65b17aa32531730d358f50;p=firefly-linux-kernel-4.4.55.git diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 1f3c9eb98500..81c4e3392f40 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -21,9 +21,7 @@ #include "ieee80211_rate.h" #include "sta_info.h" #include "debugfs_sta.h" -#ifdef CONFIG_MAC80211_MESH #include "mesh.h" -#endif /* Caller must hold local->sta_lock */ static void sta_info_hash_add(struct ieee80211_local *local, @@ -309,10 +307,8 @@ void sta_info_remove(struct sta_info *sta) } local->num_sta--; -#ifdef CONFIG_MAC80211_MESH - if (sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) + if (ieee80211_vif_is_mesh(&sdata->vif)) mesh_accept_plinks_update(sdata->dev); -#endif } void sta_info_free(struct sta_info *sta) @@ -329,13 +325,8 @@ void sta_info_free(struct sta_info *sta) sta_info_remove(sta); write_unlock_bh(&local->sta_lock); -#ifdef CONFIG_MAC80211_MESH - if (sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) { - spin_lock_bh(&sta->plink_lock); + if (ieee80211_vif_is_mesh(&sdata->vif)) mesh_plink_deactivate(sta); - spin_unlock_bh(&sta->plink_lock); - } -#endif while ((skb = skb_dequeue(&sta->ps_tx_buf)) != NULL) { local->total_ps_buffered--;