Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ce58bb5 authored by Seth Forshee's avatar Seth Forshee Committed by John W. Linville
Browse files

brcmsmac: Add rx and tx debug macros



Also convert relevant messages over to use thses macros.

Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Tested-by: default avatarDaniel Wagner <wagi@monom.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 913911f4
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -37,5 +37,7 @@ static inline void __brcms_dbg(struct device *dev, u32 level,


#define brcms_dbg_info(core, f, a...)		brcms_dbg(core, BRCM_DL_INFO, f, ##a)
#define brcms_dbg_info(core, f, a...)		brcms_dbg(core, BRCM_DL_INFO, f, ##a)
#define brcms_dbg_mac80211(core, f, a...)	brcms_dbg(core, BRCM_DL_MAC80211, f, ##a)
#define brcms_dbg_mac80211(core, f, a...)	brcms_dbg(core, BRCM_DL_MAC80211, f, ##a)
#define brcms_dbg_rx(core, f, a...)		brcms_dbg(core, BRCM_DL_RX, f, ##a)
#define brcms_dbg_tx(core, f, a...)		brcms_dbg(core, BRCM_DL_TX, f, ##a)


#endif /* _BRCMS_DEBUG_H_ */
#endif /* _BRCMS_DEBUG_H_ */
+8 −10
Original line number Original line Diff line number Diff line
@@ -882,7 +882,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
	 */
	 */
	if (!(txs->status & TX_STATUS_AMPDU)
	if (!(txs->status & TX_STATUS_AMPDU)
	    && (txs->status & TX_STATUS_INTERMEDIATE)) {
	    && (txs->status & TX_STATUS_INTERMEDIATE)) {
		BCMMSG(wlc->wiphy, "INTERMEDIATE but not AMPDU\n");
		brcms_dbg_tx(wlc->hw->d11core, "INTERMEDIATE but not AMPDU\n");
		fatal = false;
		fatal = false;
		goto out;
		goto out;
	}
	}
@@ -925,9 +925,9 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)


	supr_status = txs->status & TX_STATUS_SUPR_MASK;
	supr_status = txs->status & TX_STATUS_SUPR_MASK;
	if (supr_status == TX_STATUS_SUPR_BADCH)
	if (supr_status == TX_STATUS_SUPR_BADCH)
		BCMMSG(wlc->wiphy,
		brcms_dbg_tx(wlc->hw->d11core,
		       "%s: Pkt tx suppressed, possibly channel %d\n",
			     "Pkt tx suppressed, possibly channel %d\n",
		       __func__, CHSPEC_CHANNEL(wlc->default_bss->chanspec));
			     CHSPEC_CHANNEL(wlc->default_bss->chanspec));


	tx_rts = le16_to_cpu(txh->MacTxControlLow) & TXC_SENDRTS;
	tx_rts = le16_to_cpu(txh->MacTxControlLow) & TXC_SENDRTS;
	tx_frame_count =
	tx_frame_count =
@@ -1039,7 +1039,6 @@ static bool
brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal)
brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal)
{
{
	bool morepending = false;
	bool morepending = false;
	struct brcms_c_info *wlc = wlc_hw->wlc;
	struct bcma_device *core;
	struct bcma_device *core;
	struct tx_status txstatus, *txs;
	struct tx_status txstatus, *txs;
	u32 s1, s2;
	u32 s1, s2;
@@ -1050,7 +1049,7 @@ brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal)
	 */
	 */
	uint max_tx_num = bound ? TXSBND : -1;
	uint max_tx_num = bound ? TXSBND : -1;


	BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit);
	brcms_dbg_tx(core, "wl%d\n", wlc_hw->unit);


	txs = &txstatus;
	txs = &txstatus;
	core = wlc_hw->d11core;
	core = wlc_hw->d11core;
@@ -1528,8 +1527,7 @@ brcms_b_set_addrmatch(struct brcms_hardware *wlc_hw, int match_reg_offset,
	u16 mac_m;
	u16 mac_m;
	u16 mac_h;
	u16 mac_h;


	BCMMSG(wlc_hw->wlc->wiphy, "wl%d: brcms_b_set_addrmatch\n",
	brcms_dbg_rx(core, "wl%d: brcms_b_set_addrmatch\n", wlc_hw->unit);
		 wlc_hw->unit);


	mac_l = addr[0] | (addr[1] << 8);
	mac_l = addr[0] | (addr[1] << 8);
	mac_m = addr[2] | (addr[3] << 8);
	mac_m = addr[2] | (addr[3] << 8);
@@ -7831,7 +7829,7 @@ static void brcms_c_recv(struct brcms_c_info *wlc, struct sk_buff *p)
	uint len;
	uint len;
	bool is_amsdu;
	bool is_amsdu;


	BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
	brcms_dbg_rx(wlc->hw->d11core, "wl%d\n", wlc->pub->unit);


	/* frame starts with rxhdr */
	/* frame starts with rxhdr */
	rxh = (struct d11rxhdr *) (p->data);
	rxh = (struct d11rxhdr *) (p->data);
@@ -7889,7 +7887,7 @@ brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound)
	uint n = 0;
	uint n = 0;
	uint bound_limit = bound ? RXBND : -1;
	uint bound_limit = bound ? RXBND : -1;


	BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
	brcms_dbg_rx(wlc_hw->d11core, "wl%d\n", wlc_hw->unit);
	skb_queue_head_init(&recv_frames);
	skb_queue_head_init(&recv_frames);


	/* gather received frames */
	/* gather received frames */
+2 −0
Original line number Original line Diff line number Diff line
@@ -81,6 +81,8 @@
/* Debug levels */
/* Debug levels */
#define BRCM_DL_INFO		0x00000001
#define BRCM_DL_INFO		0x00000001
#define BRCM_DL_MAC80211	0x00000002
#define BRCM_DL_MAC80211	0x00000002
#define BRCM_DL_RX		0x00000004
#define BRCM_DL_TX		0x00000008


#define PM_OFF	0
#define PM_OFF	0
#define PM_MAX	1
#define PM_MAX	1