summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-02-24 13:50:51 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-02-29 14:11:33 -0500
commit63c9c5e77c36f8793dddf0e905a4bc43a0972735 (patch)
tree88c7d307b7369806c75245ca9cff8129e334580a /net/mac80211
parent4d94c157f87eebdcd84e9e5e27ad65978f776c2e (diff)
downloadlinux-63c9c5e77c36f8793dddf0e905a4bc43a0972735.tar.gz
linux-63c9c5e77c36f8793dddf0e905a4bc43a0972735.tar.bz2
linux-63c9c5e77c36f8793dddf0e905a4bc43a0972735.zip
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')
-rw-r--r--net/mac80211/cfg.c12
-rw-r--r--net/mac80211/ieee80211_i.h6
-rw-r--r--net/mac80211/mlme.c28
3 files changed, 20 insertions, 26 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,
}
static int ieee80211_deauth(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_deauth_request *req,
- void *cookie)
+ struct cfg80211_deauth_request *req)
{
- return ieee80211_mgd_deauth(IEEE80211_DEV_TO_SUB_IF(dev),
- req, cookie);
+ return ieee80211_mgd_deauth(IEEE80211_DEV_TO_SUB_IF(dev), req);
}
static int ieee80211_disassoc(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_disassoc_request *req,
- void *cookie)
+ struct cfg80211_disassoc_request *req)
{
- return ieee80211_mgd_disassoc(IEEE80211_DEV_TO_SUB_IF(dev),
- req, cookie);
+ return ieee80211_mgd_disassoc(IEEE80211_DEV_TO_SUB_IF(dev), req);
}
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,
int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
struct cfg80211_assoc_request *req);
int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_deauth_request *req,
- void *cookie);
+ struct cfg80211_deauth_request *req);
int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_disassoc_request *req,
- void *cookie);
+ struct cfg80211_disassoc_request *req);
void ieee80211_send_pspoll(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata);
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)
}
static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
- const u8 *bssid, u16 stype, u16 reason,
- void *cookie, bool send_frame)
+ const u8 *bssid, u16 stype,
+ u16 reason, bool cfg80211_locked,
+ bool send_frame)
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -637,12 +638,12 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
mgmt->u.deauth.reason_code = cpu_to_le16(reason);
if (stype == IEEE80211_STYPE_DEAUTH)
- if (cookie)
+ if (cfg80211_locked)
__cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
else
cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
else
- if (cookie)
+ if (cfg80211_locked)
__cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
else
cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
@@ -1696,7 +1697,7 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
ieee80211_send_deauth_disassoc(sdata, bssid,
IEEE80211_STYPE_DEAUTH,
WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY,
- NULL, true);
+ false, true);
mutex_lock(&local->mtx);
ieee80211_recalc_idle(local);
@@ -2706,8 +2707,8 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
* but that's not a problem.
*/
ieee80211_send_deauth_disassoc(sdata, bssid,
- IEEE80211_STYPE_DEAUTH, reason,
- NULL, true);
+ IEEE80211_STYPE_DEAUTH,
+ reason, false, true);
mutex_lock(&local->mtx);
ieee80211_recalc_idle(local);
@@ -3439,8 +3440,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
}
int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_deauth_request *req,
- void *cookie)
+ struct cfg80211_deauth_request *req)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
bool assoc_bss = false;
@@ -3461,8 +3461,9 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
printk(KERN_DEBUG "%s: deauthenticating from %pM by local choice (reason=%d)\n",
sdata->name, req->bssid, req->reason_code);
- ieee80211_send_deauth_disassoc(sdata, req->bssid, IEEE80211_STYPE_DEAUTH,
- req->reason_code, cookie, true);
+ ieee80211_send_deauth_disassoc(sdata, req->bssid,
+ IEEE80211_STYPE_DEAUTH,
+ req->reason_code, true, true);
if (assoc_bss)
sta_info_flush(sdata->local, sdata);
@@ -3474,8 +3475,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
}
int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_disassoc_request *req,
- void *cookie)
+ struct cfg80211_disassoc_request *req)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
u8 bssid[ETH_ALEN];
@@ -3503,7 +3503,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
ieee80211_send_deauth_disassoc(sdata, req->bss->bssid,
IEEE80211_STYPE_DISASSOC, req->reason_code,
- cookie, !req->local_state_change);
+ true, !req->local_state_change);
sta_info_flush(sdata->local, sdata);
mutex_lock(&sdata->local->mtx);