Search Linux Wireless

When on a fixed channel in monitor mode, return what that fixed channel is.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i was directed this way from the ubuntu kernel mailing list. When on a
fixed channel in monitor mode, the kernel does not return the current
channel, this should fix that.


-- 
Nicholas (Tilt) Hockey
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;
 }

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux