diff options
Diffstat (limited to 'net/ieee80211/softmac')
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_assoc.c | 2 | ||||
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_priv.h | 1 | ||||
-rw-r--r-- | net/ieee80211/softmac/ieee80211softmac_wx.c | 32 |
3 files changed, 34 insertions, 1 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c index fb79ce7d6439..ea9f5aacce85 100644 --- a/net/ieee80211/softmac/ieee80211softmac_assoc.c +++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c | |||
@@ -82,7 +82,7 @@ ieee80211softmac_assoc_timeout(void *d) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | /* Sends out a disassociation request to the desired AP */ | 84 | /* Sends out a disassociation request to the desired AP */ |
85 | static void | 85 | void |
86 | ieee80211softmac_disassoc(struct ieee80211softmac_device *mac, u16 reason) | 86 | ieee80211softmac_disassoc(struct ieee80211softmac_device *mac, u16 reason) |
87 | { | 87 | { |
88 | unsigned long flags; | 88 | unsigned long flags; |
diff --git a/net/ieee80211/softmac/ieee80211softmac_priv.h b/net/ieee80211/softmac/ieee80211softmac_priv.h index 65d9816c8ecc..8c95b3abe0cc 100644 --- a/net/ieee80211/softmac/ieee80211softmac_priv.h +++ b/net/ieee80211/softmac/ieee80211softmac_priv.h | |||
@@ -150,6 +150,7 @@ int ieee80211softmac_handle_disassoc(struct net_device * dev, | |||
150 | int ieee80211softmac_handle_reassoc_req(struct net_device * dev, | 150 | int ieee80211softmac_handle_reassoc_req(struct net_device * dev, |
151 | struct ieee80211_reassoc_request * reassoc); | 151 | struct ieee80211_reassoc_request * reassoc); |
152 | void ieee80211softmac_assoc_timeout(void *d); | 152 | void ieee80211softmac_assoc_timeout(void *d); |
153 | void ieee80211softmac_disassoc(struct ieee80211softmac_device *mac, u16 reason); | ||
153 | 154 | ||
154 | /* some helper functions */ | 155 | /* some helper functions */ |
155 | static inline int ieee80211softmac_scan_handlers_check_self(struct ieee80211softmac_device *sm) | 156 | static inline int ieee80211softmac_scan_handlers_check_self(struct ieee80211softmac_device *sm) |
diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c index 27edb2b5581a..8d0c22641ca8 100644 --- a/net/ieee80211/softmac/ieee80211softmac_wx.c +++ b/net/ieee80211/softmac/ieee80211softmac_wx.c | |||
@@ -431,3 +431,35 @@ ieee80211softmac_wx_get_genie(struct net_device *dev, | |||
431 | } | 431 | } |
432 | EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_genie); | 432 | EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_genie); |
433 | 433 | ||
434 | int | ||
435 | ieee80211softmac_wx_set_mlme(struct net_device *dev, | ||
436 | struct iw_request_info *info, | ||
437 | union iwreq_data *wrqu, | ||
438 | char *extra) | ||
439 | { | ||
440 | struct ieee80211softmac_device *mac = ieee80211_priv(dev); | ||
441 | struct iw_mlme *mlme = (struct iw_mlme *)extra; | ||
442 | u16 reason = cpu_to_le16(mlme->reason_code); | ||
443 | struct ieee80211softmac_network *net; | ||
444 | |||
445 | if (memcmp(mac->associnfo.bssid, mlme->addr.sa_data, ETH_ALEN)) { | ||
446 | printk(KERN_DEBUG PFX "wx_set_mlme: requested operation on net we don't use\n"); | ||
447 | return -EINVAL; | ||
448 | } | ||
449 | |||
450 | switch (mlme->cmd) { | ||
451 | case IW_MLME_DEAUTH: | ||
452 | net = ieee80211softmac_get_network_by_bssid_locked(mac, mlme->addr.sa_data); | ||
453 | if (!net) { | ||
454 | printk(KERN_DEBUG PFX "wx_set_mlme: we should know the net here...\n"); | ||
455 | return -EINVAL; | ||
456 | } | ||
457 | return ieee80211softmac_deauth_req(mac, net, reason); | ||
458 | case IW_MLME_DISASSOC: | ||
459 | ieee80211softmac_disassoc(mac, reason); | ||
460 | return 0; | ||
461 | default: | ||
462 | return -EOPNOTSUPP; | ||
463 | } | ||
464 | } | ||
465 | EXPORT_SYMBOL_GPL(ieee80211softmac_wx_set_mlme); | ||