This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

mini_pcie转WiFi模块,执行ifconfig wlan0 on系统会死机?为什么?




环境:dm8168+dvrrdk4.0.0.3
检测到pci转wifi模块设备型号10ec:8176
root@HDMTerm:~# lspci
00:00.0 Class 0604: Device 104c:b800 (rev 01)
01:00.0 Class 0280: Device 10ec:8176 (rev 01)
root@HDMTerm:~#
root@HDMTerm:~#
root@HDMTerm:~#

然后从realtek官网下载了一个软件驱动包,交叉编译后生产了2个ko模块
root@HDMTerm:~# ls
app.sh.bak autorun.sh mount.sh rdk.sh rtl8192ce.ko rtlwifi.ko
root@HDMTerm:~# modinfo rtlwifi.ko
filename: rtlwifi.ko
description: Realtek 802.11n PCI wireless core
license: GPL
author: Larry Finger <Larry.FInger@lwfinger.net>
author: Realtek WlanFAE <wlanfae@realtek.com>
author: lizhaoming <chaoming_li@realsil.com.cn>
depends:
vermagic: 2.6.37+ mod_unload modversions ARMv7 p2v8
root@HDMTerm:~# modinfo rtl8192ce.ko
filename: rtl8192ce.ko
firmware: rtlwifi/rtl8192cfw.bin
description: Realtek 8192C/8188C 802.11n PCI wireless
license: GPL
author: Larry Finger <Larry.Finger@lwfinger.net>
author: Realtek WlanFAE <wlanfae@realtek.com>
author: lizhaoming <chaoming_li@realsil.com.cn>
alias: pci:v000010ECd00008176sv*sd*bc*sc*i*
alias: pci:v000010ECd00008177sv*sd*bc*sc*i*
alias: pci:v000010ECd00008178sv*sd*bc*sc*i*
alias: pci:v000010ECd00008191sv*sd*bc*sc*i*
depends: rtlwifi
vermagic: 2.6.37+ mod_unload modversions ARMv7 p2v8
parm: swlps:bool
parm: swenc:using hardware crypto (default 0 [hardware])
(bool)
parm: ips:using no link power save (default 1 is open)
(bool)
parm: fwlps:using linked fw control power save (default 1 is open)
(bool)
root@HDMTerm:~#


root@HDMTerm:~# insmod rtlwifi.ko
root@HDMTerm:~# insmod rtl8192ce.ko
root@HDMTerm:~# iwconfig 检查wlan0存在
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry long limit:7 RTS thr=2347 B Fragment thr:off
Encryption key:off
Power Management:off

root@HDMTerm:~# ifconfig wlan0 on 打开wlan网卡,系统就卡死了,有时候不会卡死,但是执行
iwlist wlan0 scan 命令搜索ssid的时候也会卡死,只要操作底层硬件,跟wifi硬件模块交互,
就会出现卡死现象,很不稳定,请问怎么回事?谢谢!

下面是dm8168接口 ,mini pcie接口原理图 和wifi模块

  • 你好,

    1. 类似的操作在Linux PC上可以成功使用这个wifi么?

    2. 你是否有注意过你选择的pcie转wfif的模块是否有DM81xx PCIE RC驱动不支持的特点?

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_04.04.00.02_Feature_Performance_Guide#Features_Not_Supported_7

  • 你好! Chris Meng

    我现在一直查找这个问题没有一点头绪,现在想排查是硬件问题还是realtek软件包有问题,

    下面是插上了wifi模块后内核启动打印pcie的相关信息如下:

    [ 0.230000] ti81xx_pcie: Invoking PCI BIOS...
    [ 0.230000] ti81xx_pcie: Setting up Host Controller...
    [ 0.230000] ti81xx_pcie: Register base mapped @0xd0820000
    [ 0.340000] ti81xx_pcie: Starting PCI scan...
    [ 0.340000] pci 0000:00:00.0: [104c:b800] type 1 class 0x000604
    [ 0.340000] PCI: bus0: Fast back to back transfers disabled
    [ 0.340000] pci 0000:01:00.0: [10ec:8176] type 0 class 0x000280
    [ 0.340000] pci 0000:01:00.0: reg 10: [io 0x0000-0x00ff]
    [ 0.340000] pci 0000:01:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
    [ 0.340000] pci 0000:01:00.0: supports D1 D2
    [ 0.340000] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
    [ 0.340000] pci 0000:01:00.0: PME# disabled
    [ 0.340000] PCI: bus1: Fast back to back transfers disabled
    [ 0.340000] ti81xx_pcie: PCI scan done.
    [ 0.340000] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
    [ 0.340000] pci 0000:00:00.0: BAR 7: assigned [io 0x40000000-0x40000fff]
    [ 0.340000] pci 0000:01:00.0: BAR 2: assigned [mem 0x20000000-0x20003fff 64bit]
    [ 0.340000] pci 0000:01:00.0: BAR 2: set to [mem 0x20000000-0x20003fff 64bit] (PCI address [0x20000000-0x20003fff])
    [ 0.340000] pci 0000:01:00.0: BAR 0: assigned [io 0x40000000-0x400000ff]
    [ 0.340000] pci 0000:01:00.0: BAR 0: set to [io 0x40000000-0x400000ff] (PCI address [0x40000000-0x400000ff])
    [ 0.340000] pci 0000:00:00.0: PCI bridge to [bus 01-01]
    [ 0.340000] pci 0000:00:00.0: bridge window [io 0x40000000-0x40000fff]
    [ 0.340000] pci 0000:00:00.0: bridge window [mem 0x20000000-0x200fffff]
    [ 0.340000] pci 0000:00:00.0: bridge window [mem pref disabled]
    [ 0.340000] PCI: enabling device 0000:00:00.0 (0140 -> 0143)
    [ 0.340000] pci_bus 0000:00: resource 0 [io 0x40000000-0x402fffff]
    [ 0.340000] pci_bus 0000:00: resource 1 [mem 0x20000000-0x2fffffff]
    [ 0.340000] pci_bus 0000:01: resource 0 [io 0x40000000-0x40000fff]
    [ 0.340000] pci_bus 0000:01: resource 1 [mem 0x20000000-0x200fffff]
    [ 0.340000] bio: create slab <bio-0> at 0
    [ 0.340000] regulator: VFB: 800 <--> 1025 mV at 815 mV
    [ 0.340000] vgaarb: loaded
    [ 0.340000] SCSI subsystem initialized
    [ 0.340000] libata version 3.00 loaded.

    1.首先wifi模块是好的,因为我在一台pc机(自带minipcie接口)上装windows系统,通过驱动精灵安装wifi模块驱动,可以正常使用。

    2.因为我想用Realtek的rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013驱动包在pc机上编译成x86架构的驱动,很可惜编译不成功,
    缺少相关的IEEE80211_HW_CONNECTION_MONITOR之类的定义,想通过同样的驱动包来查找是不是我板子pcie硬件有问题,可惜没有编译成功


    ljh@ljh-desktop:/opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211$ sudo make
    [sudo] password for ljh:
    make -C /lib/modules/2.6.32-38-generic/build M=/opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211 modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.32-38-generic'
    CC [M] /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.o
    In file included from /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:32:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/wifi.h: In function ‘rtl_find_sta’:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/wifi.h:2257: warning: passing argument 1 of ‘ieee80211_find_sta’ from incompatible pointer type
    include/net/mac80211.h:2086: note: expected ‘struct ieee80211_hw *’ but argument is of type ‘struct ieee80211_vif *’
    In file included from /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:34:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.h: At top level:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.h:144: warning: ‘enum ieee80211_smps_mode’ declared inside parameter list
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.h:144: warning: its scope is only this definition or declaration, which is probably not what you want
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c: In function ‘_rtl_init_mac80211’:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:326: error: ‘IEEE80211_HW_CONNECTION_MONITOR’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:326: error: (Each undeclared identifier is reported only once
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:326: error: for each function it appears in.)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c: In function ‘rtl_tx_agg_start’:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1020: warning: passing argument 1 of ‘ieee80211_start_tx_ba_cb_irqsafe’ from incompatible pointer type
    include/net/mac80211.h:2033: note: expected ‘struct ieee80211_hw *’ but argument is of type ‘struct ieee80211_vif *’
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c: In function ‘rtl_tx_agg_stop’:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1049: warning: passing argument 1 of ‘ieee80211_stop_tx_ba_cb_irqsafe’ from incompatible pointer type
    include/net/mac80211.h:2074: note: expected ‘struct ieee80211_hw *’ but argument is of type ‘struct ieee80211_vif *’
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c: In function ‘rtl_watchdog_wq_callback’:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1303: error: implicit declaration of function ‘ieee80211_connection_loss’
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c: At top level:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1370: warning: ‘enum ieee80211_smps_mode’ declared inside parameter list
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1370: error: parameter 2 (‘smps’) has incomplete type
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c: In function ‘rtl_make_smps_action’:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1390: error: ‘WLAN_HT_ACTION_SMPS’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1392: error: ‘IEEE80211_SMPS_AUTOMATIC’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1393: error: ‘IEEE80211_SMPS_NUM_MODES’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1395: error: ‘IEEE80211_SMPS_OFF’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1397: error: ‘WLAN_HT_SMPS_CONTROL_DISABLED’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1399: error: ‘IEEE80211_SMPS_STATIC’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1401: error: ‘WLAN_HT_SMPS_CONTROL_STATIC’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1403: error: ‘IEEE80211_SMPS_DYNAMIC’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1405: error: ‘WLAN_HT_SMPS_CONTROL_DYNAMIC’ undeclared (first use in this function)
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c: At top level:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1414: warning: ‘enum ieee80211_smps_mode’ declared inside parameter list
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1414: error: parameter 3 (‘smps’) has incomplete type
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c: In function ‘rtl_send_smps_action’:
    /opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.c:1442: error: type of formal parameter 2 is incomplete
    make[2]: *** [/opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211/base.o] Error 1
    make[1]: *** [_module_/opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-38-generic'
    make: *** [all] Error 2
    ljh@ljh-desktop:/opt/work/test_dev/pcie_wifi/tool/x86rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211$


    3.现在想通过做一个自发自收的测试程序loopback,来测试mini pcie硬件是否有问题,请问dvrrdk有自带的测试程序吗?谢谢!