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.
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?
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.
johannes
signature.asc
Description: This is a digitally signed message part
