On Thu, Jul 06, 2006 at 03:51:11PM +0200, Johannes Berg wrote:
> On Thu, 2006-07-06 at 15:45 +0200, Martin Langer wrote:
>
> > ( The attached bcm43xx code is more an example. Some microcode tables
> > are missing completely and a lot of versions are missing in the tables,
> > too. But so it wouldn't hurt too much if I have to switch to sha1. :)
>
> Is there any useful reason that you have the md5sums as strings rather
> than byte arrays written out in hex in the C code? It looks wasteful to
> store those in a twice as large representation *and* print a string to
> do a strcmp() when a memcmp() would suffice fully.
There was only one reason. It's easier to add new signatures into the
table. But kernel stuff should be speed optimized. I will change it.
> Also, I don't see why you have two arrays. Why not just a single array
> with
>
> enum bcm_fw_type {
> BCM_FW_NO_MORE,
> BCM_FW_PCM5,
> ...
> };
>
> struct bcm_fw_revision {
> enum bcm_fw_type type;
> u8[16] md5sum;
> u8 maj,min,rc,patchlevel;
> };
>
> and build an array out of that?
Good idea. Should be possible.
> Other than that, it's probably a good idea to print this out so we have
> an easy way to identify what firmware the user is using.
That was my motivation.
Martin
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
http://lists.berlios.de/mailman/listinfo/bcm43xx-dev