Skip to content

Commit c53d8a5

Browse files
committed
wifi: mac80211: fix unaligned le16 access
The AP removal timer field need not be aligned, so the code shouldn't access it directly, but use unaligned loads. Use get_unaligned_le16(), which even is shorter than the current code since it doesn't need a cast. Fixes: 8eb8dd2 ("wifi: mac80211: Support link removal using Reconfiguration ML element") Reviewed-by: Ilan Peer <[email protected]> Reviewed-by: Miriam Rachel Korenblit <[email protected]> Link: https://msgid.link/20240418105220.356788ba0045.I2b3cdb3644e205d5bb10322c345c0499171cf5d2@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent cb55e08 commit c53d8a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/mlme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5819,7 +5819,7 @@ static void ieee80211_ml_reconfiguration(struct ieee80211_sub_if_data *sdata,
58195819
*/
58205820
if (control &
58215821
IEEE80211_MLE_STA_RECONF_CONTROL_AP_REM_TIMER_PRESENT)
5822-
link_removal_timeout[link_id] = le16_to_cpu(*(__le16 *)pos);
5822+
link_removal_timeout[link_id] = get_unaligned_le16(pos);
58235823
}
58245824

58255825
removed_links &= sdata->vif.valid_links;

0 commit comments

Comments
 (0)