Skip to content

Commit

Permalink
staging: brcm80211: cleanup of WMM related functions
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Apr 20, 2011
1 parent 871f847 commit a332bfc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 5 additions & 14 deletions drivers/staging/brcm80211/brcmsmac/wlc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);

Expand All @@ -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);
Expand Down Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions drivers/staging/brcm80211/brcmsmac/wlc_pub.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit a332bfc

Please sign in to comment.