提交 83e60fc3 编写于 作者: R Roland Vossen 提交者: Greg Kroah-Hartman

staging: brcm80211: removed counter related macros that expanded to NOP

Code cleanup.

Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: NHenry Ptasinski <henryp@broadcom.com>
Reviewed-by: NBrett Rudley <brudley@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 75e436d3
...@@ -38,12 +38,6 @@ ...@@ -38,12 +38,6 @@
#include "wlc_main.h" #include "wlc_main.h"
#include "wlc_ampdu.h" #include "wlc_ampdu.h"
/*
* Disable AMPDU statistics counters for now
*/
#define WLCNTINCR(a)
#define WLCNTADD(a, b)
#define AMPDU_MAX_MPDU 32 /* max number of mpdus in an ampdu */ #define AMPDU_MAX_MPDU 32 /* max number of mpdus in an ampdu */
#define AMPDU_NUM_MPDU_LEGACY 16 /* max number of mpdus in an ampdu to a legacy */ #define AMPDU_NUM_MPDU_LEGACY 16 /* max number of mpdus in an ampdu to a legacy */
#define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */ #define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */
...@@ -532,7 +526,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -532,7 +526,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
wiphy_err(wiphy, "wl%d: wlc_sendampdu: " wiphy_err(wiphy, "wl%d: wlc_sendampdu: "
"prep_xdu retry; seq 0x%x\n", "prep_xdu retry; seq 0x%x\n",
wlc->pub->unit, seq); wlc->pub->unit, seq);
WLCNTINCR(ampdu->cnt->sduretry);
*pdu = p; *pdu = p;
break; break;
} }
...@@ -540,8 +533,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -540,8 +533,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
/* error in the packet; reject it */ /* error in the packet; reject it */
wiphy_err(wiphy, "wl%d: wlc_sendampdu: prep_xdu " wiphy_err(wiphy, "wl%d: wlc_sendampdu: prep_xdu "
"rejected; seq 0x%x\n", wlc->pub->unit, seq); "rejected; seq 0x%x\n", wlc->pub->unit, seq);
WLCNTINCR(ampdu->cnt->sdurejected);
*pdu = NULL; *pdu = NULL;
break; break;
} }
...@@ -730,8 +721,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -730,8 +721,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
ini->tx_in_transit += count; ini->tx_in_transit += count;
if (count) { if (count) {
WLCNTADD(ampdu->cnt->txmpdu, count);
/* patch up the last txh */ /* patch up the last txh */
txh = (d11txh_t *) pkt[count - 1]->data; txh = (d11txh_t *) pkt[count - 1]->data;
mcl = le16_to_cpu(txh->MacTxControlLow); mcl = le16_to_cpu(txh->MacTxControlLow);
...@@ -814,8 +803,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -814,8 +803,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
/* set flag and plcp for fallback rate */ /* set flag and plcp for fallback rate */
if (fbr) { if (fbr) {
WLCNTADD(ampdu->cnt->txfbr_mpdu, count);
WLCNTINCR(ampdu->cnt->txfbr_ampdu);
mch |= TXC_AMPDU_FBR; mch |= TXC_AMPDU_FBR;
txh->MacTxControlHigh = cpu_to_le16(mch); txh->MacTxControlHigh = cpu_to_le16(mch);
WLC_SET_MIMO_PLCP_AMPDU(plcp); WLC_SET_MIMO_PLCP_AMPDU(plcp);
...@@ -978,7 +965,6 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -978,7 +965,6 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
ba_recd = true; ba_recd = true;
} else { } else {
WLCNTINCR(ampdu->cnt->noba);
if (supr_status) { if (supr_status) {
update_rate = false; update_rate = false;
if (supr_status == TX_STATUS_SUPR_BADCH) { if (supr_status == TX_STATUS_SUPR_BADCH) {
...@@ -1134,8 +1120,6 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu, ...@@ -1134,8 +1120,6 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
ini->tid = tid; ini->tid = tid;
ini->scb = scb_ampdu->scb; ini->scb = scb_ampdu->scb;
ini->magic = INI_MAGIC; ini->magic = INI_MAGIC;
WLCNTINCR(ampdu->cnt->txaddbareq);
return ini; return ini;
} }
......
...@@ -55,13 +55,6 @@ ...@@ -55,13 +55,6 @@
#include "wl_mac80211.h" #include "wl_mac80211.h"
/*
* Disable statistics counting for WME
*/
#define WLCNTSET(a, b)
#define WLCNTINCR(a)
#define WLCNTADD(a, b)
/* /*
* WPA(2) definitions * WPA(2) definitions
*/ */
...@@ -1762,9 +1755,6 @@ void *wlc_attach(struct wl_info *wl, u16 vendor, u16 device, uint unit, ...@@ -1762,9 +1755,6 @@ void *wlc_attach(struct wl_info *wl, u16 vendor, u16 device, uint unit,
pub->_cnt->version = WL_CNT_T_VERSION; pub->_cnt->version = WL_CNT_T_VERSION;
pub->_cnt->length = sizeof(struct wl_cnt); pub->_cnt->length = sizeof(struct wl_cnt);
WLCNTSET(pub->_wme_cnt->version, WL_WME_CNT_VERSION);
WLCNTSET(pub->_wme_cnt->length, sizeof(wl_wme_cnt_t));
wlc_wme_initparams_sta(wlc, &wlc->wme_param_ie); wlc_wme_initparams_sta(wlc, &wlc->wme_param_ie);
wlc->mimoft = FT_HT; wlc->mimoft = FT_HT;
...@@ -4508,44 +4498,13 @@ void wlc_statsupd(struct wlc_info *wlc) ...@@ -4508,44 +4498,13 @@ void wlc_statsupd(struct wlc_info *wlc)
} }
#endif /* BCMDBG */ #endif /* BCMDBG */
/* dot11 counter update */
WLCNTSET(wlc->pub->_cnt->txrts,
(wlc->pub->_cnt->rxctsucast -
wlc->pub->_cnt->d11cnt_txrts_off));
WLCNTSET(wlc->pub->_cnt->rxcrc,
(wlc->pub->_cnt->rxbadfcs - wlc->pub->_cnt->d11cnt_rxcrc_off));
WLCNTSET(wlc->pub->_cnt->txnocts,
((wlc->pub->_cnt->txrtsfrm - wlc->pub->_cnt->rxctsucast) -
wlc->pub->_cnt->d11cnt_txnocts_off));
/* merge counters from dma module */ /* merge counters from dma module */
for (i = 0; i < NFIFO; i++) { for (i = 0; i < NFIFO; i++) {
if (wlc->hw->di[i]) { if (wlc->hw->di[i]) {
WLCNTADD(wlc->pub->_cnt->txnobuf,
(wlc->hw->di[i])->txnobuf);
WLCNTADD(wlc->pub->_cnt->rxnobuf,
(wlc->hw->di[i])->rxnobuf);
WLCNTADD(wlc->pub->_cnt->rxgiant,
(wlc->hw->di[i])->rxgiants);
dma_counterreset(wlc->hw->di[i]); dma_counterreset(wlc->hw->di[i]);
} }
} }
/*
* Aggregate transmit and receive errors that probably resulted
* in the loss of a frame are computed on the fly.
*/
WLCNTSET(wlc->pub->_cnt->txerror,
wlc->pub->_cnt->txnobuf + wlc->pub->_cnt->txnoassoc +
wlc->pub->_cnt->txuflo + wlc->pub->_cnt->txrunt +
wlc->pub->_cnt->dmade + wlc->pub->_cnt->dmada +
wlc->pub->_cnt->dmape);
WLCNTSET(wlc->pub->_cnt->rxerror,
wlc->pub->_cnt->rxoflo + wlc->pub->_cnt->rxnobuf +
wlc->pub->_cnt->rxfragerr + wlc->pub->_cnt->rxrunt +
wlc->pub->_cnt->rxgiant + wlc->pub->_cnt->rxnoscb +
wlc->pub->_cnt->rxbadsrcmac);
for (i = 0; i < NFIFO; i++) for (i = 0; i < NFIFO; i++)
wlc->pub->_cnt->rxerror += wlc->pub->_cnt->rxuflo[i]; wlc->pub->_cnt->rxerror += wlc->pub->_cnt->rxuflo[i];
} }
...@@ -4778,14 +4737,6 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt, ...@@ -4778,14 +4737,6 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,
/* Evict packet according to discard policy */ /* Evict packet according to discard policy */
p = discard_oldest ? bcm_pktq_pdeq(q, eprec) : p = discard_oldest ? bcm_pktq_pdeq(q, eprec) :
bcm_pktq_pdeq_tail(q, eprec); bcm_pktq_pdeq_tail(q, eprec);
/* Increment wme stats */
if (WME_ENAB(wlc->pub)) {
WLCNTINCR(wlc->pub->_wme_cnt->
tx_failed[WME_PRIO2AC(p->priority)].packets);
WLCNTADD(wlc->pub->_wme_cnt->
tx_failed[WME_PRIO2AC(p->priority)].bytes,
bcm_pkttotlen(p));
}
bcm_pkt_buf_free_skb(p); bcm_pkt_buf_free_skb(p);
wlc->pub->_cnt->txnobuf++; wlc->pub->_cnt->txnobuf++;
} }
...@@ -5989,10 +5940,6 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2) ...@@ -5989,10 +5940,6 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
*/ */
if (!(txs->status & TX_STATUS_AMPDU) if (!(txs->status & TX_STATUS_AMPDU)
&& (txs->status & TX_STATUS_INTERMEDIATE)) { && (txs->status & TX_STATUS_INTERMEDIATE)) {
WLCNTADD(wlc->pub->_cnt->txnoack,
((txs->
status & TX_STATUS_FRM_RTX_MASK) >>
TX_STATUS_FRM_RTX_SHIFT));
wiphy_err(wlc->wiphy, "%s: INTERMEDIATE but not AMPDU\n", wiphy_err(wlc->wiphy, "%s: INTERMEDIATE but not AMPDU\n",
__func__); __func__);
return false; return false;
......
...@@ -149,7 +149,6 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0); ...@@ -149,7 +149,6 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0);
#endif /* BCMDBG */ #endif /* BCMDBG */
#define bcm_perf_enable() #define bcm_perf_enable()
#define bcmstats(fmt)
#define bcmlog(fmt, a1, a2) #define bcmlog(fmt, a1, a2)
#define bcmdumplog(buf, size) (*buf = '\0') #define bcmdumplog(buf, size) (*buf = '\0')
#define bcmdumplogent(buf, idx) -1 #define bcmdumplogent(buf, idx) -1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册