Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed MacNB_iwleeprom/iwleeprom
Binary file not shown.
Binary file removed MacNB_iwleeprom/iwleeprom.8.gz
Binary file not shown.
Binary file removed MacNB_iwleeprom/obj/ath5kio.o
Binary file not shown.
Binary file removed MacNB_iwleeprom/obj/ath9kio.o
Binary file not shown.
Binary file removed MacNB_iwleeprom/obj/iwleeprom.o
Binary file not shown.
Binary file removed MacNB_iwleeprom/obj/iwlio.o
Binary file not shown.
Binary file removed MacNB_iwleeprom/obj/original.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions dumpathrom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ all: dumpathrom
dumpathrom: dumpathrom.o
$(LD) $(LDFLAGS) -o $@ $<

clean:
$(RM) dumpathrom *.o *.obj
Binary file removed dumpathrom/dumpathrom
Binary file not shown.
14 changes: 9 additions & 5 deletions dumpathrom/dumpathrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <stdio.h>
#include <string.h>

#include "stdint.h"
#include "stdbool.h"

#ifdef __APPLE__
#include <MacTypes.h>
#endif
Expand Down Expand Up @@ -186,7 +189,7 @@ static void ath9k_hw_4k_dump_eeprom(struct ar5416_eeprom_4k *eep)
printf("\n");

printf("-RegDomain: 0x%.4x\n", *(unsigned int *)pBase->regDmn);
PR_EEP(" RegDomain1", pBase->regDmn[0]);
PR_EEP(" RegDomain1", pBase->regDmn[0] ^ 0x8000);
PR_EEP(" RegDomain2", pBase->regDmn[1]);
printf("\n");

Expand Down Expand Up @@ -252,9 +255,9 @@ int main(int argc, char **argv)

if ((argc != 2) || (!strncmp(argv[1], "--help", strlen(argv[1]))) || (!strncmp(argv[1], "-h", strlen(argv[1]))))
{
printf("AnV Atheros ROM Tool V1.0 (AR928X/AR9285 edition)\n");
printf("AnV Atheros ROM Tool V1.1 (AR9271/AR928X/AR9285 edition)\n");
printf("Usage: %s <infile>\n\n", argv[0]);
printf("Copyright (C) 2014 AnV Software, all rights reserved.\n");
printf("Copyright (C) 2018 AnV Software, all rights reserved.\n");

return 1;
}
Expand All @@ -272,11 +275,11 @@ int main(int argc, char **argv)
fSize = ftell(f);
fseek(f, 0, SEEK_SET);

if ((fSize != 376) && (fSize != 512) && (fSize != 4096))
if ((fSize != 376) && (fSize != 512) && (fSize != 1024) && (fSize != 4096))
{
fclose(f);

printf("ERROR: Invalid size, %d is not 376, 512 or 4096!\n", fSize);
printf("ERROR: Invalid size, %d is not 376, 512, 1024 or 4096!\n", fSize);

return 3;
}
Expand Down Expand Up @@ -313,6 +316,7 @@ int main(int argc, char **argv)
break;

case 512:
case 1024:
case 4096:
romdata = (struct ar5416_eeprom_4k *)(buffer + 128);
break;
Expand Down
Binary file removed dumpathrom/dumpathrom.obj
Binary file not shown.
Binary file removed iwleeprom/iwleeprom
Binary file not shown.
Binary file removed iwleeprom/iwleeprom.8.gz
Binary file not shown.
Binary file removed iwleeprom/obj/ath5kio.o
Binary file not shown.
Binary file removed iwleeprom/obj/ath9kio.o
Binary file not shown.
Binary file removed iwleeprom/obj/iwleeprom.o
Binary file not shown.
Binary file removed iwleeprom/obj/iwlio.o
Binary file not shown.
218 changes: 218 additions & 0 deletions overriderom.patch

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ It has the following projects:
- iwleeprom (AnV)
- AR9285_Optimized_ROM (AnV)
- iwleeprom (MacNB)

**UPDATE:**
Here is overriderom.patch , which allows you to override rom of ath9k-driven card for testing, recovery, etc
It is writen for 4.4.16 lts version, but most likely it is usable for other versions due to ath9k source code is not being changed often.
Refer to http://www.insanelymac.com/forum/topic/299732-atheros-9k-series-rom-modding-tools-and-recovery-kit/ for some additional info.
**Usage :**
> mv overriderom.patch ${kernel-source-root}/drivers/net/wireless/ath
> cd ${kernel-source-root}/drivers/net/wireless/ath
> patch -s -p0 < overriderom.patch

**ISSUE**
Overriding ROM is not configurable and enabled by default (using #defines directly in source code). Fixing of that is welcome