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

staging: brcm80211: cleanup of WMM related functions

Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 871f8477
......@@ -554,7 +554,7 @@ wl_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
params->txop, params->cw_min, params->cw_max, params->aifs);
WL_LOCK(wl);
wlc_wme_setparams(wl->wlc, queue, (void *)params, true);
wlc_wme_setparams(wl->wlc, queue, params, true);
WL_UNLOCK(wl);
return 0;
......
......@@ -525,7 +525,7 @@ void wlc_init(struct wlc_info *wlc)
/* Enable EDCF mode (while the MAC is suspended) */
if (EDCF_ENAB(wlc->pub)) {
OR_REG(&regs->ifs_ctl, IFS_USEEDCF);
wlc_edcf_setparams(wlc->cfg, false);
wlc_edcf_setparams(wlc, false);
}
/* Init precedence maps for empty FIFOs */
......@@ -1361,12 +1361,13 @@ void wlc_wme_initparams_sta(struct wlc_info *wlc, wme_param_ie_t *pe)
memcpy(pe, &stadef, sizeof(*pe));
}
void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg, bool suspend)
void wlc_wme_setparams(struct wlc_info *wlc, u16 aci,
const struct ieee80211_tx_queue_params *params,
bool suspend)
{
int i;
shm_acparams_t acp_shm;
u16 *shm_entry;
struct ieee80211_tx_queue_params *params = arg;
ASSERT(wlc);
......@@ -1376,20 +1377,12 @@ void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg, bool suspend)
return;
}
/*
* AP uses AC params from wme_param_ie_ap.
* AP advertises AC params from wme_param_ie.
* STA uses AC params from wme_param_ie.
*/
wlc->wme_admctl = 0;
do {
memset((char *)&acp_shm, 0, sizeof(shm_acparams_t));
/* find out which ac this set of params applies to */
ASSERT(aci < AC_COUNT);
/* set the admission control policy for this AC */
/* wlc->wme_admctl |= 1 << aci; *//* should be set ?? seems like off by default */
/* fill in shm ac params struct */
acp_shm.txop = le16_to_cpu(params->txop);
......@@ -1440,15 +1433,13 @@ void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg, bool suspend)
}
void wlc_edcf_setparams(struct wlc_bsscfg *cfg, bool suspend)
void wlc_edcf_setparams(struct wlc_info *wlc, bool suspend)
{
struct wlc_info *wlc = cfg->wlc;
uint aci, i, j;
edcf_acparam_t *edcf_acp;
shm_acparams_t acp_shm;
u16 *shm_entry;
ASSERT(cfg);
ASSERT(wlc);
/* Only apply params if the core is out of reset and has clocks */
......
......@@ -942,7 +942,7 @@ extern void wlc_mimops_action_ht_send(struct wlc_info *wlc,
extern void wlc_switch_shortslot(struct wlc_info *wlc, bool shortslot);
extern void wlc_set_bssid(struct wlc_bsscfg *cfg);
extern void wlc_edcf_setparams(struct wlc_bsscfg *cfg, bool suspend);
extern void wlc_edcf_setparams(struct wlc_info *wlc, bool suspend);
extern void wlc_set_ratetable(struct wlc_info *wlc);
extern int wlc_set_mac(struct wlc_bsscfg *cfg);
......
......@@ -92,6 +92,8 @@
#define AIDMAPSZ (roundup(MAXSCB, NBBY)/NBBY) /* aid bitmap size in bytes */
#endif /* AIDMAPSZ */
struct ieee80211_tx_queue_params;
typedef struct wlc_tunables {
int ntxd; /* size of tx descriptor table */
int nrxd; /* size of rx descriptor table */
......@@ -515,9 +517,9 @@ extern int wlc_get_header_len(void);
extern void wlc_mac_bcn_promisc_change(struct wlc_info *wlc, bool promisc);
extern void wlc_set_addrmatch(struct wlc_info *wlc, int match_reg_offset,
const u8 *addr);
extern void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg,
extern void wlc_wme_setparams(struct wlc_info *wlc, u16 aci,
const struct ieee80211_tx_queue_params *arg,
bool suspend);
extern struct wlc_pub *wlc_pub(void *wlc);
/* common functions for every port */
......
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