aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2009-10-22 09:30:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:36 -0400
commit243e84e91ed810f7dca5ba1c2d1a611811948566 (patch)
treee9c4a62a7ed787f3d509e00954a48b85c6ef75c1 /drivers
parentf4228b4c2e5864ee9d2051176beb2bd5a49a15cc (diff)
libertas: change IW_ESSID_MAX_SIZE -> IEEE80211_MAX_SSID_LEN
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/assoc.c10
-rw-r--r--drivers/net/wireless/libertas/cmd.c2
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c2
-rw-r--r--drivers/net/wireless/libertas/dev.h10
-rw-r--r--drivers/net/wireless/libertas/host.h4
-rw-r--r--drivers/net/wireless/libertas/persistcfg.c8
-rw-r--r--drivers/net/wireless/libertas/scan.c6
-rw-r--r--drivers/net/wireless/libertas/types.h4
-rw-r--r--drivers/net/wireless/libertas/wext.c8
9 files changed, 27 insertions, 27 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index f7161b5e070a..5a280ebadba4 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -226,7 +226,7 @@ static int lbs_assoc_post(struct lbs_private *priv,
226 priv->connect_status = LBS_CONNECTED; 226 priv->connect_status = LBS_CONNECTED;
227 227
228 /* Update current SSID and BSSID */ 228 /* Update current SSID and BSSID */
229 memcpy(&priv->curbssparams.ssid, &bss->ssid, IW_ESSID_MAX_SIZE); 229 memcpy(&priv->curbssparams.ssid, &bss->ssid, IEEE80211_MAX_SSID_LEN);
230 priv->curbssparams.ssid_len = bss->ssid_len; 230 priv->curbssparams.ssid_len = bss->ssid_len;
231 memcpy(priv->curbssparams.bssid, bss->bssid, ETH_ALEN); 231 memcpy(priv->curbssparams.bssid, bss->bssid, ETH_ALEN);
232 232
@@ -467,7 +467,7 @@ static int lbs_adhoc_post(struct lbs_private *priv,
467 memcpy(&priv->curbssparams.bssid, bss->bssid, ETH_ALEN); 467 memcpy(&priv->curbssparams.bssid, bss->bssid, ETH_ALEN);
468 468
469 /* Set the new SSID to current SSID */ 469 /* Set the new SSID to current SSID */
470 memcpy(&priv->curbssparams.ssid, &bss->ssid, IW_ESSID_MAX_SIZE); 470 memcpy(&priv->curbssparams.ssid, &bss->ssid, IEEE80211_MAX_SSID_LEN);
471 priv->curbssparams.ssid_len = bss->ssid_len; 471 priv->curbssparams.ssid_len = bss->ssid_len;
472 472
473 netif_carrier_on(priv->dev); 473 netif_carrier_on(priv->dev);
@@ -1083,7 +1083,7 @@ static int assoc_helper_essid(struct lbs_private *priv,
1083 /* else send START command */ 1083 /* else send START command */
1084 lbs_deb_assoc("SSID not found, creating adhoc network\n"); 1084 lbs_deb_assoc("SSID not found, creating adhoc network\n");
1085 memcpy(&assoc_req->bss.ssid, &assoc_req->ssid, 1085 memcpy(&assoc_req->bss.ssid, &assoc_req->ssid,
1086 IW_ESSID_MAX_SIZE); 1086 IEEE80211_MAX_SSID_LEN);
1087 assoc_req->bss.ssid_len = assoc_req->ssid_len; 1087 assoc_req->bss.ssid_len = assoc_req->ssid_len;
1088 lbs_adhoc_start(priv, assoc_req); 1088 lbs_adhoc_start(priv, assoc_req);
1089 } 1089 }
@@ -1541,7 +1541,7 @@ static int lbs_find_best_network_ssid(struct lbs_private *priv,
1541 1541
1542 found = lbs_find_best_ssid_in_list(priv, preferred_mode); 1542 found = lbs_find_best_ssid_in_list(priv, preferred_mode);
1543 if (found && (found->ssid_len > 0)) { 1543 if (found && (found->ssid_len > 0)) {
1544 memcpy(out_ssid, &found->ssid, IW_ESSID_MAX_SIZE); 1544 memcpy(out_ssid, &found->ssid, IEEE80211_MAX_SSID_LEN);
1545 *out_ssid_len = found->ssid_len; 1545 *out_ssid_len = found->ssid_len;
1546 *out_mode = found->mode; 1546 *out_mode = found->mode;
1547 ret = 0; 1547 ret = 0;
@@ -1759,7 +1759,7 @@ struct assoc_request *lbs_get_association_request(struct lbs_private *priv)
1759 assoc_req = priv->pending_assoc_req; 1759 assoc_req = priv->pending_assoc_req;
1760 if (!test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) { 1760 if (!test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
1761 memcpy(&assoc_req->ssid, &priv->curbssparams.ssid, 1761 memcpy(&assoc_req->ssid, &priv->curbssparams.ssid,
1762 IW_ESSID_MAX_SIZE); 1762 IEEE80211_MAX_SSID_LEN);
1763 assoc_req->ssid_len = priv->curbssparams.ssid_len; 1763 assoc_req->ssid_len = priv->curbssparams.ssid_len;
1764 } 1764 }
1765 1765
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 4729895c6d0c..dd4f98231352 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1167,7 +1167,7 @@ int lbs_mesh_config(struct lbs_private *priv, uint16_t action, uint16_t chan)
1167 ie->val.mesh_id_len = priv->mesh_ssid_len; 1167 ie->val.mesh_id_len = priv->mesh_ssid_len;
1168 memcpy(ie->val.mesh_id, priv->mesh_ssid, priv->mesh_ssid_len); 1168 memcpy(ie->val.mesh_id, priv->mesh_ssid, priv->mesh_ssid_len);
1169 ie->len = sizeof(struct mrvl_meshie_val) - 1169 ie->len = sizeof(struct mrvl_meshie_val) -
1170 IW_ESSID_MAX_SIZE + priv->mesh_ssid_len; 1170 IEEE80211_MAX_SSID_LEN + priv->mesh_ssid_len;
1171 cmd.length = cpu_to_le16(sizeof(struct mrvl_meshie_val)); 1171 cmd.length = cpu_to_le16(sizeof(struct mrvl_meshie_val));
1172 break; 1172 break;
1173 case CMD_ACT_MESH_CONFIG_STOP: 1173 case CMD_ACT_MESH_CONFIG_STOP:
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 384fc6187d85..6e2103885959 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -68,7 +68,7 @@ void lbs_mac_event_disconnected(struct lbs_private *priv)
68 * no longer valid. 68 * no longer valid.
69 */ 69 */
70 memset(&priv->curbssparams.bssid, 0, ETH_ALEN); 70 memset(&priv->curbssparams.bssid, 0, ETH_ALEN);
71 memset(&priv->curbssparams.ssid, 0, IW_ESSID_MAX_SIZE); 71 memset(&priv->curbssparams.ssid, 0, IEEE80211_MAX_SSID_LEN);
72 priv->curbssparams.ssid_len = 0; 72 priv->curbssparams.ssid_len = 0;
73 73
74 if (priv->psstate != PS_STATE_FULL_POWER) { 74 if (priv->psstate != PS_STATE_FULL_POWER) {
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 52b5ca1cd57e..50b457706bad 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -65,7 +65,7 @@ struct current_bss_params {
65 /** bssid */ 65 /** bssid */
66 u8 bssid[ETH_ALEN]; 66 u8 bssid[ETH_ALEN];
67 /** ssid */ 67 /** ssid */
68 u8 ssid[IW_ESSID_MAX_SIZE + 1]; 68 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
69 u8 ssid_len; 69 u8 ssid_len;
70 70
71 /** band */ 71 /** band */
@@ -163,7 +163,7 @@ struct lbs_private {
163 struct work_struct sync_channel; 163 struct work_struct sync_channel;
164 /* remember which channel was scanned last, != 0 if currently scanning */ 164 /* remember which channel was scanned last, != 0 if currently scanning */
165 int scan_channel; 165 int scan_channel;
166 u8 scan_ssid[IW_ESSID_MAX_SIZE + 1]; 166 u8 scan_ssid[IEEE80211_MAX_SSID_LEN + 1];
167 u8 scan_ssid_len; 167 u8 scan_ssid_len;
168 168
169 /** Hardware access */ 169 /** Hardware access */
@@ -230,7 +230,7 @@ struct lbs_private {
230 struct current_bss_params curbssparams; 230 struct current_bss_params curbssparams;
231 231
232 uint16_t mesh_tlv; 232 uint16_t mesh_tlv;
233 u8 mesh_ssid[IW_ESSID_MAX_SIZE + 1]; 233 u8 mesh_ssid[IEEE80211_MAX_SSID_LEN + 1];
234 u8 mesh_ssid_len; 234 u8 mesh_ssid_len;
235 235
236 /* IW_MODE_* */ 236 /* IW_MODE_* */
@@ -340,7 +340,7 @@ extern struct cmd_confirm_sleep confirm_sleep;
340struct bss_descriptor { 340struct bss_descriptor {
341 u8 bssid[ETH_ALEN]; 341 u8 bssid[ETH_ALEN];
342 342
343 u8 ssid[IW_ESSID_MAX_SIZE + 1]; 343 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
344 u8 ssid_len; 344 u8 ssid_len;
345 345
346 u16 capability; 346 u16 capability;
@@ -389,7 +389,7 @@ struct assoc_request {
389#define ASSOC_FLAG_WPA_IE 11 389#define ASSOC_FLAG_WPA_IE 11
390 unsigned long flags; 390 unsigned long flags;
391 391
392 u8 ssid[IW_ESSID_MAX_SIZE + 1]; 392 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
393 u8 ssid_len; 393 u8 ssid_len;
394 u8 channel; 394 u8 channel;
395 u8 band; 395 u8 band;
diff --git a/drivers/net/wireless/libertas/host.h b/drivers/net/wireless/libertas/host.h
index d2a8d04d2b45..d4b875445f59 100644
--- a/drivers/net/wireless/libertas/host.h
+++ b/drivers/net/wireless/libertas/host.h
@@ -719,7 +719,7 @@ struct cmd_ds_802_11_rate_adapt_rateset {
719struct cmd_ds_802_11_ad_hoc_start { 719struct cmd_ds_802_11_ad_hoc_start {
720 struct cmd_header hdr; 720 struct cmd_header hdr;
721 721
722 u8 ssid[IW_ESSID_MAX_SIZE]; 722 u8 ssid[IEEE80211_MAX_SSID_LEN];
723 u8 bsstype; 723 u8 bsstype;
724 __le16 beaconperiod; 724 __le16 beaconperiod;
725 u8 dtimperiod; /* Reserved on v9 and later */ 725 u8 dtimperiod; /* Reserved on v9 and later */
@@ -742,7 +742,7 @@ struct cmd_ds_802_11_ad_hoc_result {
742 742
743struct adhoc_bssdesc { 743struct adhoc_bssdesc {
744 u8 bssid[ETH_ALEN]; 744 u8 bssid[ETH_ALEN];
745 u8 ssid[IW_ESSID_MAX_SIZE]; 745 u8 ssid[IEEE80211_MAX_SSID_LEN];
746 u8 type; 746 u8 type;
747 __le16 beaconperiod; 747 __le16 beaconperiod;
748 u8 dtimperiod; 748 u8 dtimperiod;
diff --git a/drivers/net/wireless/libertas/persistcfg.c b/drivers/net/wireless/libertas/persistcfg.c
index 18fe29faf99b..871f914a75fc 100644
--- a/drivers/net/wireless/libertas/persistcfg.c
+++ b/drivers/net/wireless/libertas/persistcfg.c
@@ -187,9 +187,9 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr,
187 if (ret) 187 if (ret)
188 return ret; 188 return ret;
189 189
190 if (defs.meshie.val.mesh_id_len > IW_ESSID_MAX_SIZE) { 190 if (defs.meshie.val.mesh_id_len > IEEE80211_MAX_SSID_LEN) {
191 lbs_pr_err("inconsistent mesh ID length"); 191 lbs_pr_err("inconsistent mesh ID length");
192 defs.meshie.val.mesh_id_len = IW_ESSID_MAX_SIZE; 192 defs.meshie.val.mesh_id_len = IEEE80211_MAX_SSID_LEN;
193 } 193 }
194 194
195 /* SSID not null terminated: reserve room for \0 + \n */ 195 /* SSID not null terminated: reserve room for \0 + \n */
@@ -214,7 +214,7 @@ static ssize_t mesh_id_set(struct device *dev, struct device_attribute *attr,
214 int len; 214 int len;
215 int ret; 215 int ret;
216 216
217 if (count < 2 || count > IW_ESSID_MAX_SIZE + 1) 217 if (count < 2 || count > IEEE80211_MAX_SSID_LEN + 1)
218 return -EINVAL; 218 return -EINVAL;
219 219
220 memset(&cmd, 0, sizeof(struct cmd_ds_mesh_config)); 220 memset(&cmd, 0, sizeof(struct cmd_ds_mesh_config));
@@ -233,7 +233,7 @@ static ssize_t mesh_id_set(struct device *dev, struct device_attribute *attr,
233 /* SSID len */ 233 /* SSID len */
234 ie->val.mesh_id_len = len; 234 ie->val.mesh_id_len = len;
235 /* IE len */ 235 /* IE len */
236 ie->len = sizeof(struct mrvl_meshie_val) - IW_ESSID_MAX_SIZE + len; 236 ie->len = sizeof(struct mrvl_meshie_val) - IEEE80211_MAX_SSID_LEN + len;
237 237
238 ret = lbs_mesh_config_send(priv, &cmd, CMD_ACT_MESH_CONFIG_SET, 238 ret = lbs_mesh_config_send(priv, &cmd, CMD_ACT_MESH_CONFIG_SET,
239 CMD_TYPE_MESH_SET_MESH_IE); 239 CMD_TYPE_MESH_SET_MESH_IE);
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 64b404783f44..2700f4b455e3 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -19,11 +19,11 @@
19 19
20//! Approximate amount of data needed to pass a scan result back to iwlist 20//! Approximate amount of data needed to pass a scan result back to iwlist
21#define MAX_SCAN_CELL_SIZE (IW_EV_ADDR_LEN \ 21#define MAX_SCAN_CELL_SIZE (IW_EV_ADDR_LEN \
22 + IW_ESSID_MAX_SIZE \ 22 + IEEE80211_MAX_SSID_LEN \
23 + IW_EV_UINT_LEN \ 23 + IW_EV_UINT_LEN \
24 + IW_EV_FREQ_LEN \ 24 + IW_EV_FREQ_LEN \
25 + IW_EV_QUAL_LEN \ 25 + IW_EV_QUAL_LEN \
26 + IW_ESSID_MAX_SIZE \ 26 + IEEE80211_MAX_SSID_LEN \
27 + IW_EV_PARAM_LEN \ 27 + IW_EV_PARAM_LEN \
28 + 40) /* 40 for WPAIE */ 28 + 40) /* 40 for WPAIE */
29 29
@@ -775,7 +775,7 @@ static inline char *lbs_translate_scan(struct lbs_private *priv,
775 /* SSID */ 775 /* SSID */
776 iwe.cmd = SIOCGIWESSID; 776 iwe.cmd = SIOCGIWESSID;
777 iwe.u.data.flags = 1; 777 iwe.u.data.flags = 1;
778 iwe.u.data.length = min((uint32_t) bss->ssid_len, (uint32_t) IW_ESSID_MAX_SIZE); 778 iwe.u.data.length = min((uint32_t) bss->ssid_len, (uint32_t) IEEE80211_MAX_SSID_LEN);
779 start = iwe_stream_add_point(info, start, stop, &iwe, bss->ssid); 779 start = iwe_stream_add_point(info, start, stop, &iwe, bss->ssid);
780 780
781 /* Mode */ 781 /* Mode */
diff --git a/drivers/net/wireless/libertas/types.h b/drivers/net/wireless/libertas/types.h
index 99905df65b25..3e72c86ceca8 100644
--- a/drivers/net/wireless/libertas/types.h
+++ b/drivers/net/wireless/libertas/types.h
@@ -5,8 +5,8 @@
5#define _LBS_TYPES_H_ 5#define _LBS_TYPES_H_
6 6
7#include <linux/if_ether.h> 7#include <linux/if_ether.h>
8#include <linux/ieee80211.h>
8#include <asm/byteorder.h> 9#include <asm/byteorder.h>
9#include <linux/wireless.h>
10 10
11struct ieee_ie_header { 11struct ieee_ie_header {
12 u8 id; 12 u8 id;
@@ -247,7 +247,7 @@ struct mrvl_meshie_val {
247 uint8_t active_metric_id; 247 uint8_t active_metric_id;
248 uint8_t mesh_capability; 248 uint8_t mesh_capability;
249 uint8_t mesh_id_len; 249 uint8_t mesh_id_len;
250 uint8_t mesh_id[IW_ESSID_MAX_SIZE]; 250 uint8_t mesh_id[IEEE80211_MAX_SSID_LEN];
251} __attribute__ ((packed)); 251} __attribute__ ((packed));
252 252
253struct mrvl_meshie { 253struct mrvl_meshie {
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index 82a932aef6f9..3e8be9a578e8 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -1989,7 +1989,7 @@ static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info,
1989{ 1989{
1990 struct lbs_private *priv = dev->ml_priv; 1990 struct lbs_private *priv = dev->ml_priv;
1991 int ret = 0; 1991 int ret = 0;
1992 u8 ssid[IW_ESSID_MAX_SIZE]; 1992 u8 ssid[IEEE80211_MAX_SSID_LEN];
1993 u8 ssid_len = 0; 1993 u8 ssid_len = 0;
1994 struct assoc_request * assoc_req; 1994 struct assoc_request * assoc_req;
1995 int in_ssid_len = dwrq->length; 1995 int in_ssid_len = dwrq->length;
@@ -2003,7 +2003,7 @@ static int lbs_set_essid(struct net_device *dev, struct iw_request_info *info,
2003 } 2003 }
2004 2004
2005 /* Check the size of the string */ 2005 /* Check the size of the string */
2006 if (in_ssid_len > IW_ESSID_MAX_SIZE) { 2006 if (in_ssid_len > IEEE80211_MAX_SSID_LEN) {
2007 ret = -E2BIG; 2007 ret = -E2BIG;
2008 goto out; 2008 goto out;
2009 } 2009 }
@@ -2034,7 +2034,7 @@ out:
2034 ret = -ENOMEM; 2034 ret = -ENOMEM;
2035 } else { 2035 } else {
2036 /* Copy the SSID to the association request */ 2036 /* Copy the SSID to the association request */
2037 memcpy(&assoc_req->ssid, &ssid, IW_ESSID_MAX_SIZE); 2037 memcpy(&assoc_req->ssid, &ssid, IEEE80211_MAX_SSID_LEN);
2038 assoc_req->ssid_len = ssid_len; 2038 assoc_req->ssid_len = ssid_len;
2039 set_bit(ASSOC_FLAG_SSID, &assoc_req->flags); 2039 set_bit(ASSOC_FLAG_SSID, &assoc_req->flags);
2040 lbs_postpone_association_work(priv); 2040 lbs_postpone_association_work(priv);
@@ -2085,7 +2085,7 @@ static int lbs_mesh_set_essid(struct net_device *dev,
2085 } 2085 }
2086 2086
2087 /* Check the size of the string */ 2087 /* Check the size of the string */
2088 if (dwrq->length > IW_ESSID_MAX_SIZE) { 2088 if (dwrq->length > IEEE80211_MAX_SSID_LEN) {
2089 ret = -E2BIG; 2089 ret = -E2BIG;
2090 goto out; 2090 goto out;
2091 } 2091 }