mirror of
https://github.com/corellium/projectsandcastle.git
synced 2025-12-23 22:29:34 -05:00
Add special case for BCM43452A3 vs BCM4345C1.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user