Skip to content

Commit

Permalink
staging: brcm80211: removed counter related macros that expanded to NOP
Browse files Browse the repository at this point in the history
Code cleanup.

Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed May 17, 2011
1 parent 75e436d commit 83e60fc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 70 deletions.
16 changes: 0 additions & 16 deletions drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@
#include "wlc_main.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_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) */
Expand Down Expand Up @@ -532,16 +526,13 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
wiphy_err(wiphy, "wl%d: wlc_sendampdu: "
"prep_xdu retry; seq 0x%x\n",
wlc->pub->unit, seq);
WLCNTINCR(ampdu->cnt->sduretry);
*pdu = p;
break;
}

/* error in the packet; reject it */
wiphy_err(wiphy, "wl%d: wlc_sendampdu: prep_xdu "
"rejected; seq 0x%x\n", wlc->pub->unit, seq);
WLCNTINCR(ampdu->cnt->sdurejected);

*pdu = NULL;
break;
}
Expand Down Expand Up @@ -730,8 +721,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
ini->tx_in_transit += count;

if (count) {
WLCNTADD(ampdu->cnt->txmpdu, count);

/* patch up the last txh */
txh = (d11txh_t *) pkt[count - 1]->data;
mcl = le16_to_cpu(txh->MacTxControlLow);
Expand Down Expand Up @@ -814,8 +803,6 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,

/* set flag and plcp for fallback rate */
if (fbr) {
WLCNTADD(ampdu->cnt->txfbr_mpdu, count);
WLCNTINCR(ampdu->cnt->txfbr_ampdu);
mch |= TXC_AMPDU_FBR;
txh->MacTxControlHigh = cpu_to_le16(mch);
WLC_SET_MIMO_PLCP_AMPDU(plcp);
Expand Down Expand Up @@ -978,7 +965,6 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,

ba_recd = true;
} else {
WLCNTINCR(ampdu->cnt->noba);
if (supr_status) {
update_rate = false;
if (supr_status == TX_STATUS_SUPR_BADCH) {
Expand Down Expand Up @@ -1134,8 +1120,6 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
ini->tid = tid;
ini->scb = scb_ampdu->scb;
ini->magic = INI_MAGIC;
WLCNTINCR(ampdu->cnt->txaddbareq);

return ini;
}

Expand Down
53 changes: 0 additions & 53 deletions drivers/staging/brcm80211/brcmsmac/wlc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@

#include "wl_mac80211.h"

/*
* Disable statistics counting for WME
*/
#define WLCNTSET(a, b)
#define WLCNTINCR(a)
#define WLCNTADD(a, b)

/*
* WPA(2) definitions
*/
Expand Down Expand Up @@ -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->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->mimoft = FT_HT;
Expand Down Expand Up @@ -4508,44 +4498,13 @@ void wlc_statsupd(struct wlc_info *wlc)
}
#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 */
for (i = 0; i < NFIFO; 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]);
}
}

/*
* 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++)
wlc->pub->_cnt->rxerror += wlc->pub->_cnt->rxuflo[i];
}
Expand Down Expand Up @@ -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 */
p = discard_oldest ? bcm_pktq_pdeq(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);
wlc->pub->_cnt->txnobuf++;
}
Expand Down Expand Up @@ -5989,10 +5940,6 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
*/
if (!(txs->status & TX_STATUS_AMPDU)
&& (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",
__func__);
return false;
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/include/bcmutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0);
#endif /* BCMDBG */

#define bcm_perf_enable()
#define bcmstats(fmt)
#define bcmlog(fmt, a1, a2)
#define bcmdumplog(buf, size) (*buf = '\0')
#define bcmdumplogent(buf, idx) -1
Expand Down

0 comments on commit 83e60fc

Please sign in to comment.