aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-01 01:59:15 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-01 01:59:15 -0500
commit75e47b36004d136edff68295420424cba3a5ccd0 (patch)
tree363c2bc1f8b5185b37f05106fec4ba2a07134182 /net
parent68727fed5469100bec0764207d7efb7a9ecdee29 (diff)
parent07981aa43f6aec32b875f360755ed3d14f9d5139 (diff)
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r--net/ieee80211/ieee80211_geo.c9
-rw-r--r--net/ieee80211/ieee80211_module.c2
-rw-r--r--net/ieee80211/ieee80211_wx.c32
3 files changed, 17 insertions, 26 deletions
diff --git a/net/ieee80211/ieee80211_geo.c b/net/ieee80211/ieee80211_geo.c
index 3027153940fc..192243ab35ed 100644
--- a/net/ieee80211/ieee80211_geo.c
+++ b/net/ieee80211/ieee80211_geo.c
@@ -50,7 +50,8 @@ int ieee80211_is_valid_channel(struct ieee80211_device *ieee, u8 channel)
50 50
51 /* Driver needs to initialize the geography map before using 51 /* Driver needs to initialize the geography map before using
52 * these helper functions */ 52 * these helper functions */
53 BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0); 53 if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
54 return 0;
54 55
55 if (ieee->freq_band & IEEE80211_24GHZ_BAND) 56 if (ieee->freq_band & IEEE80211_24GHZ_BAND)
56 for (i = 0; i < ieee->geo.bg_channels; i++) 57 for (i = 0; i < ieee->geo.bg_channels; i++)
@@ -78,7 +79,8 @@ int ieee80211_channel_to_index(struct ieee80211_device *ieee, u8 channel)
78 79
79 /* Driver needs to initialize the geography map before using 80 /* Driver needs to initialize the geography map before using
80 * these helper functions */ 81 * these helper functions */
81 BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0); 82 if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
83 return -1;
82 84
83 if (ieee->freq_band & IEEE80211_24GHZ_BAND) 85 if (ieee->freq_band & IEEE80211_24GHZ_BAND)
84 for (i = 0; i < ieee->geo.bg_channels; i++) 86 for (i = 0; i < ieee->geo.bg_channels; i++)
@@ -99,7 +101,8 @@ u8 ieee80211_freq_to_channel(struct ieee80211_device * ieee, u32 freq)
99 101
100 /* Driver needs to initialize the geography map before using 102 /* Driver needs to initialize the geography map before using
101 * these helper functions */ 103 * these helper functions */
102 BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0); 104 if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
105 return 0;
103 106
104 freq /= 100000; 107 freq /= 100000;
105 108
diff --git a/net/ieee80211/ieee80211_module.c b/net/ieee80211/ieee80211_module.c
index 5f67c684afc2..2cb84d84f671 100644
--- a/net/ieee80211/ieee80211_module.c
+++ b/net/ieee80211/ieee80211_module.c
@@ -213,7 +213,7 @@ void free_ieee80211(struct net_device *dev)
213 213
214static int debug = 0; 214static int debug = 0;
215u32 ieee80211_debug_level = 0; 215u32 ieee80211_debug_level = 0;
216struct proc_dir_entry *ieee80211_proc = NULL; 216static struct proc_dir_entry *ieee80211_proc = NULL;
217 217
218static int show_debug_level(char *page, char **start, off_t offset, 218static int show_debug_level(char *page, char **start, off_t offset,
219 int count, int *eof, void *data) 219 int count, int *eof, void *data)
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index e8c55a4d5834..af7f9bbfd18a 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -193,33 +193,21 @@ static char *ipw2100_translate_scan(struct ieee80211_device *ieee,
193 if (iwe.u.data.length) 193 if (iwe.u.data.length)
194 start = iwe_stream_add_point(start, stop, &iwe, custom); 194 start = iwe_stream_add_point(start, stop, &iwe, custom);
195 195
196 memset(&iwe, 0, sizeof(iwe));
196 if (network->wpa_ie_len) { 197 if (network->wpa_ie_len) {
197 char buf[MAX_WPA_IE_LEN * 2 + 30]; 198 char buf[MAX_WPA_IE_LEN];
198 199 memcpy(buf, network->wpa_ie, network->wpa_ie_len);
199 u8 *p = buf; 200 iwe.cmd = IWEVGENIE;
200 p += sprintf(p, "wpa_ie="); 201 iwe.u.data.length = network->wpa_ie_len;
201 for (i = 0; i < network->wpa_ie_len; i++) {
202 p += sprintf(p, "%02x", network->wpa_ie[i]);
203 }
204
205 memset(&iwe, 0, sizeof(iwe));
206 iwe.cmd = IWEVCUSTOM;
207 iwe.u.data.length = strlen(buf);
208 start = iwe_stream_add_point(start, stop, &iwe, buf); 202 start = iwe_stream_add_point(start, stop, &iwe, buf);
209 } 203 }
210 204
205 memset(&iwe, 0, sizeof(iwe));
211 if (network->rsn_ie_len) { 206 if (network->rsn_ie_len) {
212 char buf[MAX_WPA_IE_LEN * 2 + 30]; 207 char buf[MAX_WPA_IE_LEN];
213 208 memcpy(buf, network->rsn_ie, network->rsn_ie_len);
214 u8 *p = buf; 209 iwe.cmd = IWEVGENIE;
215 p += sprintf(p, "rsn_ie="); 210 iwe.u.data.length = network->rsn_ie_len;
216 for (i = 0; i < network->rsn_ie_len; i++) {
217 p += sprintf(p, "%02x", network->rsn_ie[i]);
218 }
219
220 memset(&iwe, 0, sizeof(iwe));
221 iwe.cmd = IWEVCUSTOM;
222 iwe.u.data.length = strlen(buf);
223 start = iwe_stream_add_point(start, stop, &iwe, buf); 211 start = iwe_stream_add_point(start, stop, &iwe, buf);
224 } 212 }
225 213