wl1251 power save fixes for 2.6.33
cover wl1251 power save fixes for 2.6.33
Hi John,
my testing revealed serious power save problems in wl1251. If possible, please send the fixes to 2.6.33. The patches should be simple enough and they make a huge improvement.
---
Kalle Valo (3):
wl1251: remove false warning messages
wl1251: fix bssid handling
wl1251: don't build null data template in wl1251_op_config()
drivers/net/wireless/wl12xx/wl1251_main.c | 36 ++++++++++++----------------- 1 files changed, 15 insertions(+), 21 deletions(-)
PATCH 1/3 wl1251: remove false warning messages
From: Kalle Valo <[email protected]>
There was a warning from wl1251_op_bss_info_changed():
wl1251: WARNING Set ctsprotect failed 0
It was printed always, it's completely false and can be removed.
--- drivers/net/wireless/wl12xx/wl1251_main.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/net/wireless/wl12xx/wl1251_main.c +0 -2
@@ -1181,8 +1181,6 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, wl->beacon_int, wl->dtim_period);if (ret <0 ) goto out_sleep; -wl1251_warning ("Set ctsprotect failed %d" , ret); - goto out_sleep; } }
PATCH 2/3 wl1251: fix bssid handling
In reply to Kalle ValoFrom: Kalle Valo <[email protected]>
bssid needs to be copied first in wl1251_op_bss_info_changed(), otherwise templates will have incorrect bssid and power save will not work correctly.
--- drivers/net/wireless/wl12xx/wl1251_main.c | 30 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 15 deletions(-)
drivers/net/wireless/wl12xx/wl1251_main.c +15 -15
@@ -1110,6 +1110,21 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,if (ret <0 ) goto out; +if (changed &BSS_CHANGED_BSSID ) { +memcpy (wl->bssid, bss_conf->bssid,ETH_ALEN ); + + ret =wl1251_build_null_data (wl); +if (ret <0 ) + goto out; + +if (wl->bss_type !=BSS_TYPE_IBSS ) { + ret =wl1251_join (wl, wl->bss_type, wl->channel, + wl->beacon_int, wl->dtim_period); +if (ret <0 ) + goto out_sleep; + } + } +if (changed &BSS_CHANGED_ASSOC ) {if (bss_conf->assoc) { wl->beacon_int = bss_conf->beacon_int;
@@ -1169,21 +1184,6 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, } } -if (changed &BSS_CHANGED_BSSID ) { -memcpy (wl->bssid, bss_conf->bssid,ETH_ALEN ); - - ret =wl1251_build_null_data (wl); -if (ret <0 ) - goto out; - -if (wl->bss_type !=BSS_TYPE_IBSS ) { - ret =wl1251_join (wl, wl->bss_type, wl->channel, - wl->beacon_int, wl->dtim_period); -if (ret <0 ) - goto out_sleep; - } - } -if (changed &BSS_CHANGED_BEACON ) { beacon =ieee80211_beacon_get (hw, vif); ret = wl1251_cmd_template_set(wl, CMD_BEACON, beacon->data,
PATCH 3/3 wl1251: don't build null data template in wl1251_op_config()
In reply to Kalle ValoFrom: Kalle Valo <[email protected]>
The bssid can be zero when null data template is set in wl1251_op_config(). It's enough, and especially safe, to set it once after association.
--- drivers/net/wireless/wl12xx/wl1251_main.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/net/wireless/wl12xx/wl1251_main.c +0 -4
@@ -629,10 +629,6 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) goto out_sleep; } - ret =wl1251_build_null_data (wl); -if (ret <0 ) - goto out_sleep; -if (conf->flags &IEEE80211_CONF_PS && !wl->psm_requested) {wl1251_debug (DEBUG_PSM ,"psm enabled" );