2009-12-03 10:49:21

by Holger Schurig

[permalink] [raw]
Subject: question regarding cfg80211 monitor modes

"iw wlan0 set type monitor" allows the following flags:

none: no special flags
fcsfail: show frames with FCS errors
control: show control frames
otherbss: show frames from other BSSes
cook: use cooked mode

However, I don't know how to map them to the Libertas' firmware
flags, which has

Libertas (bits can be ored)
Data frames 0x01
Mgmt frames but beacons 0x02
Beacons 0x04


So I guess that the following could be a translation table:

none 0x00
fcsfail -ENOTSUPP
control 0x02 | 0x04

But what should "otherbss" and "cook" be?

--
http://www.holgerschurig.de


2009-12-03 11:01:29

by Holger Schurig

[permalink] [raw]
Subject: Re: question regarding cfg80211 monitor modes

> I'd say don't bother with the flags at all.

Okay, I'll then a mask of 0x07, turning everything on. If someone
doesn't like beacons, he can still use

tshark -R "!(wlan.fc.subtype == 8)"



BTW:
http://wireless.kernel.org/en/users/Documentation/modes#Monitor_mode
doesn't say anything about the modes.

--
http://www.holgerschurig.de

2009-12-03 14:47:05

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: question regarding cfg80211 monitor modes

On Thu, Dec 3, 2009 at 3:00 AM, Holger Schurig <[email protected]> wrote:
>> I'd say don't bother with the flags at all.
>
> Okay, I'll then a mask of 0x07, turning everything on. If someone
> doesn't like beacons, he can still use
>
>  tshark -R "!(wlan.fc.subtype == 8)"
>
>
>
> BTW:
> http://wireless.kernel.org/en/users/Documentation/modes#Monitor_mode
> doesn't say anything about the modes.

The modes or the flags? iw does document the flags.

Luis

2009-12-03 10:55:03

by Johannes Berg

[permalink] [raw]
Subject: Re: question regarding cfg80211 monitor modes

On Thu, 2009-12-03 at 11:48 +0100, Holger Schurig wrote:
> "iw wlan0 set type monitor" allows the following flags:
>
> none: no special flags
> fcsfail: show frames with FCS errors
> control: show control frames
> otherbss: show frames from other BSSes
> cook: use cooked mode
>
> However, I don't know how to map them to the Libertas' firmware
> flags, which has
>
> Libertas (bits can be ored)
> Data frames 0x01
> Mgmt frames but beacons 0x02
> Beacons 0x04
>
>
> So I guess that the following could be a translation table:
>
> none 0x00
> fcsfail -ENOTSUPP
> control 0x02 | 0x04
>
> But what should "otherbss" and "cook" be?

"cook" and "none" only make sense while operating in a different mode at
the same time. For "cook" you get frames that the kernel hasn't
consumed. For "none" you don't influence the filters due to the monitor.
I suspect you don't support concurrent operation, so neither of those
makes sense.

fcsfail/plcpfail are probably not supported.

From what you say, "control" isn't supported either, since you were
talking about management frames, not control frames. "otherbss" is for
showing frames with a different BSSID, and in libertas monitor mode
probably always enabled.

I'd say don't bother with the flags at all.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part