]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Support HT Control field in QoS Data frames
authorJouni Malinen <jouni@codeaurora.org>
Thu, 6 May 2021 20:28:27 +0000 (23:28 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 6 May 2021 20:32:54 +0000 (23:32 +0300)
Extend Data frame processing (and decryption) to handle +HTC frames by
skipping the HT Control field at the end of the frame header. While this
is not an exact match of the rules in IEEE Std 802.11-2020 for when the
HT Control field is present in frames (e.g., no check of the TXVECTOR
value), this is good enough to cover the most likely used cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wlantest/rx_data.c

index 8cb2d37187eb6b992863375b16e3bef99342d365..f8b5f7e8a73566a7227a5754afa401211a7de0f0 100644 (file)
@@ -847,6 +847,8 @@ void rx_data(struct wlantest *wt, const u8 *data, size_t len)
                qos = data + hdrlen;
                hdrlen += 2;
        }
+       if ((fc & WLAN_FC_HTC) && (stype & 0x08))
+               hdrlen += 4; /* HT Control field */
        if (len < hdrlen)
                return;
        wt->rx_data++;