2017-02-20 23:23:02

by Thomas d'Otreppe

[permalink] [raw]
Subject: Monitor mode 'cook' flag meaning

I've been looking through the different flags for monitor mode in iw.
Most of them are rather obvious (and well explained) but what is
exactly 'cooked mode'?

I looked up in Google and in the linux-wireless wiki (nothing in
there) and I only found explanations in 2 patches (most likely still
in the source code) which are still vague:
- A monitor interface in "cooked" mode will see all frames that
mac80211 has not used internally
- report frames after processing. Overrides all other flags.

Thinking about what the first one says, it doesn't seem any different
than just fcsfail. I don't even see when control or otherbss should be
needed since 'none' is already providing them.

Am I correct? Or is it related to transmitting frames? And in this case, how?

Thanks in advance,

Thomas


2017-02-21 01:47:41

by Thomas d'Otreppe

[permalink] [raw]
Subject: Re: Monitor mode 'cook' flag meaning

Do you have any example of devices where control or otherbss would be
useful? Would both be for FullMAC devices?

Thanks,

Thomas


On Mon, Feb 20, 2017 at 4:26 PM, Johannes Berg
<[email protected]> wrote:
> On Mon, 2017-02-20 at 16:22 -0700, Thomas d'Otreppe wrote:
>> I've been looking through the different flags for monitor mode in iw.
>> Most of them are rather obvious (and well explained) but what is
>> exactly 'cooked mode'?
>>
>> I looked up in Google and in the linux-wireless wiki (nothing in
>> there) and I only found explanations in 2 patches (most likely still
>> in the source code) which are still vague:
>> - A monitor interface in "cooked" mode will see all frames that
>> mac80211 has not used internally
>> - report frames after processing. Overrides all other flags.
>>
>> Thinking about what the first one says, it doesn't seem any different
>> than just fcsfail.
>
> No, that's the wrong idea. "cook" means that e.g. auth frames that
> mac80211 didn't actually look at will be sent there.
>
> Anyway, ignore cooked mode. It's only for ancient hostapd versions.
>
>> I don't even see when control or otherbss should be needed since
>> 'none' is already providing them.
>
> Those are hw-dependent.
>
> johannes

2017-02-20 23:26:56

by Johannes Berg

[permalink] [raw]
Subject: Re: Monitor mode 'cook' flag meaning

On Mon, 2017-02-20 at 16:22 -0700, Thomas d'Otreppe wrote:
> I've been looking through the different flags for monitor mode in iw.
> Most of them are rather obvious (and well explained) but what is
> exactly 'cooked mode'?
>
> I looked up in Google and in the linux-wireless wiki (nothing in
> there) and I only found explanations in 2 patches (most likely still
> in the source code) which are still vague:
> - A monitor interface in "cooked" mode will see all frames that
> mac80211 has not used internally
> - report frames after processing. Overrides all other flags.
>
> Thinking about what the first one says, it doesn't seem any different
> than just fcsfail.

No, that's the wrong idea. "cook" means that e.g. auth frames that
mac80211 didn't actually look at will be sent there.

Anyway, ignore cooked mode. It's only for ancient hostapd versions.

> I don't even see when control or otherbss should be needed since
> 'none' is already providing them.

Those are hw-dependent.

johannes

2017-02-21 08:37:45

by Johannes Berg

[permalink] [raw]
Subject: Re: Monitor mode 'cook' flag meaning

(please quote properly)

On Mon, 2017-02-20 at 18:46 -0700, Thomas d'Otreppe wrote:
> Do you have any example of devices where control or otherbss would be
> useful? Would both be for FullMAC devices?

No, I don't really know.

johannes