staging: brcm80211: removed function brcms_c_wme_initparams_sta()
since its variable assignment can be done in a more straightforward manner. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
00cf25ae11
commit
be6d2b32e2
|
@ -431,6 +431,12 @@ struct brcms_b_state {
|
||||||
u32 preamble_ovr; /* preamble override */
|
u32 preamble_ovr; /* preamble override */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct edcf_acparam {
|
||||||
|
u8 ACI;
|
||||||
|
u8 ECW;
|
||||||
|
u16 TXOP;
|
||||||
|
} __packed;
|
||||||
|
|
||||||
const u8 prio2fifo[NUMPRIO] = {
|
const u8 prio2fifo[NUMPRIO] = {
|
||||||
TX_AC_BE_FIFO, /* 0 BE AC_BE Best Effort */
|
TX_AC_BE_FIFO, /* 0 BE AC_BE Best Effort */
|
||||||
TX_AC_BK_FIFO, /* 1 BK AC_BK Background */
|
TX_AC_BK_FIFO, /* 1 BK AC_BK Background */
|
||||||
|
@ -4124,34 +4130,6 @@ static void brcms_c_ht_update_ldpc(struct brcms_c_info *wlc, s8 val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize a WME Parameter Info Element with default
|
|
||||||
* STA parameters from WMM Spec, Table 12
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
brcms_c_wme_initparams_sta(struct brcms_c_info *wlc, struct wme_param_ie *pe)
|
|
||||||
{
|
|
||||||
static const struct wme_param_ie stadef = {
|
|
||||||
WME_OUI,
|
|
||||||
WME_TYPE,
|
|
||||||
WME_SUBTYPE_PARAM_IE,
|
|
||||||
WME_VER,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
{
|
|
||||||
{EDCF_AC_BE_ACI_STA, EDCF_AC_BE_ECW_STA,
|
|
||||||
cpu_to_le16(EDCF_AC_BE_TXOP_STA)},
|
|
||||||
{EDCF_AC_BK_ACI_STA, EDCF_AC_BK_ECW_STA,
|
|
||||||
cpu_to_le16(EDCF_AC_BK_TXOP_STA)},
|
|
||||||
{EDCF_AC_VI_ACI_STA, EDCF_AC_VI_ECW_STA,
|
|
||||||
cpu_to_le16(EDCF_AC_VI_TXOP_STA)},
|
|
||||||
{EDCF_AC_VO_ACI_STA, EDCF_AC_VO_ECW_STA,
|
|
||||||
cpu_to_le16(EDCF_AC_VO_TXOP_STA)}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
memcpy(pe, &stadef, sizeof(*pe));
|
|
||||||
}
|
|
||||||
|
|
||||||
void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
|
void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
|
||||||
const struct ieee80211_tx_queue_params *params,
|
const struct ieee80211_tx_queue_params *params,
|
||||||
bool suspend)
|
bool suspend)
|
||||||
|
@ -4222,18 +4200,19 @@ void brcms_c_edcf_setparams(struct brcms_c_info *wlc, bool suspend)
|
||||||
{
|
{
|
||||||
u16 aci;
|
u16 aci;
|
||||||
int i_ac;
|
int i_ac;
|
||||||
struct edcf_acparam *edcf_acp;
|
|
||||||
|
|
||||||
struct ieee80211_tx_queue_params txq_pars;
|
struct ieee80211_tx_queue_params txq_pars;
|
||||||
struct ieee80211_tx_queue_params *params = &txq_pars;
|
struct ieee80211_tx_queue_params *params = &txq_pars;
|
||||||
|
static struct edcf_acparam default_edcf_acparams[] = {
|
||||||
/*
|
{EDCF_AC_BE_ACI_STA, EDCF_AC_BE_ECW_STA,
|
||||||
* AP uses AC params from wme_param_ie_ap.
|
cpu_to_le16(EDCF_AC_BE_TXOP_STA)},
|
||||||
* AP advertises AC params from wme_param_ie.
|
{EDCF_AC_BK_ACI_STA, EDCF_AC_BK_ECW_STA,
|
||||||
* STA uses AC params from wme_param_ie.
|
cpu_to_le16(EDCF_AC_BK_TXOP_STA)},
|
||||||
*/
|
{EDCF_AC_VI_ACI_STA, EDCF_AC_VI_ECW_STA,
|
||||||
|
cpu_to_le16(EDCF_AC_VI_TXOP_STA)},
|
||||||
edcf_acp = (struct edcf_acparam *) &wlc->wme_param_ie.acparam[0];
|
{EDCF_AC_VO_ACI_STA, EDCF_AC_VO_ECW_STA,
|
||||||
|
cpu_to_le16(EDCF_AC_VO_TXOP_STA)}
|
||||||
|
}; /* ucode needs these parameters during its initialization */
|
||||||
|
struct edcf_acparam *edcf_acp = &default_edcf_acparams[0];
|
||||||
|
|
||||||
for (i_ac = 0; i_ac < AC_COUNT; i_ac++, edcf_acp++) {
|
for (i_ac = 0; i_ac < AC_COUNT; i_ac++, edcf_acp++) {
|
||||||
/* find out which ac this set of params applies to */
|
/* find out which ac this set of params applies to */
|
||||||
|
@ -5294,8 +5273,6 @@ brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
|
||||||
wlc->cfg->_idx = 0;
|
wlc->cfg->_idx = 0;
|
||||||
wlc->cfg->wlc = wlc;
|
wlc->cfg->wlc = wlc;
|
||||||
|
|
||||||
brcms_c_wme_initparams_sta(wlc, &wlc->wme_param_ie);
|
|
||||||
|
|
||||||
wlc->mimoft = FT_HT;
|
wlc->mimoft = FT_HT;
|
||||||
wlc->ht_cap.cap_info = HT_CAP;
|
wlc->ht_cap.cap_info = HT_CAP;
|
||||||
|
|
||||||
|
|
|
@ -298,22 +298,6 @@ struct modulecb {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct edcf_acparam {
|
|
||||||
u8 ACI;
|
|
||||||
u8 ECW;
|
|
||||||
u16 TXOP;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct wme_param_ie {
|
|
||||||
u8 oui[3];
|
|
||||||
u8 type;
|
|
||||||
u8 subtype;
|
|
||||||
u8 version;
|
|
||||||
u8 qosinfo;
|
|
||||||
u8 rsvd;
|
|
||||||
struct edcf_acparam acparam[AC_COUNT];
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct brcms_hw_band {
|
struct brcms_hw_band {
|
||||||
int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */
|
int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */
|
||||||
uint bandunit; /* bandstate[] index */
|
uint bandunit; /* bandstate[] index */
|
||||||
|
@ -463,8 +447,6 @@ struct brcms_txq_info {
|
||||||
* WDarmed: watchdog timer is armed.
|
* WDarmed: watchdog timer is armed.
|
||||||
* WDlast: last time wlc_watchdog() was called.
|
* WDlast: last time wlc_watchdog() was called.
|
||||||
* edcf_txop[AC_COUNT]: current txop for each ac.
|
* edcf_txop[AC_COUNT]: current txop for each ac.
|
||||||
* wme_param_ie: on STA contains parameters in use locally, and on AP
|
|
||||||
* contains parameters advertised
|
|
||||||
* wme_retries: per-AC retry limits.
|
* wme_retries: per-AC retry limits.
|
||||||
* tx_prec_map: Precedence map based on HW FIFO space.
|
* tx_prec_map: Precedence map based on HW FIFO space.
|
||||||
* fifo2prec_map[NFIFO]: pointer to fifo2_prec map based on WME.
|
* fifo2prec_map[NFIFO]: pointer to fifo2_prec map based on WME.
|
||||||
|
@ -578,7 +560,6 @@ struct brcms_c_info {
|
||||||
/* WME */
|
/* WME */
|
||||||
u16 edcf_txop[AC_COUNT];
|
u16 edcf_txop[AC_COUNT];
|
||||||
|
|
||||||
struct wme_param_ie wme_param_ie;
|
|
||||||
u16 wme_retries[AC_COUNT];
|
u16 wme_retries[AC_COUNT];
|
||||||
u16 tx_prec_map;
|
u16 tx_prec_map;
|
||||||
u16 fifo2prec_map[NFIFO];
|
u16 fifo2prec_map[NFIFO];
|
||||||
|
|
Loading…
Reference in New Issue