aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/ieee80211_i.h9
-rw-r--r--net/mac80211/iface.c3
-rw-r--r--net/mac80211/mlme.c3
-rw-r--r--net/mac80211/rx.c13
-rw-r--r--net/mac80211/wext.c17
5 files changed, 11 insertions, 34 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index f69e84ab9617..564167fbb9aa 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -247,8 +247,9 @@ struct mesh_preq_queue {
247#define IEEE80211_STA_ASSOCIATED BIT(4) 247#define IEEE80211_STA_ASSOCIATED BIT(4)
248#define IEEE80211_STA_PROBEREQ_POLL BIT(5) 248#define IEEE80211_STA_PROBEREQ_POLL BIT(5)
249#define IEEE80211_STA_CREATE_IBSS BIT(6) 249#define IEEE80211_STA_CREATE_IBSS BIT(6)
250#define IEEE80211_STA_MIXED_CELL BIT(7) 250/* hole at 7, please re-use */
251#define IEEE80211_STA_WMM_ENABLED BIT(8) 251#define IEEE80211_STA_WMM_ENABLED BIT(8)
252/* hole at 9, please re-use */
252#define IEEE80211_STA_AUTO_SSID_SEL BIT(10) 253#define IEEE80211_STA_AUTO_SSID_SEL BIT(10)
253#define IEEE80211_STA_AUTO_BSSID_SEL BIT(11) 254#define IEEE80211_STA_AUTO_BSSID_SEL BIT(11)
254#define IEEE80211_STA_AUTO_CHANNEL_SEL BIT(12) 255#define IEEE80211_STA_AUTO_CHANNEL_SEL BIT(12)
@@ -411,7 +412,6 @@ struct ieee80211_if_mesh {
411 * 412 *
412 * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets 413 * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets
413 * @IEEE80211_SDATA_PROMISC: interface is promisc 414 * @IEEE80211_SDATA_PROMISC: interface is promisc
414 * @IEEE80211_SDATA_USERSPACE_MLME: userspace MLME is active
415 * @IEEE80211_SDATA_OPERATING_GMODE: operating in G-only mode 415 * @IEEE80211_SDATA_OPERATING_GMODE: operating in G-only mode
416 * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between 416 * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between
417 * associated stations and deliver multicast frames both 417 * associated stations and deliver multicast frames both
@@ -420,9 +420,8 @@ struct ieee80211_if_mesh {
420enum ieee80211_sub_if_data_flags { 420enum ieee80211_sub_if_data_flags {
421 IEEE80211_SDATA_ALLMULTI = BIT(0), 421 IEEE80211_SDATA_ALLMULTI = BIT(0),
422 IEEE80211_SDATA_PROMISC = BIT(1), 422 IEEE80211_SDATA_PROMISC = BIT(1),
423 IEEE80211_SDATA_USERSPACE_MLME = BIT(2), 423 IEEE80211_SDATA_OPERATING_GMODE = BIT(2),
424 IEEE80211_SDATA_OPERATING_GMODE = BIT(3), 424 IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(3),
425 IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(4),
426}; 425};
427 426
428struct ieee80211_sub_if_data { 427struct ieee80211_sub_if_data {
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 34f4798a98f7..dd2a276fa8ca 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -261,8 +261,7 @@ static int ieee80211_open(struct net_device *dev)
261 ieee80211_bss_info_change_notify(sdata, changed); 261 ieee80211_bss_info_change_notify(sdata, changed);
262 ieee80211_enable_keys(sdata); 262 ieee80211_enable_keys(sdata);
263 263
264 if (sdata->vif.type == NL80211_IFTYPE_STATION && 264 if (sdata->vif.type == NL80211_IFTYPE_STATION)
265 !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME))
266 netif_carrier_off(dev); 265 netif_carrier_off(dev);
267 else 266 else
268 netif_carrier_on(dev); 267 netif_carrier_on(dev);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b0808efcedf6..c05be09b9c6f 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -849,8 +849,7 @@ static int ieee80211_privacy_mismatch(struct ieee80211_sub_if_data *sdata)
849 int wep_privacy; 849 int wep_privacy;
850 int privacy_invoked; 850 int privacy_invoked;
851 851
852 if (!ifmgd || (ifmgd->flags & (IEEE80211_STA_MIXED_CELL | 852 if (!ifmgd || (ifmgd->flags & IEEE80211_STA_EXT_SME))
853 IEEE80211_STA_EXT_SME)))
854 return 0; 853 return 0;
855 854
856 bss = ieee80211_rx_bss_get(local, ifmgd->bssid, 855 bss = ieee80211_rx_bss_get(local, ifmgd->bssid,
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index fcc0a5995791..47d395a51923 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1877,18 +1877,13 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
1877 if (ieee80211_vif_is_mesh(&sdata->vif)) 1877 if (ieee80211_vif_is_mesh(&sdata->vif))
1878 return ieee80211_mesh_rx_mgmt(sdata, rx->skb, rx->status); 1878 return ieee80211_mesh_rx_mgmt(sdata, rx->skb, rx->status);
1879 1879
1880 if (sdata->vif.type != NL80211_IFTYPE_STATION && 1880 if (sdata->vif.type != NL80211_IFTYPE_ADHOC)
1881 sdata->vif.type != NL80211_IFTYPE_ADHOC) 1881 return ieee80211_ibss_rx_mgmt(sdata, rx->skb, rx->status);
1882 return RX_DROP_MONITOR;
1883
1884 1882
1885 if (sdata->vif.type == NL80211_IFTYPE_STATION) { 1883 if (sdata->vif.type == NL80211_IFTYPE_STATION)
1886 if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)
1887 return RX_DROP_MONITOR;
1888 return ieee80211_sta_rx_mgmt(sdata, rx->skb, rx->status); 1884 return ieee80211_sta_rx_mgmt(sdata, rx->skb, rx->status);
1889 }
1890 1885
1891 return ieee80211_ibss_rx_mgmt(sdata, rx->skb, rx->status); 1886 return RX_DROP_MONITOR;
1892} 1887}
1893 1888
1894static void ieee80211_rx_michael_mic_report(struct net_device *dev, 1889static void ieee80211_rx_michael_mic_report(struct net_device *dev,
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index ce21d66b1023..deb4ecec122a 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -129,9 +129,6 @@ static int ieee80211_ioctl_siwgenie(struct net_device *dev,
129 129
130 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 130 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
131 131
132 if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)
133 return -EOPNOTSUPP;
134
135 if (sdata->vif.type == NL80211_IFTYPE_STATION) { 132 if (sdata->vif.type == NL80211_IFTYPE_STATION) {
136 int ret = ieee80211_sta_set_extra_ie(sdata, extra, data->length); 133 int ret = ieee80211_sta_set_extra_ie(sdata, extra, data->length);
137 if (ret) 134 if (ret)
@@ -208,14 +205,6 @@ static int ieee80211_ioctl_siwessid(struct net_device *dev,
208 205
209 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 206 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
210 if (sdata->vif.type == NL80211_IFTYPE_STATION) { 207 if (sdata->vif.type == NL80211_IFTYPE_STATION) {
211 if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) {
212 if (len > IEEE80211_MAX_SSID_LEN)
213 return -EINVAL;
214 memcpy(sdata->u.mgd.ssid, ssid, len);
215 sdata->u.mgd.ssid_len = len;
216 return 0;
217 }
218
219 if (data->flags) 208 if (data->flags)
220 sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_SSID_SEL; 209 sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_SSID_SEL;
221 else 210 else
@@ -274,11 +263,7 @@ static int ieee80211_ioctl_siwap(struct net_device *dev,
274 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 263 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
275 if (sdata->vif.type == NL80211_IFTYPE_STATION) { 264 if (sdata->vif.type == NL80211_IFTYPE_STATION) {
276 int ret; 265 int ret;
277 if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) { 266
278 memcpy(sdata->u.mgd.bssid, (u8 *) &ap_addr->sa_data,
279 ETH_ALEN);
280 return 0;
281 }
282 if (is_zero_ether_addr((u8 *) &ap_addr->sa_data)) 267 if (is_zero_ether_addr((u8 *) &ap_addr->sa_data))
283 sdata->u.mgd.flags |= IEEE80211_STA_AUTO_BSSID_SEL | 268 sdata->u.mgd.flags |= IEEE80211_STA_AUTO_BSSID_SEL |
284 IEEE80211_STA_AUTO_CHANNEL_SEL; 269 IEEE80211_STA_AUTO_CHANNEL_SEL;