diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-11-08 15:25:48 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-26 06:42:58 -0500 |
commit | 683b6d3b31a51956ea540df00abb0b78894924c1 (patch) | |
tree | 558e0f316b56368ab259755cb4eeaeb40331853d /net/wireless/wext-sme.c | |
parent | fe4b31810c06cc6518fb193efb9b3c3289b55832 (diff) |
cfg80211: pass a channel definition struct
Instead of passing a channel pointer and channel type
to all functions and driver methods, pass a new channel
definition struct. Right now, this struct contains just
the control channel and channel type, but for VHT this
will change.
Also, add a small inline cfg80211_get_chandef_type() so
that drivers don't need to use the _type field of the
new structure all the time, which will change.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/wext-sme.c')
-rw-r--r-- | net/wireless/wext-sme.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index 1f773f668d1a..e6e5dbf2f616 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c | |||
@@ -119,7 +119,15 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev, | |||
119 | * channel we disconnected above and reconnect below. | 119 | * channel we disconnected above and reconnect below. |
120 | */ | 120 | */ |
121 | if (chan && !wdev->wext.connect.ssid_len) { | 121 | if (chan && !wdev->wext.connect.ssid_len) { |
122 | err = cfg80211_set_monitor_channel(rdev, freq, NL80211_CHAN_NO_HT); | 122 | struct cfg80211_chan_def chandef = { |
123 | ._type = NL80211_CHAN_NO_HT, | ||
124 | }; | ||
125 | |||
126 | chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq); | ||
127 | if (chandef.chan) | ||
128 | err = cfg80211_set_monitor_channel(rdev, &chandef); | ||
129 | else | ||
130 | err = -EINVAL; | ||
123 | goto out; | 131 | goto out; |
124 | } | 132 | } |
125 | 133 | ||