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 | |
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>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 35 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/debug.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/stf.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/include/defs.h | 1 |
4 files changed, 25 insertions, 20 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 | } |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/debug.h b/drivers/net/wireless/brcm80211/brcmsmac/debug.h index 2e7e077ca680..c0d2cf7d9be1 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/debug.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/debug.h | |||
@@ -41,5 +41,6 @@ static inline void __brcms_dbg(struct device *dev, u32 level, | |||
41 | #define brcms_dbg_tx(core, f, a...) brcms_dbg(core, BRCM_DL_TX, f, ##a) | 41 | #define brcms_dbg_tx(core, f, a...) brcms_dbg(core, BRCM_DL_TX, f, ##a) |
42 | #define brcms_dbg_int(core, f, a...) brcms_dbg(core, BRCM_DL_INT, f, ##a) | 42 | #define brcms_dbg_int(core, f, a...) brcms_dbg(core, BRCM_DL_INT, f, ##a) |
43 | #define brcms_dbg_dma(core, f, a...) brcms_dbg(core, BRCM_DL_DMA, f, ##a) | 43 | #define brcms_dbg_dma(core, f, a...) brcms_dbg(core, BRCM_DL_DMA, f, ##a) |
44 | #define brcms_dbg_ht(core, f, a...) brcms_dbg(core, BRCM_DL_HT, f, ##a) | ||
44 | 45 | ||
45 | #endif /* _BRCMS_DEBUG_H_ */ | 46 | #endif /* _BRCMS_DEBUG_H_ */ |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/stf.c b/drivers/net/wireless/brcm80211/brcmsmac/stf.c index ed1d1aa71d2d..dd9162722495 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/stf.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/stf.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "channel.h" | 23 | #include "channel.h" |
24 | #include "main.h" | 24 | #include "main.h" |
25 | #include "stf.h" | 25 | #include "stf.h" |
26 | #include "debug.h" | ||
26 | 27 | ||
27 | #define MIN_SPATIAL_EXPANSION 0 | 28 | #define MIN_SPATIAL_EXPANSION 0 |
28 | #define MAX_SPATIAL_EXPANSION 1 | 29 | #define MAX_SPATIAL_EXPANSION 1 |
@@ -160,8 +161,8 @@ bool brcms_c_stf_stbc_rx_set(struct brcms_c_info *wlc, s32 int_val) | |||
160 | static int brcms_c_stf_txcore_set(struct brcms_c_info *wlc, u8 Nsts, | 161 | static int brcms_c_stf_txcore_set(struct brcms_c_info *wlc, u8 Nsts, |
161 | u8 core_mask) | 162 | u8 core_mask) |
162 | { | 163 | { |
163 | BCMMSG(wlc->wiphy, "wl%d: Nsts %d core_mask %x\n", | 164 | brcms_dbg_ht(wlc->hw->d11core, "wl%d: Nsts %d core_mask %x\n", |
164 | wlc->pub->unit, Nsts, core_mask); | 165 | wlc->pub->unit, Nsts, core_mask); |
165 | 166 | ||
166 | if (hweight8(core_mask) > wlc->stf->txstreams) | 167 | if (hweight8(core_mask) > wlc->stf->txstreams) |
167 | core_mask = 0; | 168 | core_mask = 0; |
@@ -194,7 +195,8 @@ static int brcms_c_stf_spatial_policy_set(struct brcms_c_info *wlc, int val) | |||
194 | int i; | 195 | int i; |
195 | u8 core_mask = 0; | 196 | u8 core_mask = 0; |
196 | 197 | ||
197 | BCMMSG(wlc->wiphy, "wl%d: val %x\n", wlc->pub->unit, val); | 198 | brcms_dbg_ht(wlc->hw->d11core, "wl%d: val %x\n", wlc->pub->unit, |
199 | val); | ||
198 | 200 | ||
199 | wlc->stf->spatial_policy = (s8) val; | 201 | wlc->stf->spatial_policy = (s8) val; |
200 | for (i = 1; i <= MAX_STREAMS_SUPPORTED; i++) { | 202 | for (i = 1; i <= MAX_STREAMS_SUPPORTED; i++) { |
diff --git a/drivers/net/wireless/brcm80211/include/defs.h b/drivers/net/wireless/brcm80211/include/defs.h index 54ffe7ff0191..fb7cbcf81179 100644 --- a/drivers/net/wireless/brcm80211/include/defs.h +++ b/drivers/net/wireless/brcm80211/include/defs.h | |||
@@ -85,6 +85,7 @@ | |||
85 | #define BRCM_DL_TX 0x00000008 | 85 | #define BRCM_DL_TX 0x00000008 |
86 | #define BRCM_DL_INT 0x00000010 | 86 | #define BRCM_DL_INT 0x00000010 |
87 | #define BRCM_DL_DMA 0x00000020 | 87 | #define BRCM_DL_DMA 0x00000020 |
88 | #define BRCM_DL_HT 0x00000040 | ||
88 | 89 | ||
89 | #define PM_OFF 0 | 90 | #define PM_OFF 0 |
90 | #define PM_MAX 1 | 91 | #define PM_MAX 1 |