Commit 80751e2b authored by Bing Zhao's avatar Bing Zhao Committed by John W. Linville

ieee80211: add IEEE80211_COUNTRY_STRING_LEN definition

and make use of it in wireless drivers
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b9ede5f1
...@@ -290,7 +290,7 @@ struct mib_mac_mgmt { ...@@ -290,7 +290,7 @@ struct mib_mac_mgmt {
u8 res; u8 res;
u8 multi_domain_capability_implemented; u8 multi_domain_capability_implemented;
u8 multi_domain_capability_enabled; u8 multi_domain_capability_enabled;
u8 country_string[3]; u8 country_string[IEEE80211_COUNTRY_STRING_LEN];
u8 reserved[3]; u8 reserved[3];
} __packed; } __packed;
......
...@@ -961,7 +961,7 @@ struct ipw_country_channel_info { ...@@ -961,7 +961,7 @@ struct ipw_country_channel_info {
struct ipw_country_info { struct ipw_country_info {
u8 id; u8 id;
u8 length; u8 length;
u8 country_str[3]; u8 country_str[IEEE80211_COUNTRY_STRING_LEN];
struct ipw_country_channel_info groups[7]; struct ipw_country_channel_info groups[7];
} __packed; } __packed;
......
...@@ -387,7 +387,7 @@ struct lbs_offset_value { ...@@ -387,7 +387,7 @@ struct lbs_offset_value {
struct mrvl_ie_domain_param_set { struct mrvl_ie_domain_param_set {
struct mrvl_ie_header header; struct mrvl_ie_header header;
u8 country_code[3]; u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
struct ieee80211_country_ie_triplet triplet[MAX_11D_TRIPLETS]; struct ieee80211_country_ie_triplet triplet[MAX_11D_TRIPLETS];
} __packed; } __packed;
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
/* This really should be 8, but not for our firmware */ /* This really should be 8, but not for our firmware */
#define MAX_SUPPORTED_RATES 32 #define MAX_SUPPORTED_RATES 32
#define COUNTRY_STRING_LEN 3
#define MAX_COUNTRY_TRIPLETS 32 #define MAX_COUNTRY_TRIPLETS 32
/* Headers */ /* Headers */
...@@ -98,7 +97,7 @@ struct country_triplet { ...@@ -98,7 +97,7 @@ struct country_triplet {
struct wl12xx_ie_country { struct wl12xx_ie_country {
struct wl12xx_ie_header header; struct wl12xx_ie_header header;
u8 country_string[COUNTRY_STRING_LEN]; u8 country_string[IEEE80211_COUNTRY_STRING_LEN];
struct country_triplet triplets[MAX_COUNTRY_TRIPLETS]; struct country_triplet triplets[MAX_COUNTRY_TRIPLETS];
} __packed; } __packed;
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
/* This really should be 8, but not for our firmware */ /* This really should be 8, but not for our firmware */
#define MAX_SUPPORTED_RATES 32 #define MAX_SUPPORTED_RATES 32
#define COUNTRY_STRING_LEN 3
#define MAX_COUNTRY_TRIPLETS 32 #define MAX_COUNTRY_TRIPLETS 32
/* Headers */ /* Headers */
...@@ -99,7 +98,7 @@ struct country_triplet { ...@@ -99,7 +98,7 @@ struct country_triplet {
struct wl12xx_ie_country { struct wl12xx_ie_country {
struct wl12xx_ie_header header; struct wl12xx_ie_header header;
u8 country_string[COUNTRY_STRING_LEN]; u8 country_string[IEEE80211_COUNTRY_STRING_LEN];
struct country_triplet triplets[MAX_COUNTRY_TRIPLETS]; struct country_triplet triplets[MAX_COUNTRY_TRIPLETS];
} __packed; } __packed;
......
...@@ -1325,6 +1325,9 @@ enum { ...@@ -1325,6 +1325,9 @@ enum {
/* Although the spec says 8 I'm seeing 6 in practice */ /* Although the spec says 8 I'm seeing 6 in practice */
#define IEEE80211_COUNTRY_IE_MIN_LEN 6 #define IEEE80211_COUNTRY_IE_MIN_LEN 6
/* The Country String field of the element shall be 3 octets in length */
#define IEEE80211_COUNTRY_STRING_LEN 3
/* /*
* For regulatory extension stuff see IEEE 802.11-2007 * For regulatory extension stuff see IEEE 802.11-2007
* Annex I (page 1141) and Annex J (page 1147). Also * Annex I (page 1141) and Annex J (page 1147). Also
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment