From a332bfc90c8397cf683cb3bd8b540b96e0ea7e76 Mon Sep 17 00:00:00 2001 From: Roland Vossen Date: Wed, 30 Mar 2011 11:20:59 +0200 Subject: [PATCH] staging: brcm80211: cleanup of WMM related functions Signed-off-by: Roland Vossen Reviewed-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 2 +- drivers/staging/brcm80211/brcmsmac/wlc_main.c | 19 +++++-------------- drivers/staging/brcm80211/brcmsmac/wlc_main.h | 2 +- drivers/staging/brcm80211/brcmsmac/wlc_pub.h | 6 ++++-- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c index e05a9ec81805..61da97f21060 100644 --- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c +++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c @@ -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; diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_main.c b/drivers/staging/brcm80211/brcmsmac/wlc_main.c index ef811669c366..7b91ea7befb5 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_main.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_main.c @@ -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(®s->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 */ diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_main.h b/drivers/staging/brcm80211/brcmsmac/wlc_main.h index 960f82cbfbc9..f11161dc0c01 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_main.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_main.h @@ -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); diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h index b956c23fa467..273c5085720f 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h @@ -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 */ -- 2.11.0