]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mac80211: report operating frequency rather than current
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 4 May 2009 15:52:10 +0000 (17:52 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 6 May 2009 19:15:02 +0000 (15:15 -0400)
It's not very helpful to see, in iwconfig, the current frequency
the card is tuned to if that frequency is currently somewhere
across the board because we're scanning. Since we keep track of
the frequency the user wants, display that instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/wext.c

index 1a649da42c4112fc219ed57318e8af1839a227e5..6b4eb8d43a4e8256b8b542d769c520c47113437e 100644 (file)
@@ -185,7 +185,7 @@ static int ieee80211_ioctl_giwfreq(struct net_device *dev,
        if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
                return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
 
-       freq->m = local->hw.conf.channel->center_freq;
+       freq->m = local->oper_channel->center_freq;
        freq->e = 6;
 
        return 0;