420-BCM63XX-add-endian-check-for-ath9k.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --- a/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h
  2. +++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h
  3. @@ -2,6 +2,7 @@
  4. #define _PCI_ATH9K_FIXUP
  5. -void pci_enable_ath9k_fixup(unsigned slot, u32 offset) __init;
  6. +void pci_enable_ath9k_fixup(unsigned slot, u32 offset,
  7. + unsigned endian_check) __init;
  8. #endif /* _PCI_ATH9K_FIXUP */
  9. --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  10. +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  11. @@ -21,6 +21,7 @@
  12. struct ath9k_caldata {
  13. unsigned int slot;
  14. u32 caldata_offset;
  15. + unsigned int endian_check:1;
  16. };
  17. /*
  18. --- a/arch/mips/bcm63xx/pci-ath9k-fixup.c
  19. +++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c
  20. @@ -181,12 +181,14 @@ static void ath9k_pci_fixup(struct pci_d
  21. }
  22. DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup);
  23. -void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset)
  24. +void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset,
  25. + unsigned endian_check)
  26. {
  27. if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups))
  28. return;
  29. ath9k_fixups[ath9k_num_fixups].slot = slot;
  30. + ath9k_fixups[ath9k_num_fixups].pdata.endian_check = endian_check;
  31. if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset))
  32. return;
  33. --- a/arch/mips/bcm63xx/boards/board_common.c
  34. +++ b/arch/mips/bcm63xx/boards/board_common.c
  35. @@ -300,7 +300,8 @@ int __init board_register_devices(void)
  36. /* register any fixups */
  37. for (i = 0; i < board.has_caldata; i++)
  38. - pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset);
  39. + pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
  40. + board.caldata[i].endian_check);
  41. return 0;
  42. }