Skip to content

Commit b654188

Browse files
author
Duc Huynh BV
committed
Insert TIM after DS Parameter only if DS IE exists
The update_BCNTIM() function was always adding a fixed +3 offset assuming that the DS Parameter Set IE (length 3) was present. However, on 5 GHz beacons, the DS IE is typically absent. As a result, TIM was inserted 3 bytes past the correct offset, overwriting the first bytes of the following IE (usually RSN), which led to corrupted RSN contents (e.g., “RSN ver 0x0501”) and failed associations. This patch fixes the issue by checking for the presence of _DSSET_IE_ using rtw_get_ie() and adding the +3 offset only if the DS Parameter IE actually exists. This preserves RSN and other IEs, ensures correct beacon formatting on 5 GHz, and restores stable P2P and 5 GHz connectivity. Signed-off-by: Duc Huynh BV <[email protected]>
1 parent 3696de1 commit b654188

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/rtw_ap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ static void update_BCNTIM(_adapter *padapter)
132132
offset += tmp_len + 2;
133133

134134
/*DS Parameter Set IE, len=3*/
135-
offset += 3;
135+
p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _DSSET_IE_, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_));
136+
if (p != NULL)
137+
offset += 3;
136138

137139
premainder_ie = pie + offset;
138140

0 commit comments

Comments
 (0)