From: Michael Buesch <mb@bu3sch.de>
To: Larry Finger <larry.finger@lwfinger.net>
Cc: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org
Subject: Re: [PATCH RFT] b43: Add support for new firmware
Date: Fri, 11 Jan 2008 17:47:18 +0100 [thread overview]
Message-ID: <200801111747.18797.mb@bu3sch.de> (raw)
In-Reply-To: <47879BE4.7040108@lwfinger.net>
On Friday 11 January 2008 17:40:04 Larry Finger wrote:
> Michael Buesch wrote:
> > This patch adds support for new firmware.
> > Please test this on old and new firmware.
>
> I have tested this patch with old firmware. It seems to work; however my testing is not complete as
> my computer has started hanging with the "Caps Lock" light flashing. The crash is not caused by this
> patch as it happened with 2.6.24-rc5, which has run for many days. I do have a suggestion for
> changing the patch (see below).
>
> > +static inline
> > +size_t b43_txhdr_size(struct b43_wldev *dev)
> > +{
> > + if (b43_is_old_txhdr_format(dev))
> > + return 100 + sizeof(struct b43_plcp_hdr6);
> > + return 104 + sizeof(struct b43_plcp_hdr6);
> > +}
>
> Why not eliminate most of the magic numbers in this part with
>
> size_t b43_txhdr_size(struct b43_wldev *dev)
> {
> if (b43_is_old_txhdr_format(dev))
> return sizeof(struct b43_txhdr) - 4;
> return sizeof(struct b43_txhdr);
> }
Because this is IMO as magic as the above.
The struct b43_txhdr is _not_ meant to be used as an object anymore,
as it now contains this union magic stuff. So we must only use it
as a pointer type. The sizeof, however, uses it as an object.
I'm perfectly fine with the hardcoded constants. And they really
are constants, as they are defined by the hard(firm)ware.
I think this all leads to the same issue as "Should we use
#defines for the PCI IDs in PCI ID tables?".
However, this code will go away in summer anyway. So it doesn't
really matter. It really is just a hack.
--
Greetings Michael.
prev parent reply other threads:[~2008-01-11 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 19:46 [PATCH RFT] b43: Add support for new firmware Michael Buesch
2008-01-11 16:40 ` Larry Finger
2008-01-11 16:43 ` Martin Marques
2008-01-11 17:17 ` Larry Finger
2008-01-11 16:47 ` Michael Buesch [this message]
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=200801111747.18797.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=larry.finger@lwfinger.net \
--cc=linux-wireless@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).