[OpenWrt-Devel] wireless scan/add functioning wrong on my MTK7620n board

张钊 formywillcancer at gmail.com
Thu Sep 25 00:06:29 EDT 2014


I’ve built a firmware from git.openwrt.org/openwrt.git known as  CHAOS CALMER (Bleeding Edge, r42657) for my MTK7620n board, it works well except this weird problem.

When I enable wifi, then trying to use iw dev wlan0 scan or trying to add secondary AP from luci interface, my board will reboot without any signs at all, when it rebooted, secondary AP was added, can be joined normally but I also found a call trace about rt2800lib.c during the initialisation process, I wonder is this happened on your boards? I only have limited hardware driver debug skill and if I want to fix it by myself, where to go first?

Thanks a lot~

HERE is the boot log.

///////////// When I enabled wifi, it works well and msg looks like this:

BusyBox v1.22.1 (2014-09-25 02:03:10 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (Bleeding Edge, r42657)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root at OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 8C:21:A7:E1:06:04
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fdb9:97a6:50e::1/60 Scope:Global
          inet6 addr: fe80::8e21:a7ff:fee1:604/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1824 (1.7 KiB)

eth0      Link encap:Ethernet  HWaddr 8C:21:A7:E1:06:04
          inet6 addr: fe80::8e21:a7ff:fee1:604/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:1 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2512 (2.4 KiB)  TX bytes:6143 (5.9 KiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr 8C:21:A7:E1:06:04
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1870 (1.8 KiB)

eth0.2    Link encap:Ethernet  HWaddr 8C:21:A7:E1:06:05
          inet addr:192.168.2.107  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::8e21:a7ff:fee1:605/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1462 (1.4 KiB)  TX bytes:2412 (2.3 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:50 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4032 (3.9 KiB)  TX bytes:4032 (3.9 KiB)

wlan0     Link encap:Ethernet  HWaddr 8C:21:A7:E1:06:04
          inet6 addr: fe80::8e21:a7ff:fee1:604/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:2296 (2.2 KiB)


///////////////////////////Here I tried to add secondary Wifi AP using luci,  clicked “Save & Apply"

root at OpenWrt:/# [   69.540000] device wlan0 left promiscuous mode
[   69.540000] br-lan: port 2(wlan0) entered disabled state
[   70.890000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   70.900000] device wlan0 entered promiscuous mode
[?

///////////////////////// Some thing went wrong here and the device rebooted

U-Boot 1.1.3 (Jan  7 2013 - 11:32:07)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb4000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi_wait_nsec: 29
spi device id: ef 40 17 0 0 (40170000)
find flash: W25Q64BV
raspi_read: from:30000 len:1000
*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 4.1.0.0
--------------------------------------------
ASIC 7620_MP (Port5<->None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Jan  7 2013  Time:11:32:07
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =64 Mbytes

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                     4
You choosed 3
                                                                              0

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
   Image Name:   MIPS OpenWrt Linux-3.14.16
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1052542 Bytes =  1 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:100f7e
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 3.14.16 (zhangzhao at zhangzhao-Aspire-E1-470G) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42657) ) #1 Thu Sep 25 02:10:04 CST 2014
[    0.000000] Board has DDR1
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: Ralink MT7620N ver:2 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Franz MODEL1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=0006d010
[    0.000000] Readback ErrCtl register=0006d010
[    0.000000] Memory: 61708K/65536K available (2291K kernel code, 123K rwdata, 456K rodata, 128K init, 180K bss, 3828K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 580MHz
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] genirq: Flags mismatch irq 7. 00014600 (timer) vs. 00014600 (systick)
[    0.010000] Calibrating delay loop... 766.77 BogoMIPS (lpj=3833856)
[    0.050000] pid_max: default: 32768 minimum: 301
[    0.050000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060000] pinctrl core: initialized pinctrl subsystem
[    0.070000] NET: Registered protocol family 16
[    0.080000] bio: create slab <bio-0> at 0
[    0.080000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.090000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.090000] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.100000] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.100000] Switched to clocksource systick
[    0.110000] NET: Registered protocol family 2
[    0.120000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.140000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.150000] TCP: reno registered
[    0.160000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.170000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.190000] NET: Registered protocol family 1
[    0.190000] rt-timer 10000100.timer: maximum frequency is 2441Hz
[    0.210000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.230000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.250000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.270000] msgmni has been set to 120
[    0.270000] io scheduler noop registered
[    0.290000] io scheduler deadline registered (default)
[    0.290000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.310000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    0.330000] console [ttyS0] enabled
[    0.330000] console [ttyS0] enabled
[    0.340000] bootconsole [early0] disabled
[    0.340000] bootconsole [early0] disabled
[    0.360000] m25p80 spi32766.0: found s25fl064k, expected mx25l6405d
[    0.380000] m25p80 spi32766.0: s25fl064k (8192 Kbytes)
[    0.380000] 4 ofpart partitions found on MTD device spi32766.0
[    0.400000] Creating 4 MTD partitions on "spi32766.0":
[    0.400000] 0x000000000000-0x000000030000 : "u-boot"
[    0.420000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.430000] 0x000000040000-0x000000050000 : "factory"
[    0.440000] 0x000000050000-0x000000800000 : "firmware"
[    0.460000] 0x000000150fbe-0x000000800000 : "rootfs"
[    0.460000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.490000] mtd: device 4 (rootfs) set to be root filesystem
[    0.500000] mtd: partition "rootfs_data" created automatically, ofs=0x390000, len=0x470000
[    0.520000] 0x000000390000-0x000000800000 : "rootfs_data"
[    0.530000] (unregistered net_device): port 0 link up (100Mbps/Full duplex)
[    0.550000] ralink_soc_eth 10100000.ethernet: loaded mt7530 driver
[    0.560000] eth0: done loading
[    0.570000] rt3xxx-usbphy usbphy.3: loaded
[    0.570000] rt2880_wdt 10000120.watchdog: Initialized
[    0.590000] TCP: cubic registered
[    0.590000] NET: Registered protocol family 17
[    0.610000] 8021q: 802.1Q VLAN Support v1.8
[    0.630000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.650000] Freeing unused kernel memory: 128K (802d0000 - 802f0000)
procd: Console is alive
procd: - watchdog -
[    5.510000] usbcore: registered new interface driver usbfs
[    5.510000] usbcore: registered new interface driver hub
[    5.530000] usbcore: registered new device driver usb
[    5.540000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.560000] ehci-platform: EHCI generic platform driver
[    5.570000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.590000] ohci-platform: OHCI generic platform driver
procd: - preinit -
[    6.010000] random: mktemp urandom read with 64 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
jffs2 is ready
jffs2 is ready
[    9.470000] jffs2: notice: (280) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 7 of xref (0 dead, 0 orphan) found.
switching to overlay
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[   11.140000] NET: Registered protocol family 10
[   11.160000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.180000] Loading modules backported from Linux version master-2014-05-22-0-gf2032ea
[   11.200000] Backport generated by backports.git backports-20140320-37-g5c33da0
[   11.210000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.230000] nf_conntrack version 0.5.0 (966 buckets, 3864 max)
[   11.270000] xt_time: kernel timezone is -0000
[   11.310000] cfg80211: Calling CRDA to update world regulatory domain
[   11.320000] cfg80211: World regulatory domain updated:
[   11.330000] cfg80211:  DFS Master region: unset
[   11.330000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   11.330000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   11.330000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   11.330000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   11.330000] cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[   11.330000] cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   11.330000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   11.330000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   11.330000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   11.650000] PPP generic driver version 2.4.2
[   11.670000] NET: Registered protocol family 24
[   11.710000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0500 detected
[   11.730000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
procd: - init complete -
[   19.920000] device eth0.1 entered promiscuous mode
[   19.920000] device eth0 entered promiscuous mode
[   19.970000] br-lan: port 1(eth0.1) entered forwarding state
[   19.980000] br-lan: port 1(eth0.1) entered forwarding state
[   21.310000] random: nonblocking pool is initialized
[   22.140000] br-lan: port 1(eth0.1) entered forwarding state
[   22.180000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   22.200000] device wlan0 entered promiscuous mode
[   31.910000] br-lan: port 2(wlan0) entered forwarding state
[   31.930000] br-lan: port 2(wlan0) entered forwarding state
[   31.930000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   31.960000] device wlan0-1 entered promiscuous mode
[   31.980000] br-lan: port 3(wlan0-1) entered forwarding state
[   31.980000] br-lan: port 3(wlan0-1) entered forwarding state
[   32.000000] IPv6: ADDRCONF(NETDEV_UP): wlan0-1: link is not ready
[   32.010000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   32.090000] ------------[ cut here ]------------
[   32.100000] WARNING: CPU: 0 PID: 1050 at /home/zhangzhao/owrt/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/compat-wireless-2014-05-22/drivers/net/wireless/rt2x00/rt2800lib.c:1092 rt2800_conf_tx+0x3c8/0x494 [rt2800lib]()
[   32.150000] Modules linked in: rt2800soc rt2800mmio rt2800lib pppoe ppp_async iptable_nat rt2x00soc rt2x00mmio rt2x00lib pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 mac80211 ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT slhc nf_nat_irc nf_nat_ftp nf_nat nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_irc nf_conntrack_ftp nf_conntrack iptable_raw iptable_mangle iptable_filter ipt_REJECT ip_tables crc_itu_t crc_ccitt compat ledtrig_usbdev ip6t_REJECT ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables ipv6 eeprom_93cx6 arc4 crypto_blkcipher leds_gpio ohci_platform ohci_hcd ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common
[   32.280000] CPU: 0 PID: 1050 Comm: mac80211.sh Not tainted 3.14.16 #1
[   32.300000] Stack : 00000000 00000000 00000000 00000000 8031ad2e 00000039 83294b88 831c0540
          8027b6d4 802be937 0000041a 8031399c 83294b88 831c0540 00000008 0000001c
          00000001 80225228 00000003 80190aac 00000444 831c0540 8027e850 828999bc
          00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
          00000000 00000000 00000000 00000000 00000000 00000000 00000000 82899948
          ...
[   32.310000] Call Trace:
[   32.310000] [<801ccb78>] show_stack+0x48/0x70
[   32.310000] [<80236550>] warn_slowpath_common+0x84/0xb4
[   32.310000] [<80236608>] warn_slowpath_null+0x18/0x24
[   32.310000] [<83164030>] rt2800_conf_tx+0x3c8/0x494 [rt2800lib]
[   32.310000]
[   32.310000] ---[ end trace 0ecb626de4f0471a ]---
[   33.940000] br-lan: port 2(wlan0) entered forwarding state
[   33.980000] br-lan: port 3(wlan0-1) entered forwarding state


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20140925/a784d1d3/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list