aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2013-11-18 12:06:49 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-12-02 05:51:52 -0500
commitb176e629402f41f2b984d3aa842ddae23ed5562e (patch)
treed7bf11ae06d568756a3394ec3127f65e4f973eac
parent017b45bb5c5b40d9da1ea671aa8bc2eaec73675f (diff)
cfg80211: aggregate mgmt_tx parameters into a struct
Change cfg80211 and mac80211 to use cfg80211_mgmt_tx_params struct to aggregate parameters for mgmt_tx functions. This makes the functions' signatures less clumsy and allows less painful parameters extension. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> [fix all other drivers] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c9
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c7
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c6
-rw-r--r--include/net/cfg80211.h28
-rw-r--r--net/mac80211/cfg.c29
-rw-r--r--net/wireless/core.h5
-rw-r--r--net/wireless/mlme.c12
-rw-r--r--net/wireless/nl80211.c32
-rw-r--r--net/wireless/rdev-ops.h12
-rw-r--r--net/wireless/trace.h15
10 files changed, 86 insertions, 69 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 2437ad26949d..36dc61da8336 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3169,12 +3169,15 @@ static bool ath6kl_is_p2p_go_ssid(const u8 *buf, size_t len)
3169} 3169}
3170 3170
3171static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, 3171static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
3172 struct ieee80211_channel *chan, bool offchan, 3172 struct cfg80211_mgmt_tx_params *params, u64 *cookie)
3173 unsigned int wait, const u8 *buf, size_t len,
3174 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
3175{ 3173{
3176 struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev); 3174 struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
3177 struct ath6kl *ar = ath6kl_priv(vif->ndev); 3175 struct ath6kl *ar = ath6kl_priv(vif->ndev);
3176 struct ieee80211_channel *chan = params->chan;
3177 const u8 *buf = params->buf;
3178 size_t len = params->len;
3179 unsigned int wait = params->wait;
3180 bool no_cck = params->no_cck;
3178 u32 id, freq; 3181 u32 id, freq;
3179 const struct ieee80211_mgmt *mgmt; 3182 const struct ieee80211_mgmt *mgmt;
3180 bool more_data, queued; 3183 bool more_data, queued;
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 1850efa83cf8..f0bdfb120667 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -3973,11 +3973,12 @@ brcmf_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
3973 3973
3974static int 3974static int
3975brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, 3975brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
3976 struct ieee80211_channel *chan, bool offchan, 3976 struct cfg80211_mgmt_tx_params *params, u64 *cookie)
3977 unsigned int wait, const u8 *buf, size_t len,
3978 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
3979{ 3977{
3980 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); 3978 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
3979 struct ieee80211_channel *chan = params->chan;
3980 const u8 *buf = params->buf;
3981 size_t len = params->len;
3981 const struct ieee80211_mgmt *mgmt; 3982 const struct ieee80211_mgmt *mgmt;
3982 struct brcmf_cfg80211_vif *vif; 3983 struct brcmf_cfg80211_vif *vif;
3983 s32 err = 0; 3984 s32 err = 0;
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index d6d1d91a26dc..1c8116d46845 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -184,10 +184,10 @@ mwifiex_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len)
184 */ 184 */
185static int 185static int
186mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, 186mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
187 struct ieee80211_channel *chan, bool offchan, 187 struct cfg80211_mgmt_tx_params *params, u64 *cookie)
188 unsigned int wait, const u8 *buf, size_t len,
189 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
190{ 188{
189 const u8 *buf = params->buf;
190 size_t len = params->len;
191 struct sk_buff *skb; 191 struct sk_buff *skb;
192 u16 pkt_len; 192 u16 pkt_len;
193 const struct ieee80211_mgmt *mgmt; 193 const struct ieee80211_mgmt *mgmt;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index bacc5033f0b6..6c2bc329a900 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1944,6 +1944,29 @@ struct cfg80211_update_ft_ies_params {
1944}; 1944};
1945 1945
1946/** 1946/**
1947 * struct cfg80211_mgmt_tx_params - mgmt tx parameters
1948 *
1949 * This structure provides information needed to transmit a mgmt frame
1950 *
1951 * @chan: channel to use
1952 * @offchan: indicates wether off channel operation is required
1953 * @wait: duration for ROC
1954 * @buf: buffer to transmit
1955 * @len: buffer length
1956 * @no_cck: don't use cck rates for this frame
1957 * @dont_wait_for_ack: tells the low level not to wait for an ack
1958 */
1959struct cfg80211_mgmt_tx_params {
1960 struct ieee80211_channel *chan;
1961 bool offchan;
1962 unsigned int wait;
1963 const u8 *buf;
1964 size_t len;
1965 bool no_cck;
1966 bool dont_wait_for_ack;
1967};
1968
1969/**
1947 * struct cfg80211_ops - backend description for wireless configuration 1970 * struct cfg80211_ops - backend description for wireless configuration
1948 * 1971 *
1949 * This struct is registered by fullmac card drivers and/or wireless stacks 1972 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -2341,9 +2364,8 @@ struct cfg80211_ops {
2341 u64 cookie); 2364 u64 cookie);
2342 2365
2343 int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev, 2366 int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,
2344 struct ieee80211_channel *chan, bool offchan, 2367 struct cfg80211_mgmt_tx_params *params,
2345 unsigned int wait, const u8 *buf, size_t len, 2368 u64 *cookie);
2346 bool no_cck, bool dont_wait_for_ack, u64 *cookie);
2347 int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy, 2369 int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
2348 struct wireless_dev *wdev, 2370 struct wireless_dev *wdev,
2349 u64 cookie); 2371 u64 cookie);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index c7b3e57aec04..267d3aca9947 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3167,26 +3167,25 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
3167} 3167}
3168 3168
3169static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, 3169static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
3170 struct ieee80211_channel *chan, bool offchan, 3170 struct cfg80211_mgmt_tx_params *params,
3171 unsigned int wait, const u8 *buf, size_t len, 3171 u64 *cookie)
3172 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
3173{ 3172{
3174 struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); 3173 struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
3175 struct ieee80211_local *local = sdata->local; 3174 struct ieee80211_local *local = sdata->local;
3176 struct sk_buff *skb; 3175 struct sk_buff *skb;
3177 struct sta_info *sta; 3176 struct sta_info *sta;
3178 const struct ieee80211_mgmt *mgmt = (void *)buf; 3177 const struct ieee80211_mgmt *mgmt = (void *)params->buf;
3179 bool need_offchan = false; 3178 bool need_offchan = false;
3180 u32 flags; 3179 u32 flags;
3181 int ret; 3180 int ret;
3182 3181
3183 if (dont_wait_for_ack) 3182 if (params->dont_wait_for_ack)
3184 flags = IEEE80211_TX_CTL_NO_ACK; 3183 flags = IEEE80211_TX_CTL_NO_ACK;
3185 else 3184 else
3186 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX | 3185 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX |
3187 IEEE80211_TX_CTL_REQ_TX_STATUS; 3186 IEEE80211_TX_CTL_REQ_TX_STATUS;
3188 3187
3189 if (no_cck) 3188 if (params->no_cck)
3190 flags |= IEEE80211_TX_CTL_NO_CCK_RATE; 3189 flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
3191 3190
3192 switch (sdata->vif.type) { 3191 switch (sdata->vif.type) {
@@ -3234,7 +3233,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
3234 /* configurations requiring offchan cannot work if no channel has been 3233 /* configurations requiring offchan cannot work if no channel has been
3235 * specified 3234 * specified
3236 */ 3235 */
3237 if (need_offchan && !chan) 3236 if (need_offchan && !params->chan)
3238 return -EINVAL; 3237 return -EINVAL;
3239 3238
3240 mutex_lock(&local->mtx); 3239 mutex_lock(&local->mtx);
@@ -3247,8 +3246,10 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
3247 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); 3246 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
3248 3247
3249 if (chanctx_conf) { 3248 if (chanctx_conf) {
3250 need_offchan = chan && (chan != chanctx_conf->def.chan); 3249 need_offchan = params->chan &&
3251 } else if (!chan) { 3250 (params->chan !=
3251 chanctx_conf->def.chan);
3252 } else if (!params->chan) {
3252 ret = -EINVAL; 3253 ret = -EINVAL;
3253 rcu_read_unlock(); 3254 rcu_read_unlock();
3254 goto out_unlock; 3255 goto out_unlock;
@@ -3258,19 +3259,19 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
3258 rcu_read_unlock(); 3259 rcu_read_unlock();
3259 } 3260 }
3260 3261
3261 if (need_offchan && !offchan) { 3262 if (need_offchan && !params->offchan) {
3262 ret = -EBUSY; 3263 ret = -EBUSY;
3263 goto out_unlock; 3264 goto out_unlock;
3264 } 3265 }
3265 3266
3266 skb = dev_alloc_skb(local->hw.extra_tx_headroom + len); 3267 skb = dev_alloc_skb(local->hw.extra_tx_headroom + params->len);
3267 if (!skb) { 3268 if (!skb) {
3268 ret = -ENOMEM; 3269 ret = -ENOMEM;
3269 goto out_unlock; 3270 goto out_unlock;
3270 } 3271 }
3271 skb_reserve(skb, local->hw.extra_tx_headroom); 3272 skb_reserve(skb, local->hw.extra_tx_headroom);
3272 3273
3273 memcpy(skb_put(skb, len), buf, len); 3274 memcpy(skb_put(skb, params->len), params->buf, params->len);
3274 3275
3275 IEEE80211_SKB_CB(skb)->flags = flags; 3276 IEEE80211_SKB_CB(skb)->flags = flags;
3276 3277
@@ -3290,8 +3291,8 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
3290 local->hw.offchannel_tx_hw_queue; 3291 local->hw.offchannel_tx_hw_queue;
3291 3292
3292 /* This will handle all kinds of coalescing and immediate TX */ 3293 /* This will handle all kinds of coalescing and immediate TX */
3293 ret = ieee80211_start_roc_work(local, sdata, chan, 3294 ret = ieee80211_start_roc_work(local, sdata, params->chan,
3294 wait, cookie, skb, 3295 params->wait, cookie, skb,
3295 IEEE80211_ROC_TYPE_MGMT_TX); 3296 IEEE80211_ROC_TYPE_MGMT_TX);
3296 if (ret) 3297 if (ret)
3297 kfree_skb(skb); 3298 kfree_skb(skb);
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 2888867ee7c5..6716c5c3f748 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -317,9 +317,8 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid);
317void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev); 317void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev);
318int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, 318int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
319 struct wireless_dev *wdev, 319 struct wireless_dev *wdev,
320 struct ieee80211_channel *chan, bool offchan, 320 struct cfg80211_mgmt_tx_params *params,
321 unsigned int wait, const u8 *buf, size_t len, 321 u64 *cookie);
322 bool no_cck, bool dont_wait_for_ack, u64 *cookie);
323void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa, 322void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa,
324 const struct ieee80211_ht_cap *ht_capa_mask); 323 const struct ieee80211_ht_cap *ht_capa_mask);
325void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa, 324void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa,
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 31f541f7e4ea..52cca05044a8 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -520,9 +520,7 @@ void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev)
520 520
521int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, 521int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
522 struct wireless_dev *wdev, 522 struct wireless_dev *wdev,
523 struct ieee80211_channel *chan, bool offchan, 523 struct cfg80211_mgmt_tx_params *params, u64 *cookie)
524 unsigned int wait, const u8 *buf, size_t len,
525 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
526{ 524{
527 const struct ieee80211_mgmt *mgmt; 525 const struct ieee80211_mgmt *mgmt;
528 u16 stype; 526 u16 stype;
@@ -533,10 +531,10 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
533 if (!rdev->ops->mgmt_tx) 531 if (!rdev->ops->mgmt_tx)
534 return -EOPNOTSUPP; 532 return -EOPNOTSUPP;
535 533
536 if (len < 24 + 1) 534 if (params->len < 24 + 1)
537 return -EINVAL; 535 return -EINVAL;
538 536
539 mgmt = (const struct ieee80211_mgmt *) buf; 537 mgmt = (const struct ieee80211_mgmt *)params->buf;
540 538
541 if (!ieee80211_is_mgmt(mgmt->frame_control)) 539 if (!ieee80211_is_mgmt(mgmt->frame_control))
542 return -EINVAL; 540 return -EINVAL;
@@ -615,9 +613,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
615 return -EINVAL; 613 return -EINVAL;
616 614
617 /* Transmit the Action frame as requested by user space */ 615 /* Transmit the Action frame as requested by user space */
618 return rdev_mgmt_tx(rdev, wdev, chan, offchan, 616 return rdev_mgmt_tx(rdev, wdev, params, cookie);
619 wait, buf, len, no_cck, dont_wait_for_ack,
620 cookie);
621} 617}
622 618
623bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, 619bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 8c83fbb3824f..703155b1aa7a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7428,10 +7428,10 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
7428 void *hdr = NULL; 7428 void *hdr = NULL;
7429 u64 cookie; 7429 u64 cookie;
7430 struct sk_buff *msg = NULL; 7430 struct sk_buff *msg = NULL;
7431 unsigned int wait = 0; 7431 struct cfg80211_mgmt_tx_params params = {
7432 bool offchan, no_cck, dont_wait_for_ack; 7432 .dont_wait_for_ack =
7433 7433 info->attrs[NL80211_ATTR_DONT_WAIT_FOR_ACK],
7434 dont_wait_for_ack = info->attrs[NL80211_ATTR_DONT_WAIT_FOR_ACK]; 7434 };
7435 7435
7436 if (!info->attrs[NL80211_ATTR_FRAME]) 7436 if (!info->attrs[NL80211_ATTR_FRAME])
7437 return -EINVAL; 7437 return -EINVAL;
@@ -7458,24 +7458,24 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
7458 if (info->attrs[NL80211_ATTR_DURATION]) { 7458 if (info->attrs[NL80211_ATTR_DURATION]) {
7459 if (!(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) 7459 if (!(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX))
7460 return -EINVAL; 7460 return -EINVAL;
7461 wait = nla_get_u32(info->attrs[NL80211_ATTR_DURATION]); 7461 params.wait = nla_get_u32(info->attrs[NL80211_ATTR_DURATION]);
7462 7462
7463 /* 7463 /*
7464 * We should wait on the channel for at least a minimum amount 7464 * We should wait on the channel for at least a minimum amount
7465 * of time (10ms) but no longer than the driver supports. 7465 * of time (10ms) but no longer than the driver supports.
7466 */ 7466 */
7467 if (wait < NL80211_MIN_REMAIN_ON_CHANNEL_TIME || 7467 if (params.wait < NL80211_MIN_REMAIN_ON_CHANNEL_TIME ||
7468 wait > rdev->wiphy.max_remain_on_channel_duration) 7468 params.wait > rdev->wiphy.max_remain_on_channel_duration)
7469 return -EINVAL; 7469 return -EINVAL;
7470 7470
7471 } 7471 }
7472 7472
7473 offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK]; 7473 params.offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK];
7474 7474
7475 if (offchan && !(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) 7475 if (params.offchan && !(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX))
7476 return -EINVAL; 7476 return -EINVAL;
7477 7477
7478 no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]); 7478 params.no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]);
7479 7479
7480 /* get the channel if any has been specified, otherwise pass NULL to 7480 /* get the channel if any has been specified, otherwise pass NULL to
7481 * the driver. The latter will use the current one 7481 * the driver. The latter will use the current one
@@ -7487,10 +7487,10 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
7487 return err; 7487 return err;
7488 } 7488 }
7489 7489
7490 if (!chandef.chan && offchan) 7490 if (!chandef.chan && params.offchan)
7491 return -EINVAL; 7491 return -EINVAL;
7492 7492
7493 if (!dont_wait_for_ack) { 7493 if (!params.dont_wait_for_ack) {
7494 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); 7494 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
7495 if (!msg) 7495 if (!msg)
7496 return -ENOMEM; 7496 return -ENOMEM;
@@ -7503,10 +7503,10 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
7503 } 7503 }
7504 } 7504 }
7505 7505
7506 err = cfg80211_mlme_mgmt_tx(rdev, wdev, chandef.chan, offchan, wait, 7506 params.buf = nla_data(info->attrs[NL80211_ATTR_FRAME]);
7507 nla_data(info->attrs[NL80211_ATTR_FRAME]), 7507 params.len = nla_len(info->attrs[NL80211_ATTR_FRAME]);
7508 nla_len(info->attrs[NL80211_ATTR_FRAME]), 7508 params.chan = chandef.chan;
7509 no_cck, dont_wait_for_ack, &cookie); 7509 err = cfg80211_mlme_mgmt_tx(rdev, wdev, &params, &cookie);
7510 if (err) 7510 if (err)
7511 goto free_msg; 7511 goto free_msg;
7512 7512
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 37ce9fdfe934..a6c03ab14a0d 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -624,16 +624,12 @@ rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev,
624 624
625static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev, 625static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev,
626 struct wireless_dev *wdev, 626 struct wireless_dev *wdev,
627 struct ieee80211_channel *chan, bool offchan, 627 struct cfg80211_mgmt_tx_params *params,
628 unsigned int wait, const u8 *buf, size_t len, 628 u64 *cookie)
629 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
630{ 629{
631 int ret; 630 int ret;
632 trace_rdev_mgmt_tx(&rdev->wiphy, wdev, chan, offchan, 631 trace_rdev_mgmt_tx(&rdev->wiphy, wdev, params);
633 wait, no_cck, dont_wait_for_ack); 632 ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, params, cookie);
634 ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan,
635 wait, buf, len, no_cck,
636 dont_wait_for_ack, cookie);
637 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); 633 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
638 return ret; 634 return ret;
639} 635}
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index ba5f0d6614d5..f7aa7a72d9bc 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -1653,9 +1653,8 @@ TRACE_EVENT(rdev_cancel_remain_on_channel,
1653 1653
1654TRACE_EVENT(rdev_mgmt_tx, 1654TRACE_EVENT(rdev_mgmt_tx,
1655 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1655 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1656 struct ieee80211_channel *chan, bool offchan, 1656 struct cfg80211_mgmt_tx_params *params),
1657 unsigned int wait, bool no_cck, bool dont_wait_for_ack), 1657 TP_ARGS(wiphy, wdev, params),
1658 TP_ARGS(wiphy, wdev, chan, offchan, wait, no_cck, dont_wait_for_ack),
1659 TP_STRUCT__entry( 1658 TP_STRUCT__entry(
1660 WIPHY_ENTRY 1659 WIPHY_ENTRY
1661 WDEV_ENTRY 1660 WDEV_ENTRY
@@ -1668,11 +1667,11 @@ TRACE_EVENT(rdev_mgmt_tx,
1668 TP_fast_assign( 1667 TP_fast_assign(
1669 WIPHY_ASSIGN; 1668 WIPHY_ASSIGN;
1670 WDEV_ASSIGN; 1669 WDEV_ASSIGN;
1671 CHAN_ASSIGN(chan); 1670 CHAN_ASSIGN(params->chan);
1672 __entry->offchan = offchan; 1671 __entry->offchan = params->offchan;
1673 __entry->wait = wait; 1672 __entry->wait = params->wait;
1674 __entry->no_cck = no_cck; 1673 __entry->no_cck = params->no_cck;
1675 __entry->dont_wait_for_ack = dont_wait_for_ack; 1674 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
1676 ), 1675 ),
1677 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s," 1676 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", " CHAN_PR_FMT ", offchan: %s,"
1678 " wait: %u, no cck: %s, dont wait for ack: %s", 1677 " wait: %u, no cck: %s, dont wait for ack: %s",