Changeset 12388
- Timestamp:
- 06/27/09 20:36:23 (4 years ago)
- Location:
- ar5315_microredboot/microredboot/ecos/packages/redboot/current/src/net
- Files:
-
- 3 edited
-
fwupgrade_ubnt.c (modified) (1 diff)
-
tftp_client.c (modified) (1 diff)
-
tftp_server.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ar5315_microredboot/microredboot/ecos/packages/redboot/current/src/net/fwupgrade_ubnt.c
r12385 r12388 59 59 signature_t *sig; 60 60 fw.size = maxlen; 61 if (!strncmp(header->magic, "OPEN", 4) 62 && !strncmp(header->magic, "UBNT", 4)) { 63 return -1; //not ubnt firmware 64 } 65 #if defined(CYGPKG_HAL_MIPS_AR2316) 66 if (strncmp((unsigned char *)&header->version[4], "ar2316", 6)) { 67 diag_printf 68 ("UBNT_FW: cannot upgrade, wrong target platform. only ar2316 is valid"); 69 return -1; 70 } 71 #endif 72 #if defined(CYGPKG_HAL_MIPS_AR5312) 73 if (strncmp((unsigned char *)&header->version[4], "ar2313", 6)) { 74 diag_printf 75 ("UBNT_FW: cannot upgrade, wrong target platform. only ar2313 is valid"); 76 return -1; 77 } 78 #endif 61 79 if (htonl(crc) != header->crc) { 62 80 diag_printf("UBNT_FW: header crc failed\n"); -
ar5315_microredboot/microredboot/ecos/packages/redboot/current/src/net/tftp_client.c
r12385 r12388 223 223 if (ntohs(hdr->th_opcode) == DATA) { 224 224 if (ntohs(hdr->th_block) == 225 (cyg_uint16) ((tftp_stream.last_good_block + 1) & 0xFFFF)) { 225 (cyg_uint16) ((tftp_stream. 226 last_good_block + 227 1) & 0xFFFF)) { 226 228 // Consume this data 227 229 data_len -= 4; /* Sizeof TFTP header */ -
ar5315_microredboot/microredboot/ecos/packages/redboot/current/src/net/tftp_server.c
r12385 r12388 240 240 sizeof(struct firmware_formats); i++) { 241 241 int v = 242 fw_formats[i]. 243 fw_check_image((char *)BASE_ADDR, 244 ptr - BASE_ADDR, 0) == 0; 242 fw_formats[i].fw_check_image((char *) 243 BASE_ADDR, 244 ptr - 245 BASE_ADDR, 246 0) == 0; 245 247 if (v) { 246 248 detect = i;
Note: See TracChangeset
for help on using the changeset viewer.
