diff options
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/debug.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 59 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/include/defs.h | 1 |
3 files changed, 36 insertions, 27 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/debug.h b/drivers/net/wireless/brcm80211/brcmsmac/debug.h index 6f2fe3b98e57..f4f5090f5e78 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/debug.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/debug.h | |||
@@ -35,6 +35,7 @@ static inline void __brcms_dbg(struct device *dev, u32 level, | |||
35 | #define brcms_err(core, f, a...) __brcms_err(&(core)->dev, f, ##a) | 35 | #define brcms_err(core, f, a...) __brcms_err(&(core)->dev, f, ##a) |
36 | #define brcms_crit(core, f, a...) __brcms_crit(&(core)->dev, f, ##a) | 36 | #define brcms_crit(core, f, a...) __brcms_crit(&(core)->dev, f, ##a) |
37 | 37 | ||
38 | #define brcms_dbg_info(core, f, a...) brcms_dbg(core, BRCM_DL_INFO, f, ##a) | 38 | #define brcms_dbg_info(core, f, a...) brcms_dbg(core, BRCM_DL_INFO, f, ##a) |
39 | #define brcms_dbg_mac80211(core, f, a...) brcms_dbg(core, BRCM_DL_MAC80211, f, ##a) | ||
39 | 40 | ||
40 | #endif /* _BRCMS_DEBUG_H_ */ | 41 | #endif /* _BRCMS_DEBUG_H_ */ |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index c7e7380a2e43..53992eaf0d27 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -646,8 +646,9 @@ static uint brcms_c_calc_frame_time(struct brcms_c_info *wlc, u32 ratespec, | |||
646 | rate = BRCM_RATE_1M; | 646 | rate = BRCM_RATE_1M; |
647 | } | 647 | } |
648 | 648 | ||
649 | BCMMSG(wlc->wiphy, "wl%d: rspec 0x%x, preamble_type %d, len%d\n", | 649 | brcms_dbg_mac80211(wlc->hw->d11core, |
650 | wlc->pub->unit, ratespec, preamble_type, mac_len); | 650 | "wl%d: rspec 0x%x, preamble_type %d, len%d\n", |
651 | wlc->pub->unit, ratespec, preamble_type, mac_len); | ||
651 | 652 | ||
652 | if (is_mcs_rate(ratespec)) { | 653 | if (is_mcs_rate(ratespec)) { |
653 | uint mcs = ratespec & RSPEC_RATE_MASK; | 654 | uint mcs = ratespec & RSPEC_RATE_MASK; |
@@ -807,8 +808,8 @@ static void brcms_b_core_phy_clk(struct brcms_hardware *wlc_hw, bool clk) | |||
807 | /* low-level band switch utility routine */ | 808 | /* low-level band switch utility routine */ |
808 | static void brcms_c_setxband(struct brcms_hardware *wlc_hw, uint bandunit) | 809 | static void brcms_c_setxband(struct brcms_hardware *wlc_hw, uint bandunit) |
809 | { | 810 | { |
810 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit, | 811 | brcms_dbg_mac80211(wlc_hw->d11core, "wl%d: bandunit %d\n", wlc_hw->unit, |
811 | bandunit); | 812 | bandunit); |
812 | 813 | ||
813 | wlc_hw->band = wlc_hw->bandstate[bandunit]; | 814 | wlc_hw->band = wlc_hw->bandstate[bandunit]; |
814 | 815 | ||
@@ -836,7 +837,7 @@ static u32 brcms_c_setband_inact(struct brcms_c_info *wlc, uint bandunit) | |||
836 | u32 macintmask; | 837 | u32 macintmask; |
837 | u32 macctrl; | 838 | u32 macctrl; |
838 | 839 | ||
839 | BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit); | 840 | brcms_dbg_mac80211(wlc_hw->d11core, "wl%d\n", wlc_hw->unit); |
840 | macctrl = bcma_read32(wlc_hw->d11core, | 841 | macctrl = bcma_read32(wlc_hw->d11core, |
841 | D11REGOFFS(maccontrol)); | 842 | D11REGOFFS(maccontrol)); |
842 | WARN_ON((macctrl & MCTL_EN_MAC) != 0); | 843 | WARN_ON((macctrl & MCTL_EN_MAC) != 0); |
@@ -1724,8 +1725,8 @@ static void brcms_b_bsinit(struct brcms_c_info *wlc, u16 chanspec) | |||
1724 | { | 1725 | { |
1725 | struct brcms_hardware *wlc_hw = wlc->hw; | 1726 | struct brcms_hardware *wlc_hw = wlc->hw; |
1726 | 1727 | ||
1727 | BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit, | 1728 | brcms_dbg_mac80211(wlc_hw->d11core, "wl%d: bandunit %d\n", wlc_hw->unit, |
1728 | wlc_hw->band->bandunit); | 1729 | wlc_hw->band->bandunit); |
1729 | 1730 | ||
1730 | brcms_c_ucode_bsinit(wlc_hw); | 1731 | brcms_c_ucode_bsinit(wlc_hw); |
1731 | 1732 | ||
@@ -2648,8 +2649,8 @@ void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc) | |||
2648 | struct bcma_device *core = wlc_hw->d11core; | 2649 | struct bcma_device *core = wlc_hw->d11core; |
2649 | u32 mc, mi; | 2650 | u32 mc, mi; |
2650 | 2651 | ||
2651 | BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit, | 2652 | brcms_dbg_mac80211(core, "wl%d: bandunit %d\n", wlc_hw->unit, |
2652 | wlc_hw->band->bandunit); | 2653 | wlc_hw->band->bandunit); |
2653 | 2654 | ||
2654 | /* | 2655 | /* |
2655 | * Track overlapping suspend requests | 2656 | * Track overlapping suspend requests |
@@ -2716,8 +2717,8 @@ void brcms_c_enable_mac(struct brcms_c_info *wlc) | |||
2716 | struct bcma_device *core = wlc_hw->d11core; | 2717 | struct bcma_device *core = wlc_hw->d11core; |
2717 | u32 mc, mi; | 2718 | u32 mc, mi; |
2718 | 2719 | ||
2719 | BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit, | 2720 | brcms_dbg_mac80211(core, "wl%d: bandunit %d\n", wlc_hw->unit, |
2720 | wlc->band->bandunit); | 2721 | wlc->band->bandunit); |
2721 | 2722 | ||
2722 | /* | 2723 | /* |
2723 | * Track overlapping suspend requests | 2724 | * Track overlapping suspend requests |
@@ -3777,7 +3778,8 @@ static void brcms_c_set_ps_ctrl(struct brcms_c_info *wlc) | |||
3777 | 3778 | ||
3778 | hps = brcms_c_ps_allowed(wlc); | 3779 | hps = brcms_c_ps_allowed(wlc); |
3779 | 3780 | ||
3780 | BCMMSG(wlc->wiphy, "wl%d: hps %d\n", wlc->pub->unit, hps); | 3781 | brcms_dbg_mac80211(wlc->hw->d11core, "wl%d: hps %d\n", wlc->pub->unit, |
3782 | hps); | ||
3781 | 3783 | ||
3782 | v1 = bcma_read32(wlc->hw->d11core, D11REGOFFS(maccontrol)); | 3784 | v1 = bcma_read32(wlc->hw->d11core, D11REGOFFS(maccontrol)); |
3783 | v2 = MCTL_WAKE; | 3785 | v2 = MCTL_WAKE; |
@@ -3863,7 +3865,8 @@ brcms_b_set_chanspec(struct brcms_hardware *wlc_hw, u16 chanspec, | |||
3863 | { | 3865 | { |
3864 | uint bandunit; | 3866 | uint bandunit; |
3865 | 3867 | ||
3866 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d: 0x%x\n", wlc_hw->unit, chanspec); | 3868 | brcms_dbg_mac80211(wlc_hw->d11core, "wl%d: 0x%x\n", wlc_hw->unit, |
3869 | chanspec); | ||
3867 | 3870 | ||
3868 | wlc_hw->chanspec = chanspec; | 3871 | wlc_hw->chanspec = chanspec; |
3869 | 3872 | ||
@@ -5978,8 +5981,9 @@ brcms_c_calc_ack_time(struct brcms_c_info *wlc, u32 rspec, | |||
5978 | { | 5981 | { |
5979 | uint dur = 0; | 5982 | uint dur = 0; |
5980 | 5983 | ||
5981 | BCMMSG(wlc->wiphy, "wl%d: rspec 0x%x, preamble_type %d\n", | 5984 | brcms_dbg_mac80211(wlc->hw->d11core, |
5982 | wlc->pub->unit, rspec, preamble_type); | 5985 | "wl%d: rspec 0x%x, preamble_type %d\n", |
5986 | wlc->pub->unit, rspec, preamble_type); | ||
5983 | /* | 5987 | /* |
5984 | * Spec 9.6: ack rate is the highest rate in BSSBasicRateSet that | 5988 | * Spec 9.6: ack rate is the highest rate in BSSBasicRateSet that |
5985 | * is less than or equal to the rate of the immediately previous | 5989 | * is less than or equal to the rate of the immediately previous |
@@ -5997,8 +6001,9 @@ static uint | |||
5997 | brcms_c_calc_cts_time(struct brcms_c_info *wlc, u32 rspec, | 6001 | brcms_c_calc_cts_time(struct brcms_c_info *wlc, u32 rspec, |
5998 | u8 preamble_type) | 6002 | u8 preamble_type) |
5999 | { | 6003 | { |
6000 | BCMMSG(wlc->wiphy, "wl%d: ratespec 0x%x, preamble_type %d\n", | 6004 | brcms_dbg_mac80211(wlc->hw->d11core, |
6001 | wlc->pub->unit, rspec, preamble_type); | 6005 | "wl%d: ratespec 0x%x, preamble_type %d\n", |
6006 | wlc->pub->unit, rspec, preamble_type); | ||
6002 | return brcms_c_calc_ack_time(wlc, rspec, preamble_type); | 6007 | return brcms_c_calc_ack_time(wlc, rspec, preamble_type); |
6003 | } | 6008 | } |
6004 | 6009 | ||
@@ -6006,8 +6011,9 @@ static uint | |||
6006 | brcms_c_calc_ba_time(struct brcms_c_info *wlc, u32 rspec, | 6011 | brcms_c_calc_ba_time(struct brcms_c_info *wlc, u32 rspec, |
6007 | u8 preamble_type) | 6012 | u8 preamble_type) |
6008 | { | 6013 | { |
6009 | BCMMSG(wlc->wiphy, "wl%d: rspec 0x%x, " | 6014 | brcms_dbg_mac80211(wlc->hw->d11core, |
6010 | "preamble_type %d\n", wlc->pub->unit, rspec, preamble_type); | 6015 | "wl%d: rspec 0x%x, preamble_type %d\n", |
6016 | wlc->pub->unit, rspec, preamble_type); | ||
6011 | /* | 6017 | /* |
6012 | * Spec 9.6: ack rate is the highest rate in BSSBasicRateSet that | 6018 | * Spec 9.6: ack rate is the highest rate in BSSBasicRateSet that |
6013 | * is less than or equal to the rate of the immediately previous | 6019 | * is less than or equal to the rate of the immediately previous |
@@ -6061,8 +6067,9 @@ brcms_c_calc_frame_len(struct brcms_c_info *wlc, u32 ratespec, | |||
6061 | uint nsyms, mac_len, Ndps, kNdps; | 6067 | uint nsyms, mac_len, Ndps, kNdps; |
6062 | uint rate = rspec2rate(ratespec); | 6068 | uint rate = rspec2rate(ratespec); |
6063 | 6069 | ||
6064 | BCMMSG(wlc->wiphy, "wl%d: rspec 0x%x, preamble_type %d, dur %d\n", | 6070 | brcms_dbg_mac80211(wlc->hw->d11core, |
6065 | wlc->pub->unit, ratespec, preamble_type, dur); | 6071 | "wl%d: rspec 0x%x, preamble_type %d, dur %d\n", |
6072 | wlc->pub->unit, ratespec, preamble_type, dur); | ||
6066 | 6073 | ||
6067 | if (is_mcs_rate(ratespec)) { | 6074 | if (is_mcs_rate(ratespec)) { |
6068 | uint mcs = ratespec & RSPEC_RATE_MASK; | 6075 | uint mcs = ratespec & RSPEC_RATE_MASK; |
@@ -6177,9 +6184,9 @@ mac80211_wlc_set_nrate(struct brcms_c_info *wlc, struct brcms_band *cur_band, | |||
6177 | } else if (rate > HIGHEST_SINGLE_STREAM_MCS) { | 6184 | } else if (rate > HIGHEST_SINGLE_STREAM_MCS) { |
6178 | /* mcs > 7 must use stf SDM */ | 6185 | /* mcs > 7 must use stf SDM */ |
6179 | if (stf != PHY_TXC1_MODE_SDM) { | 6186 | if (stf != PHY_TXC1_MODE_SDM) { |
6180 | BCMMSG(wlc->wiphy, "wl%d: enabling " | 6187 | brcms_dbg_mac80211(core, "wl%d: enabling " |
6181 | "SDM mode for mcs %d\n", | 6188 | "SDM mode for mcs %d\n", |
6182 | wlc->pub->unit, rate); | 6189 | wlc->pub->unit, rate); |
6183 | stf = PHY_TXC1_MODE_SDM; | 6190 | stf = PHY_TXC1_MODE_SDM; |
6184 | } | 6191 | } |
6185 | } else { | 6192 | } else { |
@@ -7468,8 +7475,8 @@ brcms_c_calc_lsig_len(struct brcms_c_info *wlc, u32 ratespec, | |||
7468 | { | 7475 | { |
7469 | uint nsyms, len = 0, kNdps; | 7476 | uint nsyms, len = 0, kNdps; |
7470 | 7477 | ||
7471 | BCMMSG(wlc->wiphy, "wl%d: rate %d, len%d\n", | 7478 | brcms_dbg_mac80211(wlc->hw->d11core, "wl%d: rate %d, len%d\n", |
7472 | wlc->pub->unit, rspec2rate(ratespec), mac_len); | 7479 | wlc->pub->unit, rspec2rate(ratespec), mac_len); |
7473 | 7480 | ||
7474 | if (is_mcs_rate(ratespec)) { | 7481 | if (is_mcs_rate(ratespec)) { |
7475 | uint mcs = ratespec & RSPEC_RATE_MASK; | 7482 | uint mcs = ratespec & RSPEC_RATE_MASK; |
diff --git a/drivers/net/wireless/brcm80211/include/defs.h b/drivers/net/wireless/brcm80211/include/defs.h index 223eb2ba2240..4d6906fb320a 100644 --- a/drivers/net/wireless/brcm80211/include/defs.h +++ b/drivers/net/wireless/brcm80211/include/defs.h | |||
@@ -80,6 +80,7 @@ | |||
80 | 80 | ||
81 | /* Debug levels */ | 81 | /* Debug levels */ |
82 | #define BRCM_DL_INFO 0x00000001 | 82 | #define BRCM_DL_INFO 0x00000001 |
83 | #define BRCM_DL_MAC80211 0x00000002 | ||
83 | 84 | ||
84 | #define PM_OFF 0 | 85 | #define PM_OFF 0 |
85 | #define PM_MAX 1 | 86 | #define PM_MAX 1 |