提交 50425b09 编写于 作者: H Holger Schurig 提交者: John W. Linville

cfg80211: use cfg80211_wext_freq() for freq conversion

WEXT's "struct iw_freq" can also be used to handle a channel. This patch now
uses cfg80211_wext_freq() instead of hand-converting the frequency. That
allows user-space to specify channels as well, like with SIOCSIWFREQ.
Signed-off-by: NHolger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 10a01bfd
...@@ -662,7 +662,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, ...@@ -662,7 +662,7 @@ int cfg80211_wext_siwscan(struct net_device *dev,
int k; int k;
int wiphy_freq = wiphy->bands[band]->channels[j].center_freq; int wiphy_freq = wiphy->bands[band]->channels[j].center_freq;
for (k = 0; k < wreq->num_channels; k++) { for (k = 0; k < wreq->num_channels; k++) {
int wext_freq = wreq->channel_list[k].m / 100000; int wext_freq = cfg80211_wext_freq(wiphy, &wreq->channel_list[k]);
if (wext_freq == wiphy_freq) if (wext_freq == wiphy_freq)
goto wext_freq_found; goto wext_freq_found;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册