Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ieee80211: add IEEE80211_COUNTRY_STRING_LEN definition

and make use of it in wireless drivers

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Bing Zhao and committed by
John W. Linville
80751e2b b9ede5f1

+8 -7
+1 -1
drivers/net/wireless/at76c50x-usb.h
··· 290 290 u8 res; 291 291 u8 multi_domain_capability_implemented; 292 292 u8 multi_domain_capability_enabled; 293 - u8 country_string[3]; 293 + u8 country_string[IEEE80211_COUNTRY_STRING_LEN]; 294 294 u8 reserved[3]; 295 295 } __packed; 296 296
+1 -1
drivers/net/wireless/ipw2x00/ipw2200.h
··· 961 961 struct ipw_country_info { 962 962 u8 id; 963 963 u8 length; 964 - u8 country_str[3]; 964 + u8 country_str[IEEE80211_COUNTRY_STRING_LEN]; 965 965 struct ipw_country_channel_info groups[7]; 966 966 } __packed; 967 967
+1 -1
drivers/net/wireless/libertas/host.h
··· 387 387 struct mrvl_ie_domain_param_set { 388 388 struct mrvl_ie_header header; 389 389 390 - u8 country_code[3]; 390 + u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; 391 391 struct ieee80211_country_ie_triplet triplet[MAX_11D_TRIPLETS]; 392 392 } __packed; 393 393
+1 -2
drivers/net/wireless/wl1251/wl12xx_80211.h
··· 54 54 55 55 /* This really should be 8, but not for our firmware */ 56 56 #define MAX_SUPPORTED_RATES 32 57 - #define COUNTRY_STRING_LEN 3 58 57 #define MAX_COUNTRY_TRIPLETS 32 59 58 60 59 /* Headers */ ··· 97 98 98 99 struct wl12xx_ie_country { 99 100 struct wl12xx_ie_header header; 100 - u8 country_string[COUNTRY_STRING_LEN]; 101 + u8 country_string[IEEE80211_COUNTRY_STRING_LEN]; 101 102 struct country_triplet triplets[MAX_COUNTRY_TRIPLETS]; 102 103 } __packed; 103 104
+1 -2
drivers/net/wireless/wl12xx/wl12xx_80211.h
··· 55 55 56 56 /* This really should be 8, but not for our firmware */ 57 57 #define MAX_SUPPORTED_RATES 32 58 - #define COUNTRY_STRING_LEN 3 59 58 #define MAX_COUNTRY_TRIPLETS 32 60 59 61 60 /* Headers */ ··· 98 99 99 100 struct wl12xx_ie_country { 100 101 struct wl12xx_ie_header header; 101 - u8 country_string[COUNTRY_STRING_LEN]; 102 + u8 country_string[IEEE80211_COUNTRY_STRING_LEN]; 102 103 struct country_triplet triplets[MAX_COUNTRY_TRIPLETS]; 103 104 } __packed; 104 105
+3
include/linux/ieee80211.h
··· 1325 1325 /* Although the spec says 8 I'm seeing 6 in practice */ 1326 1326 #define IEEE80211_COUNTRY_IE_MIN_LEN 6 1327 1327 1328 + /* The Country String field of the element shall be 3 octets in length */ 1329 + #define IEEE80211_COUNTRY_STRING_LEN 3 1330 + 1328 1331 /* 1329 1332 * For regulatory extension stuff see IEEE 802.11-2007 1330 1333 * Annex I (page 1141) and Annex J (page 1147). Also