On 9/9/07, Pavel Roskin <[EMAIL PROTECTED]> wrote:
> Hello!

Hi,

>
> On Sat, 2007-09-08 at 15:08 +0800, Sepherosa Ziehau wrote:
>
> > Following patch make b43-fwcutter work on DragonFlyBSD:
> > http://leaf.dragonflybsd.org/~sephe/fwcutter.diff
> >
> > Please review it.  If you folks think it is OK, please commit it to
> > your svn repos.
> > It was reviewed by johill and mb on #bcm-specs
>
> I suggest that you remove all references to DragonFlyBSD and use some
> symbol that is defined on all BSD systems.

I follow the way that wpa_supplicant/hostapd does.  And in the current
way I don't need to change Makefile.  'ifdef' in makefile is quite
'make' dependent.  And each BSD seems to have different firmware
loading mechanism, so I don't know whether they would port fwcutter
even if they took the dfly driver.

>
> This way, the program will compile and work with no changes on all BSD
> systems as long as the headers are compatible.  And if there are any
> incompatibilities, they would likely be minor and fixable without adding
> too many ifdefs.
>
> The patch as it is just encourages adding more preprocessor conditionals
> if the program is ported to more OSes.
>
> Also, I suggest that you reconsider calling the firmware directories
> "v3" and "v4".  Such names are too generic and don't provide information

There will be /etc/firmware/bwi directory, v3/ and v4/ will be put in
there.  I think it functions almost as same as b43/b43legacy directory
layout, and v3 firmware seems to work for non-legacy broadcom chips
too.

> about the hardware, unlike "b43" and "b43legacy".  It would be easier if
> b43-fwcutter just worked the same way on any OS.  You may prefer to do
> renaming in a wrapper that installs the firmware.
>
> I would put definitions for bswap_16 and bswap_32 immediately below
> "#include <sys/endian.h>", but it's a mater of taste.  Also, I would use
> definitions with arguments, as they are more robust and would indicate
> use with a wrong number of arguments.

Ah, thanks for the suggestion.  I just did a quick hack :)

Updated patch is at:
http://leaf.dragonflybsd.org/~sephe/fwcutter1.diff

Please review it, thanks.

Best Regards,
sephe

-- 
Live Free or Die
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to