Message ID | BANLkTin9CPeu6LsXiQMu632GU4CvNuwO6Q@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 06/22/2011 06:35 PM, Nicholas Hockey wrote: > When on a fixed channel in monitor mode, the kernel does not return > the current channel, this should fix that. > > -- > Nicholas (Tilt) Hockey > This is best submitted on the wireless developer mailing list at linux-wireless@vger.kernel.org rtg
On Thu, Jun 23, 2011 at 1:31 PM, Tim Gardner <tim.gardner@canonical.com> wrote: > On 06/22/2011 06:35 PM, Nicholas Hockey wrote: >> >> When on a fixed channel in monitor mode, the kernel does not return >> the current channel, this should fix that. >> >> -- >> Nicholas (Tilt) Hockey >> > > This is best submitted on the wireless developer mailing list at > linux-wireless@vger.kernel.org > > rtg > -- > Tim Gardner tim.gardner@canonical.com > Thanks for pointing me in their direction Tim. Ill do that and see what they think about it.
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 17cd0c0..261ee32 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -82,10 +82,12 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev, { struct ieee80211_channel *chan; int result; + struct wireless_dev *mon_dev = NULL; - if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) + if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) { + mon_dev = wdev; wdev = NULL; - + } if (wdev) { ASSERT_WDEV_LOCK(wdev); @@ -131,5 +133,8 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev, if (wdev) wdev->channel = chan; + if (mon_dev) + mon_dev->channel = chan; + return 0; }