netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>
To: Michael Wu <flamingice-R9e9/4HEdknk1uMJSBkQmQ@public.gmane.org>
Cc: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	"John W. Linville"
	<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Please pull 'adm8211' branch of wireless-2.6
Date: Sun, 16 Sep 2007 03:50:25 -0400	[thread overview]
Message-ID: <46ECE041.3090001@garzik.org> (raw)
In-Reply-To: <200709160047.45128.flamingice-R9e9/4HEdknk1uMJSBkQmQ@public.gmane.org>

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

  parent reply	other threads:[~2007-09-16  7:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-15 13:22 Please pull 'adm8211' branch of wireless-2.6 John W. Linville
     [not found] ` <20070915132220.GE6060-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-09-15 17:00   ` John W. Linville
     [not found]     ` <20070915170018.GC18930-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-09-15 18:25       ` David Miller
     [not found]         ` <20070915.112549.79067357.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-09-16  2:36           ` John W. Linville
     [not found]             ` <20070916023600.GA3967-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-09-16  3:26               ` Jeff Garzik
2007-09-15 21:32   ` Jeff Garzik
     [not found]     ` <46EC4F78.4050700-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>
2007-09-16  0:16       ` Michael Wu
2007-09-16  0:56         ` Jeff Garzik
2007-09-16  4:47           ` Michael Wu
2007-09-16  4:50             ` David Miller
     [not found]               ` <20070915.215053.74746915.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-09-16  5:00                 ` Michael Wu
     [not found]             ` <200709160047.45128.flamingice-R9e9/4HEdknk1uMJSBkQmQ@public.gmane.org>
2007-09-16  7:50               ` Jeff Garzik [this message]
2007-09-16  0:37 ` Michael Wu

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=46ECE041.3090001@garzik.org \
    --to=jeff-o2qlijkoznsdnm+yrofe0a@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=flamingice-R9e9/4HEdknk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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).