aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-12-11 08:40:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:31:33 -0500
commita6fe231361e35e3d068a63bbfd2318fa4e961ec5 (patch)
tree9556758a018f7477133eab647c7d043b9ad9861d /drivers
parent018b171c40b613da867e054f9b6b258ae9298133 (diff)
wl1271: Use slow rates for association messages
While not associated, default the data rates to 1 and 2mbps, so that only those rates will be used for association related message transfer. Once associated, configure the full rate-set supported by the AP. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271.h2
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_conf.h3
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_init.c2
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c8
4 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 8dfc9ec9590d..4b5ddba96f0b 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -107,8 +107,6 @@ enum {
107 CFG_RX_CTL_EN | CFG_RX_BCN_EN | \ 107 CFG_RX_CTL_EN | CFG_RX_BCN_EN | \
108 CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN) 108 CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN)
109 109
110#define WL1271_DEFAULT_BASIC_RATE_SET (CONF_TX_RATE_MASK_ALL)
111
112#define WL1271_FW_NAME "wl1271-fw.bin" 110#define WL1271_FW_NAME "wl1271-fw.bin"
113#define WL1271_NVS_NAME "wl1271-nvs.bin" 111#define WL1271_NVS_NAME "wl1271-nvs.bin"
114#define WL1271_NVS_LEN 468 112#define WL1271_NVS_LEN 468
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h
index c87ae56ce42a..5d1b5b6493e9 100644
--- a/drivers/net/wireless/wl12xx/wl1271_conf.h
+++ b/drivers/net/wireless/wl12xx/wl1271_conf.h
@@ -258,7 +258,8 @@ struct conf_rx_settings {
258#define CONF_TX_MAX_RATE_CLASSES 8 258#define CONF_TX_MAX_RATE_CLASSES 8
259 259
260#define CONF_TX_RATE_MASK_UNSPECIFIED 0 260#define CONF_TX_RATE_MASK_UNSPECIFIED 0
261#define CONF_TX_RATE_MASK_ALL 0x1eff 261#define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \
262 CONF_HW_BIT_RATE_2MBPS)
262#define CONF_TX_RATE_RETRY_LIMIT 10 263#define CONF_TX_RATE_RETRY_LIMIT 10
263 264
264struct conf_tx_rate_class { 265struct conf_tx_rate_class {
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c
index 7bfd6c6a4c77..c67889dd18fc 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.c
+++ b/drivers/net/wireless/wl12xx/wl1271_init.c
@@ -284,7 +284,7 @@ int wl1271_hw_init(struct wl1271 *wl)
284 goto out_free_memmap; 284 goto out_free_memmap;
285 285
286 /* Configure TX rate classes */ 286 /* Configure TX rate classes */
287 ret = wl1271_acx_rate_policies(wl, WL1271_DEFAULT_BASIC_RATE_SET); 287 ret = wl1271_acx_rate_policies(wl, CONF_TX_RATE_MASK_BASIC);
288 if (ret < 0) 288 if (ret < 0)
289 goto out_free_memmap; 289 goto out_free_memmap;
290 290
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 5a6e4d446962..272a8fa677ef 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1180,6 +1180,11 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
1180 wl1271_unjoin_channel(wl); 1180 wl1271_unjoin_channel(wl);
1181 else 1181 else
1182 wl1271_join_channel(wl, channel); 1182 wl1271_join_channel(wl, channel);
1183
1184 if (conf->flags & IEEE80211_CONF_IDLE) {
1185 wl->basic_rate_set = CONF_TX_RATE_MASK_BASIC;
1186 wl1271_acx_rate_policies(wl, CONF_TX_RATE_MASK_BASIC);
1187 }
1183 } 1188 }
1184 1189
1185 /* if the channel changes while joined, join again */ 1190 /* if the channel changes while joined, join again */
@@ -1568,7 +1573,6 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1568 } 1573 }
1569 } else { 1574 } else {
1570 /* use defaults when not associated */ 1575 /* use defaults when not associated */
1571 wl->basic_rate_set = WL1271_DEFAULT_BASIC_RATE_SET;
1572 wl->aid = 0; 1576 wl->aid = 0;
1573 } 1577 }
1574 1578
@@ -1897,7 +1901,7 @@ static int __devinit wl1271_probe(struct spi_device *spi)
1897 wl->psm_entry_retry = 0; 1901 wl->psm_entry_retry = 0;
1898 wl->tx_queue_stopped = false; 1902 wl->tx_queue_stopped = false;
1899 wl->power_level = WL1271_DEFAULT_POWER_LEVEL; 1903 wl->power_level = WL1271_DEFAULT_POWER_LEVEL;
1900 wl->basic_rate_set = WL1271_DEFAULT_BASIC_RATE_SET; 1904 wl->basic_rate_set = CONF_TX_RATE_MASK_BASIC;
1901 wl->band = IEEE80211_BAND_2GHZ; 1905 wl->band = IEEE80211_BAND_2GHZ;
1902 wl->vif = NULL; 1906 wl->vif = NULL;
1903 wl->joined = false; 1907 wl->joined = false;