diff options
author | Andrei Otcheretianski <andrei.otcheretianski@intel.com> | 2013-11-18 12:06:49 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-02 05:51:52 -0500 |
commit | b176e629402f41f2b984d3aa842ddae23ed5562e (patch) | |
tree | d7bf11ae06d568756a3394ec3127f65e4f973eac /net/wireless/mlme.c | |
parent | 017b45bb5c5b40d9da1ea671aa8bc2eaec73675f (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>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 12 |
1 files changed, 4 insertions, 8 deletions
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 | ||
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, |