Skip to content

Commit fa9069f

Browse files
committed
RDKB-61540: fixed disassoc after assoc retry
Reason for change: Client cannot connect due to disassoc from AP. Scenario: - client sends two assoc requests - while second assoc request is in queue hostapd sends reply - when second assoc request is handled hostapd removes STA and adds again - remove of STA triggers DEL_STATION event - DEL_STATION event sends disassoc - after two disassoc STA gives up and connects to different band The fix is to skip remove-add STA for duplicated requests. Test Procedure: - Connect Intel BE200 client - Check connection successful if client retries assoc request Risks: Low Priority: P1 Signed-off-by: Bogdan Bogush <[email protected]>
1 parent a12cfc3 commit fa9069f

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
##########################################
2+
Date: Nov 6, 2025 1:00 PM
3+
From:
4+
Subject: Fixed disassoc after multiple assoc requests
5+
Source: Comcast
6+
Upstream-Status:
7+
Signed-off-by: Bogdan Bogush <[email protected]>
8+
##########################################
9+
diff --git a/source/hostap-2.11/src/ap/ieee802_11.c b/source/hostap-2.11/src/ap/ieee802_11.c
10+
index e3cd9e47c..f53ea2de5 100644
11+
--- a/source/hostap-2.11/src/ap/ieee802_11.c
12+
+++ b/source/hostap-2.11/src/ap/ieee802_11.c
13+
@@ -5699,6 +5699,29 @@ static void handle_assoc(struct hostapd_data *hapd,
14+
seq_ctrl);
15+
return;
16+
}
17+
+
18+
+ /* If association request retry handled after reply has already
19+
+ * been sent then added_unassoc is set to 0. In this case STA is
20+
+ * removed from driver in add_associated_sta and later disassociated
21+
+ * by NL80211_CMD_DEL_STATION event. After disassociation STA stops
22+
+ * EAPOL handshake and disconnects.
23+
+ */
24+
+#ifdef RDK_ONEWIFI
25+
+ if (!sta->added_unassoc &&
26+
+ !(sta->flags & WLAN_STA_AUTHORIZED) &&
27+
+ sta->last_seq_ctrl != WLAN_INVALID_MGMT_SEQ &&
28+
+ WLAN_GET_SEQ_SEQ(le_to_host16(sta->last_seq_ctrl)) + 1 ==
29+
+ WLAN_GET_SEQ_SEQ(le_to_host16(seq_ctrl)) &&
30+
+ sta->last_subtype == (reassoc ? WLAN_FC_STYPE_REASSOC_REQ :
31+
+ WLAN_FC_STYPE_ASSOC_REQ)) {
32+
+ hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
33+
+ HOSTAPD_LEVEL_DEBUG,
34+
+ "Drop repeated association frame seq_ctrl=0x%x",
35+
+ seq_ctrl);
36+
+ return;
37+
+ }
38+
+#endif /* RDK_ONEWIFI */
39+
+
40+
sta->last_seq_ctrl = seq_ctrl;
41+
sta->last_subtype = reassoc ? WLAN_FC_STYPE_REASSOC_REQ :
42+
WLAN_FC_STYPE_ASSOC_REQ;

meta-rdk-mtk-bpir4/recipes-ccsp/rdk-wifi-libhostap/files/2.11/kernel_5_4/patches.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ SRC_URI:append = " \
3636
file://supplicant_new.patch \
3737
file://bpi.patch \
3838
file://mlo_fix.patch \
39+
file://fixed_disassoc_after_assoc_retry.patch \
3940
"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
##########################################
2+
Date: Nov 6, 2025 1:00 PM
3+
From:
4+
Subject: Fixed disassoc after multiple assoc requests
5+
Source: Comcast
6+
Upstream-Status:
7+
Signed-off-by: Bogdan Bogush <[email protected]>
8+
##########################################
9+
diff --git a/source/hostap-2.11/src/ap/ieee802_11.c b/source/hostap-2.11/src/ap/ieee802_11.c
10+
index e3cd9e47c..f53ea2de5 100644
11+
--- a/source/hostap-2.11/src/ap/ieee802_11.c
12+
+++ b/source/hostap-2.11/src/ap/ieee802_11.c
13+
@@ -5699,6 +5699,29 @@ static void handle_assoc(struct hostapd_data *hapd,
14+
seq_ctrl);
15+
return;
16+
}
17+
+
18+
+ /* If association request retry handled after reply has already
19+
+ * been sent then added_unassoc is set to 0. In this case STA is
20+
+ * removed from driver in add_associated_sta and later disassociated
21+
+ * by NL80211_CMD_DEL_STATION event. After disassociation STA stops
22+
+ * EAPOL handshake and disconnects.
23+
+ */
24+
+#ifdef RDK_ONEWIFI
25+
+ if (!sta->added_unassoc &&
26+
+ !(sta->flags & WLAN_STA_AUTHORIZED) &&
27+
+ sta->last_seq_ctrl != WLAN_INVALID_MGMT_SEQ &&
28+
+ WLAN_GET_SEQ_SEQ(le_to_host16(sta->last_seq_ctrl)) + 1 ==
29+
+ WLAN_GET_SEQ_SEQ(le_to_host16(seq_ctrl)) &&
30+
+ sta->last_subtype == (reassoc ? WLAN_FC_STYPE_REASSOC_REQ :
31+
+ WLAN_FC_STYPE_ASSOC_REQ)) {
32+
+ hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
33+
+ HOSTAPD_LEVEL_DEBUG,
34+
+ "Drop repeated association frame seq_ctrl=0x%x",
35+
+ seq_ctrl);
36+
+ return;
37+
+ }
38+
+#endif /* RDK_ONEWIFI */
39+
+
40+
sta->last_seq_ctrl = seq_ctrl;
41+
sta->last_subtype = reassoc ? WLAN_FC_STYPE_REASSOC_REQ :
42+
WLAN_FC_STYPE_ASSOC_REQ;

meta-rdk-mtk-bpir4/recipes-ccsp/rdk-wifi-libhostap/files/2.11/kernel_6_6/patches.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,4 +270,5 @@ SRC_URI:append = " \
270270
file://mdu_radius_psk_auth_2_11.patch \
271271
file://supplicant_new.patch \
272272
file://bpi.patch \
273+
file://fixed_disassoc_after_assoc_retry.patch \
273274
"

0 commit comments

Comments
 (0)