MT7603EN/MT7612EN Wifi Troubles on Netgear R6220

Has anyone gotten the Mediatek wifi to work reliably? If yes could you post your configuration?

I'm not even trying with 5G and I can only get it to work if I select a channel. And even then it will stop accepting connections after a while. I'm currently using a snapshot from May 5th.

Can I see your boot log? I've noticed a bug where EEPROM doesn't load correctly causing random wifi mac address + kernel panic

Of course, here it is:

[    0.000000] Linux version 4.4.61 (buildbot@buildslave) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4084-414b65d) ) #0 SMP Wed May 3 22:51:05 2017
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is Netgear R6220
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 8048f0e0, node_mem_map 81000000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] VPE topology {2} total 2
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] PERCPU: Embedded 10 pages/cpu @8110c000 s8400 r8192 d24368 u40960
[    0.000000] pcpu-alloc: s8400 r8192 d24368 u40960 alloc=10*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00043270
[    0.000000] Readback ErrCtl register=00043270
[    0.000000] Memory: 124456K/131072K available (3730K kernel code, 206K rwdata, 860K rodata, 248K init, 256K bss, 6616K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:256
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
[    0.010000] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.090000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.090000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.090000] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.180000] Synchronize counters for CPU 1: done.
[    0.190000] Brought up 2 CPUs
[    0.190000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.200000] futex hash table entries: 512 (order: 2, 16384 bytes)
[    0.210000] pinctrl core: initialized pinctrl subsystem
[    0.220000] NET: Registered protocol family 16
[    0.230000] FPU Affinity set after 8840 emulations
[    0.260000] pull PCIe RST: RALINK_RSTCTRL = 0
[    0.560000] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.570000] ***** Xtal 40MHz *****
[    0.570000] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.580000] Port 0 N_FTS = 1b102800
[    0.580000] Port 1 N_FTS = 1b102800
[    0.590000] Port 2 N_FTS = 1b102800
[    1.740000] PCIE1 no card, disable it(RST&CLK)
[    1.750000]  -> 12007f2
[    1.750000] PCIE0 enabled
[    1.760000] PCIE2 enabled
[    1.760000] PCI host bridge /pcie@1e140000 ranges:
[    1.770000]  MEM 0x0000000060000000..0x000000006fffffff
[    1.780000]   IO 0x000000001e160000..0x000000001e16ffff
[    1.790000] PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    1.830000] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    1.840000] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    1.850000] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    1.860000] PCI host bridge to bus 0000:00
[    1.870000] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.880000] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    1.890000] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.910000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.920000] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    1.920000] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.920000] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    1.920000] pci 0000:00:00.0: supports D1
[    1.920000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.920000] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    1.920000] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.920000] pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    1.920000] pci 0000:00:01.0: supports D1
[    1.920000] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    1.920000] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.940000] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.960000] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    1.960000] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    1.960000] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    1.960000] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    1.960000] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.960000] pci 0000:02:00.0: [14c3:7603] type 00 class 0x028000
[    1.960000] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    1.960000] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    1.960000] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    1.960000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 02
[    1.960000] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    1.970000] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.980000] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.000000] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.010000] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.020000] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    2.040000] pci 0000:00:01.0: BAR 8: assigned [mem 0x60200000-0x602fffff]
[    2.050000] pci 0000:00:00.0: BAR 1: assigned [mem 0x60300000-0x6030ffff]
[    2.070000] pci 0000:00:01.0: BAR 1: assigned [mem 0x60310000-0x6031ffff]
[    2.080000] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.090000] pci 0000:01:00.0: BAR 6: assigned [mem 0x60100000-0x6010ffff pref]
[    2.110000] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.120000] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.130000] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    2.150000] pci 0000:02:00.0: BAR 0: assigned [mem 0x60200000-0x602fffff]
[    2.160000] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.170000] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
[    2.180000] BAR0 at slot 0 = 0
[    2.190000] bus=0x0, slot = 0x0
[    2.190000] BAR0 at slot 1 = 0
[    2.200000] bus=0x0, slot = 0x1
[    2.210000] bus=0x1, slot = 0x0, irq=0xff
[    2.210000] bus=0x2, slot = 0x1, irq=0xff
[    2.220000] clocksource: Switched to clocksource GIC
[    2.230000] NET: Registered protocol family 2
[    2.240000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.250000] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.260000] TCP: Hash tables configured (established 1024 bind 1024)
[    2.270000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.290000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.300000] NET: Registered protocol family 1
[    2.310000] PCI: CLS 80 bytes, default 32
[    2.310000] Crashlog allocated RAM at address 0x3f00000
[    2.330000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.340000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.360000] io scheduler noop registered
[    2.370000] io scheduler deadline registered (default)
[    2.380000] gpio-export gpio_export: 1 gpio(s) exported
[    2.390000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.410000] console [ttyS0] disabled
[    2.420000] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 33, base_baud = 3125000) is a 16550A
[    2.430000] console [ttyS0] enabled
[    2.450000] bootconsole [early0] disabled
[    2.460000] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.480000] Allocate 16 byte aligned buffer: 80524290
[    2.490000] Enable NFI Clock
[    2.490000] # MTK NAND # : Use HW ECC
[    2.500000] Device not found, ID: c2f1
[    2.510000] Not Support this Device! 
[    2.520000] chip_mode=00000001
[    2.520000] Support this Device in MTK table! c2f1 
[    2.530000] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xf1
[    2.550000] nand: Macronix NAND 128MiB 3,3V 8-bit
[    2.550000] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.570000] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    2.580000] Scanning device for bad blocks
[    2.600000] Bad eraseblock 56 at 0x000000700000
[    2.840000] 6 ofpart partitions found on MTD device MT7621-NAND
[    2.850000] Creating 6 MTD partitions on "MT7621-NAND":
[    2.860000] 0x000000000000-0x000000100000 : "u-boot"
[    2.870000] 0x000000100000-0x000000200000 : "SC PID"
[    2.880000] 0x000000200000-0x000000600000 : "kernel"
[    2.900000] 0x000000600000-0x000002200000 : "ubi"
[    2.910000] 0x000002e00000-0x000002f00000 : "factory"
[    2.920000] 0x000004200000-0x000007e00000 : "reserved"
[    2.930000] [mtk_nand] probe successfully!
[    2.940000] Signature matched and data read!
[    2.950000] load_fact_bbt success 1023
[    2.960000] netif_napi_add() called with weight 128 on device eth%d
[    2.980000] mtk_soc_eth 1e100000.ethernet: generated random MAC address ae:ca:54:cf:6f:55
[    3.000000] libphy: mdio: probed
[    4.400000] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    4.420000] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 10
[    4.430000] mt7621_wdt 1e000100.wdt: Initialized
[    4.440000] NET: Registered protocol family 10
[    4.460000] NET: Registered protocol family 17
[    4.460000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    4.490000] 8021q: 802.1Q VLAN Support v1.8
[    4.500000] UBI: auto-attach mtd3
[    4.510000] ubi0: attaching mtd3
[    4.560000] mtk_soc_eth 1e100000.ethernet eth0: port 4 link up
[    4.770000] ubi0: scanning is finished
[    4.790000] ubi0: attached mtd3 (name "ubi", size 28 MiB)
[    4.800000] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.820000] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.830000] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.840000] ubi0: good PEBs: 223, bad PEBs: 1, corrupted PEBs: 0
[    4.860000] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    4.870000] ubi0: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 785228654
[    4.890000] ubi0: available PEBs: 0, total reserved PEBs: 223, PEBs reserved for bad PEB handling: 19
[    4.910000] ubi0: background thread "ubi_bgt0d" started, PID 322
[    4.920000] block ubiblock0_0: created from ubi0:0(rootfs)
[    4.930000] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    4.950000] hctosys: unable to open rtc device (rtc0)
[    4.960000] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    4.980000] Freeing unused kernel memory: 248K (804b2000 - 804f0000)
[    5.610000] init: Console is alive
[    5.620000] init: - watchdog -
[    6.140000] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.210000] usbcore: registered new interface driver usbfs
[    6.220000] usbcore: registered new interface driver hub
[    6.230000] usbcore: registered new device driver usb
[    6.250000] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.260000] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    6.280000] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x00210010
[    6.300000] xhci-mtk 1e1c0000.xhci: irq 29, io mem 0x1e1c0000
[    6.310000] hub 1-0:1.0: USB hub found
[    6.320000] hub 1-0:1.0: 2 ports detected
[    6.330000] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.340000] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    6.350000] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.370000] hub 2-0:1.0: USB hub found
[    6.380000] hub 2-0:1.0: 1 port detected
[    6.390000] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.400000] init: - preinit -
[    6.820000] random: procd: uninitialized urandom read (4 bytes read, 11 bits of entropy available)
[    8.970000] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 402
[    9.050000] UBIFS (ubi0:1): recovery needed
[    9.200000] UBIFS (ubi0:1): recovery completed
[    9.210000] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[    9.220000] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    9.230000] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[    9.250000] UBIFS (ubi0:1): FS size: 21966848 bytes (20 MiB, 173 LEBs), journal size 1142784 bytes (1 MiB, 9 LEBs)
[    9.280000] UBIFS (ubi0:1): reserved for root: 1037548 bytes (1013 KiB)
[    9.290000] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID E7743D56-5450-4D2E-BE17-57A5947E2D3E, small LPT model
[    9.320000] mount_root: switching to ubifs overlay
[    9.350000] urandom-seed: Seeding with /etc/urandom.seed
[    9.450000] procd: - early -
[    9.460000] procd: - watchdog -
[    9.870000] random: jshn: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[   10.010000] random: jshn: uninitialized urandom read (4 bytes read, 18 bits of entropy available)
[   10.130000] procd: - ubus -
[   10.220000] random: ubusd: uninitialized urandom read (4 bytes read, 19 bits of entropy available)
[   10.310000] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   10.330000] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   10.340000] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   10.360000] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   10.380000] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   10.400000] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   10.420000] procd: - init -
[   10.850000] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.880000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.890000] ehci-platform: EHCI generic platform driver
[   10.910000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.930000] ehci-pci: EHCI PCI platform driver
[   10.940000] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[   10.960000] Backport generated by backports.git backports-20160324-13-g24da7d3c
[   11.020000] mt7603e 0000:02:00.0: ASIC revision: 76030010
[   11.030000] mt7603e 0000:02:00.0: Invalid MAC address, using random address 6e:f2:89:c2:66:7b
[   11.680000] mtk_soc_eth 1e100000.ethernet eth0: port 0 link down
[   13.150000] mt7603e 0000:02:00.0: Firmware Version: _mt7603mp
[   13.160000] mt7603e 0000:02:00.0: Build Time: 20151020155902
[   13.220000] firmware init done
[   13.380000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   13.390000] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[   13.400000] mt76x2e 0000:01:00.0: EEPROM data check failed: ffff
[   13.420000] mt76x2e 0000:01:00.0: Invalid MAC address, using random address 72:59:c0:71:02:7e
[   13.440000] mt76x2e 0000:01:00.0: ROM patch already applied
[   13.460000] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[   13.470000] mt76x2e 0000:01:00.0: Build: 1
[   13.480000] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[   13.510000] mt76x2e 0000:01:00.0: Firmware running!
[   13.520000] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   13.610000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.630000] nf_conntrack version 0.5.0 (1948 buckets, 7792 max)
[   13.680000] usbcore: registered new interface driver usbserial
[   13.690000] usbcore: registered new interface driver usbserial_generic
[   13.710000] usbserial: USB Serial support registered for generic
[   13.730000] xt_time: kernel timezone is -0000
[   13.750000] PPP generic driver version 2.4.2
[   13.760000] NET: Registered protocol family 24
[   13.790000] usbcore: registered new interface driver option
[   13.800000] usbserial: USB Serial support registered for GSM modem (1-port)
[   13.820000] kmodloader: done loading kernel modules from /etc/modules.d/*
[   14.740000] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[   18.470000] device eth0.1 entered promiscuous mode
[   18.480000] device eth0 entered promiscuous mode
[   18.490000] br-lan: port 1(eth0.1) entered forwarding state
[   18.500000] br-lan: port 1(eth0.1) entered forwarding state
[   20.500000] br-lan: port 1(eth0.1) entered forwarding state
[   21.430000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   21.450000] device wlan0 entered promiscuous mode
[   21.820000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   21.830000] br-lan: port 2(wlan0) entered forwarding state
[   21.840000] br-lan: port 2(wlan0) entered forwarding state
[   23.840000] br-lan: port 2(wlan0) entered forwarding state
[   42.580000] random: nonblocking pool is initialized

I guess you are right:

[   11.030000] mt7603e 0000:02:00.0: Invalid MAC address, using random address 6e:f2:89:c2:66:7b
...
[   13.400000] mt76x2e 0000:01:00.0: EEPROM data check failed: ffff
[   13.420000] mt76x2e 0000:01:00.0: Invalid MAC address, using random address 72:59:c0:71:02:7e

There is also this:

[    2.600000] Bad eraseblock 56 at 0x000000700000
...
[    4.840000] ubi0: good PEBs: 223, bad PEBs: 1, corrupted PEBs: 0

Is there anything I can do?

I just made a patch and tested it on my r6220. Here is the build if you
want to give it a go.
http://serverside.host/LEDE/r6220/

when set wifi channel to auto the ssid will disappear

Can you post your patch ?

@realopty thanks for the patch but I still see the same errors in the log:

[    0.000000] Linux version 4.4.61 (will@2ez) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3914-cffeb31) ) #0 SMP Sun May 14 19:45:50 2017
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
...
[   11.090000] mt7603e 0000:02:00.0: ASIC revision: 76030010
[   11.100000] mt7603e 0000:02:00.0: Invalid MAC address, using random address 46:a6:ce:8c:1f:86
[   13.160000] mt7603e 0000:02:00.0: Firmware Version: _mt7603mp
[   13.170000] mt7603e 0000:02:00.0: Build Time: 20151020155902
[   13.220000] firmware init done
[   13.380000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   13.390000] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[   13.400000] mt76x2e 0000:01:00.0: EEPROM data check failed: ffff
[   13.420000] mt76x2e 0000:01:00.0: Invalid MAC address, using random address 8a:d4:00:8e:41:ec
[   13.440000] mt76x2e 0000:01:00.0: ROM patch already applied
[   13.460000] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[   13.470000] mt76x2e 0000:01:00.0: Build: 1
[   13.480000] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[   13.510000] mt76x2e 0000:01:00.0: Firmware running!

http://serverside.host/LEDE/r6220/999_r6220_dts_updated.patch

Yeah for some reason the offset of the EEPROM is fluctuating. I would take the patch above and modify the factory partition offset to fix the issue

@laktak
Your eeprom "emulation" partition is not found.
Please check with hexdump in the factory partition if
0x7662 or 0x7612 is found on 512 bytes boundaries.

Note about endianess, so you should see
0x62 0x76 in memory

in DTS of R6220

pcie0 {
	mt76@0,0 {
		reg = <0x0000 0 0 0 0>;
		device_type = "pci";
		mediatek,mtd-eeprom = <&factory 0x8000>;
		ieee80211-freq-limit = <5000000 6000000>;
	};
};

pcie1 {
	mt76@1,0 {
		reg = <0x0000 0 0 0 0>;
		device_type = "pci";
		mediatek,mtd-eeprom = <&factory 0x0000>;
		ieee80211-freq-limit = <2400000 2500000>;
	};
};

are the addresses for the eprom data.
Please dump these to check if this is valid.

Thanks but I don't really have an idea how to dump these.

The factory partition is /dev/mtd4? So I need to hexdump -x /dev/mtd4?

If yes, I see 6276 here:

01eae50    0de6    6276    59a0    6730    070d    3bb9    dbce    9308

01ef830    a9d4    6276    e154    dc23    4c45    30f1    4a4b    86b1

01f4f20    1fa7    65c7    2492    5a8c    0853    e675    6276    cbb7

Here is my sample output

00008000  10 76 00 02 XX XX XX XX  XX XX 10 76 c3 14 00 00  |.v...&..........|
00008010  00 00 10 76 c3 14 00 00  00 00 00 00 00 00 00 00  |...v............|
00008020  ff ff ff 37 ef ff 30 3e  3c 9b ff ff ff ff ff ff  |...7..0><.......|
00008030  ff ff ff ff 11 05 09 00  ff ff 5c 01 ff ff ff ff  |..........\.....|
00008040  ff ff 11 06 00 0f 00 00  00 0c 00 00 00 0a 00 00  |................|
00008050  ff 80 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00008060  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00008070  ff ff ff ff ff 00 00 ff  0d 0c 0b 0a 09 08 07 07  |................|
00008080  07 06 06 06 05 06 07 08  09 0a 0b 0c 0d 0e 0f 10  |................|
00008090  11 11 11 11 13 13 14 14  14 15 15 ff ff ff ff ff  |................|
000080a0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

is is a valid eeprom entry from my Kingston MLGW3 with MT7610E
Note the beginning at 0x8000
As @realopty you may need to rebuild LEDE with the patch

hexdump -x /dev/mtd10

0000000 7603 000b 6a50 e903 f0d7 7603 14c3 ffff
0000010 ffff 7603 14c3 0000 0000 0000 0000 0000
0000020 0000 07b0 0080 7f60 9bfd ffff ffff ffff
0000030 ffff ffff 3422 2000 ffff 0100 0000 0000
0000040 0000 0022 0000 0000 0000 0000 0000 01e0
0000050 0082 9400 b040 c940 0023 0000 c940 0023
0000060 0000 0000 0000 0000 0000 0000 0000 0000
0000070 ffff ffff ffff ffff ffff ffff ffff ffff
*
00000a0 c8c8 c8c8 0000 c800 c6c2 c2c2 00c2 0000
00000b0 ffff ffff ffff ffff ffff ffff ffff ffff
*
00000f0 0000 0000 00bf 8862 0000 0000 0000 0000
0000100 ffff ffff ffff ffff ffff ffff ffff ffff
*
0000120 0000 0000 0000 0000 0000 0000 0000 20ff
0000130 ffff ffff ffff ffff ffff ffff ffff ffff
*
0008000 7662 0001 6a50 e903 f4d7 7612 14c3 0000
0008010 0000 7612 14c3 0000 0000 ffff ffff ffff
0008020 ffff d837 409d 7fff 9bfd ffff ffff ffff
0008030 ffff ffff fd22 000a ffff 01b1 0000 0000
0008040 0000 d7ff 8c8c 0000 8c00 0000 8c00 01e0
0008050 8200 5782 b547 057f 001d 0000 167e 000a
0008060 0000 e982 000a 8200 17e9 0000 ed81 0018
0008070 8000 19f0 0000 f681 001b 8000 1cfe 0000
0008080 e282 000a 8200 1de2 0000 e882 001d 8200
0008090 1de6 0000 eb83 001b 8300 1bf2 0000 4f3c
00080a0 c3c3 0000 0000 c6c6 82c2 c6c6 82c2 0000
00080b0 0000 c6c6 00c4 0000 0000 0000 0000 8384
00080c0 ffff ffff ffff ffff ffff ffff ffff ffff
*
00080f0 ffff 090d 100d 28a5 0028 0000 0000 0000
0008100 ca0f c574 07e8 3d30 b001 2608 0e00 1504
0008110 8a00 4000 0000 0800 9d00 0008 c012 0000
0008120 2008 2a04 0090 2400 0401 0854 a0d0 2028
0008130 ffff ffff ffff 08ff ffff ffff ffff 0000
0008140 ffff ffff ffff ffff ffff ffff ffff ffff
*
00081e0 81c0 c382 4504 0746 0908 ffff ffff ffff
00081f0 ffff ffff ffff ffff ffff ffff ffff ffff
*
0100000

Looks valid to me: at offset 0x0004 your MAC address is stored and at offert 0x8004 for the second wifi.

It starts with 50:6a:03 which is the OUI from Netgear.its a driver probleem, not something wrong with your flash.

I don't see address 00008000 when I hexdump -x /dev/mtd10:

0000000    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
*
0040000    7603    000b    da10    e143    e0e8    7603    14c3    ffff
0040010    ffff    7603    14c3    0000    0000    0000    0000    0000
0040020    0000    07b0    0080    7f60    9bfd    ffff    ffff    ffff
0040030    ffff    ffff    3422    2000    ffff    0100    0000    0000
0040040    0000    0022    0000    0000    0000    0000    0000    01e0
0040050    0082    9400    ae40    c9c0    0023    0000    c9c0    0023
0040060    0000    0000    0000    0000    0000    0000    0000    0000
0040070    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
*
00400a0    c8c8    c8c8    0000    c800    c6c2    c2c2    00c2    0000
00400b0    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
*
00400f0    0005    0000    00af    885e    0000    0000    0000    0000
0040100    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
*
[..]
*
0100000

What I just noticed in the logs when looking for the partitions is a Bad eraseblock message - is that a problem and if yes, how do I get rid of it?

[    2.580000] Scanning device for bad blocks
[    2.600000] Bad eraseblock 56 at 0x000000700000
[    2.840000] 22 ofpart partitions found on MTD device MT7621-NAND
[    2.850000] Creating 22 MTD partitions on "MT7621-NAND":
[    2.860000] 0x000000000000-0x000000100000 : "u-boot"
[    2.870000] 0x000000100000-0x000000200000 : "SC PID"
[    2.880000] 0x000000200000-0x000000600000 : "kernel"
[    2.890000] 0x000000600000-0x000002200000 : "ubi"
[    2.900000] 0x000002200000-0x000002400000 : "ENG UI"
[    2.910000] 0x000002400000-0x000002600000 : "ML1"
[    2.930000] 0x000002600000-0x000002800000 : "ML2"
[    2.940000] 0x000002800000-0x000002a00000 : "ML3"
[    2.950000] 0x000002a00000-0x000002c00000 : "ML4"
[    2.960000] 0x000002c00000-0x000002e00000 : "ML5"
[    2.970000] 0x000002da0000-0x000002ea0000 : "factory"
[    2.980000] 0x000002f00000-0x000003000000 : "SC Private Data"
[    2.990000] 0x000003000000-0x000003200000 : "POT"
[    3.000000] 0x000003200000-0x000003400000 : "Traffic Meter"
[    3.010000] 0x000003400000-0x000003600000 : "DPF"
[    3.020000] 0x000003600000-0x000003800000 : "SC Nvram"
[    3.040000] 0x000003800000-0x000003a00000 : "Ralink Nvram"
[    3.050000] 0x000003a00000-0x000003c00000 : "Ralink Reserved"
[    3.060000] 0x000003c00000-0x000003e00000 : "ML6"
[    3.070000] 0x000003e00000-0x000003f00000 : "Upgrade Flag"
[    3.080000] 0x000004000000-0x000004200000 : "Reserved Block3"
[    3.100000] 0x000004200000-0x000007e00000 : "Reserved Block4"

Please check offset
0040000 + 008000 => 0048000

The values at offset 0040000 looks valid for MT7603

Some other obstacle you have 22 partitions LEDE only 6 , why ??
Have you done a proper sysupgrade or only factoryupgrade ?

I was using the patch by @realopty, after going back to the snapshot release I'm back to 6 partitions (using sysupgrade).

root@lede:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00100000 00020000 "SC PID"
mtd2: 00400000 00020000 "kernel"
mtd3: 01c00000 00020000 "ubi"
mtd4: 00100000 00020000 "factory"
mtd5: 03c00000 00020000 "reserved"

But I still can't find the address in the hexdump of the factory partition, also it's rather short:

root@lede:~# hexdump -x /dev/mtd4
0000000    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
*
00e00b0    da10    e143    e0e8    33ff    5358    3635    4239    3031
00e00c0    3430    3137    ffff    ffff    ffff    ffff    ffff    ffff
00e00d0    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
00e00e0    34ff    3033    3132    3738    ff31    ffff    ffff    ffff
00e00f0    ffff    0000    0200    2e52    5941    3641    4e38    3931
00e0100    3635    ffff    ffff    454e    4754    4145    3152    ff31
00e0110    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
00e0120    6c63    7665    7265    6977    646e    3635    ff38    ffff
00e0130    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
*
00e0200    3130    ffff    ffff    ffff    ffff    ffff    ffff    ffff
00e0210    ffff    ffff    ffff    ffff    ffff    ffff    ffff    ffff
*
0100000

Please try
https://github.com/ulli-kroll/lede/tree/do-work/netgear-R6220

I've change the offsets of /dev/mtd10
So now I'm curious, if I'm count correctly I see three different flash layouts.

I have two R6220 flash same fireware patched your patch but got diff result
one is
[ 13.350000] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[ 13.370000] mt76x2e 0000:01:00.0: ROM patch already applied
[ 13.390000] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[ 13.400000] mt76x2e 0000:01:00.0: Build: 1
[ 13.410000] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[ 13.440000] mt76x2e 0000:01:00.0: Firmware running!
can got the right mac
second is
[ 13.490000] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[ 13.500000] mt76x2e 0000:01:00.0: EEPROM data check failed: ffff
[ 13.520000] mt76x2e 0000:01:00.0: Invalid MAC address, using random address 3a:49:68:23:0d:c6
[ 13.540000] mt76x2e 0000:01:00.0: ROM patch already applied
[ 13.560000] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[ 13.570000] mt76x2e 0000:01:00.0: Build: 1
[ 13.580000] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[ 13.610000] mt76x2e 0000:01:00.0: Firmware running!

and the second one , I change dts file to
factory: partition@2e00000 {
label = "factory";
reg = <0x2e00000 0x100000>;
read-only;
};
to
can got the right mac
one model have two diff flash layouts ?