staging: brcm80211: cleanup of WMM related functions
authorRoland Vossen <rvossen@broadcom.com>
Wed, 30 Mar 2011 09:20:59 +0000 (11:20 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Apr 2011 20:56:05 +0000 (13:56 -0700)
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>
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
drivers/staging/brcm80211/brcmsmac/wlc_main.c
drivers/staging/brcm80211/brcmsmac/wlc_main.h
drivers/staging/brcm80211/brcmsmac/wlc_pub.h

index e05a9ec..61da97f 100644 (file)
@@ -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;
index ef81166..7b91ea7 100644 (file)
@@ -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 */
index 960f82c..f11161d 100644 (file)
@@ -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);
index b956c23..273c508 100644 (file)
@@ -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 */