Only have the Station PS handling routine run when we are actually in Station mode...
authormentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 6 Feb 2008 21:29:06 +0000 (21:29 +0000)
committermentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 6 Feb 2008 21:29:06 +0000 (21:29 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3341 0192ed92-7a03-0410-a25b-9323aeb14dbd

net80211/ieee80211_power.c
net80211/ieee80211_scan.c

index 7a97b4bcc4dd3c5a42caa9cdb3b6e780fac6795c..6b9d4aa3ca53344acaa44a1e6c8022c6a2375ea6 100644 (file)
@@ -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;
 
index 1a5e5ca8e667c2ecce8673b25773a5a7faf84a6e..aa11fa9b840851598816af8cb2a8f09d2edfa760 100644 (file)
@@ -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;