wl1271: Configure a higher listen interval to AP upon association
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Thu, 1 Apr 2010 08:38:22 +0000 (11:38 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 6 Apr 2010 20:55:13 +0000 (16:55 -0400)
Increase the fixed listen-interval max value configured to the mac80211 on
driver init. This value will allow a larger value to be configured to the
AP, which means the AP will buffer our frames longer.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@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_conf.h
drivers/net/wireless/wl12xx/wl1271_main.c

index 0b34b62611761e20c266f5d178c058b7d8bb3063..d76ae03762a3ae4feb5b0a5f5076916afe05cb43 100644 (file)
@@ -977,6 +977,13 @@ struct conf_conn_settings {
         * Range: 1000 - 3600000
         */
        u32 keep_alive_interval;
+
+       /*
+        * Maximum listen interval supported by the driver in units of beacons.
+        *
+        * Range: u16
+        */
+       u8 max_listen_interval;
 };
 
 enum {
index 247f4079832e3e971b107d446f0713c436b7d9c5..5c32d8d723612fcbc1220ab6fe66b65d27e915c7 100644 (file)
@@ -219,7 +219,7 @@ static struct conf_drv_settings default_conf = {
        },
        .conn = {
                .wake_up_event               = CONF_WAKE_UP_EVENT_DTIM,
-               .listen_interval             = 0,
+               .listen_interval             = 1,
                .bcn_filt_mode               = CONF_BCN_FILT_MODE_ENABLED,
                .bcn_filt_ie_count           = 1,
                .bcn_filt_ie = {
@@ -266,7 +266,8 @@ static struct conf_drv_settings default_conf = {
                .bet_enable                  = CONF_BET_MODE_ENABLE,
                .bet_max_consecutive         = 10,
                .psm_entry_retries           = 3,
-               .keep_alive_interval         = 55000
+               .keep_alive_interval         = 55000,
+               .max_listen_interval         = 20,
        },
        .init = {
                .radioparam = {
@@ -2253,6 +2254,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
        /* unit us */
        /* FIXME: find a proper value */
        wl->hw->channel_change_time = 10000;
+       wl->hw->max_listen_interval = wl->conf.conn.max_listen_interval;
 
        wl->hw->flags = IEEE80211_HW_SIGNAL_DBM |
                IEEE80211_HW_NOISE_DBM |