diff options
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 6a6b1c8e907d..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 | ||
521 | int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | 521 | int 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 | ||
623 | bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, | 619 | bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, |
@@ -763,12 +759,12 @@ void cfg80211_radar_event(struct wiphy *wiphy, | |||
763 | EXPORT_SYMBOL(cfg80211_radar_event); | 759 | EXPORT_SYMBOL(cfg80211_radar_event); |
764 | 760 | ||
765 | void cfg80211_cac_event(struct net_device *netdev, | 761 | void cfg80211_cac_event(struct net_device *netdev, |
762 | const struct cfg80211_chan_def *chandef, | ||
766 | enum nl80211_radar_event event, gfp_t gfp) | 763 | enum nl80211_radar_event event, gfp_t gfp) |
767 | { | 764 | { |
768 | struct wireless_dev *wdev = netdev->ieee80211_ptr; | 765 | struct wireless_dev *wdev = netdev->ieee80211_ptr; |
769 | struct wiphy *wiphy = wdev->wiphy; | 766 | struct wiphy *wiphy = wdev->wiphy; |
770 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 767 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
771 | struct cfg80211_chan_def chandef; | ||
772 | unsigned long timeout; | 768 | unsigned long timeout; |
773 | 769 | ||
774 | trace_cfg80211_cac_event(netdev, event); | 770 | trace_cfg80211_cac_event(netdev, event); |
@@ -779,14 +775,12 @@ void cfg80211_cac_event(struct net_device *netdev, | |||
779 | if (WARN_ON(!wdev->channel)) | 775 | if (WARN_ON(!wdev->channel)) |
780 | return; | 776 | return; |
781 | 777 | ||
782 | cfg80211_chandef_create(&chandef, wdev->channel, NL80211_CHAN_NO_HT); | ||
783 | |||
784 | switch (event) { | 778 | switch (event) { |
785 | case NL80211_RADAR_CAC_FINISHED: | 779 | case NL80211_RADAR_CAC_FINISHED: |
786 | timeout = wdev->cac_start_time + | 780 | timeout = wdev->cac_start_time + |
787 | msecs_to_jiffies(IEEE80211_DFS_MIN_CAC_TIME_MS); | 781 | msecs_to_jiffies(IEEE80211_DFS_MIN_CAC_TIME_MS); |
788 | WARN_ON(!time_after_eq(jiffies, timeout)); | 782 | WARN_ON(!time_after_eq(jiffies, timeout)); |
789 | cfg80211_set_dfs_state(wiphy, &chandef, NL80211_DFS_AVAILABLE); | 783 | cfg80211_set_dfs_state(wiphy, chandef, NL80211_DFS_AVAILABLE); |
790 | break; | 784 | break; |
791 | case NL80211_RADAR_CAC_ABORTED: | 785 | case NL80211_RADAR_CAC_ABORTED: |
792 | break; | 786 | break; |
@@ -796,6 +790,6 @@ void cfg80211_cac_event(struct net_device *netdev, | |||
796 | } | 790 | } |
797 | wdev->cac_started = false; | 791 | wdev->cac_started = false; |
798 | 792 | ||
799 | nl80211_radar_notify(rdev, &chandef, event, netdev, gfp); | 793 | nl80211_radar_notify(rdev, chandef, event, netdev, gfp); |
800 | } | 794 | } |
801 | EXPORT_SYMBOL(cfg80211_cac_event); | 795 | EXPORT_SYMBOL(cfg80211_cac_event); |