aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/init.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-04-18 14:15:21 +0300
committerLuciano Coelho <coelho@ti.com>2011-05-02 10:29:20 +0300
commit5f704d180e448d05859e1cb6572822ba27dbcdc7 (patch)
treeb82bf4812c6d99e0c532a71a067f8c15ecc0a4d1 /drivers/net/wireless/wl12xx/init.c
parent801f870bc0524bad7ebef9cea52d20e4d4992e4a (diff)
downloadkernel_samsung_smdk4412-5f704d180e448d05859e1cb6572822ba27dbcdc7.zip
kernel_samsung_smdk4412-5f704d180e448d05859e1cb6572822ba27dbcdc7.tar.gz
kernel_samsung_smdk4412-5f704d180e448d05859e1cb6572822ba27dbcdc7.tar.bz2
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/init.c')
-rw-r--r--drivers/net/wireless/wl12xx/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index 1be6569..060ca31 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -258,7 +258,7 @@ int wl1271_init_phy_config(struct wl1271 *wl)
if (ret < 0)
return ret;
- ret = wl1271_acx_rts_threshold(wl, wl->conf.rx.rts_threshold);
+ ret = wl1271_acx_rts_threshold(wl, wl->hw->wiphy->rts_threshold);
if (ret < 0)
return ret;
@@ -614,7 +614,7 @@ int wl1271_hw_init(struct wl1271 *wl)
goto out_free_memmap;
/* Default fragmentation threshold */
- ret = wl1271_acx_frag_threshold(wl, wl->conf.tx.frag_threshold);
+ ret = wl1271_acx_frag_threshold(wl, wl->hw->wiphy->frag_threshold);
if (ret < 0)
goto out_free_memmap;