aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-28 20:09:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-11-10 15:11:56 -0500
commit41bb73eeac5ff5fb217257ba33b654747b3abf11 (patch)
tree766ebc2b0da42bb30abbc59ec9a2dd4e43f7a825 /net/mac80211
parentb23f99bcfa12c7b452f7ad201ea5921534d4e9ff (diff)
mac80211: remove SSID driver code
Remove the SSID from the driver API since now there is no driver that requires knowing the SSID and I think it's unlikely that any hardware design that does require the SSID will play well with mac80211. This also removes support for setting the SSID in master mode which will require a patch to hostapd to not try. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h3
-rw-r--r--net/mac80211/main.c15
-rw-r--r--net/mac80211/mlme.c14
-rw-r--r--net/mac80211/wext.c16
4 files changed, 3 insertions, 45 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 2c91108e3901..155a20410017 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -212,9 +212,6 @@ struct ieee80211_if_ap {
212 212
213 struct list_head vlans; 213 struct list_head vlans;
214 214
215 u8 ssid[IEEE80211_MAX_SSID_LEN];
216 size_t ssid_len;
217
218 /* yes, this looks ugly, but guarantees that we can later use 215 /* yes, this looks ugly, but guarantees that we can later use
219 * bitmap_empty :) 216 * bitmap_empty :)
220 * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */ 217 * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index fa0cc7a1e6b4..d631dc96c323 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -171,19 +171,13 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed)
171 conf.changed = changed; 171 conf.changed = changed;
172 172
173 if (sdata->vif.type == NL80211_IFTYPE_STATION || 173 if (sdata->vif.type == NL80211_IFTYPE_STATION ||
174 sdata->vif.type == NL80211_IFTYPE_ADHOC) { 174 sdata->vif.type == NL80211_IFTYPE_ADHOC)
175 conf.bssid = sdata->u.sta.bssid; 175 conf.bssid = sdata->u.sta.bssid;
176 conf.ssid = sdata->u.sta.ssid; 176 else if (sdata->vif.type == NL80211_IFTYPE_AP)
177 conf.ssid_len = sdata->u.sta.ssid_len;
178 } else if (sdata->vif.type == NL80211_IFTYPE_AP) {
179 conf.bssid = sdata->dev->dev_addr; 177 conf.bssid = sdata->dev->dev_addr;
180 conf.ssid = sdata->u.ap.ssid; 178 else if (ieee80211_vif_is_mesh(&sdata->vif)) {
181 conf.ssid_len = sdata->u.ap.ssid_len;
182 } else if (ieee80211_vif_is_mesh(&sdata->vif)) {
183 u8 zero[ETH_ALEN] = { 0 }; 179 u8 zero[ETH_ALEN] = { 0 };
184 conf.bssid = zero; 180 conf.bssid = zero;
185 conf.ssid = zero;
186 conf.ssid_len = 0;
187 } else { 181 } else {
188 WARN_ON(1); 182 WARN_ON(1);
189 return -EINVAL; 183 return -EINVAL;
@@ -192,9 +186,6 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed)
192 if (WARN_ON(!conf.bssid && (changed & IEEE80211_IFCC_BSSID))) 186 if (WARN_ON(!conf.bssid && (changed & IEEE80211_IFCC_BSSID)))
193 return -EINVAL; 187 return -EINVAL;
194 188
195 if (WARN_ON(!conf.ssid && (changed & IEEE80211_IFCC_SSID)))
196 return -EINVAL;
197
198 return local->ops->config_interface(local_to_hw(local), 189 return local->ops->config_interface(local_to_hw(local),
199 &sdata->vif, &conf); 190 &sdata->vif, &conf);
200} 191}
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 9e6c75abc922..708eb4502ed7 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2416,7 +2416,6 @@ void ieee80211_sta_req_auth(struct ieee80211_sub_if_data *sdata,
2416int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len) 2416int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len)
2417{ 2417{
2418 struct ieee80211_if_sta *ifsta; 2418 struct ieee80211_if_sta *ifsta;
2419 int res;
2420 2419
2421 if (len > IEEE80211_MAX_SSID_LEN) 2420 if (len > IEEE80211_MAX_SSID_LEN)
2422 return -EINVAL; 2421 return -EINVAL;
@@ -2428,19 +2427,6 @@ int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size
2428 memcpy(ifsta->ssid, ssid, len); 2427 memcpy(ifsta->ssid, ssid, len);
2429 ifsta->ssid_len = len; 2428 ifsta->ssid_len = len;
2430 ifsta->flags &= ~IEEE80211_STA_PREV_BSSID_SET; 2429 ifsta->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
2431
2432 res = 0;
2433 /*
2434 * Hack! MLME code needs to be cleaned up to have different
2435 * entry points for configuration and internal selection change
2436 */
2437 if (netif_running(sdata->dev))
2438 res = ieee80211_if_config(sdata, IEEE80211_IFCC_SSID);
2439 if (res) {
2440 printk(KERN_DEBUG "%s: Failed to config new SSID to "
2441 "the low-level driver\n", sdata->dev->name);
2442 return res;
2443 }
2444 } 2430 }
2445 2431
2446 if (len) 2432 if (len)
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 231cab57351f..63f36e9d1af8 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -407,13 +407,6 @@ static int ieee80211_ioctl_siwessid(struct net_device *dev,
407 return 0; 407 return 0;
408 } 408 }
409 409
410 if (sdata->vif.type == NL80211_IFTYPE_AP) {
411 memcpy(sdata->u.ap.ssid, ssid, len);
412 memset(sdata->u.ap.ssid + len, 0,
413 IEEE80211_MAX_SSID_LEN - len);
414 sdata->u.ap.ssid_len = len;
415 return ieee80211_if_config(sdata, IEEE80211_IFCC_SSID);
416 }
417 return -EOPNOTSUPP; 410 return -EOPNOTSUPP;
418} 411}
419 412
@@ -437,15 +430,6 @@ static int ieee80211_ioctl_giwessid(struct net_device *dev,
437 return res; 430 return res;
438 } 431 }
439 432
440 if (sdata->vif.type == NL80211_IFTYPE_AP) {
441 len = sdata->u.ap.ssid_len;
442 if (len > IW_ESSID_MAX_SIZE)
443 len = IW_ESSID_MAX_SIZE;
444 memcpy(ssid, sdata->u.ap.ssid, len);
445 data->length = len;
446 data->flags = 1;
447 return 0;
448 }
449 return -EOPNOTSUPP; 433 return -EOPNOTSUPP;
450} 434}
451 435