Changeset 12370 for ar5315_microredboot/microredboot/ecos/packages/redboot/current/src/net/tftp_server.c
- Timestamp:
- 06/24/09 22:02:36 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ar5315_microredboot/microredboot/ecos/packages/redboot/current/src/net/tftp_server.c
r12368 r12370 156 156 /* do_flash = 1, write to flash */ 157 157 rc = fw_check_image_wili((char *)base_addr, len, 1); 158 159 memset((unsigned char *)base_addr, 0, len); 160 flashresult(rc); 161 } 162 163 void do_flash_update_senao(unsigned long base_addr, unsigned long len) 164 { 165 int rc; 166 pagesetup(); 167 /* do_flash = 1, write to flash */ 168 rc = fw_check_image_senao((char *)base_addr, len, 1); 158 169 159 170 memset((unsigned char *)base_addr, 0, len); … … 257 268 int isubnt = 0; 258 269 int iswili = 0; 270 int issenao = 0; 259 271 isddwrt = fw_check_image_ddwrt((char *)BASE_ADDR, 260 272 ptr - BASE_ADDR, 0) == 0; … … 271 283 0) == 0; 272 284 273 if (isddwrt || isubnt || iswili) /* third parameter 0 - do not write to flash */ 285 if (!isubnt && !isddwrt && !iswili) 286 issenao = 287 fw_check_image_senao((char *)BASE_ADDR, 288 ptr - BASE_ADDR, 289 0) == 0; 290 291 if (isddwrt || isubnt || iswili || issenao) /* third parameter 0 - do not write to flash */ 274 292 tftpd_send(ACK, block, src_route, src_port); // crc ok 275 293 else { … … 296 314 ("WILIGEAR firmware format detected\n"); 297 315 do_flash_update_wili(BASE_ADDR, 316 ptr - BASE_ADDR); 317 } 318 if (issenao) { 319 diag_printf 320 ("SENAO firmware format detected\n"); 321 do_flash_update_senao(BASE_ADDR, 298 322 ptr - BASE_ADDR); 299 323 }
