wok-6.x annotate linux/stuff/channel-negative-one-maxim.patch @ rev 18890

Up cookutils (793), tazpanel (566)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 12 16:05:17 2016 +0100 (2016-02-12)
parents a1084fda7f23
children ffc20f9bd49f
rev   line source
pankso@12285 1 commit fffd6e63ea75850dafbf2ccfb38a4189f43c0282
pankso@12285 2 Author: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
pankso@12285 3 Date: Tue Jun 1 15:43:21 2010 +0300
pankso@12285 4
pankso@12285 5 wireless: allow to retrieve the channel set on monitor interface
pankso@12285 6
pankso@12285 7 This will allow to preserve compatibility with userspace
pankso@12285 8
pankso@12285 9 Signed-off-by: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
pankso@12285 10
pankso@12285 11 diff --git a/net/wireless/chan.c b/net/wireless/chan.c
pankso@12285 12 index b01a6f6..09d979b 100644
pankso@12285 13 --- a/net/wireless/chan.c
pankso@12285 14 +++ b/net/wireless/chan.c
pankso@15855 15 @@ -49,9 +49,12 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
pankso@12285 16 {
pankso@12285 17 struct ieee80211_channel *chan;
pankso@12285 18 int result;
pankso@12285 19 + struct wireless_dev *mon_dev = NULL;
pankso@12285 20
pankso@12285 21 - if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
pankso@12285 22 + if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) {
pankso@12285 23 + mon_dev = wdev;
pankso@12285 24 wdev = NULL;
pankso@12285 25 + }
pankso@12285 26
pankso@12285 27 if (wdev) {
pankso@12285 28 ASSERT_WDEV_LOCK(wdev);
pankso@15855 29 @@ -76,5 +79,8 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
pankso@12285 30 if (wdev)
pankso@12285 31 wdev->channel = chan;
pankso@12285 32
pankso@12285 33 + if (mon_dev)
pankso@12285 34 + mon_dev->channel = chan;
pankso@12285 35 +
pankso@12285 36 return 0;
pankso@12285 37 }
pankso@12285 38