aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-04-18 07:15:21 -0400
committerLuciano Coelho <coelho@ti.com>2011-05-02 03:29:20 -0400
commit5f704d180e448d05859e1cb6572822ba27dbcdc7 (patch)
treeb82bf4812c6d99e0c532a71a067f8c15ecc0a4d1 /drivers/net/wireless/wl12xx/main.c
parent801f870bc0524bad7ebef9cea52d20e4d4992e4a (diff)
wl12xx: use wiphy values for setting rts, frag thresholds on init
Use the wiphy RTS and fragmentation thresholds for initializing the FW when possible. This mitigates a bug where previously set values are forgotten after interface down/up. Add checks before settings these values to ensure they are valid. Use default values when invalid thresholds are configured. Update the default RTS threshold to the maximum value given by the specification. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r--drivers/net/wireless/wl12xx/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 5f8bb35c647..81a0c8ed5a4 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -163,7 +163,7 @@ static struct conf_drv_settings default_conf = {
163 .packet_detection_threshold = 0, 163 .packet_detection_threshold = 0,
164 .ps_poll_timeout = 15, 164 .ps_poll_timeout = 15,
165 .upsd_timeout = 15, 165 .upsd_timeout = 15,
166 .rts_threshold = 2347, 166 .rts_threshold = IEEE80211_MAX_RTS_THRESHOLD,
167 .rx_cca_threshold = 0, 167 .rx_cca_threshold = 0,
168 .irq_blk_threshold = 0xFFFF, 168 .irq_blk_threshold = 0xFFFF,
169 .irq_pkt_threshold = 0, 169 .irq_pkt_threshold = 0,
@@ -2360,7 +2360,7 @@ static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
2360 if (ret < 0) 2360 if (ret < 0)
2361 goto out; 2361 goto out;
2362 2362
2363 ret = wl1271_acx_frag_threshold(wl, (u16)value); 2363 ret = wl1271_acx_frag_threshold(wl, value);
2364 if (ret < 0) 2364 if (ret < 0)
2365 wl1271_warning("wl1271_op_set_frag_threshold failed: %d", ret); 2365 wl1271_warning("wl1271_op_set_frag_threshold failed: %d", ret);
2366 2366
@@ -2388,7 +2388,7 @@ static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
2388 if (ret < 0) 2388 if (ret < 0)
2389 goto out; 2389 goto out;
2390 2390
2391 ret = wl1271_acx_rts_threshold(wl, (u16) value); 2391 ret = wl1271_acx_rts_threshold(wl, value);
2392 if (ret < 0) 2392 if (ret < 0)
2393 wl1271_warning("wl1271_op_set_rts_threshold failed: %d", ret); 2393 wl1271_warning("wl1271_op_set_rts_threshold failed: %d", ret);
2394 2394