Commit 0701519f authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Kalle Valo

wifi: brcmsmac: cleanup SCB-related data types

Drop unused and set-but-unused fields of 'struct scb_ampdu_tid_ini',
'struct scb_ampdu' and 'struct scb', as well as now unused argument
of 'brcms_c_ampdu_tx_operational()', adjust related code.
Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230725162400.192357-2-dmantipov@yandex.ru
parent a9477c12
...@@ -476,11 +476,9 @@ static int brcms_c_ffpld_check_txfunfl(struct brcms_c_info *wlc, int fid) ...@@ -476,11 +476,9 @@ static int brcms_c_ffpld_check_txfunfl(struct brcms_c_info *wlc, int fid)
void void
brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
u8 ba_wsize, /* negotiated ba window size (in pdu) */
uint max_rx_ampdu_bytes) /* from ht_cap in beacon */ uint max_rx_ampdu_bytes) /* from ht_cap in beacon */
{ {
struct scb_ampdu *scb_ampdu; struct scb_ampdu *scb_ampdu;
struct scb_ampdu_tid_ini *ini;
struct ampdu_info *ampdu = wlc->ampdu; struct ampdu_info *ampdu = wlc->ampdu;
struct scb *scb = &wlc->pri_scb; struct scb *scb = &wlc->pri_scb;
scb_ampdu = &scb->scb_ampdu; scb_ampdu = &scb->scb_ampdu;
...@@ -491,10 +489,6 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, ...@@ -491,10 +489,6 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
return; return;
} }
ini = &scb_ampdu->ini[tid];
ini->tid = tid;
ini->scb = scb_ampdu->scb;
ini->ba_wsize = ba_wsize;
scb_ampdu->max_rx_ampdu_bytes = max_rx_ampdu_bytes; scb_ampdu->max_rx_ampdu_bytes = max_rx_ampdu_bytes;
} }
......
...@@ -810,7 +810,6 @@ brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -810,7 +810,6 @@ brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
brcms_c_init_scb(scb); brcms_c_init_scb(scb);
wl->pub->global_ampdu = &(scb->scb_ampdu); wl->pub->global_ampdu = &(scb->scb_ampdu);
wl->pub->global_ampdu->scb = scb;
wl->pub->global_ampdu->max_pdu = 16; wl->pub->global_ampdu->max_pdu = 16;
/* /*
...@@ -831,7 +830,6 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw, ...@@ -831,7 +830,6 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_sta *sta = params->sta; struct ieee80211_sta *sta = params->sta;
enum ieee80211_ampdu_mlme_action action = params->action; enum ieee80211_ampdu_mlme_action action = params->action;
u16 tid = params->tid; u16 tid = params->tid;
u8 buf_size = params->buf_size;
if (WARN_ON(scb->magic != SCB_MAGIC)) if (WARN_ON(scb->magic != SCB_MAGIC))
return -EIDRM; return -EIDRM;
...@@ -863,11 +861,11 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw, ...@@ -863,11 +861,11 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw,
/* /*
* BA window size from ADDBA response ('buf_size') defines how * BA window size from ADDBA response ('buf_size') defines how
* many outstanding MPDUs are allowed for the BA stream by * many outstanding MPDUs are allowed for the BA stream by
* recipient and traffic class. 'ampdu_factor' gives maximum * recipient and traffic class (this is actually unused by the
* AMPDU size. * rest of the driver). 'ampdu_factor' gives maximum AMPDU size.
*/ */
spin_lock_bh(&wl->lock); spin_lock_bh(&wl->lock);
brcms_c_ampdu_tx_operational(wl->wlc, tid, buf_size, brcms_c_ampdu_tx_operational(wl->wlc, tid,
(1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + (1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
sta->deflink.ht_cap.ampdu_factor)) - 1); sta->deflink.ht_cap.ampdu_factor)) - 1);
spin_unlock_bh(&wl->lock); spin_unlock_bh(&wl->lock);
......
...@@ -3147,10 +3147,8 @@ void brcms_c_init_scb(struct scb *scb) ...@@ -3147,10 +3147,8 @@ void brcms_c_init_scb(struct scb *scb)
scb->flags = SCB_WMECAP | SCB_HTCAP; scb->flags = SCB_WMECAP | SCB_HTCAP;
for (i = 0; i < NUMPRIO; i++) { for (i = 0; i < NUMPRIO; i++) {
scb->seqnum[i] = 0; scb->seqnum[i] = 0;
scb->seqctl[i] = 0xFFFF;
} }
scb->seqctl_nonqos = 0xFFFF;
scb->magic = SCB_MAGIC; scb->magic = SCB_MAGIC;
} }
......
...@@ -297,7 +297,7 @@ struct brcms_pub *brcms_c_pub(struct brcms_c_info *wlc); ...@@ -297,7 +297,7 @@ struct brcms_pub *brcms_c_pub(struct brcms_c_info *wlc);
void brcms_c_ampdu_flush(struct brcms_c_info *wlc, struct ieee80211_sta *sta, void brcms_c_ampdu_flush(struct brcms_c_info *wlc, struct ieee80211_sta *sta,
u16 tid); u16 tid);
void brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, void brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
u8 ba_wsize, uint max_rx_ampdu_bytes); uint max_rx_ampdu_bytes);
int brcms_c_module_register(struct brcms_pub *pub, const char *name, int brcms_c_module_register(struct brcms_pub *pub, const char *name,
struct brcms_info *hdl, struct brcms_info *hdl,
int (*down_fn)(void *handle)); int (*down_fn)(void *handle));
......
...@@ -36,19 +36,13 @@ ...@@ -36,19 +36,13 @@
/* structure to store per-tid state for the ampdu initiator */ /* structure to store per-tid state for the ampdu initiator */
struct scb_ampdu_tid_ini { struct scb_ampdu_tid_ini {
u8 tid; /* initiator tid for easy lookup */
/* tx retry count; indexed by seq modulo */ /* tx retry count; indexed by seq modulo */
u8 txretry[AMPDU_TX_BA_MAX_WSIZE]; u8 txretry[AMPDU_TX_BA_MAX_WSIZE];
struct scb *scb; /* backptr for easy lookup */
u8 ba_wsize; /* negotiated ba window size (in pdu) */
}; };
struct scb_ampdu { struct scb_ampdu {
struct scb *scb; /* back pointer for easy reference */
u8 mpdu_density; /* mpdu density */
u8 max_pdu; /* max pdus allowed in ampdu */ u8 max_pdu; /* max pdus allowed in ampdu */
u8 release; /* # of mpdus released at a time */ u8 release; /* # of mpdus released at a time */
u16 min_len; /* min mpdu len to support the density */
u32 max_rx_ampdu_bytes; /* max ampdu rcv length; 8k, 16k, 32k, 64k */ u32 max_rx_ampdu_bytes; /* max ampdu rcv length; 8k, 16k, 32k, 64k */
/* /*
...@@ -64,15 +58,7 @@ struct scb_ampdu { ...@@ -64,15 +58,7 @@ struct scb_ampdu {
struct scb { struct scb {
u32 magic; u32 magic;
u32 flags; /* various bit flags as defined below */ u32 flags; /* various bit flags as defined below */
u32 flags2; /* various bit flags2 as defined below */
u8 state; /* current state bitfield of auth/assoc process */
u8 ea[ETH_ALEN]; /* station address */
uint fragresid[NUMPRIO];/* #bytes unused in frag buffer per prio */
u16 seqctl[NUMPRIO]; /* seqctl of last received frame (for dups) */ u16 seqctl[NUMPRIO]; /* seqctl of last received frame (for dups) */
/* seqctl of last received frame (for dups) for non-QoS data and
* management */
u16 seqctl_nonqos;
u16 seqnum[NUMPRIO];/* WME: driver maintained sw seqnum per priority */ u16 seqnum[NUMPRIO];/* WME: driver maintained sw seqnum per priority */
struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */ struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */
......
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