···54545555/* This really should be 8, but not for our firmware */5656#define MAX_SUPPORTED_RATES 325757-#define COUNTRY_STRING_LEN 35857#define MAX_COUNTRY_TRIPLETS 3259586059/* Headers */···97989899struct wl12xx_ie_country {99100 struct wl12xx_ie_header header;100100- u8 country_string[COUNTRY_STRING_LEN];101101+ u8 country_string[IEEE80211_COUNTRY_STRING_LEN];101102 struct country_triplet triplets[MAX_COUNTRY_TRIPLETS];102103} __packed;103104
+1-2
drivers/net/wireless/wl12xx/wl12xx_80211.h
···55555656/* This really should be 8, but not for our firmware */5757#define MAX_SUPPORTED_RATES 325858-#define COUNTRY_STRING_LEN 35958#define MAX_COUNTRY_TRIPLETS 3260596160/* Headers */···989999100struct wl12xx_ie_country {100101 struct wl12xx_ie_header header;101101- u8 country_string[COUNTRY_STRING_LEN];102102+ u8 country_string[IEEE80211_COUNTRY_STRING_LEN];102103 struct country_triplet triplets[MAX_COUNTRY_TRIPLETS];103104} __packed;104105
+3
include/linux/ieee80211.h
···13251325/* Although the spec says 8 I'm seeing 6 in practice */13261326#define IEEE80211_COUNTRY_IE_MIN_LEN 61327132713281328+/* The Country String field of the element shall be 3 octets in length */13291329+#define IEEE80211_COUNTRY_STRING_LEN 313301330+13281331/*13291332 * For regulatory extension stuff see IEEE 802.11-200713301333 * Annex I (page 1141) and Annex J (page 1147). Also