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

staging: brcm80211: macro cleanup in softmac ampdu.c

Moved, deleted or substituted macro's.
Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 47eef483
...@@ -60,8 +60,6 @@ ...@@ -60,8 +60,6 @@
* accumulate between resets. * accumulate between resets.
*/ */
#define SHORTNAME "AMPDU status"
#define TX_SEQ_TO_INDEX(seq) ((seq) % AMPDU_TX_BA_MAX_WSIZE) #define TX_SEQ_TO_INDEX(seq) ((seq) % AMPDU_TX_BA_MAX_WSIZE)
/* max possible overhead per mpdu in the ampdu; 3 is for roundup if needed */ /* max possible overhead per mpdu in the ampdu; 3 is for roundup if needed */
...@@ -144,14 +142,6 @@ struct cb_del_ampdu_pars { ...@@ -144,14 +142,6 @@ struct cb_del_ampdu_pars {
u16 tid; u16 tid;
}; };
#define AMPDU_CLEANUPFLAG_RX (0x1)
#define AMPDU_CLEANUPFLAG_TX (0x2)
#define SCB_AMPDU_CUBBY(ampdu, scb) (&(scb->scb_ampdu))
#define SCB_AMPDU_INI(scb_ampdu, tid) (&(scb_ampdu->ini[tid]))
#define brcms_c_ampdu_txflowcontrol(a, b, c) do {} while (0)
static void brcms_c_scb_ampdu_update_max_txlen(struct ampdu_info *ampdu, u8 dur) static void brcms_c_scb_ampdu_update_max_txlen(struct ampdu_info *ampdu, u8 dur)
{ {
u32 rate, mcs; u32 rate, mcs;
...@@ -288,7 +278,7 @@ void brcms_c_ampdu_detach(struct ampdu_info *ampdu) ...@@ -288,7 +278,7 @@ void brcms_c_ampdu_detach(struct ampdu_info *ampdu)
static void brcms_c_scb_ampdu_update_config(struct ampdu_info *ampdu, static void brcms_c_scb_ampdu_update_config(struct ampdu_info *ampdu,
struct scb *scb) struct scb *scb)
{ {
struct scb_ampdu *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb); struct scb_ampdu *scb_ampdu = &scb->scb_ampdu;
int i; int i;
scb_ampdu->max_pdu = (u8) ampdu->wlc->pub->tunables->ampdunummpdu; scb_ampdu->max_pdu = (u8) ampdu->wlc->pub->tunables->ampdunummpdu;
...@@ -486,7 +476,7 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, ...@@ -486,7 +476,7 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
struct scb_ampdu_tid_ini *ini; struct scb_ampdu_tid_ini *ini;
struct ampdu_info *ampdu = wlc->ampdu; struct ampdu_info *ampdu = wlc->ampdu;
struct scb *scb = wlc->pub->global_scb; struct scb *scb = wlc->pub->global_scb;
scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb); scb_ampdu = &scb->scb_ampdu;
if (!ampdu->ini_enable[tid]) { if (!ampdu->ini_enable[tid]) {
wiphy_err(ampdu->wlc->wiphy, "%s: Rejecting tid %d\n", wiphy_err(ampdu->wlc->wiphy, "%s: Rejecting tid %d\n",
...@@ -494,7 +484,7 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, ...@@ -494,7 +484,7 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
return; return;
} }
ini = SCB_AMPDU_INI(scb_ampdu, tid); ini = &scb_ampdu->ini[tid];
ini->tid = tid; ini->tid = tid;
ini->scb = scb_ampdu->scb; ini->scb = scb_ampdu->scb;
ini->ba_wsize = ba_wsize; ini->ba_wsize = ba_wsize;
...@@ -546,7 +536,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi, ...@@ -546,7 +536,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
f = ampdu->fifo_tb + prio2fifo[tid]; f = ampdu->fifo_tb + prio2fifo[tid];
scb = wlc->pub->global_scb; scb = wlc->pub->global_scb;
scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb); scb_ampdu = &scb->scb_ampdu;
ini = &scb_ampdu->ini[tid]; ini = &scb_ampdu->ini[tid];
/* Let pressure continue to build ... */ /* Let pressure continue to build ... */
...@@ -925,10 +915,10 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -925,10 +915,10 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
memset(hole, 0, sizeof(hole)); memset(hole, 0, sizeof(hole));
#endif #endif
scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb); scb_ampdu = &scb->scb_ampdu;
tid = (u8) (p->priority); tid = (u8) (p->priority);
ini = SCB_AMPDU_INI(scb_ampdu, tid); ini = &scb_ampdu->ini[tid];
retry_limit = ampdu->retry_limit_tid[tid]; retry_limit = ampdu->retry_limit_tid[tid];
rr_retry_limit = ampdu->rr_retry_limit_tid[tid]; rr_retry_limit = ampdu->rr_retry_limit_tid[tid];
memset(bitmap, 0, sizeof(bitmap)); memset(bitmap, 0, sizeof(bitmap));
...@@ -1080,7 +1070,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -1080,7 +1070,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
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);
wiphy_err(wiphy, "%s: BA Timeout, seq %d, in_" wiphy_err(wiphy, "%s: BA Timeout, seq %d, in_"
"transit %d\n", SHORTNAME, seq, "transit %d\n", "AMPDU status", seq,
ini->tx_in_transit); ini->tx_in_transit);
ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
p); p);
...@@ -1134,8 +1124,8 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, ...@@ -1134,8 +1124,8 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
} }
if (likely(scb)) { if (likely(scb)) {
scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb); scb_ampdu = &scb->scb_ampdu;
ini = SCB_AMPDU_INI(scb_ampdu, p->priority); ini = &scb_ampdu->ini[p->priority];
brcms_c_ampdu_dotxstatus_complete(ampdu, scb, p, txs, s1, s2); brcms_c_ampdu_dotxstatus_complete(ampdu, scb, p, txs, s1, s2);
} else { } else {
/* loop through all pkts and free */ /* loop through all pkts and free */
...@@ -1155,7 +1145,6 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, ...@@ -1155,7 +1145,6 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
} }
brcms_c_txfifo_complete(wlc, queue, ampdu->txpkt_weight); brcms_c_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
} }
brcms_c_ampdu_txflowcontrol(wlc, scb_ampdu, ini);
} }
void brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc) void brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc)
......
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