summaryrefslogtreecommitdiffstats
path: root/net/wireless/wext-compat.c
diff options
context:
space:
mode:
authorJohn W. Linville2011-11-17 19:11:43 +0100
committerJohn W. Linville2011-11-17 19:11:43 +0100
commite11c259f745889b55bc5596ca78271f2f5cf08d2 (patch)
tree5025f0bf9093e84d0643beb9097249c176dbbea7 /net/wireless/wext-compat.c
parentipv6: Use pr_warn() in ip6_fib.c (diff)
parentmac80211: fix warning in ieee80211_probe_client (diff)
downloadkernel-qcow2-linux-e11c259f745889b55bc5596ca78271f2f5cf08d2.tar.gz
kernel-qcow2-linux-e11c259f745889b55bc5596ca78271f2f5cf08d2.tar.xz
kernel-qcow2-linux-e11c259f745889b55bc5596ca78271f2f5cf08d2.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: include/net/bluetooth/bluetooth.h
Diffstat (limited to 'net/wireless/wext-compat.c')
-rw-r--r--net/wireless/wext-compat.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index 6897436b1d3f..3c24eb97e9d7 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -819,12 +819,24 @@ static int cfg80211_wext_giwfreq(struct net_device *dev,
struct iw_freq *freq, char *extra)
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
+ struct ieee80211_channel *chan;
switch (wdev->iftype) {
case NL80211_IFTYPE_STATION:
return cfg80211_mgd_wext_giwfreq(dev, info, freq, extra);
case NL80211_IFTYPE_ADHOC:
return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
+ case NL80211_IFTYPE_MONITOR:
+ if (!rdev->ops->get_channel)
+ return -EINVAL;
+
+ chan = rdev->ops->get_channel(wdev->wiphy);
+ if (!chan)
+ return -EINVAL;
+ freq->m = chan->center_freq;
+ freq->e = 6;
+ return 0;
default:
if (!wdev->channel)
return -EINVAL;