aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c12
-rw-r--r--net/mac80211/ieee80211_i.h6
-rw-r--r--net/mac80211/mlme.c25
3 files changed, 28 insertions, 15 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7cfc14e4ca07..36f8f245fa4c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1182,15 +1182,19 @@ static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev,
1182} 1182}
1183 1183
1184static int ieee80211_deauth(struct wiphy *wiphy, struct net_device *dev, 1184static int ieee80211_deauth(struct wiphy *wiphy, struct net_device *dev,
1185 struct cfg80211_deauth_request *req) 1185 struct cfg80211_deauth_request *req,
1186 void *cookie)
1186{ 1187{
1187 return ieee80211_mgd_deauth(IEEE80211_DEV_TO_SUB_IF(dev), req); 1188 return ieee80211_mgd_deauth(IEEE80211_DEV_TO_SUB_IF(dev),
1189 req, cookie);
1188} 1190}
1189 1191
1190static int ieee80211_disassoc(struct wiphy *wiphy, struct net_device *dev, 1192static int ieee80211_disassoc(struct wiphy *wiphy, struct net_device *dev,
1191 struct cfg80211_disassoc_request *req) 1193 struct cfg80211_disassoc_request *req,
1194 void *cookie)
1192{ 1195{
1193 return ieee80211_mgd_disassoc(IEEE80211_DEV_TO_SUB_IF(dev), req); 1196 return ieee80211_mgd_disassoc(IEEE80211_DEV_TO_SUB_IF(dev),
1197 req, cookie);
1194} 1198}
1195 1199
1196static int ieee80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, 1200static int ieee80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 2e92bbd9b2d0..327aabc07abe 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -918,9 +918,11 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
918int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, 918int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
919 struct cfg80211_assoc_request *req); 919 struct cfg80211_assoc_request *req);
920int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, 920int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
921 struct cfg80211_deauth_request *req); 921 struct cfg80211_deauth_request *req,
922 void *cookie);
922int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, 923int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
923 struct cfg80211_disassoc_request *req); 924 struct cfg80211_disassoc_request *req,
925 void *cookie);
924ieee80211_rx_result ieee80211_sta_rx_mgmt(struct ieee80211_sub_if_data *sdata, 926ieee80211_rx_result ieee80211_sta_rx_mgmt(struct ieee80211_sub_if_data *sdata,
925 struct sk_buff *skb); 927 struct sk_buff *skb);
926void ieee80211_send_pspoll(struct ieee80211_local *local, 928void ieee80211_send_pspoll(struct ieee80211_local *local,
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 15dbb57ab55e..c9db9646025b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -386,7 +386,8 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
386 386
387 387
388static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, 388static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
389 const u8 *bssid, u16 stype, u16 reason) 389 const u8 *bssid, u16 stype, u16 reason,
390 void *cookie)
390{ 391{
391 struct ieee80211_local *local = sdata->local; 392 struct ieee80211_local *local = sdata->local;
392 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 393 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -412,9 +413,9 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
412 mgmt->u.deauth.reason_code = cpu_to_le16(reason); 413 mgmt->u.deauth.reason_code = cpu_to_le16(reason);
413 414
414 if (stype == IEEE80211_STYPE_DEAUTH) 415 if (stype == IEEE80211_STYPE_DEAUTH)
415 cfg80211_send_deauth(sdata->dev, (u8 *) mgmt, skb->len); 416 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len, cookie);
416 else 417 else
417 cfg80211_send_disassoc(sdata->dev, (u8 *) mgmt, skb->len); 418 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len, cookie);
418 ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED); 419 ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED);
419} 420}
420 421
@@ -1837,10 +1838,12 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
1837 /* no action */ 1838 /* no action */
1838 break; 1839 break;
1839 case RX_MGMT_CFG80211_DEAUTH: 1840 case RX_MGMT_CFG80211_DEAUTH:
1840 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); 1841 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len,
1842 NULL);
1841 break; 1843 break;
1842 case RX_MGMT_CFG80211_DISASSOC: 1844 case RX_MGMT_CFG80211_DISASSOC:
1843 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); 1845 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len,
1846 NULL);
1844 break; 1847 break;
1845 default: 1848 default:
1846 WARN(1, "unexpected: %d", rma); 1849 WARN(1, "unexpected: %d", rma);
@@ -2273,7 +2276,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
2273} 2276}
2274 2277
2275int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, 2278int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
2276 struct cfg80211_deauth_request *req) 2279 struct cfg80211_deauth_request *req,
2280 void *cookie)
2277{ 2281{
2278 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 2282 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2279 struct ieee80211_mgd_work *wk; 2283 struct ieee80211_mgd_work *wk;
@@ -2305,13 +2309,15 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
2305 mutex_unlock(&ifmgd->mtx); 2309 mutex_unlock(&ifmgd->mtx);
2306 2310
2307 ieee80211_send_deauth_disassoc(sdata, bssid, 2311 ieee80211_send_deauth_disassoc(sdata, bssid,
2308 IEEE80211_STYPE_DEAUTH, req->reason_code); 2312 IEEE80211_STYPE_DEAUTH, req->reason_code,
2313 cookie);
2309 2314
2310 return 0; 2315 return 0;
2311} 2316}
2312 2317
2313int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, 2318int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
2314 struct cfg80211_disassoc_request *req) 2319 struct cfg80211_disassoc_request *req,
2320 void *cookie)
2315{ 2321{
2316 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 2322 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2317 2323
@@ -2331,6 +2337,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
2331 mutex_unlock(&ifmgd->mtx); 2337 mutex_unlock(&ifmgd->mtx);
2332 2338
2333 ieee80211_send_deauth_disassoc(sdata, req->bss->bssid, 2339 ieee80211_send_deauth_disassoc(sdata, req->bss->bssid,
2334 IEEE80211_STYPE_DISASSOC, req->reason_code); 2340 IEEE80211_STYPE_DISASSOC, req->reason_code,
2341 cookie);
2335 return 0; 2342 return 0;
2336} 2343}