summaryrefslogtreecommitdiffstats
path: root/net/mac80211/offchannel.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-11-24 14:25:49 +0100
committerJohannes Berg <johannes.berg@intel.com>2015-12-04 14:43:32 +0100
commit5ee00dbd52c57f37d74306ce6e8db26171f599b3 (patch)
treecd4ea4db19e3dde3b2bdb6159e66e7fdc53971db /net/mac80211/offchannel.c
parentmac80211: move off-channel/mgmt-tx code to offchannel.c (diff)
downloadlinux-5ee00dbd52c57f37d74306ce6e8db26171f599b3.tar.xz
linux-5ee00dbd52c57f37d74306ce6e8db26171f599b3.zip
mac80211: simplify ack_skb handling
Since the cookie is assigned inside ieee80211_make_ack_skb() now, we no longer need to return the ack_skb as the cookie and can simplify the function's return and the callers. Also rename it to ieee80211_attach_ack_skb() to more accurately reflect its purpose. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/offchannel.c')
-rw-r--r--net/mac80211/offchannel.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index b737437c9ac6..6a8178f4a675 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -733,7 +733,7 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
{
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
struct ieee80211_local *local = sdata->local;
- struct sk_buff *skb, *ack_skb;
+ struct sk_buff *skb;
struct sta_info *sta;
const struct ieee80211_mgmt *mgmt = (void *)params->buf;
bool need_offchan = false;
@@ -876,10 +876,8 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
/* make a copy to preserve the frame contents
* in case of encryption.
*/
- ack_skb = ieee80211_make_ack_skb(local, skb, cookie,
- GFP_KERNEL);
- if (IS_ERR(ack_skb)) {
- ret = PTR_ERR(ack_skb);
+ ret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_KERNEL);
+ if (ret) {
kfree_skb(skb);
goto out_unlock;
}