linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug in iw prevents setting the "cook" monitor flag
@ 2009-03-02 23:16 Mike Cui
  2009-03-03 14:52 ` John W. Linville
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Cui @ 2009-03-02 23:16 UTC (permalink / raw)
  To: linux-wireless

There is an off by one error in interface.c of iw that prevents
passing of the cook flag when creating a monitor interface. The fix is
simple:


--- a/interface.c       2009-03-02 15:11:58.748078548 -0800
+++ b/interface.c       2009-03-02 15:12:14.695203787 -0800
@@ -36,7 +36,7 @@ static int parse_mntr_flags(int *_argc,
        while (argc) {
                int ok = 0;
                for (flag = __NL80211_MNTR_FLAG_INVALID;
-                    flag < NL80211_MNTR_FLAG_MAX; flag++) {
+                    flag < NL80211_MNTR_FLAG_MAX + 1; flag++) {
                        if (strcmp(*argv, mntr_flags[flag]) == 0) {
                                ok = 1;
                                /*

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

* Re: Bug in iw prevents setting the "cook" monitor flag
  2009-03-02 23:16 Bug in iw prevents setting the "cook" monitor flag Mike Cui
@ 2009-03-03 14:52 ` John W. Linville
  2009-03-04 10:04   ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2009-03-03 14:52 UTC (permalink / raw)
  To: Mike Cui; +Cc: linux-wireless

On Mon, Mar 02, 2009 at 03:16:14PM -0800, Mike Cui wrote:
> There is an off by one error in interface.c of iw that prevents
> passing of the cook flag when creating a monitor interface. The fix is
> simple:
> 
> 
> --- a/interface.c       2009-03-02 15:11:58.748078548 -0800
> +++ b/interface.c       2009-03-02 15:12:14.695203787 -0800
> @@ -36,7 +36,7 @@ static int parse_mntr_flags(int *_argc,
>         while (argc) {
>                 int ok = 0;
>                 for (flag = __NL80211_MNTR_FLAG_INVALID;
> -                    flag < NL80211_MNTR_FLAG_MAX; flag++) {
> +                    flag < NL80211_MNTR_FLAG_MAX + 1; flag++) {
>                         if (strcmp(*argv, mntr_flags[flag]) == 0) {
>                                 ok = 1;
>                                 /*

FWIW, I think I like "x <= Y" instead of "x < Y + 1".

Also, please make sure you are following the guidelines explained here:

	http://linux.yyz.us/patch-format.html

In particular, I need a Signed-off-by line from you.

Thanks!

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: Bug in iw prevents setting the "cook" monitor flag
  2009-03-03 14:52 ` John W. Linville
@ 2009-03-04 10:04   ` Kalle Valo
  2009-03-04 14:14     ` John W. Linville
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2009-03-04 10:04 UTC (permalink / raw)
  To: John W. Linville; +Cc: Mike Cui, linux-wireless

"John W. Linville" <linville@tuxdriver.com> writes:

> On Mon, Mar 02, 2009 at 03:16:14PM -0800, Mike Cui wrote:
>> There is an off by one error in interface.c of iw that prevents
>> passing of the cook flag when creating a monitor interface. The fix is
>> simple:
>> 
>> 
>> --- a/interface.c       2009-03-02 15:11:58.748078548 -0800
>> +++ b/interface.c       2009-03-02 15:12:14.695203787 -0800

[...]

> FWIW, I think I like "x <= Y" instead of "x < Y + 1".

I agree.

> Also, please make sure you are following the guidelines explained here:
>
> 	http://linux.yyz.us/patch-format.html
>
> In particular, I need a Signed-off-by line from you.

But this is for iw, not for wireless-testing. Or did I miss something?

-- 
Kalle Valo

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

* Re: Bug in iw prevents setting the "cook" monitor flag
  2009-03-04 10:04   ` Kalle Valo
@ 2009-03-04 14:14     ` John W. Linville
  0 siblings, 0 replies; 4+ messages in thread
From: John W. Linville @ 2009-03-04 14:14 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Mike Cui, linux-wireless

On Wed, Mar 04, 2009 at 12:04:39PM +0200, Kalle Valo wrote:
> "John W. Linville" <linville@tuxdriver.com> writes:
> 
> > On Mon, Mar 02, 2009 at 03:16:14PM -0800, Mike Cui wrote:
> >> There is an off by one error in interface.c of iw that prevents
> >> passing of the cook flag when creating a monitor interface. The fix is
> >> simple:
> >> 
> >> 
> >> --- a/interface.c       2009-03-02 15:11:58.748078548 -0800
> >> +++ b/interface.c       2009-03-02 15:12:14.695203787 -0800
> 
> [...]
> 
> > FWIW, I think I like "x <= Y" instead of "x < Y + 1".
> 
> I agree.
> 
> > Also, please make sure you are following the guidelines explained here:
> >
> > 	http://linux.yyz.us/patch-format.html
> >
> > In particular, I need a Signed-off-by line from you.
> 
> But this is for iw, not for wireless-testing. Or did I miss something?

Ah, you're right... :-)  Then I'll let Johannes worry about that.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

end of thread, other threads:[~2009-03-04 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-02 23:16 Bug in iw prevents setting the "cook" monitor flag Mike Cui
2009-03-03 14:52 ` John W. Linville
2009-03-04 10:04   ` Kalle Valo
2009-03-04 14:14     ` John W. Linville

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).