hidl/1.3: Change in setting AssocRetryDelay.
BTM request frame may include multiple duration fields
for which a BSS is not present or not accepting
new connection. They are
1. Disassoc timer - Time after which BSS issues a disassociation
frame.
2. BSS termination duration - Duration for which a BSS is not available
3. MBO assoc retry delay (Added in case of only disassociation imminent bit)
- Duration for which STA should not attempt to
associate with this BSS.
First check disassociation imminent bit is set, if yes set
AssocRetryDelay to disassoc timer value. If BSS termination is included,
overwrite the AssocRetryDelay with BSS termination duration.
If MBO assoc retry delay is included overwrite the AssocRetryDelay to
MBO assoc retry delay.
Bug: 150579651
Test: Manual - Basic wifi sanity test
Change-Id: Ifa848ffdfee4a12b0733e579162057d5c42ca967
diff --git a/wpa_supplicant/hidl/1.3/hidl_manager.cpp b/wpa_supplicant/hidl/1.3/hidl_manager.cpp
index a7fd3f5..e467da3 100644
--- a/wpa_supplicant/hidl/1.3/hidl_manager.cpp
+++ b/wpa_supplicant/hidl/1.3/hidl_manager.cpp
@@ -1691,6 +1691,10 @@
else
beacon_int = 100; /* best guess */
+ if (wpa_s->wnm_mode & WNM_BSS_TM_REQ_DISASSOC_IMMINENT) {
+ // number of tbtts to milliseconds
+ duration_ms = wpa_s->wnm_dissoc_timer * beacon_int * 128 / 125;
+ }
if (wpa_s->wnm_mode & WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED) {
//wnm_bss_termination_duration contains 12 bytes of BSS
//termination duration subelement. Format of IE is
@@ -1701,17 +1705,13 @@
duration_ms = WPA_GET_LE16(wpa_s->wnm_bss_termination_duration + 10);
// minutes to milliseconds
duration_ms = duration_ms * 60 * 1000;
- } else if ((wpa_s->wnm_mode & WNM_BSS_TM_REQ_DISASSOC_IMMINENT)
- || (wpa_s->wnm_mode & WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT)) {
- // number of tbtts to milliseconds
- duration_ms = wpa_s->wnm_dissoc_timer * beacon_int * 128 / 125;
-#ifdef CONFIG_MBO
- if (wpa_s->wnm_mbo_assoc_retry_delay_present) {
- // number of seconds to milliseconds
- duration_ms = wpa_s->wnm_mbo_assoc_retry_delay_sec * 1000;
- }
-#endif
}
+#ifdef CONFIG_MBO
+ if (wpa_s->wnm_mbo_assoc_retry_delay_present) {
+ // number of seconds to milliseconds
+ duration_ms = wpa_s->wnm_mbo_assoc_retry_delay_sec * 1000;
+ }
+#endif
return duration_ms;
}