aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c7
-rw-r--r--include/net/mac80211.h11
-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
7 files changed, 4 insertions, 69 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index ce3141f07f35..ad186e134dec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2957,13 +2957,6 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
2957 return rc; 2957 return rc;
2958 } 2958 }
2959 2959
2960 if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
2961 (!conf->ssid_len)) {
2962 IWL_DEBUG_MAC80211
2963 ("Leaving in AP mode because HostAPD is not ready.\n");
2964 return 0;
2965 }
2966
2967 if (!iwl_is_alive(priv)) 2960 if (!iwl_is_alive(priv))
2968 return -EAGAIN; 2961 return -EAGAIN;
2969 2962
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 0c2d778a9ff7..47881be9ba44 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6743,13 +6743,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6743 6743
6744 /* XXX: this MUST use conf->mac_addr */ 6744 /* XXX: this MUST use conf->mac_addr */
6745 6745
6746 if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
6747 (!conf->ssid_len)) {
6748 IWL_DEBUG_MAC80211
6749 ("Leaving in AP mode because HostAPD is not ready.\n");
6750 return 0;
6751 }
6752
6753 if (!iwl3945_is_alive(priv)) 6746 if (!iwl3945_is_alive(priv))
6754 return -EAGAIN; 6747 return -EAGAIN;
6755 6748
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 0b983bed3829..af2ec6f9beb9 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -616,14 +616,12 @@ struct ieee80211_if_init_conf {
616 * enum ieee80211_if_conf_change - interface config change flags 616 * enum ieee80211_if_conf_change - interface config change flags
617 * 617 *
618 * @IEEE80211_IFCC_BSSID: The BSSID changed. 618 * @IEEE80211_IFCC_BSSID: The BSSID changed.
619 * @IEEE80211_IFCC_SSID: The SSID changed.
620 * @IEEE80211_IFCC_BEACON: The beacon for this interface changed 619 * @IEEE80211_IFCC_BEACON: The beacon for this interface changed
621 * (currently AP and MESH only), use ieee80211_beacon_get(). 620 * (currently AP and MESH only), use ieee80211_beacon_get().
622 */ 621 */
623enum ieee80211_if_conf_change { 622enum ieee80211_if_conf_change {
624 IEEE80211_IFCC_BSSID = BIT(0), 623 IEEE80211_IFCC_BSSID = BIT(0),
625 IEEE80211_IFCC_SSID = BIT(1), 624 IEEE80211_IFCC_BEACON = BIT(1),
626 IEEE80211_IFCC_BEACON = BIT(2),
627}; 625};
628 626
629/** 627/**
@@ -631,11 +629,6 @@ enum ieee80211_if_conf_change {
631 * 629 *
632 * @changed: parameters that have changed, see &enum ieee80211_if_conf_change. 630 * @changed: parameters that have changed, see &enum ieee80211_if_conf_change.
633 * @bssid: BSSID of the network we are associated to/creating. 631 * @bssid: BSSID of the network we are associated to/creating.
634 * @ssid: used (together with @ssid_len) by drivers for hardware that
635 * generate beacons independently. The pointer is valid only during the
636 * config_interface() call, so copy the value somewhere if you need
637 * it.
638 * @ssid_len: length of the @ssid field.
639 * 632 *
640 * This structure is passed to the config_interface() callback of 633 * This structure is passed to the config_interface() callback of
641 * &struct ieee80211_hw. 634 * &struct ieee80211_hw.
@@ -643,8 +636,6 @@ enum ieee80211_if_conf_change {
643struct ieee80211_if_conf { 636struct ieee80211_if_conf {
644 u32 changed; 637 u32 changed;
645 u8 *bssid; 638 u8 *bssid;
646 u8 *ssid;
647 size_t ssid_len;
648}; 639};
649 640
650/** 641/**
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