diff options
Diffstat (limited to 'net/wireless/wext-compat.c')
-rw-r--r-- | net/wireless/wext-compat.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index bc879833b21f..7df42f541873 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -827,8 +827,6 @@ static int cfg80211_wext_giwfreq(struct net_device *dev, | |||
827 | { | 827 | { |
828 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 828 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
829 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 829 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
830 | struct ieee80211_channel *chan; | ||
831 | enum nl80211_channel_type channel_type; | ||
832 | 830 | ||
833 | switch (wdev->iftype) { | 831 | switch (wdev->iftype) { |
834 | case NL80211_IFTYPE_STATION: | 832 | case NL80211_IFTYPE_STATION: |
@@ -836,13 +834,10 @@ static int cfg80211_wext_giwfreq(struct net_device *dev, | |||
836 | case NL80211_IFTYPE_ADHOC: | 834 | case NL80211_IFTYPE_ADHOC: |
837 | return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra); | 835 | return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra); |
838 | case NL80211_IFTYPE_MONITOR: | 836 | case NL80211_IFTYPE_MONITOR: |
839 | if (!rdev->ops->get_channel) | 837 | if (!rdev->monitor_channel) |
840 | return -EINVAL; | 838 | return -EINVAL; |
841 | 839 | ||
842 | chan = rdev->ops->get_channel(wdev->wiphy, &channel_type); | 840 | freq->m = rdev->monitor_channel->center_freq; |
843 | if (!chan) | ||
844 | return -EINVAL; | ||
845 | freq->m = chan->center_freq; | ||
846 | freq->e = 6; | 841 | freq->e = 6; |
847 | return 0; | 842 | return 0; |
848 | default: | 843 | default: |