From 3f4e3ddb407050c473a3be3d0d185bc8d37ec7e4 Mon Sep 17 00:00:00 2001 From: mentor Date: Wed, 6 Feb 2008 21:29:06 +0000 Subject: [PATCH] Only have the Station PS handling routine run when we are actually in Station mode. This probably only affects IBSS. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3341 0192ed92-7a03-0410-a25b-9323aeb14dbd --- net80211/ieee80211_power.c | 3 +++ net80211/ieee80211_scan.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/net80211/ieee80211_power.c b/net80211/ieee80211_power.c index 7a97b4b..6b9d4aa 100644 --- a/net80211/ieee80211_power.c +++ b/net80211/ieee80211_power.c @@ -350,6 +350,9 @@ ieee80211_sta_pwrsave(struct ieee80211vap *vap, int enable) struct ieee80211_node *ni = vap->iv_bss; int qlen; + if (vap->iv_opmode != IEEE80211_M_STA) + return; + if (!!enable == !!IEEE80211_VAP_IS_SLEEPING(vap)) /* Bool. normalise */ return; diff --git a/net80211/ieee80211_scan.c b/net80211/ieee80211_scan.c index 1a5e5ca..aa11fa9 100644 --- a/net80211/ieee80211_scan.c +++ b/net80211/ieee80211_scan.c @@ -291,13 +291,13 @@ scan_restart_pwrsav(unsigned long arg) struct ieee80211com *ic = vap->iv_ic; int delay; + /* Handle PS stuff, if required. */ ieee80211_sta_pwrsave(vap, 1); - /* - * Use an initial 1ms delay to ensure the null + + /* Use an initial 1ms delay to ensure the null * data frame has a chance to go out. * XXX: 1ms is a lot, better to trigger scan - * on TX complete. - */ + * on TX complete. */ delay = msecs_to_jiffies(1); if (delay < 1) delay = 1; -- 2.35.1