Commit cd67038e authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: replaced WL_ERROR in wlc_ampdu.c

Code cleanup. Replaced proprietary function by wiphy_err().

Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9b289c7b
...@@ -169,7 +169,7 @@ struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc) ...@@ -169,7 +169,7 @@ struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc)
ampdu = kzalloc(sizeof(struct ampdu_info), GFP_ATOMIC); ampdu = kzalloc(sizeof(struct ampdu_info), GFP_ATOMIC);
if (!ampdu) { if (!ampdu) {
WL_ERROR("wl%d: wlc_ampdu_attach: out of mem\n", wiphy_err(wlc->wiphy, "wl%d: wlc_ampdu_attach: out of mem\n",
wlc->pub->unit); wlc->pub->unit);
return NULL; return NULL;
} }
...@@ -516,8 +516,10 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -516,8 +516,10 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
bool fbr_iscck; bool fbr_iscck;
struct ieee80211_tx_info *tx_info; struct ieee80211_tx_info *tx_info;
u16 qlen; u16 qlen;
struct wiphy *wiphy;
wlc = ampdu->wlc; wlc = ampdu->wlc;
wiphy = wlc->wiphy;
p = *pdu; p = *pdu;
ASSERT(p); ASSERT(p);
...@@ -543,7 +545,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -543,7 +545,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
wlc_ampdu_agg(ampdu, scb, p, tid); wlc_ampdu_agg(ampdu, scb, p, tid);
if (wlc->block_datafifo) { if (wlc->block_datafifo) {
WL_ERROR("%s: Fifo blocked\n", __func__); wiphy_err(wiphy, "%s: Fifo blocked\n", __func__);
return -BCME_BUSY; return -BCME_BUSY;
} }
rr_retry_limit = ampdu->rr_retry_limit_tid[tid]; rr_retry_limit = ampdu->rr_retry_limit_tid[tid];
...@@ -558,15 +560,16 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -558,15 +560,16 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
err = wlc_prep_pdu(wlc, p, &fifo); err = wlc_prep_pdu(wlc, p, &fifo);
} else { } else {
WL_ERROR("%s: AMPDU flag is off!\n", __func__); wiphy_err(wiphy, "%s: AMPDU flag is off!\n", __func__);
*pdu = NULL; *pdu = NULL;
err = 0; err = 0;
break; break;
} }
if (err) { if (err) {
if (err == -BCME_BUSY) { if (err == BCME_BUSY) {
WL_ERROR("wl%d: wlc_sendampdu: prep_xdu retry; seq 0x%x\n", wiphy_err(wiphy, "wl%d: wlc_sendampdu: "
"prep_xdu retry; seq 0x%x\n",
wlc->pub->unit, seq); wlc->pub->unit, seq);
WLCNTINCR(ampdu->cnt->sduretry); WLCNTINCR(ampdu->cnt->sduretry);
*pdu = p; *pdu = p;
...@@ -574,8 +577,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -574,8 +577,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
} }
/* error in the packet; reject it */ /* error in the packet; reject it */
WL_AMPDU_ERR("wl%d: wlc_sendampdu: prep_xdu rejected; seq 0x%x\n", wiphy_err(wiphy, "wl%d: wlc_sendampdu: prep_xdu "
wlc->pub->unit, seq); "rejected; seq 0x%x\n", wlc->pub->unit, seq);
WLCNTINCR(ampdu->cnt->sdurejected); WLCNTINCR(ampdu->cnt->sdurejected);
*pdu = NULL; *pdu = NULL;
...@@ -746,7 +749,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -746,7 +749,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
if ((plen + ampdu_len) > maxlen) { if ((plen + ampdu_len) > maxlen) {
p = NULL; p = NULL;
WL_ERROR("%s: Bogus plen #1\n", wiphy_err(wiphy, "%s: Bogus plen #1\n",
__func__); __func__);
ASSERT(3 == 4); ASSERT(3 == 4);
continue; continue;
...@@ -754,8 +757,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -754,8 +757,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
/* check if there are enough descriptors available */ /* check if there are enough descriptors available */
if (TXAVAIL(wlc, fifo) <= (seg_cnt + 1)) { if (TXAVAIL(wlc, fifo) <= (seg_cnt + 1)) {
WL_ERROR("%s: No fifo space !!!!!!\n", wiphy_err(wiphy, "%s: No fifo space "
__func__); "!!\n", __func__);
p = NULL; p = NULL;
continue; continue;
} }
...@@ -868,8 +871,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi, ...@@ -868,8 +871,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
/* inform rate_sel if it this is a rate probe pkt */ /* inform rate_sel if it this is a rate probe pkt */
frameid = le16_to_cpu(txh->TxFrameID); frameid = le16_to_cpu(txh->TxFrameID);
if (frameid & TXFID_RATE_PROBE_MASK) { if (frameid & TXFID_RATE_PROBE_MASK) {
WL_ERROR("%s: XXX what to do with TXFID_RATE_PROBE_MASK!?\n", wiphy_err(wiphy, "%s: XXX what to do with "
__func__); "TXFID_RATE_PROBE_MASK!?\n", __func__);
} }
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
wlc_txfifo(wlc, fifo, pkt[i], i == (count - 1), wlc_txfifo(wlc, fifo, pkt[i], i == (count - 1),
...@@ -984,6 +987,7 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -984,6 +987,7 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
u8 antselid = 0; u8 antselid = 0;
u8 retry_limit, rr_retry_limit; u8 retry_limit, rr_retry_limit;
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p); struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p);
struct wiphy *wiphy = wlc->wiphy;
#ifdef BCMDBG #ifdef BCMDBG
u8 hole[AMPDU_MAX_MPDU]; u8 hole[AMPDU_MAX_MPDU];
...@@ -1041,12 +1045,14 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -1041,12 +1045,14 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
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) {
WL_ERROR("%s: Pkt tx suppressed, illegal channel possibly %d\n", wiphy_err(wiphy, "%s: Pkt tx suppressed, "
__func__, "illegal channel possibly %d\n",
CHSPEC_CHANNEL(wlc->default_bss->chanspec)); __func__, CHSPEC_CHANNEL(
wlc->default_bss->chanspec));
} else { } else {
if (supr_status != TX_STATUS_SUPR_FRAG) if (supr_status != TX_STATUS_SUPR_FRAG)
WL_ERROR("%s: wlc_ampdu_dotxstatus: supr_status 0x%x\n", wiphy_err(wiphy, "%s: wlc_ampdu_dotx"
"status:supr_status 0x%x\n",
__func__, supr_status); __func__, supr_status);
} }
/* no need to retry for badch; will fail again */ /* no need to retry for badch; will fail again */
...@@ -1071,8 +1077,9 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -1071,8 +1077,9 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
} else if (txs->phyerr) { } else if (txs->phyerr) {
update_rate = false; update_rate = false;
wlc->pub->_cnt->txphyerr++; wlc->pub->_cnt->txphyerr++;
WL_ERROR("wl%d: wlc_ampdu_dotxstatus: tx phy error (0x%x)\n", wiphy_err(wiphy, "wl%d: wlc_ampdu_dotxstatus: tx phy "
wlc->pub->unit, txs->phyerr); "error (0x%x)\n", wlc->pub->unit,
txs->phyerr);
if (WL_ERROR_ON()) { if (WL_ERROR_ON()) {
prpkt("txpkt (AMPDU)", p); prpkt("txpkt (AMPDU)", p);
...@@ -1150,8 +1157,9 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -1150,8 +1157,9 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
IEEE80211_TX_STAT_AMPDU_NO_BACK; IEEE80211_TX_STAT_AMPDU_NO_BACK;
skb_pull(p, D11_PHY_HDR_LEN); skb_pull(p, D11_PHY_HDR_LEN);
skb_pull(p, D11_TXH_LEN); skb_pull(p, D11_TXH_LEN);
WL_ERROR("%s: BA Timeout, seq %d, in_transit %d\n", wiphy_err(wiphy, "%s: BA Timeout, seq %d, in_"
SHORTNAME, seq, ini->tx_in_transit); "transit %d\n", SHORTNAME, seq,
ini->tx_in_transit);
ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
p); p);
} }
...@@ -1213,7 +1221,8 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu, ...@@ -1213,7 +1221,8 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
/* check for per-tid control of ampdu */ /* check for per-tid control of ampdu */
if (!ampdu->ini_enable[tid]) { if (!ampdu->ini_enable[tid]) {
WL_ERROR("%s: Rejecting tid %d\n", __func__, tid); wiphy_err(ampdu->wlc->wiphy, "%s: Rejecting tid %d\n",
__func__, tid);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment