From 562d01532616b7be095b9e14a407351e71c0a06c Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 22 Apr 2022 23:56:35 +0200 Subject: iwinfo: nl80211: fix hwmode parsing for multi-band NICs In case a NIC supports multiple frequency bands, the supported hw-modelist might not contain all valid hwmodes, as B/G/AD hwmodes are only included based on the last parsed supported frequency. In case a radio supports multiple bands, this might result in these hwmodes not being flagged as supported. Circumvent this by tracking all seen frequency bands using a bitmask which later determined which HW modes are listed as supported. Signed-off-by: David Bauer --- include/iwinfo.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/iwinfo.h b/include/iwinfo.h index 8469ee7..e9b7451 100644 --- a/include/iwinfo.h +++ b/include/iwinfo.h @@ -31,6 +31,11 @@ #define IWINFO_80211_AD (1 << 5) #define IWINFO_80211_AX (1 << 6) +#define IWINFO_BAND_24 (1 << 0) +#define IWINFO_BAND_5 (1 << 1) +#define IWINFO_BAND_6 (1 << 2) +#define IWINFO_BAND_60 (1 << 3) + #define IWINFO_CIPHER_NONE (1 << 0) #define IWINFO_CIPHER_WEP40 (1 << 1) #define IWINFO_CIPHER_TKIP (1 << 2) -- cgit v1.2.1