diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 77dcf2f89d42..06fa75ceb025 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -169,9 +169,7 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta) | |||
169 | if (sta->rate_ctrl) | 169 | if (sta->rate_ctrl) |
170 | rate_control_free_sta(sta); | 170 | rate_control_free_sta(sta); |
171 | 171 | ||
172 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 172 | sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr); |
173 | wiphy_debug(local->hw.wiphy, "Destroyed STA %pM\n", sta->sta.addr); | ||
174 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | ||
175 | 173 | ||
176 | kfree(sta); | 174 | kfree(sta); |
177 | } | 175 | } |
@@ -278,9 +276,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, | |||
278 | for (i = 0; i < NUM_RX_DATA_QUEUES; i++) | 276 | for (i = 0; i < NUM_RX_DATA_QUEUES; i++) |
279 | sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX); | 277 | sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX); |
280 | 278 | ||
281 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 279 | sta_dbg(sdata, "Allocated STA %pM\n", sta->sta.addr); |
282 | wiphy_debug(local->hw.wiphy, "Allocated STA %pM\n", sta->sta.addr); | ||
283 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | ||
284 | 280 | ||
285 | #ifdef CONFIG_MAC80211_MESH | 281 | #ifdef CONFIG_MAC80211_MESH |
286 | sta->plink_state = NL80211_PLINK_LISTEN; | 282 | sta->plink_state = NL80211_PLINK_LISTEN; |
@@ -333,8 +329,9 @@ static int sta_info_insert_drv_state(struct ieee80211_local *local, | |||
333 | } | 329 | } |
334 | 330 | ||
335 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { | 331 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { |
336 | pr_debug("%s: failed to move IBSS STA %pM to state %d (%d) - keeping it anyway\n", | 332 | sdata_info(sdata, |
337 | sdata->name, sta->sta.addr, state + 1, err); | 333 | "failed to move IBSS STA %pM to state %d (%d) - keeping it anyway\n", |
334 | sta->sta.addr, state + 1, err); | ||
338 | err = 0; | 335 | err = 0; |
339 | } | 336 | } |
340 | 337 | ||
@@ -389,9 +386,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) | |||
389 | sinfo.generation = local->sta_generation; | 386 | sinfo.generation = local->sta_generation; |
390 | cfg80211_new_sta(sdata->dev, sta->sta.addr, &sinfo, GFP_KERNEL); | 387 | cfg80211_new_sta(sdata->dev, sta->sta.addr, &sinfo, GFP_KERNEL); |
391 | 388 | ||
392 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 389 | sta_dbg(sdata, "Inserted STA %pM\n", sta->sta.addr); |
393 | wiphy_debug(local->hw.wiphy, "Inserted STA %pM\n", sta->sta.addr); | ||
394 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | ||
395 | 390 | ||
396 | /* move reference to rcu-protected */ | 391 | /* move reference to rcu-protected */ |
397 | rcu_read_lock(); | 392 | rcu_read_lock(); |
@@ -617,9 +612,8 @@ static bool sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local, | |||
617 | break; | 612 | break; |
618 | 613 | ||
619 | local->total_ps_buffered--; | 614 | local->total_ps_buffered--; |
620 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 615 | ps_dbg(sta->sdata, "Buffered frame expired (STA %pM)\n", |
621 | pr_debug("Buffered frame expired (STA %pM)\n", sta->sta.addr); | 616 | sta->sta.addr); |
622 | #endif | ||
623 | dev_kfree_skb(skb); | 617 | dev_kfree_skb(skb); |
624 | } | 618 | } |
625 | 619 | ||
@@ -745,9 +739,8 @@ int __must_check __sta_info_destroy(struct sta_info *sta) | |||
745 | mesh_accept_plinks_update(sdata); | 739 | mesh_accept_plinks_update(sdata); |
746 | #endif | 740 | #endif |
747 | 741 | ||
748 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 742 | sta_dbg(sdata, "Removed STA %pM\n", sta->sta.addr); |
749 | wiphy_debug(local->hw.wiphy, "Removed STA %pM\n", sta->sta.addr); | 743 | |
750 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | ||
751 | cancel_work_sync(&sta->drv_unblock_wk); | 744 | cancel_work_sync(&sta->drv_unblock_wk); |
752 | 745 | ||
753 | cfg80211_del_sta(sdata->dev, sta->sta.addr, GFP_KERNEL); | 746 | cfg80211_del_sta(sdata->dev, sta->sta.addr, GFP_KERNEL); |
@@ -887,8 +880,8 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata, | |||
887 | continue; | 880 | continue; |
888 | 881 | ||
889 | if (time_after(jiffies, sta->last_rx + exp_time)) { | 882 | if (time_after(jiffies, sta->last_rx + exp_time)) { |
890 | ibss_vdbg("%s: expiring inactive STA %pM\n", | 883 | ibss_dbg(sdata, "expiring inactive STA %pM\n", |
891 | sdata->name, sta->sta.addr); | 884 | sta->sta.addr); |
892 | WARN_ON(__sta_info_destroy(sta)); | 885 | WARN_ON(__sta_info_destroy(sta)); |
893 | } | 886 | } |
894 | } | 887 | } |
@@ -986,10 +979,9 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
986 | 979 | ||
987 | sta_info_recalc_tim(sta); | 980 | sta_info_recalc_tim(sta); |
988 | 981 | ||
989 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 982 | ps_dbg(sdata, |
990 | pr_debug("%s: STA %pM aid %d sending %d filtered/%d PS frames since STA not sleeping anymore\n", | 983 | "STA %pM aid %d sending %d filtered/%d PS frames since STA not sleeping anymore\n", |
991 | sdata->name, sta->sta.addr, sta->sta.aid, filtered, buffered); | 984 | sta->sta.addr, sta->sta.aid, filtered, buffered); |
992 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | ||
993 | } | 985 | } |
994 | 986 | ||
995 | static void ieee80211_send_null_response(struct ieee80211_sub_if_data *sdata, | 987 | static void ieee80211_send_null_response(struct ieee80211_sub_if_data *sdata, |
@@ -1379,10 +1371,8 @@ int sta_info_move_state(struct sta_info *sta, | |||
1379 | return -EINVAL; | 1371 | return -EINVAL; |
1380 | } | 1372 | } |
1381 | 1373 | ||
1382 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1374 | sta_dbg(sta->sdata, "moving STA %pM to state %d\n", |
1383 | pr_debug("%s: moving STA %pM to state %d\n", | 1375 | sta->sta.addr, new_state); |
1384 | sta->sdata->name, sta->sta.addr, new_state); | ||
1385 | #endif | ||
1386 | 1376 | ||
1387 | /* | 1377 | /* |
1388 | * notify the driver before the actual changes so it can | 1378 | * notify the driver before the actual changes so it can |