aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-02-24 07:50:51 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-29 14:11:33 -0500
commit63c9c5e77c36f8793dddf0e905a4bc43a0972735 (patch)
tree88c7d307b7369806c75245ca9cff8129e334580a /net/mac80211/mlme.c
parent4d94c157f87eebdcd84e9e5e27ad65978f776c2e (diff)
cfg80211: remove cookies from callbacks
In "cfg80211: no cookies in cfg80211_send_XXX()" Holger Schurig removed the cookies in the calls from mac80211 to cfg80211, but the ones in the other direction were left in. Remove them now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 0c220e1b6c9c..edba1d8158fc 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -612,8 +612,9 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
612} 612}
613 613
614static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, 614static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
615 const u8 *bssid, u16 stype, u16 reason, 615 const u8 *bssid, u16 stype,
616 void *cookie, bool send_frame) 616 u16 reason, bool cfg80211_locked,
617 bool send_frame)
617{ 618{
618 struct ieee80211_local *local = sdata->local; 619 struct ieee80211_local *local = sdata->local;
619 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 620 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -637,12 +638,12 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
637 mgmt->u.deauth.reason_code = cpu_to_le16(reason); 638 mgmt->u.deauth.reason_code = cpu_to_le16(reason);
638 639
639 if (stype == IEEE80211_STYPE_DEAUTH) 640 if (stype == IEEE80211_STYPE_DEAUTH)
640 if (cookie) 641 if (cfg80211_locked)
641 __cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); 642 __cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
642 else 643 else
643 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); 644 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
644 else 645 else
645 if (cookie) 646 if (cfg80211_locked)
646 __cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); 647 __cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
647 else 648 else
648 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); 649 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
@@ -1696,7 +1697,7 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
1696 ieee80211_send_deauth_disassoc(sdata, bssid, 1697 ieee80211_send_deauth_disassoc(sdata, bssid,
1697 IEEE80211_STYPE_DEAUTH, 1698 IEEE80211_STYPE_DEAUTH,
1698 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, 1699 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY,
1699 NULL, true); 1700 false, true);
1700 1701
1701 mutex_lock(&local->mtx); 1702 mutex_lock(&local->mtx);
1702 ieee80211_recalc_idle(local); 1703 ieee80211_recalc_idle(local);
@@ -2706,8 +2707,8 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
2706 * but that's not a problem. 2707 * but that's not a problem.
2707 */ 2708 */
2708 ieee80211_send_deauth_disassoc(sdata, bssid, 2709 ieee80211_send_deauth_disassoc(sdata, bssid,
2709 IEEE80211_STYPE_DEAUTH, reason, 2710 IEEE80211_STYPE_DEAUTH,
2710 NULL, true); 2711 reason, false, true);
2711 2712
2712 mutex_lock(&local->mtx); 2713 mutex_lock(&local->mtx);
2713 ieee80211_recalc_idle(local); 2714 ieee80211_recalc_idle(local);
@@ -3439,8 +3440,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
3439} 3440}
3440 3441
3441int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, 3442int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
3442 struct cfg80211_deauth_request *req, 3443 struct cfg80211_deauth_request *req)
3443 void *cookie)
3444{ 3444{
3445 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 3445 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
3446 bool assoc_bss = false; 3446 bool assoc_bss = false;
@@ -3461,8 +3461,9 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
3461 printk(KERN_DEBUG "%s: deauthenticating from %pM by local choice (reason=%d)\n", 3461 printk(KERN_DEBUG "%s: deauthenticating from %pM by local choice (reason=%d)\n",
3462 sdata->name, req->bssid, req->reason_code); 3462 sdata->name, req->bssid, req->reason_code);
3463 3463
3464 ieee80211_send_deauth_disassoc(sdata, req->bssid, IEEE80211_STYPE_DEAUTH, 3464 ieee80211_send_deauth_disassoc(sdata, req->bssid,
3465 req->reason_code, cookie, true); 3465 IEEE80211_STYPE_DEAUTH,
3466 req->reason_code, true, true);
3466 if (assoc_bss) 3467 if (assoc_bss)
3467 sta_info_flush(sdata->local, sdata); 3468 sta_info_flush(sdata->local, sdata);
3468 3469
@@ -3474,8 +3475,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
3474} 3475}
3475 3476
3476int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, 3477int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
3477 struct cfg80211_disassoc_request *req, 3478 struct cfg80211_disassoc_request *req)
3478 void *cookie)
3479{ 3479{
3480 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 3480 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
3481 u8 bssid[ETH_ALEN]; 3481 u8 bssid[ETH_ALEN];
@@ -3503,7 +3503,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
3503 3503
3504 ieee80211_send_deauth_disassoc(sdata, req->bss->bssid, 3504 ieee80211_send_deauth_disassoc(sdata, req->bss->bssid,
3505 IEEE80211_STYPE_DISASSOC, req->reason_code, 3505 IEEE80211_STYPE_DISASSOC, req->reason_code,
3506 cookie, !req->local_state_change); 3506 true, !req->local_state_change);
3507 sta_info_flush(sdata->local, sdata); 3507 sta_info_flush(sdata->local, sdata);
3508 3508
3509 mutex_lock(&sdata->local->mtx); 3509 mutex_lock(&sdata->local->mtx);