diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index af25c4e7ec5c..37eda7e00e03 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -297,9 +297,10 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx) | |||
297 | if (unlikely(!assoc && | 297 | if (unlikely(!assoc && |
298 | ieee80211_is_data(hdr->frame_control))) { | 298 | ieee80211_is_data(hdr->frame_control))) { |
299 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 299 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
300 | pr_debug("%s: dropped data frame to not associated station %pM\n", | 300 | sdata_info(tx->sdata, |
301 | tx->sdata->name, hdr->addr1); | 301 | "dropped data frame to not associated station %pM\n", |
302 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | 302 | hdr->addr1); |
303 | #endif | ||
303 | I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); | 304 | I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); |
304 | return TX_DROP; | 305 | return TX_DROP; |
305 | } | 306 | } |
@@ -366,10 +367,7 @@ static void purge_old_ps_buffers(struct ieee80211_local *local) | |||
366 | rcu_read_unlock(); | 367 | rcu_read_unlock(); |
367 | 368 | ||
368 | local->total_ps_buffered = total; | 369 | local->total_ps_buffered = total; |
369 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 370 | ps_dbg_hw(&local->hw, "PS buffers full - purged %d frames\n", purged); |
370 | wiphy_debug(local->hw.wiphy, "PS buffers full - purged %d frames\n", | ||
371 | purged); | ||
372 | #endif | ||
373 | } | 371 | } |
374 | 372 | ||
375 | static ieee80211_tx_result | 373 | static ieee80211_tx_result |
@@ -411,10 +409,8 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) | |||
411 | purge_old_ps_buffers(tx->local); | 409 | purge_old_ps_buffers(tx->local); |
412 | 410 | ||
413 | if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= AP_MAX_BC_BUFFER) { | 411 | if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= AP_MAX_BC_BUFFER) { |
414 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 412 | ps_dbg(tx->sdata, |
415 | net_dbg_ratelimited("%s: BC TX buffer full - dropping the oldest frame\n", | 413 | "BC TX buffer full - dropping the oldest frame\n"); |
416 | tx->sdata->name); | ||
417 | #endif | ||
418 | dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); | 414 | dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); |
419 | } else | 415 | } else |
420 | tx->local->total_ps_buffered++; | 416 | tx->local->total_ps_buffered++; |
@@ -465,18 +461,15 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
465 | return TX_CONTINUE; | 461 | return TX_CONTINUE; |
466 | } | 462 | } |
467 | 463 | ||
468 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 464 | ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", |
469 | pr_debug("STA %pM aid %d: PS buffer for AC %d\n", | 465 | sta->sta.addr, sta->sta.aid, ac); |
470 | sta->sta.addr, sta->sta.aid, ac); | ||
471 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | ||
472 | if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) | 466 | if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) |
473 | purge_old_ps_buffers(tx->local); | 467 | purge_old_ps_buffers(tx->local); |
474 | if (skb_queue_len(&sta->ps_tx_buf[ac]) >= STA_MAX_TX_BUFFER) { | 468 | if (skb_queue_len(&sta->ps_tx_buf[ac]) >= STA_MAX_TX_BUFFER) { |
475 | struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf[ac]); | 469 | struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf[ac]); |
476 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 470 | ps_dbg(tx->sdata, |
477 | net_dbg_ratelimited("%s: STA %pM TX buffer for AC %d full - dropping oldest frame\n", | 471 | "STA %pM TX buffer for AC %d full - dropping oldest frame\n", |
478 | tx->sdata->name, sta->sta.addr, ac); | 472 | sta->sta.addr, ac); |
479 | #endif | ||
480 | dev_kfree_skb(old); | 473 | dev_kfree_skb(old); |
481 | } else | 474 | } else |
482 | tx->local->total_ps_buffered++; | 475 | tx->local->total_ps_buffered++; |
@@ -498,13 +491,11 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
498 | sta_info_recalc_tim(sta); | 491 | sta_info_recalc_tim(sta); |
499 | 492 | ||
500 | return TX_QUEUED; | 493 | return TX_QUEUED; |
494 | } else if (unlikely(test_sta_flag(sta, WLAN_STA_PS_STA))) { | ||
495 | ps_dbg(tx->sdata, | ||
496 | "STA %pM in PS mode, but polling/in SP -> send frame\n", | ||
497 | sta->sta.addr); | ||
501 | } | 498 | } |
502 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | ||
503 | else if (unlikely(test_sta_flag(sta, WLAN_STA_PS_STA))) { | ||
504 | pr_debug("%s: STA %pM in PS mode, but polling/in SP -> send frame\n", | ||
505 | tx->sdata->name, sta->sta.addr); | ||
506 | } | ||
507 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | ||
508 | 499 | ||
509 | return TX_CONTINUE; | 500 | return TX_CONTINUE; |
510 | } | 501 | } |
@@ -1963,7 +1954,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1963 | (cpu_to_be16(ethertype) != sdata->control_port_protocol || | 1954 | (cpu_to_be16(ethertype) != sdata->control_port_protocol || |
1964 | !ether_addr_equal(sdata->vif.addr, skb->data + ETH_ALEN)))) { | 1955 | !ether_addr_equal(sdata->vif.addr, skb->data + ETH_ALEN)))) { |
1965 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1956 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1966 | net_dbg_ratelimited("%s: dropped frame to %pM (unauthorized port)\n", | 1957 | net_info_ratelimited("%s: dropped frame to %pM (unauthorized port)\n", |
1967 | dev->name, hdr.addr1); | 1958 | dev->name, hdr.addr1); |
1968 | #endif | 1959 | #endif |
1969 | 1960 | ||