This patch adds support for the AR9223 wifi chip on the Netgear DGN3500 ADSL2
router. Originally the chip was identified with PCI product ID 0xff1d. This was
fixed by using ltq_pci_ath_fixup similair to other implementations with the
AR9223. The eeprom data is extracted from the original firmware located in
/etc/ath/eeprom.
I've tested this by manually scanning other networks and creating a simple
access-point.
Signed-off-by: Pieter Voorthuijsen <p.voorthuijsen at gmail.com>
---
Index: target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.h
===================================================================
--- target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.h
(revision 0)
+++ target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.h
(revision 0)
@@ -0,0 +1,271 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * Copyright (C) 2012 Pieter Voorthuijsen
+ *
+ */
+
+#ifndef _MACH_NETGEAR_H__
+#define _MACH_NETGEAR_H__
+
+static u16 dgn3500_eeprom_data[] = {
+ 0xa55a, 0x0000, 0x0003, 0x6000, 0x168c, 0x0029, 0x6008, 0x0001,
+ 0x0280, 0x602c, 0x168c, 0x2093, 0x5000, 0x168c, 0x002a, 0x5008,
+ 0x0001, 0x0280, 0x502c, 0x168c, 0x2093, 0x5064, 0x0cc0, 0x0504,
+ 0x506c, 0x3811, 0x0003, 0x4004, 0x073b, 0x0040, 0x4074, 0x0003,
+ 0x0000, 0x4000, 0x0000, 0x01c2, 0x6034, 0x0044, 0x0000, 0xffff,
+ 0xc01a, 0x1aac, 0x612a, 0x9e3c, 0xf29a, 0x0ebc, 0x5fbd, 0x46c3,
+ 0xc1fe, 0x8b93, 0x9ed8, 0xd4c8, 0xcfbb, 0x99f6, 0xb094, 0x7cbf,
+ 0x52a2, 0x5a3b, 0xedde, 0x97cf, 0x5928, 0xe314, 0xb947, 0xb4c1,
+ 0x5ac8, 0x80d5, 0x892b, 0x6053, 0xc9b5, 0xb4e5, 0xf242, 0x0ef1,
+ 0xb947, 0xc159, 0x22d1, 0x0cd9, 0xf77d, 0x2845, 0x6f35, 0x05a2,
+ 0x0d74, 0x0d1f, 0x7ee6, 0x1002, 0xc682, 0xe94d, 0x0f2e, 0x4d8e,
+ 0x869b, 0x74df, 0x1240, 0x2c9f, 0xd680, 0x62d6, 0xea70, 0xfa50,
+ 0xa53e, 0xebb0, 0xc96a, 0xfaac, 0x13f9, 0x45f7, 0xe6a4, 0xada6,
+ 0x114e, 0x2c8e, 0x305e, 0x76ba, 0xd2d5, 0xd6ad, 0x69f0, 0x03a0,
+ 0xd6bb, 0x8063, 0x7c8d, 0x7fee, 0x83d4, 0x3888, 0x1460, 0xbd4c,
+ 0x7104, 0xad78, 0xe57f, 0xddb6, 0x5910, 0x87a0, 0xb725, 0x29be,
+ 0x81b5, 0x2ffe, 0x269e, 0x55f4, 0xb5f1, 0xc447, 0x23aa, 0x5f1a,
+ 0x7eda, 0x091b, 0x7c76, 0xd018, 0xd69e, 0xb521, 0x1975, 0x5910,
+ 0xd162, 0xb75c, 0xeba0, 0x7a0a, 0x1973, 0x28aa, 0x6721, 0x20cb,
+ 0x8415, 0xcde5, 0x0fe9, 0x6e66, 0x8600, 0x9aff, 0xc370, 0x33eb,
+ 0x3ba8, 0x5e64, 0x6d6c, 0xe0d8, 0x98e5, 0xff91, 0x17db, 0xa722,
+ 0xfbe5, 0x251c, 0x7a2b, 0x4d84, 0xaf8d, 0x2ef7, 0x714e, 0xe055,
+ 0xe90d, 0xbcc4, 0x81eb, 0xfe75, 0xc386, 0xe836, 0x5cb0, 0x9748,
+ 0x6a9c, 0x5df2, 0xbe32, 0x9320, 0xe5e2, 0x345b, 0x11e2, 0x5165,
+ 0x452d, 0x1500, 0x2cd1, 0x6e60, 0xfffe, 0x7ab4, 0xb3fa, 0x9a07,
+ 0xeb13, 0x65ae, 0x6cfd, 0x8ec6, 0x81c8, 0x6fd5, 0x2025, 0x022f,
+ 0x783e, 0x01ea, 0x55d3, 0x1163, 0xfa51, 0x7eb9, 0xdbd2, 0xdc45,
+ 0x28bf, 0x226d, 0x9535, 0x4340, 0x9267, 0x86e5, 0xb20b, 0x692c,
+ 0xb6a5, 0xf6ee, 0x101b, 0xb882, 0x428f, 0xe4b4, 0x0f1d, 0x2bd6,
+ 0x29f4, 0xdb1f, 0x0618, 0xe5d3, 0x211f, 0xbef0, 0x3207, 0x8271,
+ 0xee38, 0x328c, 0x1766, 0xe3b0, 0x5612, 0x5c36, 0x54dd, 0xb685,
+ 0x15f0, 0x15be, 0xac6a, 0x6b38, 0x0944, 0xde4a, 0x85e0, 0xbce3,
+ 0x0cb8, 0xd437, 0xe015, 0x0002, 0x0000, 0x001f, 0x0300, 0xbe7f,
+ 0x3cf1, 0x0303, 0x0000, 0x0000, 0x0000, 0x1b00, 0x0007, 0x0003,
+ 0x0000, 0x0002, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2d00, 0x0b0b, 0x0b0b, 0x0b0b, 0x00e0, 0x0e0e, 0x000e,
+ 0x0e02, 0xca00, 0xcaca, 0x0109, 0x0000, 0x0000, 0x0000, 0x0206,
+ 0x0002, 0x0000, 0x0e0e, 0x0002, 0x0000, 0x0000, 0x2c00, 0x0000,
+ 0x0000, 0x0000, 0x0202, 0x098d, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x0000, 0x0010, 0x0000,
+ 0x0000, 0x0000, 0x05a0, 0x0960, 0x0000, 0x2d00, 0x2020, 0x000b,
+ 0x1000, 0x00e2, 0x0d0d, 0x000d, 0x0e02, 0xff1c, 0xffff, 0x0106,
+ 0x0000, 0x0000, 0x0000, 0x0306, 0x0303, 0x0000, 0x0e0e, 0x1b00,
+ 0x001b, 0x1919, 0x2d00, 0x0000, 0x0000, 0x0000, 0x0303, 0x098d,
+ 0x0000, 0x0000, 0x0000, 0x0092, 0x9200, 0x0000, 0x8000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x8e70, 0xffac, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1908, 0x3929,
+ 0x324b, 0x5144, 0x5b5a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x4941, 0x6e56, 0x309c, 0x5e43, 0x8e83, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x200f, 0x3e30, 0x334e, 0x4e43, 0x5a55, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x4e46, 0x755e, 0x32aa, 0x5441,
+ 0x856c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2312, 0x3d32,
+ 0x344e, 0x4a41, 0x5650, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x5347, 0x7865, 0x33ad, 0x5141, 0x7760, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1202, 0x2f20,
+ 0x333f, 0x5043, 0x5d53, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x4841, 0x6353, 0x347f, 0x5e46, 0xa46d, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x1302, 0x2f21, 0x333f, 0x4c41, 0x5c54, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x4941, 0x6553, 0x3582, 0x5c45,
+ 0xa176, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1303, 0x2f21,
+ 0x323d, 0x4b41, 0x5b53, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x4942, 0x6255, 0x347b, 0x5543, 0x936c, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00ff, 0x0000,
+ 0xff00, 0x0000, 0x0000, 0x00ff, 0x0000, 0xff00, 0x0000, 0x0000,
+ 0x00ff, 0x0000, 0xff00, 0x0000, 0x0000, 0x00ff, 0x0000, 0xff00,
+ 0x0000, 0x0000, 0x00ff, 0x0000, 0x0000, 0x0000, 0xff00, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x00ff, 0x0000, 0x0000, 0x0000, 0xff00,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x00ff, 0x0000, 0x0000, 0x0000,
+ 0xff00, 0x0000, 0x0000, 0x0000, 0x0000, 0x00ff, 0x0000, 0x0000,
+ 0x0000, 0xff00, 0x0000, 0x0000, 0x0000, 0x0000, 0x00ff, 0x0000,
+ 0x0000, 0x0000, 0xff00, 0x0000, 0x0000, 0x0000, 0x0000, 0x00ff,
+ 0x0000, 0x0000, 0x0000, 0xff00, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x00ff, 0x0000, 0x0000, 0x0000, 0xff00, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x00ff, 0x0000, 0x0000, 0x0000, 0xff00, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x2470, 0x2424, 0xb824, 0x2424, 0x2424, 0x00ff,
+ 0x0000, 0x7000, 0x2224, 0x1e20, 0x2489, 0x2022, 0xac1e, 0x2224,
+ 0x1e20, 0x00ff, 0x0000, 0x7000, 0x2222, 0x2020, 0x1c1e, 0x161a,
+ 0x2289, 0x2022, 0x1e20, 0x1a1c, 0xac16, 0x2222, 0x2020, 0x1c1e,
+ 0x161a, 0x00ff, 0x0000, 0x0000, 0x0000, 0x7000, 0x2222, 0x2020,
+ 0x1c1e, 0x161a, 0x2289, 0x2022, 0x1e20, 0x1a1c, 0xac16, 0x2222,
+ 0x2020, 0x1c1e, 0x161a, 0x00ff, 0x0000, 0x0000, 0x0000, 0x1100,
+ 0x1512, 0x0017, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x7000, 0x7522, 0xa266, 0x0023, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x7000, 0x7522, 0xa266, 0x0023, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x7000, 0x751e, 0xa264, 0x001c, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x7000, 0x751e, 0xa264, 0x001c, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x7000, 0x751a, 0xa264, 0x0019, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x7000, 0x751a, 0xa264, 0x0019, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x7a00, 0x7f18, 0x9364, 0x9864, 0x0015,
+ 0x0000, 0x0000, 0x0000, 0x7a00, 0x7f18, 0x9364, 0x9864, 0x0015,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0xb2c0, 0xd6fa, 0xce1a, 0x7893,
+ 0xcbfc, 0x75c1, 0x37e6, 0x63fc, 0xd135, 0x619d, 0x44b6, 0x8cab,
+ 0xb0bd, 0xf9c6, 0x40e2, 0x5284, 0x0c0a, 0xfdc7, 0x692c, 0x40a8,
+ 0x6e93, 0x1dcb, 0x2220, 0xb20a, 0xec5e, 0xb2a2, 0xed42, 0x188e,
+ 0xc591, 0x6e4b, 0x476e, 0x0361, 0xa6f4, 0xc050, 0x7b4b, 0x70de,
+ 0x90f4, 0x8ae4, 0xe168, 0x0a87, 0xcf46, 0x66c7, 0x18ec, 0x2c34,
+ 0x23cd, 0xea7e, 0xc9a2, 0x64f1, 0x2cb6, 0xe971, 0x1d42, 0xb64e,
+ 0x96e0, 0x0dc0, 0xcf95, 0x4151, 0x23f2, 0xca25, 0x6cec, 0x4623,
+ 0xae56, 0xd645, 0x4e5b, 0x4996, 0xc5c9, 0x0da8, 0x3057, 0x3ea0,
+ 0x80d9, 0xbe53, 0xec75, 0xe31a, 0xcd6f, 0xf134, 0x3d76, 0x3fd5,
+ 0x6e5d, 0x914c, 0x5cb4, 0xc4a4, 0xd1bb, 0xb922, 0x692b, 0xf10b,
+ 0x9701, 0x5cdb, 0x460e, 0x6b4d, 0x4b0d, 0x2a79, 0x9a2c, 0x0a4c,
+ 0x91ae, 0xeeec, 0x0997, 0x9e26, 0x8556, 0xc8f2, 0xb236, 0xbfe6,
+ 0xdc4e, 0x0b00, 0x68be, 0x8e97, 0xcdc9, 0xd281, 0x8880, 0x9cc0,
+ 0x655b, 0x0c55, 0xa963, 0x8fce, 0x0090, 0x8f17, 0x7427, 0x9069,
+ 0x454d, 0xa1aa, 0x6c3e, 0xdaa4, 0x150a, 0x96f0, 0x5f2a, 0xf050,
+ 0x15ee, 0x4fdc, 0x7372, 0x845d, 0x0f17, 0x753a, 0x6998, 0x4b90,
+ 0x888c, 0x621a, 0x28d6, 0xc42b, 0x7b2a, 0x2ab1, 0x692d, 0xee5f,
+ 0xa9cf, 0x1abe, 0x0f27, 0x9e0c, 0xfdba, 0xe124, 0x4613, 0xee2e,
+ 0x7ca7, 0xfd28, 0xba88, 0xdb1c, 0x6e2d, 0x7e8b, 0x37f6, 0x336e,
+ 0xe884, 0xc9b8, 0x77db, 0x9220, 0x4118, 0x09d4, 0xf24b, 0x7d45,
+};
+#endif
Index: target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.c
===================================================================
--- target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.c
(revision 31079)
+++ target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.c
(working copy)
@@ -4,6 +4,7 @@
* by the Free Software Foundation.
*
* Copyright (C) 2010 John Crispin <[email protected]>
+ * Copyright (C) 2012 Pieter Voorthuijsen
*/
#include <linux/init.h>
@@ -21,6 +22,11 @@
#include "../machtypes.h"
#include "devices.h"
+#include "mach-netgear.h"
+#include "dev-wifi-athxk.h"
+#include <linux/if_ether.h>
+#include <linux/etherdevice.h>
+#include "pci-ath-fixup.h"
static struct ltq_pci_data ltq_pci_data = {
.clock = PCI_CLOCK_INT,
@@ -72,11 +78,50 @@
.num_chipselect = 4,
};
+static u8 ltq_ethaddr[6] = { 0 };
+
+static int __init setup_ethaddr(char *str)
+{
+ if (!mac_pton(str, ltq_ethaddr))
+ memset(ltq_ethaddr, 0, 6);
+ return 0;
+}
+__setup("ethaddr=", setup_ethaddr);
+
+void __init
+dgn3500_eeprom_fixup(void)
+{
+ int i;
+ u16 *eepdata, sum, el;
+
+ /* force regdomain WOR02_WORLD */
+ dgn3500_eeprom_data[0x208>>1] = 0x67;
+ /* calculate new checksum */
+ sum = dgn3500_eeprom_data[0x200>>1];
+ el = sum / sizeof(u16) - 2; /* skip length and (old) checksum */
+ eepdata = (u16 *) (&dgn3500_eeprom_data[0x204>>1]); /* after checksum */
+ for (i = 0; i < el; i++)
+ sum ^= *eepdata++;
+ sum ^= 0xffff;
+ dgn3500_eeprom_data[0x202>>1] = sum;
+}
+
static void __init dgn3500_init(void)
{
ltq_register_pci(<q_pci_data);
+ ltq_register_spi(<q_spi_data, &spi_info, 1);
+
+ if (!is_valid_ether_addr(ltq_ethaddr)) {
+ printk(KERN_INFO "mac address not present or invalid,"\
+ "using random\n");
+ random_ether_addr(ltq_ethaddr);
+ }
+
+ memcpy(<q_eth_data.mac.sa_data, ltq_ethaddr, 6);
ltq_register_etop(<q_eth_data);
- ltq_register_spi(<q_spi_data, &spi_info, 1);
+ dgn3500_eeprom_fixup();
+ ltq_register_ath9k(dgn3500_eeprom_data, ltq_ethaddr);
+ ltq_pci_ath_fixup(14, dgn3500_eeprom_data);
}
MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel