mac80211: Enhancements to dynamic power save.
PATCH 1/1 mac80211: Enhancements to dynamic power save.
This patch enables mac80211 to send a null frame and also to check for tim in the beacon if dynamic power save is enabled.
Signed-off-by Vivek Natarajan <[email protected]>
--- net/mac80211/ieee80211_i.h | 3 +++ net/mac80211/mlme.c | 41 ++++++++++++++++++++++++++++++++++++++++- net/mac80211/scan.c | 2 +- net/mac80211/wext.c | 13 +++++++++---- 4 files changed, 53 insertions(+), 6 deletions(-)
net/mac80211/ieee80211_i.h +3 -0
@@ -986,6 +986,9 @@ u64 ieee80211_mandatory_rates(struct ieee80211_local *local,void ieee80211_dynamic_ps_enable_work (struct work_struct *work);void ieee80211_dynamic_ps_disable_work (struct work_struct *work);void ieee80211_dynamic_ps_timer (unsigned long data); +void ieee80211_send_nullfunc (struct ieee80211_local *local, +struct ieee80211_sub_if_data *sdata, +int powersave);void ieee80211_wake_queues_by_reason (struct ieee80211_hw *hw,enum queue_stop_reason reason);
net/mac80211/mlme.c +40 -1
75 lines not on this page · raw message
net/mac80211/scan.c +1 -1
@@ -395,7 +395,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,return RX_QUEUED ; } -static void ieee80211_send_nullfunc (struct ieee80211_local *local, +void ieee80211_send_nullfunc (struct ieee80211_local *local,struct ieee80211_sub_if_data *sdata,int powersave) {
net/mac80211/wext.c +9 -4
@@ -871,12 +871,17 @@ set:mod_timer (&local->dynamic_ps_timer, jiffies +msecs_to_jiffies (local->dynamic_ps_timeout)); else { -if (local->powersave) +if (local->powersave) { +ieee80211_send_nullfunc (local, sdata,1 ); conf->flags |=IEEE80211_CONF_PS ; -else + ret =ieee80211_hw_config (local, +IEEE80211_CONF_CHANGE_PS ); + }else { conf->flags &= ~IEEE80211_CONF_PS ; - ret =ieee80211_hw_config (local, -IEEE80211_CONF_CHANGE_PS ); + ret =ieee80211_hw_config (local, +IEEE80211_CONF_CHANGE_PS ); +ieee80211_send_nullfunc (local, sdata,0 ); + } } }
Signature · 1 line
1.6.0.1
This patch is to be applied on top of my previous patch,' A couple of fixes to dynamic power save'.
Thanks,
Vivek.