linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Farina <sidhayn@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "Maxim Levitsky" <maximlevitsky@gmail.com>,
	"Gábor Stefanik" <netrolller.3d@gmail.com>,
	"Joker Joker" <jokesareonyou@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: Path for fixed channel issue in aircrack-ng suite [V2]
Date: Tue, 01 Jun 2010 15:50:14 -0400	[thread overview]
Message-ID: <4C056476.9090905@gmail.com> (raw)
In-Reply-To: <1275419973.3634.7.camel@jlt3.sipsolutions.net>

Johannes Berg wrote:
> On Tue, 2010-06-01 at 21:28 +0300, Maxim Levitsky wrote:
>
>   
>>     wireless: allow to retrieve the channel set on monitor interface
>>     
>>     This will allow to preserve compatibility with userspace
>>     
>>     Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
>>
>> 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;
>> +
>>     
>
> This won't quite work. monitor interfaces are always slaves in the sense
> that their channel setting never takes precedence over anything, so if
> you add another interface and do something there, the hardware will
> happily channel switch away from the monitor channel, but it will still
> report the old channel here that you set.
>
> I have no idea how to _properly_ fix this though, since eventually we'll
> have a situation where you can have multiple interfaces active on
> different channels, so that monitors don't have a fixed channel anyway.
>
> Maybe this patch is sufficient since it works in the case people care
> about when they _only_ have a monitor interface, but I think it'd be
> nicer if it wouldn't report anything in the other cases.
>
>   
Is this a NACK or a "I wish there was a better way to do this but I'll 
allow it until a better way if found"?

-Rick

> johannes
>
>
>   


  reply	other threads:[~2010-06-01 19:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  5:07 Path for fixed channel issue in aircrack-ng suite Joker Joker
2010-05-25  8:11 ` Johannes Berg
2010-05-25 22:54   ` Gábor Stefanik
2010-05-26  7:51     ` Johannes Berg
2010-05-27  3:51       ` Richard Farina
2010-05-28 18:28       ` Richard Farina
2010-06-01 18:28         ` Path for fixed channel issue in aircrack-ng suite [V2] Maxim Levitsky
2010-06-01 18:36           ` Richard Farina
2010-06-01 19:19           ` Johannes Berg
2010-06-01 19:50             ` Richard Farina [this message]
2010-06-01 20:19               ` Johannes Berg
2010-06-01 21:53                 ` Thomas d'Otreppe
2010-06-01 19:53             ` Maxim Levitsky
2010-06-01 20:06               ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C056476.9090905@gmail.com \
    --to=sidhayn@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=jokesareonyou@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=netrolller.3d@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).