* [PATCH 2/3] netdev: remove handling of beacon loss event
2020-11-03 20:51 [PATCH 1/3] station/wsc: remove beacon loss handling James Prestwood
@ 2020-11-03 20:51 ` James Prestwood
2020-11-03 20:51 ` [PATCH 3/3] auto-t: remove beacon loss tests James Prestwood
2020-11-04 19:41 ` [PATCH 1/3] station/wsc: remove beacon loss handling Denis Kenzior
2 siblings, 0 replies; 4+ messages in thread
From: James Prestwood @ 2020-11-03 20:51 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]
---
src/netdev.c | 14 --------------
src/netdev.h | 2 --
2 files changed, 16 deletions(-)
diff --git a/src/netdev.c b/src/netdev.c
index 5d3aa862..3f78afbf 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -671,16 +671,6 @@ struct netdev *netdev_find(int ifindex)
return l_queue_find(netdev_list, netdev_match, L_UINT_TO_PTR(ifindex));
}
-static void netdev_lost_beacon(struct netdev *netdev)
-{
- if (!netdev->connected)
- return;
-
- if (netdev->event_filter)
- netdev->event_filter(netdev, NETDEV_EVENT_LOST_BEACON, NULL,
- netdev->user_data);
-}
-
/* Threshold RSSI for roaming to trigger, configurable in main.conf */
static int LOW_SIGNAL_THRESHOLD;
@@ -771,10 +761,6 @@ static void netdev_cqm_event(struct l_genl_msg *msg, struct netdev *netdev)
while (l_genl_attr_next(&nested, &type, &len, &data)) {
switch (type) {
- case NL80211_ATTR_CQM_BEACON_LOSS_EVENT:
- netdev_lost_beacon(netdev);
- break;
-
case NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT:
if (len != 4)
continue;
diff --git a/src/netdev.h b/src/netdev.h
index 58b63fbd..65fdbaaf 100644
--- a/src/netdev.h
+++ b/src/netdev.h
@@ -40,7 +40,6 @@ enum netdev_result {
enum netdev_event {
NETDEV_EVENT_AUTHENTICATING,
NETDEV_EVENT_ASSOCIATING,
- NETDEV_EVENT_LOST_BEACON,
NETDEV_EVENT_DISCONNECT_BY_AP,
NETDEV_EVENT_DISCONNECT_BY_SME,
NETDEV_EVENT_RSSI_THRESHOLD_LOW,
@@ -89,7 +88,6 @@ typedef void (*netdev_connect_cb_t)(struct netdev *netdev,
*
* NETDEV_EVENT_AUTHENTICATING - unused
* NETDEV_EVENT_ASSOCIATING - unused
- * NETDEV_EVENT_LOST_BEACON - unused
* NETDEV_EVENT_DISCONNECT_BY_AP - MMPDU_REASON_CODE
* NETDEV_EVENT_DISCONNECT_BY_SME - MMPDU_REASON_CODE
* NETDEV_EVENT_RSSI_THRESHOLD_LOW - unused
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/3] auto-t: remove beacon loss tests
2020-11-03 20:51 [PATCH 1/3] station/wsc: remove beacon loss handling James Prestwood
2020-11-03 20:51 ` [PATCH 2/3] netdev: remove handling of beacon loss event James Prestwood
@ 2020-11-03 20:51 ` James Prestwood
2020-11-04 19:41 ` [PATCH 1/3] station/wsc: remove beacon loss handling Denis Kenzior
2 siblings, 0 replies; 4+ messages in thread
From: James Prestwood @ 2020-11-03 20:51 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 7457 bytes --]
---
.../testFT-8021x-roam/connection_test.py | 76 -----------------
autotests/testFT-PSK-roam/connection_test.py | 83 -------------------
2 files changed, 159 deletions(-)
diff --git a/autotests/testFT-8021x-roam/connection_test.py b/autotests/testFT-8021x-roam/connection_test.py
index 2dfe9ce5..6e905f0d 100644
--- a/autotests/testFT-8021x-roam/connection_test.py
+++ b/autotests/testFT-8021x-roam/connection_test.py
@@ -92,82 +92,6 @@ class Test(unittest.TestCase):
self.assertRaises(Exception, testutil.test_ifaces_connected,
(self.bss_hostapd[0].ifname, device.name))
- def test_roam_on_beacon_loss(self):
- hwsim = Hwsim()
-
- rule0 = hwsim.rules.create()
- rule0.source = self.bss_radio[0].addresses[0]
- rule0.bidirectional = True
-
- rule1 = hwsim.rules.create()
- rule1.source = self.bss_radio[1].addresses[0]
- rule1.bidirectional = True
-
- wd = IWD()
-
- device = wd.list_devices(1)[0]
-
- # Check that iwd selects BSS 0 first
- rule0.signal = -2000
- rule1.signal = -2500
-
- condition = 'not obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
- device.scan()
-
- condition = 'obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
- condition = 'not obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
- ordered_network = device.get_ordered_network("TestFT")
- self.assertEqual(ordered_network.type, NetworkType.eap)
- self.assertEqual(ordered_network.signal_strength, -2000)
-
- condition = 'not obj.connected'
- wd.wait_for_object_condition(ordered_network.network_object, condition)
-
- self.assertFalse(self.bss_hostapd[0].list_sta())
- self.assertFalse(self.bss_hostapd[1].list_sta())
-
- ordered_network.network_object.connect()
-
- condition = 'obj.state == DeviceState.connected'
- wd.wait_for_object_condition(device, condition)
-
- self.assertTrue(self.bss_hostapd[0].list_sta())
- self.assertFalse(self.bss_hostapd[1].list_sta())
-
- testutil.test_iface_operstate(device.name)
- testutil.test_ifaces_connected(self.bss_hostapd[0].ifname, device.name)
- self.assertRaises(Exception, testutil.test_ifaces_connected,
- (self.bss_hostapd[1].ifname, device.name))
-
- # Check that iwd starts transition to BSS 1 in less than 20 seconds
- # from a beacon loss event
- rule0.drop = True
- rule0.signal = -3000
- wd.wait(2)
- rule0.drop = False
-
- condition = 'obj.state == DeviceState.roaming'
- wd.wait_for_object_condition(device, condition)
-
- # Check that iwd is on BSS 1 once out of roaming state and doesn't
- # go through 'disconnected', 'autoconnect', 'connecting' in between
- condition = 'obj.state != DeviceState.roaming'
- wd.wait_for_object_condition(device, condition)
-
- self.assertEqual(device.state, iwd.DeviceState.connected)
- self.assertTrue(self.bss_hostapd[1].list_sta())
-
- testutil.test_iface_operstate(device.name)
- testutil.test_ifaces_connected(self.bss_hostapd[1].ifname, device.name)
- self.assertRaises(Exception, testutil.test_ifaces_connected,
- (self.bss_hostapd[0].ifname, device.name))
-
def tearDown(self):
os.system('ifconfig "' + self.bss_hostapd[0].ifname + '" down')
os.system('ifconfig "' + self.bss_hostapd[1].ifname + '" down')
diff --git a/autotests/testFT-PSK-roam/connection_test.py b/autotests/testFT-PSK-roam/connection_test.py
index 2d65c925..8e69fcd5 100644
--- a/autotests/testFT-PSK-roam/connection_test.py
+++ b/autotests/testFT-PSK-roam/connection_test.py
@@ -98,89 +98,6 @@ class Test(unittest.TestCase):
self.assertRaises(Exception, testutil.test_ifaces_connected,
(self.bss_hostapd[0].ifname, device.name))
- def test_roam_on_beacon_loss(self):
- hwsim = Hwsim()
-
- rule0 = hwsim.rules.create()
- rule0.source = self.bss_radio[0].addresses[0]
- rule0.bidirectional = True
-
- rule1 = hwsim.rules.create()
- rule1.source = self.bss_radio[1].addresses[0]
- rule1.bidirectional = True
-
- # Check that iwd selects BSS 0 first
- rule0.signal = -2000
- rule1.signal = -2500
-
- wd = IWD(True)
-
- psk_agent = PSKAgent("EasilyGuessedPassword")
- wd.register_psk_agent(psk_agent)
-
- device = wd.list_devices(1)[0]
- # prevent autoconnect
- device.disconnect()
-
- condition = 'not obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
- device.scan()
-
- condition = 'obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
- condition = 'not obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
- ordered_network = device.get_ordered_network("TestFT")
- self.assertEqual(ordered_network.type, NetworkType.psk)
- self.assertEqual(ordered_network.signal_strength, -2000)
-
- condition = 'not obj.connected'
- wd.wait_for_object_condition(ordered_network.network_object, condition)
-
- self.assertFalse(self.bss_hostapd[0].list_sta())
- self.assertFalse(self.bss_hostapd[1].list_sta())
-
- ordered_network.network_object.connect()
-
- condition = 'obj.state == DeviceState.connected'
- wd.wait_for_object_condition(device, condition)
-
- self.assertTrue(self.bss_hostapd[0].list_sta())
- self.assertFalse(self.bss_hostapd[1].list_sta())
-
- wd.unregister_psk_agent(psk_agent)
-
- testutil.test_iface_operstate(device.name)
- testutil.test_ifaces_connected(self.bss_hostapd[0].ifname, device.name)
- self.assertRaises(Exception, testutil.test_ifaces_connected,
- (self.bss_hostapd[1].ifname, device.name))
-
- # Check that iwd starts transition to BSS 1 in less than 20 seconds
- # from a beacon loss event
- rule0.drop = True
- rule0.signal = -3000
- wd.wait(2)
- rule0.drop = False
-
- condition = 'obj.state == DeviceState.roaming'
- wd.wait_for_object_condition(device, condition, 20)
-
- # Check that iwd is on BSS 1 once out of roaming state and doesn't
- # go through 'disconnected', 'autoconnect', 'connecting' in between
- condition = 'obj.state != DeviceState.roaming'
- wd.wait_for_object_condition(device, condition, 5)
-
- self.assertEqual(device.state, iwd.DeviceState.connected)
- self.assertTrue(self.bss_hostapd[1].list_sta())
-
- testutil.test_iface_operstate(device.name)
- testutil.test_ifaces_connected(self.bss_hostapd[1].ifname, device.name)
- self.assertRaises(Exception, testutil.test_ifaces_connected,
- (self.bss_hostapd[0].ifname, device.name))
-
def tearDown(self):
os.system('ifconfig "' + self.bss_hostapd[0].ifname + '" down')
os.system('ifconfig "' + self.bss_hostapd[1].ifname + '" down')
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread