summaryrefslogtreecommitdiff
path: root/net-wireless/compat-wireless/files/channel-negative-one-maxim.patch
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:41:37 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:41:37 +0200
commit5d65d52a7227128a8524fe1c9c0cf5ba5b10c2d1 (patch)
tree7fd12c75ddb0f44b225e963d1836b326a1470c45 /net-wireless/compat-wireless/files/channel-negative-one-maxim.patch
parent20a107748317091d1ac003f1cbb045928d07e684 (diff)
Addeed the wi-fi modules
Diffstat (limited to 'net-wireless/compat-wireless/files/channel-negative-one-maxim.patch')
-rw-r--r--net-wireless/compat-wireless/files/channel-negative-one-maxim.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/net-wireless/compat-wireless/files/channel-negative-one-maxim.patch b/net-wireless/compat-wireless/files/channel-negative-one-maxim.patch
new file mode 100644
index 00000000..a1eb2b2d
--- /dev/null
+++ b/net-wireless/compat-wireless/files/channel-negative-one-maxim.patch
@@ -0,0 +1,38 @@
+commit fffd6e63ea75850dafbf2ccfb38a4189f43c0282
+Author: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
+Date: Tue Jun 1 15:43:21 2010 +0300
+
+ wireless: allow to retrieve the channel set on monitor interface
+
+ This will allow to preserve compatibility with userspace
+
+ Signed-off-by: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
+
+diff --git a/net/wireless/chan.c b/net/wireless/chan.c
+index b01a6f6..09d979b 100644
+--- a/net/wireless/chan.c
++++ b/net/wireless/chan.c
+@@ -49,9 +49,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);
+@@ -76,5 +79,8 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
+ if (wdev)
+ wdev->channel = chan;
+
++ if (mon_dev)
++ mon_dev->channel = chan;
++
+ return 0;
+ }
+