mirror of
https://github.com/proski/madwifi
synced 2024-11-22 22:41:33 +03:00
Dump EEPROM starting with 0, not 1
Reference: madwifi-trace@3088, madwifi-trace@3422 git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3423 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
7006778174
commit
b9e098b4f7
@ -1265,14 +1265,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
printf("\nEEPROM dump (%d byte)\n", byte_size);
|
printf("\nEEPROM dump (%d byte)\n", byte_size);
|
||||||
printf("==============================================");
|
printf("==============================================");
|
||||||
for (i = 1; i <= (byte_size / 2); i++) {
|
for (i = 0; i < byte_size / 2; i++) {
|
||||||
error =
|
error =
|
||||||
ath5k_hw_eeprom_read(mem, i, &data, mac_version);
|
ath5k_hw_eeprom_read(mem, i, &data, mac_version);
|
||||||
if (error) {
|
if (error) {
|
||||||
printf("\nUnable to read at %04x\n", i);
|
printf("\nUnable to read at %04x\n", i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!((i - 1) % 8))
|
if (!(i % 8))
|
||||||
printf("\n%04x: ", i);
|
printf("\n%04x: ", i);
|
||||||
printf("%04x ", data);
|
printf("%04x ", data);
|
||||||
fwrite(&data, 2, 1, dumpfile);
|
fwrite(&data, 2, 1, dumpfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user