Subject: Re: Please pull 'adm8211' branch of wireless-2.6

From: Jeff Garzik <[email-masked]>
Date: Sun, 16 Sep 2007 03:50:25 -0400

Michael Wu wrote:
> On Saturday 15 September 2007 20:56, Jeff Garzik wrote:
>>>>> +	if (flags & IFF_PROMISC)
>>>>> +		dev->flags |= IEEE80211_HW_RX_INCLUDES_FCS;
>>>>> +	else
>>>>> +		dev->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS;
>>>> why does promisc dictate inclusion of FCS?
>>> Because that's the way the hardware works.
>> Why not always include it, regardless of promisc?
>>
> I really do mean that's how the hardware works. If you turn on the promisc bit 
> in the hardware (which IFF_PROMISC causes), it starts including the FCS, but 
> if the bit is not set, the FCS is not included in frames.

OK, I was confused by the name.  Based on the constant's name, I was 
assuming that you could unconditionally enable it, promisc or not. 
Nevermind.  I thought that was a hardware rather than software bit.

> What form of debugging are you talking about? I don't see how it makes a 
> difference for debugging. The type checking provided by enums won't make a 

When you are tracing through with kgdb, the code is actually readable. 
You see

	dev->flags |= IEEE80211_HW_RX_INCLUDES_FCS;

rather than the far more obtuse

	dev->flags |= 8;

Ditto for any time you have to read pre-processed source code.  I do so 
at least once a month, since post-cpp code shows you precisely what the 
compiler is munching, after all the macro magic goes away.

	Jeff