]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
wl1271: enable U-APSD
authorKalle Valo <kalle.valo@nokia.com>
Thu, 18 Mar 2010 10:26:38 +0000 (12:26 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 23 Mar 2010 20:50:23 +0000 (16:50 -0400)
wl1271 supports U-APSD similarly as wl1251, so let's enable it.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1271_main.c

index 2a2e5841a0e08d99339feb28fea674cf4cb39f78..037a4f4036fdc8050d138682dffe851ec82caff8 100644 (file)
@@ -1781,6 +1781,7 @@ static int wl1271_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
                             const struct ieee80211_tx_queue_params *params)
 {
        struct wl1271 *wl = hw->priv;
+       u8 ps_scheme;
        int ret;
 
        mutex_lock(&wl->mutex);
@@ -1798,11 +1799,15 @@ static int wl1271_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
        if (ret < 0)
                goto out_sleep;
 
+       if (params->uapsd)
+               ps_scheme = CONF_PS_SCHEME_UPSD_TRIGGER;
+       else
+               ps_scheme = CONF_PS_SCHEME_LEGACY;
+
        ret = wl1271_acx_tid_cfg(wl, wl1271_tx_get_queue(queue),
                                 CONF_CHANNEL_TYPE_EDCF,
                                 wl1271_tx_get_queue(queue),
-                                CONF_PS_SCHEME_LEGACY,
-                                CONF_ACK_POLICY_LEGACY, 0, 0);
+                                ps_scheme, CONF_ACK_POLICY_LEGACY, 0, 0);
        if (ret < 0)
                goto out_sleep;
 
@@ -2083,6 +2088,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
                IEEE80211_HW_NOISE_DBM |
                IEEE80211_HW_BEACON_FILTER |
                IEEE80211_HW_SUPPORTS_PS |
+               IEEE80211_HW_SUPPORTS_UAPSD |
                IEEE80211_HW_HAS_RATE_CONTROL;
 
        wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |