aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2008-09-30 17:17:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:48 -0400
commitc5d3dce875ef055ed9b14f169cc967cc2c8faf1f (patch)
tree778402be72b858ec6318c480cd19261079cd1f77 /net
parent7e272fcff6f0a32a3d46e600ea5895f6058f4e2d (diff)
wireless: remove NETWORK_EMPTY_ESSID flag
It is unnecessary and of questionable value. Also remove is_empty_ssid, as it is also unnecessary. Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/ieee80211/ieee80211_rx.c15
-rw-r--r--net/ieee80211/ieee80211_wx.c12
-rw-r--r--net/wireless/lib80211.c5
3 files changed, 5 insertions, 27 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 876a004918b0..f15f82e7bbfd 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -1146,12 +1146,6 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
1146 1146
1147 switch (info_element->id) { 1147 switch (info_element->id) {
1148 case MFIE_TYPE_SSID: 1148 case MFIE_TYPE_SSID:
1149 if (is_empty_ssid(info_element->data,
1150 info_element->len)) {
1151 network->flags |= NETWORK_EMPTY_ESSID;
1152 break;
1153 }
1154
1155 network->ssid_len = min(info_element->len, 1149 network->ssid_len = min(info_element->len,
1156 (u8) IW_ESSID_MAX_SIZE); 1150 (u8) IW_ESSID_MAX_SIZE);
1157 memcpy(network->ssid, info_element->data, 1151 memcpy(network->ssid, info_element->data,
@@ -1161,7 +1155,8 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
1161 IW_ESSID_MAX_SIZE - network->ssid_len); 1155 IW_ESSID_MAX_SIZE - network->ssid_len);
1162 1156
1163 IEEE80211_DEBUG_MGMT("MFIE_TYPE_SSID: '%s' len=%d.\n", 1157 IEEE80211_DEBUG_MGMT("MFIE_TYPE_SSID: '%s' len=%d.\n",
1164 network->ssid, network->ssid_len); 1158 escape_ssid(network->ssid),
1159 network->ssid_len);
1165 break; 1160 break;
1166 1161
1167 case MFIE_TYPE_RATES: 1162 case MFIE_TYPE_RATES:
@@ -1391,9 +1386,6 @@ static int ieee80211_handle_assoc_resp(struct ieee80211_device *ieee, struct iee
1391 network->mode |= IEEE_B; 1386 network->mode |= IEEE_B;
1392 } 1387 }
1393 1388
1394 if (is_empty_ssid(network->ssid, network->ssid_len))
1395 network->flags |= NETWORK_EMPTY_ESSID;
1396
1397 memcpy(&network->stats, stats, sizeof(network->stats)); 1389 memcpy(&network->stats, stats, sizeof(network->stats));
1398 1390
1399 if (ieee->handle_assoc_response != NULL) 1391 if (ieee->handle_assoc_response != NULL)
@@ -1463,9 +1455,6 @@ static int ieee80211_network_init(struct ieee80211_device *ieee, struct ieee8021
1463 return 1; 1455 return 1;
1464 } 1456 }
1465 1457
1466 if (is_empty_ssid(network->ssid, network->ssid_len))
1467 network->flags |= NETWORK_EMPTY_ESSID;
1468
1469 memcpy(&network->stats, stats, sizeof(network->stats)); 1458 memcpy(&network->stats, stats, sizeof(network->stats));
1470 1459
1471 return 0; 1460 return 0;
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index 3b031c2910ac..3025140ae721 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -65,15 +65,9 @@ static char *ieee80211_translate_scan(struct ieee80211_device *ieee,
65 /* Add the ESSID */ 65 /* Add the ESSID */
66 iwe.cmd = SIOCGIWESSID; 66 iwe.cmd = SIOCGIWESSID;
67 iwe.u.data.flags = 1; 67 iwe.u.data.flags = 1;
68 if (network->flags & NETWORK_EMPTY_ESSID) { 68 iwe.u.data.length = min(network->ssid_len, (u8) 32);
69 iwe.u.data.length = sizeof("<hidden>"); 69 start = iwe_stream_add_point(info, start, stop,
70 start = iwe_stream_add_point(info, start, stop, 70 &iwe, network->ssid);
71 &iwe, "<hidden>");
72 } else {
73 iwe.u.data.length = min(network->ssid_len, (u8) 32);
74 start = iwe_stream_add_point(info, start, stop,
75 &iwe, network->ssid);
76 }
77 71
78 /* Add the protocol name */ 72 /* Add the protocol name */
79 iwe.cmd = SIOCGIWNAME; 73 iwe.cmd = SIOCGIWNAME;
diff --git a/net/wireless/lib80211.c b/net/wireless/lib80211.c
index b22d271fb675..872cc8dc00a3 100644
--- a/net/wireless/lib80211.c
+++ b/net/wireless/lib80211.c
@@ -24,11 +24,6 @@ const char *escape_ssid(const char *ssid, u8 ssid_len)
24 const char *s = ssid; 24 const char *s = ssid;
25 char *d = escaped; 25 char *d = escaped;
26 26
27 if (is_empty_ssid(ssid, ssid_len)) {
28 memcpy(escaped, "<hidden>", sizeof("<hidden>"));
29 return escaped;
30 }
31
32 ssid_len = min_t(u8, ssid_len, IEEE80211_MAX_SSID_LEN); 27 ssid_len = min_t(u8, ssid_len, IEEE80211_MAX_SSID_LEN);
33 while (ssid_len--) { 28 while (ssid_len--) {
34 if (*s == '\0') { 29 if (*s == '\0') {