diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 7fef8ea1f5ec..ca89a848c41e 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -137,14 +137,12 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx, | |||
137 | static void __sta_info_free(struct ieee80211_local *local, | 137 | static void __sta_info_free(struct ieee80211_local *local, |
138 | struct sta_info *sta) | 138 | struct sta_info *sta) |
139 | { | 139 | { |
140 | DECLARE_MAC_BUF(mbuf); | ||
141 | |||
142 | rate_control_free_sta(sta); | 140 | rate_control_free_sta(sta); |
143 | rate_control_put(sta->rate_ctrl); | 141 | rate_control_put(sta->rate_ctrl); |
144 | 142 | ||
145 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 143 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
146 | printk(KERN_DEBUG "%s: Destroyed STA %s\n", | 144 | printk(KERN_DEBUG "%s: Destroyed STA %pM\n", |
147 | wiphy_name(local->hw.wiphy), print_mac(mbuf, sta->sta.addr)); | 145 | wiphy_name(local->hw.wiphy), sta->sta.addr); |
148 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | 146 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ |
149 | 147 | ||
150 | kfree(sta); | 148 | kfree(sta); |
@@ -222,7 +220,6 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, | |||
222 | struct ieee80211_local *local = sdata->local; | 220 | struct ieee80211_local *local = sdata->local; |
223 | struct sta_info *sta; | 221 | struct sta_info *sta; |
224 | int i; | 222 | int i; |
225 | DECLARE_MAC_BUF(mbuf); | ||
226 | 223 | ||
227 | sta = kzalloc(sizeof(*sta) + local->hw.sta_data_size, gfp); | 224 | sta = kzalloc(sizeof(*sta) + local->hw.sta_data_size, gfp); |
228 | if (!sta) | 225 | if (!sta) |
@@ -263,8 +260,8 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, | |||
263 | skb_queue_head_init(&sta->tx_filtered); | 260 | skb_queue_head_init(&sta->tx_filtered); |
264 | 261 | ||
265 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 262 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
266 | printk(KERN_DEBUG "%s: Allocated STA %s\n", | 263 | printk(KERN_DEBUG "%s: Allocated STA %pM\n", |
267 | wiphy_name(local->hw.wiphy), print_mac(mbuf, sta->sta.addr)); | 264 | wiphy_name(local->hw.wiphy), sta->sta.addr); |
268 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | 265 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ |
269 | 266 | ||
270 | #ifdef CONFIG_MAC80211_MESH | 267 | #ifdef CONFIG_MAC80211_MESH |
@@ -281,7 +278,6 @@ int sta_info_insert(struct sta_info *sta) | |||
281 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 278 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
282 | unsigned long flags; | 279 | unsigned long flags; |
283 | int err = 0; | 280 | int err = 0; |
284 | DECLARE_MAC_BUF(mac); | ||
285 | 281 | ||
286 | /* | 282 | /* |
287 | * Can't be a WARN_ON because it can be triggered through a race: | 283 | * Can't be a WARN_ON because it can be triggered through a race: |
@@ -322,8 +318,8 @@ int sta_info_insert(struct sta_info *sta) | |||
322 | } | 318 | } |
323 | 319 | ||
324 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 320 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
325 | printk(KERN_DEBUG "%s: Inserted STA %s\n", | 321 | printk(KERN_DEBUG "%s: Inserted STA %pM\n", |
326 | wiphy_name(local->hw.wiphy), print_mac(mac, sta->sta.addr)); | 322 | wiphy_name(local->hw.wiphy), sta->sta.addr); |
327 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | 323 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ |
328 | 324 | ||
329 | spin_unlock_irqrestore(&local->sta_lock, flags); | 325 | spin_unlock_irqrestore(&local->sta_lock, flags); |
@@ -423,9 +419,6 @@ static void __sta_info_unlink(struct sta_info **sta) | |||
423 | { | 419 | { |
424 | struct ieee80211_local *local = (*sta)->local; | 420 | struct ieee80211_local *local = (*sta)->local; |
425 | struct ieee80211_sub_if_data *sdata = (*sta)->sdata; | 421 | struct ieee80211_sub_if_data *sdata = (*sta)->sdata; |
426 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | ||
427 | DECLARE_MAC_BUF(mbuf); | ||
428 | #endif | ||
429 | /* | 422 | /* |
430 | * pull caller's reference if we're already gone. | 423 | * pull caller's reference if we're already gone. |
431 | */ | 424 | */ |
@@ -468,8 +461,8 @@ static void __sta_info_unlink(struct sta_info **sta) | |||
468 | } | 461 | } |
469 | 462 | ||
470 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 463 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
471 | printk(KERN_DEBUG "%s: Removed STA %s\n", | 464 | printk(KERN_DEBUG "%s: Removed STA %pM\n", |
472 | wiphy_name(local->hw.wiphy), print_mac(mbuf, (*sta)->sta.addr)); | 465 | wiphy_name(local->hw.wiphy), (*sta)->sta.addr); |
473 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | 466 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ |
474 | 467 | ||
475 | /* | 468 | /* |
@@ -544,7 +537,6 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
544 | unsigned long flags; | 537 | unsigned long flags; |
545 | struct sk_buff *skb; | 538 | struct sk_buff *skb; |
546 | struct ieee80211_sub_if_data *sdata; | 539 | struct ieee80211_sub_if_data *sdata; |
547 | DECLARE_MAC_BUF(mac); | ||
548 | 540 | ||
549 | if (skb_queue_empty(&sta->ps_tx_buf)) | 541 | if (skb_queue_empty(&sta->ps_tx_buf)) |
550 | return; | 542 | return; |
@@ -564,8 +556,8 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
564 | sdata = sta->sdata; | 556 | sdata = sta->sdata; |
565 | local->total_ps_buffered--; | 557 | local->total_ps_buffered--; |
566 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 558 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
567 | printk(KERN_DEBUG "Buffered frame expired (STA " | 559 | printk(KERN_DEBUG "Buffered frame expired (STA %pM)\n", |
568 | "%s)\n", print_mac(mac, sta->sta.addr)); | 560 | sta->sta.addr); |
569 | #endif | 561 | #endif |
570 | dev_kfree_skb(skb); | 562 | dev_kfree_skb(skb); |
571 | 563 | ||
@@ -809,15 +801,14 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata, | |||
809 | struct ieee80211_local *local = sdata->local; | 801 | struct ieee80211_local *local = sdata->local; |
810 | struct sta_info *sta, *tmp; | 802 | struct sta_info *sta, *tmp; |
811 | LIST_HEAD(tmp_list); | 803 | LIST_HEAD(tmp_list); |
812 | DECLARE_MAC_BUF(mac); | ||
813 | unsigned long flags; | 804 | unsigned long flags; |
814 | 805 | ||
815 | spin_lock_irqsave(&local->sta_lock, flags); | 806 | spin_lock_irqsave(&local->sta_lock, flags); |
816 | list_for_each_entry_safe(sta, tmp, &local->sta_list, list) | 807 | list_for_each_entry_safe(sta, tmp, &local->sta_list, list) |
817 | if (time_after(jiffies, sta->last_rx + exp_time)) { | 808 | if (time_after(jiffies, sta->last_rx + exp_time)) { |
818 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 809 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
819 | printk(KERN_DEBUG "%s: expiring inactive STA %s\n", | 810 | printk(KERN_DEBUG "%s: expiring inactive STA %pM\n", |
820 | sdata->dev->name, print_mac(mac, sta->sta.addr)); | 811 | sdata->dev->name, sta->sta.addr); |
821 | #endif | 812 | #endif |
822 | __sta_info_unlink(&sta); | 813 | __sta_info_unlink(&sta); |
823 | if (sta) | 814 | if (sta) |