]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SCS: Convert endianness of MAC Capabilities Information before use
authorBenjamin Lin <benjamin-jw.lin@mediatek.com>
Wed, 19 Feb 2025 01:26:32 +0000 (09:26 +0800)
committerJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 08:37:17 +0000 (10:37 +0200)
mac_cap in ieee80211_eht_capabilities is little-endian, hence requiring
endianness conversion before its usage.

Fixes: 33da386553b7 ("SCS: Add support for QoS Characteristics in SCS request")
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
wpa_supplicant/robust_av.c

index a3edf3bee80e691c563702afeb069b6c31df6193..b4d46e3f6a54a514fbe37857f730ce9a59728c2b 100644 (file)
@@ -540,7 +540,7 @@ int wpas_send_scs_req(struct wpa_supplicant *wpa_s)
        if (wpa_s->connection_eht && eht_ie &&
            eht_ie[1] >= 1 + IEEE80211_EHT_CAPAB_MIN_LEN) {
                eht = (const struct ieee80211_eht_capabilities *) &eht_ie[3];
-               if (eht->mac_cap & EHT_MACCAP_SCS_TRAFFIC_DESC)
+               if (le_to_host16(eht->mac_cap) & EHT_MACCAP_SCS_TRAFFIC_DESC)
                        allow_scs_traffic_desc = true;
        }