Dump EEPROM starting with 0, not 1
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 3 Apr 2008 21:04:52 +0000 (21:04 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 3 Apr 2008 21:04:52 +0000 (21:04 +0000)
Reference: madwifi-trace@3088, madwifi-trace@3422

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3423 0192ed92-7a03-0410-a25b-9323aeb14dbd

tools/ath_info.c

index bf28d8bee2fd099cf86d3396f11c4ef71787e43d..6917fe55a4b37e9b678a362e86c80547f44dbcf3 100644 (file)
@@ -1265,14 +1265,14 @@ int main(int argc, char *argv[])
 
                printf("\nEEPROM dump (%d byte)\n", byte_size);
                printf("==============================================");
-               for (i = 1; i <= (byte_size / 2); i++) {
+               for (i = 0; i < byte_size / 2; i++) {
                        error =
                            ath5k_hw_eeprom_read(mem, i, &data, mac_version);
                        if (error) {
                                printf("\nUnable to read at %04x\n", i);
                                continue;
                        }
-                       if (!((i - 1) % 8))
+                       if (!(i % 8))
                                printf("\n%04x:  ", i);
                        printf("%04x ", data);
                        fwrite(&data, 2, 1, dumpfile);