linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: fix WEXT ioctl GIWFREQ for monitor interfaces
@ 2010-07-19 18:41 David Gnedt
  2010-07-19 20:12 ` Gábor Stefanik
  2010-07-19 20:27 ` Johannes Berg
  0 siblings, 2 replies; 7+ messages in thread
From: David Gnedt @ 2010-07-19 18:41 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Johannes Berg

The cfg80211_set_freq function now also saves the channel for monitor
interfaces.
This fixes a issue were the WEXT ioctl GIWFREQ doesn't report the correct
channel when the channel was switched in monitor mode.

Signed-off-by: David Gnedt <david.gnedt@davizone.at>
---
 net/wireless/chan.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index d0c92dd..fd05938 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -51,9 +51,6 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
 	struct ieee80211_channel *chan;
 	int result;

-	if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
-		wdev = NULL;
-
 	if (wdev) {
 		ASSERT_WDEV_LOCK(wdev);

@@ -69,7 +66,9 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
 		return -EINVAL;

 	result = rdev->ops->set_channel(&rdev->wiphy,
-					wdev ? wdev->netdev : NULL,
+					wdev && wdev->iftype !=
+						NL80211_IFTYPE_MONITOR ?
+							wdev->netdev : NULL,
 					chan, channel_type);
 	if (result)
 		return result;
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-20 16:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-19 18:41 [PATCH] cfg80211: fix WEXT ioctl GIWFREQ for monitor interfaces David Gnedt
2010-07-19 20:12 ` Gábor Stefanik
2010-07-19 20:27 ` Johannes Berg
2010-07-19 21:06   ` Gábor Stefanik
2010-07-19 23:28     ` David Gnedt
2010-07-20 13:04       ` Johannes Berg
2010-07-20 16:49         ` Gábor Stefanik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).