[PATCH] tests: enable device ps before sending ps_poll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Adiel Aloni <adiel.aloni@xxxxxxxxx>

Commit c9491367b759 ("mac80211: always update the PM state of a peer on
MGMT / DATA frames") enforces the ap to check only mgmt/data frames pm bit,
and to update station's power save accordingly.
When sending only ps-poll (control frame) the ap will ignore the PM bit.
As the result, the partial virtual bitmap will not be updated, and the test
ap_open_disconnect_in_ps will fail on tshark check.
Since the test needs only the TIM to be updated, setting ps enable will
send NDP that will signal that the station is sleeping.
Sending PS-POLL to enable power save is not correct, according to the
following spec statement: "A PS-Poll frame exchange does not necessarily
result in an Ack frame from the AP, so a non-AP STA cannot change power
management mode using a PS-Poll frame"

Signed-off-by: Adiel Aloni <adiel.aloni@xxxxxxxxx>
---
 tests/hwsim/test_ap_open.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py
index b888002..1b62ea6 100644
--- a/tests/hwsim/test_ap_open.py
+++ b/tests/hwsim/test_ap_open.py
@@ -426,7 +426,9 @@ def test_ap_open_disconnect_in_ps(dev, apdev, params):
         raise Exception("No connection event received from hostapd")
 
     time.sleep(0.2)
-    hwsim_utils.set_powersave(dev[0], hwsim_utils.PS_MANUAL_POLL)
+    #setting power save enabled
+    hwsim_utils.set_powersave(dev[0], hwsim_utils.PS_ENABLED)
+    time.sleep(0.1)
     try:
         # inject some traffic
         sa = hapd.own_addr()
-- 
2.7.4


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux