Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27302
b: refs/heads/master
c: 9a1771e
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Apr 24, 2006
1 parent 486d560 commit 51df191
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3c5a64e7075dd066316f1685caadabcbc649427
refs/heads/master: 9a1771e86756212041b32d80b850cc4c8063360a
5 changes: 5 additions & 0 deletions trunk/include/net/ieee80211softmac_wx.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,9 @@ ieee80211softmac_wx_get_genie(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu,
char *extra);
extern int
ieee80211softmac_wx_set_mlme(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu,
char *extra);
#endif /* _IEEE80211SOFTMAC_WX */
2 changes: 1 addition & 1 deletion trunk/net/ieee80211/softmac/ieee80211softmac_assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ ieee80211softmac_assoc_timeout(void *d)
}

/* Sends out a disassociation request to the desired AP */
static void
void
ieee80211softmac_disassoc(struct ieee80211softmac_device *mac, u16 reason)
{
unsigned long flags;
Expand Down
1 change: 1 addition & 0 deletions trunk/net/ieee80211/softmac/ieee80211softmac_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ int ieee80211softmac_handle_disassoc(struct net_device * dev,
int ieee80211softmac_handle_reassoc_req(struct net_device * dev,
struct ieee80211_reassoc_request * reassoc);
void ieee80211softmac_assoc_timeout(void *d);
void ieee80211softmac_disassoc(struct ieee80211softmac_device *mac, u16 reason);

/* some helper functions */
static inline int ieee80211softmac_scan_handlers_check_self(struct ieee80211softmac_device *sm)
Expand Down
32 changes: 32 additions & 0 deletions trunk/net/ieee80211/softmac/ieee80211softmac_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,3 +431,35 @@ ieee80211softmac_wx_get_genie(struct net_device *dev,
}
EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_genie);

int
ieee80211softmac_wx_set_mlme(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu,
char *extra)
{
struct ieee80211softmac_device *mac = ieee80211_priv(dev);
struct iw_mlme *mlme = (struct iw_mlme *)extra;
u16 reason = cpu_to_le16(mlme->reason_code);
struct ieee80211softmac_network *net;

if (memcmp(mac->associnfo.bssid, mlme->addr.sa_data, ETH_ALEN)) {
printk(KERN_DEBUG PFX "wx_set_mlme: requested operation on net we don't use\n");
return -EINVAL;
}

switch (mlme->cmd) {
case IW_MLME_DEAUTH:
net = ieee80211softmac_get_network_by_bssid_locked(mac, mlme->addr.sa_data);
if (!net) {
printk(KERN_DEBUG PFX "wx_set_mlme: we should know the net here...\n");
return -EINVAL;
}
return ieee80211softmac_deauth_req(mac, net, reason);
case IW_MLME_DISASSOC:
ieee80211softmac_disassoc(mac, reason);
return 0;
default:
return -EOPNOTSUPP;
}
}
EXPORT_SYMBOL_GPL(ieee80211softmac_wx_set_mlme);

0 comments on commit 51df191

Please sign in to comment.