diff options
author | Seth Forshee <seth.forshee@canonical.com> | 2012-11-15 09:08:08 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-20 14:07:25 -0500 |
commit | 5211fa2c483dc85134e46a17a72210dc41a0802d (patch) | |
tree | 2117d19db4c7fc5eec88a3f17db4573aefe50ed0 /drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | |
parent | 90123e045cac4ce8ec13e266f030c618fa674554 (diff) |
brcmsmac: Add brcms_dbg_ht() debug macro
Also convert relevant messages to use this macro.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/ampdu.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c index 2916ddf2414a..56d2d6bb5eb7 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | |||
@@ -371,7 +371,8 @@ static int brcms_c_ffpld_check_txfunfl(struct brcms_c_info *wlc, int fid) | |||
371 | offsetof(struct macstat, txfunfl[fid])); | 371 | offsetof(struct macstat, txfunfl[fid])); |
372 | new_txunfl = (u16) (cur_txunfl - fifo->prev_txfunfl); | 372 | new_txunfl = (u16) (cur_txunfl - fifo->prev_txfunfl); |
373 | if (new_txunfl == 0) { | 373 | if (new_txunfl == 0) { |
374 | BCMMSG(wlc->wiphy, "TX status FRAG set but no tx underflows\n"); | 374 | brcms_dbg_ht(wlc->hw->d11core, |
375 | "TX status FRAG set but no tx underflows\n"); | ||
375 | return -1; | 376 | return -1; |
376 | } | 377 | } |
377 | fifo->prev_txfunfl = cur_txunfl; | 378 | fifo->prev_txfunfl = cur_txunfl; |
@@ -393,8 +394,8 @@ static int brcms_c_ffpld_check_txfunfl(struct brcms_c_info *wlc, int fid) | |||
393 | if (fifo->accum_txfunfl < 10) | 394 | if (fifo->accum_txfunfl < 10) |
394 | return 0; | 395 | return 0; |
395 | 396 | ||
396 | BCMMSG(wlc->wiphy, "ampdu_count %d tx_underflows %d\n", | 397 | brcms_dbg_ht(wlc->hw->d11core, "ampdu_count %d tx_underflows %d\n", |
397 | current_ampdu_cnt, fifo->accum_txfunfl); | 398 | current_ampdu_cnt, fifo->accum_txfunfl); |
398 | 399 | ||
399 | /* | 400 | /* |
400 | compute the current ratio of tx unfl per ampdu. | 401 | compute the current ratio of tx unfl per ampdu. |
@@ -447,9 +448,10 @@ static int brcms_c_ffpld_check_txfunfl(struct brcms_c_info *wlc, int fid) | |||
447 | (max_mpdu * FFPLD_MPDU_SIZE - fifo->ampdu_pld_size)) | 448 | (max_mpdu * FFPLD_MPDU_SIZE - fifo->ampdu_pld_size)) |
448 | / (max_mpdu * FFPLD_MPDU_SIZE)) * 100; | 449 | / (max_mpdu * FFPLD_MPDU_SIZE)) * 100; |
449 | 450 | ||
450 | BCMMSG(wlc->wiphy, "DMA estimated transfer rate %d; " | 451 | brcms_dbg_ht(wlc->hw->d11core, |
451 | "pre-load size %d\n", | 452 | "DMA estimated transfer rate %d; " |
452 | fifo->dmaxferrate, fifo->ampdu_pld_size); | 453 | "pre-load size %d\n", |
454 | fifo->dmaxferrate, fifo->ampdu_pld_size); | ||
453 | } else { | 455 | } else { |
454 | 456 | ||
455 | /* decrease ampdu size */ | 457 | /* decrease ampdu size */ |
@@ -810,9 +812,9 @@ void brcms_c_ampdu_finalize(struct brcms_ampdu_session *session) | |||
810 | BRCMS_SET_MIMO_PLCP_AMPDU(txh->FragPLCPFallback); | 812 | BRCMS_SET_MIMO_PLCP_AMPDU(txh->FragPLCPFallback); |
811 | } | 813 | } |
812 | 814 | ||
813 | BCMMSG(wlc->wiphy, "wl%d: count %d ampdu_len %d\n", | 815 | brcms_dbg_ht(wlc->hw->d11core, "wl%d: count %d ampdu_len %d\n", |
814 | wlc->pub->unit, skb_queue_len(&session->skb_list), | 816 | wlc->pub->unit, skb_queue_len(&session->skb_list), |
815 | session->ampdu_len); | 817 | session->ampdu_len); |
816 | } | 818 | } |
817 | 819 | ||
818 | static void | 820 | static void |
@@ -852,7 +854,6 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, | |||
852 | u8 antselid = 0; | 854 | u8 antselid = 0; |
853 | u8 retry_limit, rr_retry_limit; | 855 | u8 retry_limit, rr_retry_limit; |
854 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p); | 856 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p); |
855 | struct wiphy *wiphy = wlc->wiphy; | ||
856 | 857 | ||
857 | #ifdef DEBUG | 858 | #ifdef DEBUG |
858 | u8 hole[AMPDU_MAX_MPDU]; | 859 | u8 hole[AMPDU_MAX_MPDU]; |
@@ -956,10 +957,10 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, | |||
956 | ack_recd = false; | 957 | ack_recd = false; |
957 | if (ba_recd) { | 958 | if (ba_recd) { |
958 | bindex = MODSUB_POW2(seq, start_seq, SEQNUM_MAX); | 959 | bindex = MODSUB_POW2(seq, start_seq, SEQNUM_MAX); |
959 | BCMMSG(wiphy, | 960 | brcms_dbg_ht(wlc->hw->d11core, |
960 | "tid %d seq %d, start_seq %d, bindex %d set %d, index %d\n", | 961 | "tid %d seq %d, start_seq %d, bindex %d set %d, index %d\n", |
961 | tid, seq, start_seq, bindex, | 962 | tid, seq, start_seq, bindex, |
962 | isset(bitmap, bindex), index); | 963 | isset(bitmap, bindex), index); |
963 | /* if acked then clear bit and free packet */ | 964 | /* if acked then clear bit and free packet */ |
964 | if ((bindex < AMPDU_TX_BA_MAX_WSIZE) | 965 | if ((bindex < AMPDU_TX_BA_MAX_WSIZE) |
965 | && isset(bitmap, bindex)) { | 966 | && isset(bitmap, bindex)) { |
@@ -1010,9 +1011,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, | |||
1010 | IEEE80211_TX_STAT_AMPDU_NO_BACK; | 1011 | IEEE80211_TX_STAT_AMPDU_NO_BACK; |
1011 | skb_pull(p, D11_PHY_HDR_LEN); | 1012 | skb_pull(p, D11_PHY_HDR_LEN); |
1012 | skb_pull(p, D11_TXH_LEN); | 1013 | skb_pull(p, D11_TXH_LEN); |
1013 | BCMMSG(wiphy, | 1014 | brcms_dbg_ht(wlc->hw->d11core, |
1014 | "BA Timeout, seq %d, in_transit %d\n", | 1015 | "BA Timeout, seq %d, in_transit %d\n", |
1015 | seq, ini->tx_in_transit); | 1016 | seq, ini->tx_in_transit); |
1016 | ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, | 1017 | ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, |
1017 | p); | 1018 | p); |
1018 | } | 1019 | } |