Add special case for BCM43452A3 vs BCM4345C1.

This commit is contained in:
Stan Skowronek
2020-03-06 14:55:19 -05:00
parent 083c2d2b07
commit 97dc4a6dd3
2 changed files with 10 additions and 3 deletions

View File

@@ -116,8 +116,8 @@ int main(int argc, char *argv[])
unsigned i;
if(argc != 2 && argc != 6) {
fprintf(stderr, "usage: autohcd <hcd-pack>\n");
fprintf(stderr, " autohcd <hcd-pack> <otp-chip> <module> <otp-nvram> <outfile>\n");
fprintf(stderr, "usage: hcdpack <hcd-pack>\n");
fprintf(stderr, " hcdpack <hcd-pack> <otp-chip> <module> <otp-nvram> <outfile>\n");
return 1;
}
@@ -151,6 +151,13 @@ int main(int argc, char *argv[])
sprintf(chipstr, "BCM%s%s ", chip, rev);
sprintf(modstr, " %s %s", mod, vendstr);
/* this chip has different names on WLAN and Bluetooth */
if(!strcmp(chipstr, "BCM43452A3 ")) {
strcpy(chip, "4345");
strcpy(rev, "C1");
strcpy(chipstr, "BCM4345C1 ");
}
for(i=0; i<nimages; i++) {
if(strncmp(images[i].name, chipstr, strlen(chipstr)))
continue;

View File

@@ -225,7 +225,7 @@ static int send_wake(int fd)
static unsigned bytesum(const unsigned char *ptr, unsigned num)
{
unsigned sum = 0;
while(num)
while(num --)
sum += *(ptr ++);
return sum;
}