diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ieee80211.c | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 3 | ||||
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 12 | ||||
-rw-r--r-- | net/mac80211/rx.c | 2 |
4 files changed, 8 insertions, 11 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 804da5e89bbf..f484ca7ade9c 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -254,7 +254,7 @@ static int ieee80211_open(struct net_device *dev) | |||
254 | ieee80211_enable_keys(sdata); | 254 | ieee80211_enable_keys(sdata); |
255 | 255 | ||
256 | if (sdata->type == IEEE80211_IF_TYPE_STA && | 256 | if (sdata->type == IEEE80211_IF_TYPE_STA && |
257 | !local->user_space_mlme) | 257 | !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) |
258 | netif_carrier_off(dev); | 258 | netif_carrier_off(dev); |
259 | else | 259 | else |
260 | netif_carrier_on(dev); | 260 | netif_carrier_on(dev); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 0fe077747082..db80e1be1dcb 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -287,6 +287,7 @@ struct ieee80211_if_sta { | |||
287 | * generator reports that there are no present stations that cannot support short | 287 | * generator reports that there are no present stations that cannot support short |
288 | * preambles */ | 288 | * preambles */ |
289 | #define IEEE80211_SDATA_SHORT_PREAMBLE BIT(3) | 289 | #define IEEE80211_SDATA_SHORT_PREAMBLE BIT(3) |
290 | #define IEEE80211_SDATA_USERSPACE_MLME BIT(4) | ||
290 | struct ieee80211_sub_if_data { | 291 | struct ieee80211_sub_if_data { |
291 | struct list_head list; | 292 | struct list_head list; |
292 | enum ieee80211_if_types type; | 293 | enum ieee80211_if_types type; |
@@ -553,8 +554,6 @@ struct ieee80211_local { | |||
553 | unsigned int hw_modes; /* bitfield of supported hardware modes; | 554 | unsigned int hw_modes; /* bitfield of supported hardware modes; |
554 | * (1 << MODE_*) */ | 555 | * (1 << MODE_*) */ |
555 | 556 | ||
556 | int user_space_mlme; | ||
557 | |||
558 | #ifdef CONFIG_MAC80211_DEBUGFS | 557 | #ifdef CONFIG_MAC80211_DEBUGFS |
559 | struct local_debugfsdentries { | 558 | struct local_debugfsdentries { |
560 | struct dentry *channel; | 559 | struct dentry *channel; |
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 6c8e73e0d29d..f0224c2311d2 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c | |||
@@ -105,12 +105,12 @@ static int ieee80211_ioctl_siwgenie(struct net_device *dev, | |||
105 | struct iw_point *data, char *extra) | 105 | struct iw_point *data, char *extra) |
106 | { | 106 | { |
107 | struct ieee80211_sub_if_data *sdata; | 107 | struct ieee80211_sub_if_data *sdata; |
108 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
109 | 108 | ||
110 | if (local->user_space_mlme) | 109 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
110 | |||
111 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) | ||
111 | return -EOPNOTSUPP; | 112 | return -EOPNOTSUPP; |
112 | 113 | ||
113 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
114 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 114 | if (sdata->type == IEEE80211_IF_TYPE_STA || |
115 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 115 | sdata->type == IEEE80211_IF_TYPE_IBSS) { |
116 | int ret = ieee80211_sta_set_extra_ie(dev, extra, data->length); | 116 | int ret = ieee80211_sta_set_extra_ie(dev, extra, data->length); |
@@ -374,7 +374,6 @@ static int ieee80211_ioctl_siwessid(struct net_device *dev, | |||
374 | struct iw_request_info *info, | 374 | struct iw_request_info *info, |
375 | struct iw_point *data, char *ssid) | 375 | struct iw_point *data, char *ssid) |
376 | { | 376 | { |
377 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
378 | struct ieee80211_sub_if_data *sdata; | 377 | struct ieee80211_sub_if_data *sdata; |
379 | size_t len = data->length; | 378 | size_t len = data->length; |
380 | 379 | ||
@@ -386,7 +385,7 @@ static int ieee80211_ioctl_siwessid(struct net_device *dev, | |||
386 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 385 | if (sdata->type == IEEE80211_IF_TYPE_STA || |
387 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 386 | sdata->type == IEEE80211_IF_TYPE_IBSS) { |
388 | int ret; | 387 | int ret; |
389 | if (local->user_space_mlme) { | 388 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) { |
390 | if (len > IEEE80211_MAX_SSID_LEN) | 389 | if (len > IEEE80211_MAX_SSID_LEN) |
391 | return -EINVAL; | 390 | return -EINVAL; |
392 | memcpy(sdata->u.sta.ssid, ssid, len); | 391 | memcpy(sdata->u.sta.ssid, ssid, len); |
@@ -451,14 +450,13 @@ static int ieee80211_ioctl_siwap(struct net_device *dev, | |||
451 | struct iw_request_info *info, | 450 | struct iw_request_info *info, |
452 | struct sockaddr *ap_addr, char *extra) | 451 | struct sockaddr *ap_addr, char *extra) |
453 | { | 452 | { |
454 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
455 | struct ieee80211_sub_if_data *sdata; | 453 | struct ieee80211_sub_if_data *sdata; |
456 | 454 | ||
457 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 455 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
458 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 456 | if (sdata->type == IEEE80211_IF_TYPE_STA || |
459 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 457 | sdata->type == IEEE80211_IF_TYPE_IBSS) { |
460 | int ret; | 458 | int ret; |
461 | if (local->user_space_mlme) { | 459 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) { |
462 | memcpy(sdata->u.sta.bssid, (u8 *) &ap_addr->sa_data, | 460 | memcpy(sdata->u.sta.bssid, (u8 *) &ap_addr->sa_data, |
463 | ETH_ALEN); | 461 | ETH_ALEN); |
464 | return 0; | 462 | return 0; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 8c16574ec39c..4c046af237e3 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1199,7 +1199,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_txrx_data *rx) | |||
1199 | sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); | 1199 | sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); |
1200 | if ((sdata->type == IEEE80211_IF_TYPE_STA || | 1200 | if ((sdata->type == IEEE80211_IF_TYPE_STA || |
1201 | sdata->type == IEEE80211_IF_TYPE_IBSS) && | 1201 | sdata->type == IEEE80211_IF_TYPE_IBSS) && |
1202 | !rx->local->user_space_mlme) | 1202 | !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) |
1203 | ieee80211_sta_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status); | 1203 | ieee80211_sta_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status); |
1204 | else | 1204 | else |
1205 | return TXRX_DROP; | 1205 | return TXRX_DROP; |