diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-02-24 07:50:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-29 14:11:33 -0500 |
commit | 63c9c5e77c36f8793dddf0e905a4bc43a0972735 (patch) | |
tree | 88c7d307b7369806c75245ca9cff8129e334580a /net | |
parent | 4d94c157f87eebdcd84e9e5e27ad65978f776c2e (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')
-rw-r--r-- | net/mac80211/cfg.c | 12 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 6 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 28 | ||||
-rw-r--r-- | net/wireless/mlme.c | 6 |
4 files changed, 23 insertions, 29 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index f7eb25aabf8f..6a77d4c910f9 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1595,19 +1595,15 @@ static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev, | |||
1595 | } | 1595 | } |
1596 | 1596 | ||
1597 | static int ieee80211_deauth(struct wiphy *wiphy, struct net_device *dev, | 1597 | static int ieee80211_deauth(struct wiphy *wiphy, struct net_device *dev, |
1598 | struct cfg80211_deauth_request *req, | 1598 | struct cfg80211_deauth_request *req) |
1599 | void *cookie) | ||
1600 | { | 1599 | { |
1601 | return ieee80211_mgd_deauth(IEEE80211_DEV_TO_SUB_IF(dev), | 1600 | return ieee80211_mgd_deauth(IEEE80211_DEV_TO_SUB_IF(dev), req); |
1602 | req, cookie); | ||
1603 | } | 1601 | } |
1604 | 1602 | ||
1605 | static int ieee80211_disassoc(struct wiphy *wiphy, struct net_device *dev, | 1603 | static int ieee80211_disassoc(struct wiphy *wiphy, struct net_device *dev, |
1606 | struct cfg80211_disassoc_request *req, | 1604 | struct cfg80211_disassoc_request *req) |
1607 | void *cookie) | ||
1608 | { | 1605 | { |
1609 | return ieee80211_mgd_disassoc(IEEE80211_DEV_TO_SUB_IF(dev), | 1606 | return ieee80211_mgd_disassoc(IEEE80211_DEV_TO_SUB_IF(dev), req); |
1610 | req, cookie); | ||
1611 | } | 1607 | } |
1612 | 1608 | ||
1613 | static int ieee80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, | 1609 | static 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 4d1682950a60..cee0c7493fd0 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1150,11 +1150,9 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, | |||
1150 | int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | 1150 | int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, |
1151 | struct cfg80211_assoc_request *req); | 1151 | struct cfg80211_assoc_request *req); |
1152 | int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | 1152 | int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, |
1153 | struct cfg80211_deauth_request *req, | 1153 | struct cfg80211_deauth_request *req); |
1154 | void *cookie); | ||
1155 | int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | 1154 | int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, |
1156 | struct cfg80211_disassoc_request *req, | 1155 | struct cfg80211_disassoc_request *req); |
1157 | void *cookie); | ||
1158 | void ieee80211_send_pspoll(struct ieee80211_local *local, | 1156 | void ieee80211_send_pspoll(struct ieee80211_local *local, |
1159 | struct ieee80211_sub_if_data *sdata); | 1157 | struct ieee80211_sub_if_data *sdata); |
1160 | void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency); | 1158 | void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency); |
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 | ||
614 | static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | 614 | static 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 | ||
3441 | int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | 3442 | int 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 | ||
3476 | int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | 3477 | int 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); |
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index d553d365e751..fb1e72179117 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -455,7 +455,7 @@ int __cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev, | |||
455 | return 0; | 455 | return 0; |
456 | } | 456 | } |
457 | 457 | ||
458 | return rdev->ops->deauth(&rdev->wiphy, dev, &req, wdev); | 458 | return rdev->ops->deauth(&rdev->wiphy, dev, &req); |
459 | } | 459 | } |
460 | 460 | ||
461 | int cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev, | 461 | int cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev, |
@@ -500,7 +500,7 @@ static int __cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev, | |||
500 | else | 500 | else |
501 | return -ENOTCONN; | 501 | return -ENOTCONN; |
502 | 502 | ||
503 | return rdev->ops->disassoc(&rdev->wiphy, dev, &req, wdev); | 503 | return rdev->ops->disassoc(&rdev->wiphy, dev, &req); |
504 | } | 504 | } |
505 | 505 | ||
506 | int cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev, | 506 | int cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev, |
@@ -541,7 +541,7 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev, | |||
541 | 541 | ||
542 | memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN); | 542 | memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN); |
543 | req.bssid = bssid; | 543 | req.bssid = bssid; |
544 | rdev->ops->deauth(&rdev->wiphy, dev, &req, wdev); | 544 | rdev->ops->deauth(&rdev->wiphy, dev, &req); |
545 | 545 | ||
546 | if (wdev->current_bss) { | 546 | if (wdev->current_bss) { |
547 | cfg80211_unhold_bss(wdev->current_bss); | 547 | cfg80211_unhold_bss(wdev->current_bss); |