aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/sta_info.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index f708367092d..2a5a2f067ba 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -129,16 +129,18 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx,
void sta_info_destroy(struct sta_info *sta)
{
- struct ieee80211_local *local = sta->local;
+ struct ieee80211_local *local;
struct sk_buff *skb;
int i;
DECLARE_MAC_BUF(mbuf);
+ ASSERT_RTNL();
+ might_sleep();
+
if (!sta)
return;
- ASSERT_RTNL();
- might_sleep();
+ local = sta->local;
rate_control_remove_sta_debugfs(sta);
ieee80211_sta_debugfs_remove(sta);