netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Michael Wu <flamingice@sourmilk.net>, David Miller <davem@davemloft.net>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: Please pull 'adm8211' branch of wireless-2.6
Date: Sat, 15 Sep 2007 20:56:19 -0400	[thread overview]
Message-ID: <46EC7F33.2050206@garzik.org> (raw)
In-Reply-To: <200709152017.02646.flamingice@sourmilk.net>

Michael Wu wrote:
> On Saturday 15 September 2007 17:32, Jeff Garzik wrote:
>> Review summary:  many minor issues, only one major one:  irq handler loop
>>
> CCing me would help.

Sorry.  I just hit 'reply to all'...  apparently you were not CC'd on 
the submission.


>>> +	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?


>>> +	} while (count++ < 20);
>> NAK -- talk about back to the past.
>>
>> It's bogus to loop in the interrupt handler, then loop again in both RX
>> and TX paths.  You are getting close to reinventing the wheel here.
>>
>> Use NAPI rather than doing such a loop.
>>
> This is old interrupt handler code from Jouni's original driver. I never 
> bothered to replace it with the simpler designs used in newer drivers I've 
> worked on.
> 
> Also - mac80211 drivers have no access to NAPI.

Not true as of net-2.6.24.



>>> +/* CSR (Host Control and Status Registers) */
>>> +struct adm8211_csr {
>> [snip]
>>> +} __attribute__ ((packed));
>> attributed(packed) is unneccesary here, and its use results in
>> sub-optimal code
>>
> How? Doesn't this just turn into a bunch of offsets?

It depends on how its used in the code.


>> enums are preferred.  they do not disappear at the cpp stage, and confer
>> type information.
>>
> I'd rather not.

Elaboration?

Remember this code is not just for you, but for all people working with 
the code.  It makes debugging (and sometimes tracebacks) much more 
readable, since it hasn't been eaten by cpp.

Thanks,

	Jeff



  reply	other threads:[~2007-09-16  0:56 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 [this message]
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
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=46EC7F33.2050206@garzik.org \
    --to=jeff@garzik.org \
    --cc=davem@davemloft.net \
    --cc=flamingice@sourmilk.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.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).