aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-08 12:31:02 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-26 06:42:58 -0500
commit42d97a599eb6b2aab3a401b3e5799a399d6c7652 (patch)
tree1905b71c2092ad299503515dd0d59fa74573cd12 /net/wireless
parent028e8da0723a6f6a00d9d1e3dae9ad448a28987e (diff)
cfg80211: remove remain-on-channel channel type
As mwifiex (and mac80211 in the software case) are the only drivers actually implementing remain-on-channel with channel type, userspace can't be relying on it. This is the case, as it's used only for P2P operations right now. Rather than adding a flag to tell userspace whether or not it can actually rely on it, simplify all the code by removing the ability to use different channel types. Leave only the validation of the attribute, so that if we extend it again later (with the needed capability flag), it can't break userspace sending invalid data. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/core.h6
-rw-r--r--net/wireless/mlme.c21
-rw-r--r--net/wireless/nl80211.c36
-rw-r--r--net/wireless/nl80211.h4
-rw-r--r--net/wireless/rdev-ops.h20
-rw-r--r--net/wireless/trace.h52
6 files changed, 47 insertions, 92 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index e53831c876bb..b0a09cf56e06 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -378,10 +378,8 @@ void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev);
378int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, 378int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
379 struct wireless_dev *wdev, 379 struct wireless_dev *wdev,
380 struct ieee80211_channel *chan, bool offchan, 380 struct ieee80211_channel *chan, bool offchan,
381 enum nl80211_channel_type channel_type, 381 unsigned int wait, const u8 *buf, size_t len,
382 bool channel_type_valid, unsigned int wait, 382 bool no_cck, bool dont_wait_for_ack, u64 *cookie);
383 const u8 *buf, size_t len, bool no_cck,
384 bool dont_wait_for_ack, u64 *cookie);
385void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa, 383void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa,
386 const struct ieee80211_ht_cap *ht_capa_mask); 384 const struct ieee80211_ht_cap *ht_capa_mask);
387 385
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 4bfd14f7c592..a9646b53a095 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -579,31 +579,25 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev,
579 579
580void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie, 580void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie,
581 struct ieee80211_channel *chan, 581 struct ieee80211_channel *chan,
582 enum nl80211_channel_type channel_type,
583 unsigned int duration, gfp_t gfp) 582 unsigned int duration, gfp_t gfp)
584{ 583{
585 struct wiphy *wiphy = wdev->wiphy; 584 struct wiphy *wiphy = wdev->wiphy;
586 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 585 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
587 586
588 trace_cfg80211_ready_on_channel(wdev, cookie, chan, channel_type, 587 trace_cfg80211_ready_on_channel(wdev, cookie, chan, duration);
589 duration); 588 nl80211_send_remain_on_channel(rdev, wdev, cookie, chan, duration, gfp);
590 nl80211_send_remain_on_channel(rdev, wdev, cookie, chan, channel_type,
591 duration, gfp);
592} 589}
593EXPORT_SYMBOL(cfg80211_ready_on_channel); 590EXPORT_SYMBOL(cfg80211_ready_on_channel);
594 591
595void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie, 592void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie,
596 struct ieee80211_channel *chan, 593 struct ieee80211_channel *chan,
597 enum nl80211_channel_type channel_type,
598 gfp_t gfp) 594 gfp_t gfp)
599{ 595{
600 struct wiphy *wiphy = wdev->wiphy; 596 struct wiphy *wiphy = wdev->wiphy;
601 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 597 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
602 598
603 trace_cfg80211_ready_on_channel_expired(wdev, cookie, chan, 599 trace_cfg80211_ready_on_channel_expired(wdev, cookie, chan);
604 channel_type); 600 nl80211_send_remain_on_channel_cancel(rdev, wdev, cookie, chan, gfp);
605 nl80211_send_remain_on_channel_cancel(rdev, wdev, cookie, chan,
606 channel_type, gfp);
607} 601}
608EXPORT_SYMBOL(cfg80211_remain_on_channel_expired); 602EXPORT_SYMBOL(cfg80211_remain_on_channel_expired);
609 603
@@ -758,10 +752,8 @@ void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev)
758int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, 752int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
759 struct wireless_dev *wdev, 753 struct wireless_dev *wdev,
760 struct ieee80211_channel *chan, bool offchan, 754 struct ieee80211_channel *chan, bool offchan,
761 enum nl80211_channel_type channel_type, 755 unsigned int wait, const u8 *buf, size_t len,
762 bool channel_type_valid, unsigned int wait, 756 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
763 const u8 *buf, size_t len, bool no_cck,
764 bool dont_wait_for_ack, u64 *cookie)
765{ 757{
766 const struct ieee80211_mgmt *mgmt; 758 const struct ieee80211_mgmt *mgmt;
767 u16 stype; 759 u16 stype;
@@ -855,7 +847,6 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
855 847
856 /* Transmit the Action frame as requested by user space */ 848 /* Transmit the Action frame as requested by user space */
857 return rdev_mgmt_tx(rdev, wdev, chan, offchan, 849 return rdev_mgmt_tx(rdev, wdev, chan, offchan,
858 channel_type, channel_type_valid,
859 wait, buf, len, no_cck, dont_wait_for_ack, 850 wait, buf, len, no_cck, dont_wait_for_ack,
860 cookie); 851 cookie);
861} 852}
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4c427fa5c450..e880f4494950 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -5952,7 +5952,6 @@ static int nl80211_remain_on_channel(struct sk_buff *skb,
5952 struct sk_buff *msg; 5952 struct sk_buff *msg;
5953 void *hdr; 5953 void *hdr;
5954 u64 cookie; 5954 u64 cookie;
5955 enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
5956 u32 freq, duration; 5955 u32 freq, duration;
5957 int err; 5956 int err;
5958 5957
@@ -5975,11 +5974,11 @@ static int nl80211_remain_on_channel(struct sk_buff *skb,
5975 return -EINVAL; 5974 return -EINVAL;
5976 5975
5977 if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE] && 5976 if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE] &&
5978 !nl80211_valid_channel_type(info, &channel_type)) 5977 !nl80211_valid_channel_type(info, NULL))
5979 return -EINVAL; 5978 return -EINVAL;
5980 5979
5981 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]); 5980 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
5982 chan = rdev_freq_to_chan(rdev, freq, channel_type); 5981 chan = rdev_freq_to_chan(rdev, freq, NL80211_CHAN_NO_HT);
5983 if (chan == NULL) 5982 if (chan == NULL)
5984 return -EINVAL; 5983 return -EINVAL;
5985 5984
@@ -5995,8 +5994,7 @@ static int nl80211_remain_on_channel(struct sk_buff *skb,
5995 goto free_msg; 5994 goto free_msg;
5996 } 5995 }
5997 5996
5998 err = rdev_remain_on_channel(rdev, wdev, chan, channel_type, duration, 5997 err = rdev_remain_on_channel(rdev, wdev, chan, duration, &cookie);
5999 &cookie);
6000 5998
6001 if (err) 5999 if (err)
6002 goto free_msg; 6000 goto free_msg;
@@ -6216,8 +6214,6 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
6216 struct cfg80211_registered_device *rdev = info->user_ptr[0]; 6214 struct cfg80211_registered_device *rdev = info->user_ptr[0];
6217 struct wireless_dev *wdev = info->user_ptr[1]; 6215 struct wireless_dev *wdev = info->user_ptr[1];
6218 struct ieee80211_channel *chan; 6216 struct ieee80211_channel *chan;
6219 enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
6220 bool channel_type_valid = false;
6221 u32 freq; 6217 u32 freq;
6222 int err; 6218 int err;
6223 void *hdr = NULL; 6219 void *hdr = NULL;
@@ -6264,11 +6260,9 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
6264 6260
6265 } 6261 }
6266 6262
6267 if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) { 6263 if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE] &&
6268 if (!nl80211_valid_channel_type(info, &channel_type)) 6264 !nl80211_valid_channel_type(info, NULL))
6269 return -EINVAL; 6265 return -EINVAL;
6270 channel_type_valid = true;
6271 }
6272 6266
6273 offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK]; 6267 offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK];
6274 6268
@@ -6278,7 +6272,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
6278 no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]); 6272 no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]);
6279 6273
6280 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]); 6274 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
6281 chan = rdev_freq_to_chan(rdev, freq, channel_type); 6275 chan = rdev_freq_to_chan(rdev, freq, NL80211_CHAN_NO_HT);
6282 if (chan == NULL) 6276 if (chan == NULL)
6283 return -EINVAL; 6277 return -EINVAL;
6284 6278
@@ -6296,8 +6290,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
6296 } 6290 }
6297 } 6291 }
6298 6292
6299 err = cfg80211_mlme_mgmt_tx(rdev, wdev, chan, offchan, channel_type, 6293 err = cfg80211_mlme_mgmt_tx(rdev, wdev, chan, offchan, wait,
6300 channel_type_valid, wait,
6301 nla_data(info->attrs[NL80211_ATTR_FRAME]), 6294 nla_data(info->attrs[NL80211_ATTR_FRAME]),
6302 nla_len(info->attrs[NL80211_ATTR_FRAME]), 6295 nla_len(info->attrs[NL80211_ATTR_FRAME]),
6303 no_cck, dont_wait_for_ack, &cookie); 6296 no_cck, dont_wait_for_ack, &cookie);
@@ -8395,7 +8388,6 @@ static void nl80211_send_remain_on_chan_event(
8395 int cmd, struct cfg80211_registered_device *rdev, 8388 int cmd, struct cfg80211_registered_device *rdev,
8396 struct wireless_dev *wdev, u64 cookie, 8389 struct wireless_dev *wdev, u64 cookie,
8397 struct ieee80211_channel *chan, 8390 struct ieee80211_channel *chan,
8398 enum nl80211_channel_type channel_type,
8399 unsigned int duration, gfp_t gfp) 8391 unsigned int duration, gfp_t gfp)
8400{ 8392{
8401 struct sk_buff *msg; 8393 struct sk_buff *msg;
@@ -8416,7 +8408,8 @@ static void nl80211_send_remain_on_chan_event(
8416 wdev->netdev->ifindex)) || 8408 wdev->netdev->ifindex)) ||
8417 nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || 8409 nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) ||
8418 nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, chan->center_freq) || 8410 nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, chan->center_freq) ||
8419 nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, channel_type) || 8411 nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE,
8412 NL80211_CHAN_NO_HT) ||
8420 nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie)) 8413 nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie))
8421 goto nla_put_failure; 8414 goto nla_put_failure;
8422 8415
@@ -8438,23 +8431,20 @@ static void nl80211_send_remain_on_chan_event(
8438void nl80211_send_remain_on_channel(struct cfg80211_registered_device *rdev, 8431void nl80211_send_remain_on_channel(struct cfg80211_registered_device *rdev,
8439 struct wireless_dev *wdev, u64 cookie, 8432 struct wireless_dev *wdev, u64 cookie,
8440 struct ieee80211_channel *chan, 8433 struct ieee80211_channel *chan,
8441 enum nl80211_channel_type channel_type,
8442 unsigned int duration, gfp_t gfp) 8434 unsigned int duration, gfp_t gfp)
8443{ 8435{
8444 nl80211_send_remain_on_chan_event(NL80211_CMD_REMAIN_ON_CHANNEL, 8436 nl80211_send_remain_on_chan_event(NL80211_CMD_REMAIN_ON_CHANNEL,
8445 rdev, wdev, cookie, chan, 8437 rdev, wdev, cookie, chan,
8446 channel_type, duration, gfp); 8438 duration, gfp);
8447} 8439}
8448 8440
8449void nl80211_send_remain_on_channel_cancel( 8441void nl80211_send_remain_on_channel_cancel(
8450 struct cfg80211_registered_device *rdev, 8442 struct cfg80211_registered_device *rdev,
8451 struct wireless_dev *wdev, 8443 struct wireless_dev *wdev,
8452 u64 cookie, struct ieee80211_channel *chan, 8444 u64 cookie, struct ieee80211_channel *chan, gfp_t gfp)
8453 enum nl80211_channel_type channel_type, gfp_t gfp)
8454{ 8445{
8455 nl80211_send_remain_on_chan_event(NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL, 8446 nl80211_send_remain_on_chan_event(NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL,
8456 rdev, wdev, cookie, chan, 8447 rdev, wdev, cookie, chan, 0, gfp);
8457 channel_type, 0, gfp);
8458} 8448}
8459 8449
8460void nl80211_send_sta_event(struct cfg80211_registered_device *rdev, 8450void nl80211_send_sta_event(struct cfg80211_registered_device *rdev,
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index f6153516068c..7adbd767dbfd 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -76,13 +76,11 @@ void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
76void nl80211_send_remain_on_channel(struct cfg80211_registered_device *rdev, 76void nl80211_send_remain_on_channel(struct cfg80211_registered_device *rdev,
77 struct wireless_dev *wdev, u64 cookie, 77 struct wireless_dev *wdev, u64 cookie,
78 struct ieee80211_channel *chan, 78 struct ieee80211_channel *chan,
79 enum nl80211_channel_type channel_type,
80 unsigned int duration, gfp_t gfp); 79 unsigned int duration, gfp_t gfp);
81void nl80211_send_remain_on_channel_cancel( 80void nl80211_send_remain_on_channel_cancel(
82 struct cfg80211_registered_device *rdev, 81 struct cfg80211_registered_device *rdev,
83 struct wireless_dev *wdev, 82 struct wireless_dev *wdev,
84 u64 cookie, struct ieee80211_channel *chan, 83 u64 cookie, struct ieee80211_channel *chan, gfp_t gfp);
85 enum nl80211_channel_type channel_type, gfp_t gfp);
86 84
87void nl80211_send_sta_event(struct cfg80211_registered_device *rdev, 85void nl80211_send_sta_event(struct cfg80211_registered_device *rdev,
88 struct net_device *dev, const u8 *mac_addr, 86 struct net_device *dev, const u8 *mac_addr,
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 6e5fa659068d..ee54a5aa4381 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -600,14 +600,12 @@ static inline int
600rdev_remain_on_channel(struct cfg80211_registered_device *rdev, 600rdev_remain_on_channel(struct cfg80211_registered_device *rdev,
601 struct wireless_dev *wdev, 601 struct wireless_dev *wdev,
602 struct ieee80211_channel *chan, 602 struct ieee80211_channel *chan,
603 enum nl80211_channel_type channel_type,
604 unsigned int duration, u64 *cookie) 603 unsigned int duration, u64 *cookie)
605{ 604{
606 int ret; 605 int ret;
607 trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, channel_type, 606 trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, duration);
608 duration);
609 ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan, 607 ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan,
610 channel_type, duration, cookie); 608 duration, cookie);
611 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); 609 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
612 return ret; 610 return ret;
613} 611}
@@ -626,17 +624,15 @@ rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev,
626static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev, 624static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev,
627 struct wireless_dev *wdev, 625 struct wireless_dev *wdev,
628 struct ieee80211_channel *chan, bool offchan, 626 struct ieee80211_channel *chan, bool offchan,
629 enum nl80211_channel_type channel_type, 627 unsigned int wait, const u8 *buf, size_t len,
630 bool channel_type_valid, unsigned int wait, 628 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
631 const u8 *buf, size_t len, bool no_cck,
632 bool dont_wait_for_ack, u64 *cookie)
633{ 629{
634 int ret; 630 int ret;
635 trace_rdev_mgmt_tx(&rdev->wiphy, wdev, chan, offchan, channel_type, 631 trace_rdev_mgmt_tx(&rdev->wiphy, wdev, chan, offchan,
636 channel_type_valid, wait, no_cck, dont_wait_for_ack); 632 wait, no_cck, dont_wait_for_ack);
637 ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan, 633 ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan,
638 channel_type, channel_type_valid, wait, buf, 634 wait, buf, len, no_cck,
639 len, no_cck, dont_wait_for_ack, cookie); 635 dont_wait_for_ack, cookie);
640 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); 636 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
641 return ret; 637 return ret;
642} 638}
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index f264c20a7090..ed10833f9a3a 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -1573,25 +1573,22 @@ DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa,
1573TRACE_EVENT(rdev_remain_on_channel, 1573TRACE_EVENT(rdev_remain_on_channel,
1574 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1574 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1575 struct ieee80211_channel *chan, 1575 struct ieee80211_channel *chan,
1576 enum nl80211_channel_type channel_type, unsigned int duration), 1576 unsigned int duration),
1577 TP_ARGS(wiphy, wdev, chan, channel_type, duration), 1577 TP_ARGS(wiphy, wdev, chan, duration),
1578 TP_STRUCT__entry( 1578 TP_STRUCT__entry(
1579 WIPHY_ENTRY 1579 WIPHY_ENTRY
1580 WDEV_ENTRY 1580 WDEV_ENTRY
1581 CHAN_ENTRY 1581 CHAN_ENTRY
1582 __field(enum nl80211_channel_type, channel_type)
1583 __field(unsigned int, duration) 1582 __field(unsigned int, duration)
1584 ), 1583 ),
1585 TP_fast_assign( 1584 TP_fast_assign(
1586 WIPHY_ASSIGN; 1585 WIPHY_ASSIGN;
1587 WDEV_ASSIGN; 1586 WDEV_ASSIGN;
1588 CHAN_ASSIGN(chan); 1587 CHAN_ASSIGN(chan);
1589 __entry->channel_type = channel_type;
1590 __entry->duration = duration; 1588 __entry->duration = duration;
1591 ), 1589 ),
1592 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", channel type: %d, duration: %u", 1590 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", duration: %u",
1593 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->channel_type, 1591 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->duration)
1594 __entry->duration)
1595); 1592);
1596 1593
1597TRACE_EVENT(rdev_return_int_cookie, 1594TRACE_EVENT(rdev_return_int_cookie,
@@ -1631,18 +1628,13 @@ TRACE_EVENT(rdev_cancel_remain_on_channel,
1631TRACE_EVENT(rdev_mgmt_tx, 1628TRACE_EVENT(rdev_mgmt_tx,
1632 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, 1629 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
1633 struct ieee80211_channel *chan, bool offchan, 1630 struct ieee80211_channel *chan, bool offchan,
1634 enum nl80211_channel_type channel_type, 1631 unsigned int wait, bool no_cck, bool dont_wait_for_ack),
1635 bool channel_type_valid, unsigned int wait, bool no_cck, 1632 TP_ARGS(wiphy, wdev, chan, offchan, wait, no_cck, dont_wait_for_ack),
1636 bool dont_wait_for_ack),
1637 TP_ARGS(wiphy, wdev, chan, offchan, channel_type, channel_type_valid,
1638 wait, no_cck, dont_wait_for_ack),
1639 TP_STRUCT__entry( 1633 TP_STRUCT__entry(
1640 WIPHY_ENTRY 1634 WIPHY_ENTRY
1641 WDEV_ENTRY 1635 WDEV_ENTRY
1642 CHAN_ENTRY 1636 CHAN_ENTRY
1643 __field(bool, offchan) 1637 __field(bool, offchan)
1644 __field(enum nl80211_channel_type, channel_type)
1645 __field(bool, channel_type_valid)
1646 __field(unsigned int, wait) 1638 __field(unsigned int, wait)
1647 __field(bool, no_cck) 1639 __field(bool, no_cck)
1648 __field(bool, dont_wait_for_ack) 1640 __field(bool, dont_wait_for_ack)
@@ -1652,18 +1644,14 @@ TRACE_EVENT(rdev_mgmt_tx,
1652 WDEV_ASSIGN; 1644 WDEV_ASSIGN;
1653 CHAN_ASSIGN(chan); 1645 CHAN_ASSIGN(chan);
1654 __entry->offchan = offchan; 1646 __entry->offchan = offchan;
1655 __entry->channel_type = channel_type;
1656 __entry->channel_type_valid = channel_type_valid;
1657 __entry->wait = wait; 1647 __entry->wait = wait;
1658 __entry->no_cck = no_cck; 1648 __entry->no_cck = no_cck;
1659 __entry->dont_wait_for_ack = dont_wait_for_ack; 1649 __entry->dont_wait_for_ack = dont_wait_for_ack;
1660 ), 1650 ),
1661 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", offchan: %s, " 1651 TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", offchan: %s,"
1662 "channel type: %d, channel type valid: %s, wait: %u, " 1652 " wait: %u, no cck: %s, dont wait for ack: %s",
1663 "no cck: %s, dont wait for ack: %s",
1664 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, 1653 WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG,
1665 BOOL_TO_STR(__entry->offchan), __entry->channel_type, 1654 BOOL_TO_STR(__entry->offchan), __entry->wait,
1666 BOOL_TO_STR(__entry->channel_type_valid), __entry->wait,
1667 BOOL_TO_STR(__entry->no_cck), 1655 BOOL_TO_STR(__entry->no_cck),
1668 BOOL_TO_STR(__entry->dont_wait_for_ack)) 1656 BOOL_TO_STR(__entry->dont_wait_for_ack))
1669); 1657);
@@ -1894,47 +1882,41 @@ TRACE_EVENT(cfg80211_michael_mic_failure,
1894TRACE_EVENT(cfg80211_ready_on_channel, 1882TRACE_EVENT(cfg80211_ready_on_channel,
1895 TP_PROTO(struct wireless_dev *wdev, u64 cookie, 1883 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
1896 struct ieee80211_channel *chan, 1884 struct ieee80211_channel *chan,
1897 enum nl80211_channel_type channel_type, unsigned int duration), 1885 unsigned int duration),
1898 TP_ARGS(wdev, cookie, chan, channel_type, duration), 1886 TP_ARGS(wdev, cookie, chan, duration),
1899 TP_STRUCT__entry( 1887 TP_STRUCT__entry(
1900 WDEV_ENTRY 1888 WDEV_ENTRY
1901 __field(u64, cookie) 1889 __field(u64, cookie)
1902 CHAN_ENTRY 1890 CHAN_ENTRY
1903 __field(enum nl80211_channel_type, channel_type)
1904 __field(unsigned int, duration) 1891 __field(unsigned int, duration)
1905 ), 1892 ),
1906 TP_fast_assign( 1893 TP_fast_assign(
1907 WDEV_ASSIGN; 1894 WDEV_ASSIGN;
1908 __entry->cookie = cookie; 1895 __entry->cookie = cookie;
1909 CHAN_ASSIGN(chan); 1896 CHAN_ASSIGN(chan);
1910 __entry->channel_type = channel_type;
1911 __entry->duration = duration; 1897 __entry->duration = duration;
1912 ), 1898 ),
1913 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", channel type: %d, duration: %u", 1899 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
1914 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG, 1900 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
1915 __entry->channel_type, __entry->duration) 1901 __entry->duration)
1916); 1902);
1917 1903
1918TRACE_EVENT(cfg80211_ready_on_channel_expired, 1904TRACE_EVENT(cfg80211_ready_on_channel_expired,
1919 TP_PROTO(struct wireless_dev *wdev, u64 cookie, 1905 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
1920 struct ieee80211_channel *chan, 1906 struct ieee80211_channel *chan),
1921 enum nl80211_channel_type channel_type), 1907 TP_ARGS(wdev, cookie, chan),
1922 TP_ARGS(wdev, cookie, chan, channel_type),
1923 TP_STRUCT__entry( 1908 TP_STRUCT__entry(
1924 WDEV_ENTRY 1909 WDEV_ENTRY
1925 __field(u64, cookie) 1910 __field(u64, cookie)
1926 CHAN_ENTRY 1911 CHAN_ENTRY
1927 __field(enum nl80211_channel_type, channel_type)
1928 ), 1912 ),
1929 TP_fast_assign( 1913 TP_fast_assign(
1930 WDEV_ASSIGN; 1914 WDEV_ASSIGN;
1931 __entry->cookie = cookie; 1915 __entry->cookie = cookie;
1932 CHAN_ASSIGN(chan); 1916 CHAN_ASSIGN(chan);
1933 __entry->channel_type = channel_type;
1934 ), 1917 ),
1935 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", channel type: %d", 1918 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
1936 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG, 1919 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
1937 __entry->channel_type)
1938); 1920);
1939 1921
1940TRACE_EVENT(cfg80211_new_sta, 1922TRACE_EVENT(cfg80211_new_sta,