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 /drivers/net/wireless/orinoco | |
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 'drivers/net/wireless/orinoco')
-rw-r--r-- | drivers/net/wireless/orinoco/cfg.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c index 7b751fba7e1f..d01edd2c50c5 100644 --- a/drivers/net/wireless/orinoco/cfg.c +++ b/drivers/net/wireless/orinoco/cfg.c | |||
@@ -161,24 +161,23 @@ static int orinoco_scan(struct wiphy *wiphy, | |||
161 | } | 161 | } |
162 | 162 | ||
163 | static int orinoco_set_monitor_channel(struct wiphy *wiphy, | 163 | static int orinoco_set_monitor_channel(struct wiphy *wiphy, |
164 | struct ieee80211_channel *chan, | 164 | struct cfg80211_chan_def *chandef) |
165 | enum nl80211_channel_type channel_type) | ||
166 | { | 165 | { |
167 | struct orinoco_private *priv = wiphy_priv(wiphy); | 166 | struct orinoco_private *priv = wiphy_priv(wiphy); |
168 | int err = 0; | 167 | int err = 0; |
169 | unsigned long flags; | 168 | unsigned long flags; |
170 | int channel; | 169 | int channel; |
171 | 170 | ||
172 | if (!chan) | 171 | if (!chandef->chan) |
173 | return -EINVAL; | 172 | return -EINVAL; |
174 | 173 | ||
175 | if (channel_type != NL80211_CHAN_NO_HT) | 174 | if (cfg80211_get_chandef_type(chandef) != NL80211_CHAN_NO_HT) |
176 | return -EINVAL; | 175 | return -EINVAL; |
177 | 176 | ||
178 | if (chan->band != IEEE80211_BAND_2GHZ) | 177 | if (chandef->chan->band != IEEE80211_BAND_2GHZ) |
179 | return -EINVAL; | 178 | return -EINVAL; |
180 | 179 | ||
181 | channel = ieee80211_freq_to_dsss_chan(chan->center_freq); | 180 | channel = ieee80211_freq_to_dsss_chan(chandef->chan->center_freq); |
182 | 181 | ||
183 | if ((channel < 1) || (channel > NUM_CHANNELS) || | 182 | if ((channel < 1) || (channel > NUM_CHANNELS) || |
184 | !(priv->channel_mask & (1 << (channel - 1)))) | 183 | !(priv->channel_mask & (1 << (channel - 1)))) |