diff options
Diffstat (limited to 'net/wireless/wext-compat.c')
-rw-r--r-- | net/wireless/wext-compat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index da3307f32362..f9680c9cf9b3 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -785,7 +785,7 @@ static int cfg80211_wext_siwfreq(struct net_device *dev, | |||
785 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 785 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
786 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 786 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
787 | struct cfg80211_chan_def chandef = { | 787 | struct cfg80211_chan_def chandef = { |
788 | ._type = NL80211_CHAN_NO_HT, | 788 | .width = NL80211_CHAN_WIDTH_20_NOHT, |
789 | }; | 789 | }; |
790 | int freq, err; | 790 | int freq, err; |
791 | 791 | ||
@@ -800,6 +800,7 @@ static int cfg80211_wext_siwfreq(struct net_device *dev, | |||
800 | return freq; | 800 | return freq; |
801 | if (freq == 0) | 801 | if (freq == 0) |
802 | return -EINVAL; | 802 | return -EINVAL; |
803 | chandef.center_freq1 = freq; | ||
803 | chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq); | 804 | chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq); |
804 | if (!chandef.chan) | 805 | if (!chandef.chan) |
805 | return -EINVAL; | 806 | return -EINVAL; |
@@ -813,6 +814,7 @@ static int cfg80211_wext_siwfreq(struct net_device *dev, | |||
813 | return freq; | 814 | return freq; |
814 | if (freq == 0) | 815 | if (freq == 0) |
815 | return -EINVAL; | 816 | return -EINVAL; |
817 | chandef.center_freq1 = freq; | ||
816 | chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq); | 818 | chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq); |
817 | if (!chandef.chan) | 819 | if (!chandef.chan) |
818 | return -EINVAL; | 820 | return -EINVAL; |