ieee80211: add IEEE80211_COUNTRY_STRING_LEN definition
authorBing Zhao <bzhao@marvell.com>
Mon, 7 Mar 2011 19:14:23 +0000 (11:14 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 Mar 2011 21:10:56 +0000 (16:10 -0500)
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>
drivers/net/wireless/at76c50x-usb.h
drivers/net/wireless/ipw2x00/ipw2200.h
drivers/net/wireless/libertas/host.h
drivers/net/wireless/wl1251/wl12xx_80211.h
drivers/net/wireless/wl12xx/wl12xx_80211.h
include/linux/ieee80211.h

index 4a37447dfc01e14e4a97210c9c0500b4a31dad16..f14a65473fe8466062bf70a156dd620038787fb5 100644 (file)
@@ -290,7 +290,7 @@ struct mib_mac_mgmt {
        u8 res;
        u8 multi_domain_capability_implemented;
        u8 multi_domain_capability_enabled;
-       u8 country_string[3];
+       u8 country_string[IEEE80211_COUNTRY_STRING_LEN];
        u8 reserved[3];
 } __packed;
 
index d7d049c7a4fa93ae3be77d11632bda0a4c4863ac..d9e1d9bad5814039c9e8e8359069575dd48ecda7 100644 (file)
@@ -961,7 +961,7 @@ struct ipw_country_channel_info {
 struct ipw_country_info {
        u8 id;
        u8 length;
-       u8 country_str[3];
+       u8 country_str[IEEE80211_COUNTRY_STRING_LEN];
        struct ipw_country_channel_info groups[7];
 } __packed;
 
index 5eac1351a02133e692074895bdb625aa28e28212..6cb6935ee4a395e4eedc89183392b71f80fd3966 100644 (file)
@@ -387,7 +387,7 @@ struct lbs_offset_value {
 struct mrvl_ie_domain_param_set {
        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];
 } __packed;
 
index 1846280272139ec110e5089d84f70a95b60ffd8b..1417b1445c3d0cbe3435583e082c644a276846db 100644 (file)
@@ -54,7 +54,6 @@
 
 /* This really should be 8, but not for our firmware */
 #define MAX_SUPPORTED_RATES 32
-#define COUNTRY_STRING_LEN 3
 #define MAX_COUNTRY_TRIPLETS 32
 
 /* Headers */
@@ -98,7 +97,7 @@ struct country_triplet {
 
 struct wl12xx_ie_country {
        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];
 } __packed;
 
index 67dcf8f28cd3fee77924366b0f49dc920f6cee03..18fe542360f22e5945243d6f52bb95b8917ed2c7 100644 (file)
@@ -55,7 +55,6 @@
 
 /* This really should be 8, but not for our firmware */
 #define MAX_SUPPORTED_RATES 32
-#define COUNTRY_STRING_LEN 3
 #define MAX_COUNTRY_TRIPLETS 32
 
 /* Headers */
@@ -99,7 +98,7 @@ struct country_triplet {
 
 struct wl12xx_ie_country {
        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];
 } __packed;
 
index 294169e31364727edd70f699c821c0430d612649..2d1c6117d92c9adf7daf205bffe93ff6e47bb4a6 100644 (file)
@@ -1325,6 +1325,9 @@ enum {
 /* Although the spec says 8 I'm seeing 6 in practice */
 #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
  * Annex I (page 1141) and Annex J (page 1147). Also
This page took 0.034677 seconds and 5 git commands to generate.