diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-11-17 13:11:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-17 13:11:43 -0500 |
commit | e11c259f745889b55bc5596ca78271f2f5cf08d2 (patch) | |
tree | 5025f0bf9093e84d0643beb9097249c176dbbea7 /net/wireless/wext-compat.c | |
parent | 8d26784cf0d04c1238e906efdd5de76439cb0a1e (diff) | |
parent | b4487c2d0edaf1332d7a9f11b5661044955ef5e2 (diff) |
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.c | 12 |
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, | |||
819 | struct iw_freq *freq, char *extra) | 819 | struct iw_freq *freq, char *extra) |
820 | { | 820 | { |
821 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 821 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
822 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | ||
823 | struct ieee80211_channel *chan; | ||
822 | 824 | ||
823 | switch (wdev->iftype) { | 825 | switch (wdev->iftype) { |
824 | case NL80211_IFTYPE_STATION: | 826 | case NL80211_IFTYPE_STATION: |
825 | return cfg80211_mgd_wext_giwfreq(dev, info, freq, extra); | 827 | return cfg80211_mgd_wext_giwfreq(dev, info, freq, extra); |
826 | case NL80211_IFTYPE_ADHOC: | 828 | case NL80211_IFTYPE_ADHOC: |
827 | return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra); | 829 | return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra); |
830 | case NL80211_IFTYPE_MONITOR: | ||
831 | if (!rdev->ops->get_channel) | ||
832 | return -EINVAL; | ||
833 | |||
834 | chan = rdev->ops->get_channel(wdev->wiphy); | ||
835 | if (!chan) | ||
836 | return -EINVAL; | ||
837 | freq->m = chan->center_freq; | ||
838 | freq->e = 6; | ||
839 | return 0; | ||
828 | default: | 840 | default: |
829 | if (!wdev->channel) | 841 | if (!wdev->channel) |
830 | return -EINVAL; | 842 | return -EINVAL; |