summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSunil Ravi <sunilravi@google.com>2020-03-22 17:32:35 -0700
committerSunil Ravi <sunilravi@google.com>2020-03-22 17:32:35 -0700
commitd66d7953ed80e1ef044499b96ef404598b944021 (patch)
tree5a314285c2bd6a0c162d8f32e37773bcc0fd885e /tests
parent06a5b1236b2defcef2b13959a1440d2f3dd5af2e (diff)
Blacklist the BSS only if MBO assoc retry delay is included.
When handling 802.11v bss transition request frame, blacklist the bss only if MBO association retry delay is included. Bug: 150579651 Test: Manual - Basic wifi sanity test Test: atest com.android.server.wifi.ClientModeImplTest Change-Id: I7e87e66b95e352f64f5f9ed2c740c022b2400d26
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
index 42bcd0013..8cff6f870 100644
--- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
@@ -4130,18 +4130,20 @@ public class ClientModeImplTest extends WifiBaseTest {
}
/**
- * Test that handleBssTransitionRequest() blacklist the BSS when
- * imminent bit is set.
+ * Test that handleBssTransitionRequest() blacklist the BSS upon
+ * receiving BTM request frame that contains MBO-OCE IE with an
+ * association retry delay attribute.
*/
@Test
- public void testBtmFrameWithImminentBitBlackListTheBssid() throws Exception {
+ public void testBtmFrameWithMboAssocretryDelayBlackListTheBssid() throws Exception {
// Connect to network with |sBSSID|, |sFreq|.
connect();
MboOceController.BtmFrameData btmFrmData = new MboOceController.BtmFrameData();
btmFrmData.mStatus = MboOceConstants.BTM_RESPONSE_STATUS_REJECT_UNSPECIFIED;
- btmFrmData.mBssTmDataFlagsMask = MboOceConstants.BTM_DATA_FLAG_DISASSOCIATION_IMMINENT;
+ btmFrmData.mBssTmDataFlagsMask = MboOceConstants.BTM_DATA_FLAG_DISASSOCIATION_IMMINENT
+ | MboOceConstants.BTM_DATA_FLAG_MBO_ASSOC_RETRY_DELAY_INCLUDED;
btmFrmData.mBlackListDurationMs = 60000;
mCmi.sendMessage(WifiMonitor.MBO_OCE_BSS_TM_HANDLING_DONE, btmFrmData);
@@ -4164,14 +4166,15 @@ public class ClientModeImplTest extends WifiBaseTest {
btmFrmData.mStatus = MboOceConstants.BTM_RESPONSE_STATUS_REJECT_UNSPECIFIED;
btmFrmData.mBssTmDataFlagsMask = MboOceConstants.BTM_DATA_FLAG_DISASSOCIATION_IMMINENT
+ | MboOceConstants.BTM_DATA_FLAG_BSS_TERMINATION_INCLUDED
| MboOceConstants.BTM_DATA_FLAG_MBO_CELL_DATA_CONNECTION_PREFERENCE_INCLUDED;
- btmFrmData.mBlackListDurationMs = 0;
+ btmFrmData.mBlackListDurationMs = 60000;
mCmi.sendMessage(WifiMonitor.MBO_OCE_BSS_TM_HANDLING_DONE, btmFrmData);
mLooper.dispatchAll();
- verify(mBssidBlocklistMonitor).blockBssidForDurationMs(sBSSID, sSSID,
- MboOceConstants.DEFAULT_BLACKLIST_DURATION_MS);
+ verify(mBssidBlocklistMonitor, never()).blockBssidForDurationMs(sBSSID, sSSID,
+ btmFrmData.mBlackListDurationMs);
verify(mWifiConnectivityManager).forceConnectivityScan(ClientModeImpl.WIFI_WORK_SOURCE);
verify(mWifiMetrics, times(1)).incrementMboCellularSwitchRequestCount();
verify(mWifiMetrics, times(1))