作者

QQ群:852283276
微信:arm80x86
微信公众号:青儿创客基地
B站:主页 https://space.bilibili.com/208826118

参考

请问有知道atheros无线网卡Linux驱动官方下载地址是什么吗?
Ubuntu 16.04 - Can’t connect to home Wi-Fi with Killer 1535 (QCA6174)
ath10k-firmware
linux-firmware.git
ubuntu下安装Qualcomm Atheros QCA6174无线网卡驱动方法
ubuntu18.0.4 无线网卡无法上网解决!
无线网卡驱动Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter
imx6ull linux下wifi驱动移植
Linux移植wifi驱动
嵌入式系统添加无线wifi模块
基于Atheros 300M MiniPCI网卡(AR9223-AL1A)的嵌入式x86路由器/Mesh节点的配置
11AC ath10k的移植
cfg80211 subsystem
Atheros-CSI-Tool(Ubuntu版本安装及使用过程)[原教程来自xieyaxiong]
ubuntu 安装Qualcomm Atheros QCA9565 AR9565 无线网卡驱动并连接wifi网络
Backports Project
如何在编译内核时添加缺少的固件(以intel wireless 5100 AGN的 iwlwifi 为例)
wpa_supplicant 配置与应用
wpa_supplicant_8_ti hostapd wpa_supplicant TI 官方的wpa_supplicant hostapd 移植到linux
wpa_supplicant、hostapd编译
hostapd and wpa_supplicant
hostapd和wpa_supplicant工具移植到ARM Linux
hostapd 与 wpa_supplicant详解
linux下WIFI模块使用:wpa_supplicant工具交叉编译以及配置
linux下使用shell命令通过wpa_cli控制wpa_supplicant连接wifi
Linux系统Wpa_supplicant用法小结
使用wpa_supplicant手动配置连接wifi
Linux环境下使用WIFI模块:使用wpa_supplicant工具配置和连接WIFI
Could not connect to wpa_supplicant: p2p-dev-wlan0 - re-trying
嵌入式linux开发板上增加rfkill命令
eunseong/rfkill
wpa_supplicant及wpa_cli使用方法
wpa_cli 操作指令使用指南
hostapd基本配置
用Hostapd创建可用的软AP
ubuntu下搭建udhcpd服务器
udhcpd配置及使用
Yocto i.MX6 (TQIMX6) (03) : wifi网卡的相关工具wpa_supplicant与dhcp
Yocto tips (11): Yocto如何往最终的rootfs中添加软件
802.11 a/b/g/n/ac 是什么以及它们有什么区别
Linux博通43xx系列网卡驱动
安装centOS 7双系统(四)——解决Broadcom博通BCM 43xx无线网卡驱动问题
博通的网卡linux驱动,Centos&Redhat下bcm43142博通无线网卡linux驱动
linux内核makefile概览
linux – 内核模块编译和KBUILD_NOPEDANTIC

视频

Xilinx Zynq通过PCIe WIFI模块联网
Xilinx Zynq通过PCIe WIFI速度测试
Xilinx Zynq PCIe WIFI速度测试后续

WIFI6

Wi-Fi6无线网卡横评,killer 1650 vs Intel AX210 vs Intel AX200
不只有ax200,Wi-Fi6网卡大盘点

wifi6对应802.11ax,可同时支持2.4G/5G。
Intel AX210 vs Intel AX200,AX210采用M.2 2230或M.2 1216形态设计,除了支持Wi-Fi 6E,还支持蓝牙5.2,2x2天线,无线速度最高3000Mbps。高级特性方面,首先就是Wi-Fi 6E独有的6GHz频段,虽然穿墙不佳,但近距离传输速度更快。当然要想用上,外围设备也得支持才行,否则就是传统Wi-Fi 6的2.4GHz和5GHz。

速度

开启5G,VHT80,WPEQ-257 QCA988X不支持VHT160,使用手机iperf3测速,测试手机红米K30 Pro,骁龙865 SOC,接收速度57MB/s,发送速度30MB/s,

root@zynq-v2019:~# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.43.30, port 46802
[  5] local 192.168.43.1 port 5201 connected to 192.168.43.30 port 46804
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  49.0 MBytes   411 Mbits/sec
[  5]   1.00-2.00   sec  58.1 MBytes   487 Mbits/sec
[  5]   2.00-3.00   sec  57.1 MBytes   479 Mbits/sec
[  5]   3.00-4.00   sec  57.1 MBytes   479 Mbits/sec
[  5]   4.00-5.00   sec  57.1 MBytes   479 Mbits/sec
[  5]   5.00-5.06   sec  3.22 MBytes   492 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-5.06   sec   282 MBytes   467 Mbits/sec                  receiver
root@zynq-v2019:~# iperf3 -c 192.168.43.30
Connecting to host 192.168.43.30, port 5201
[  5] local 192.168.43.1 port 56530 connected to 192.168.43.30 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  27.8 MBytes   233 Mbits/sec    0    532 KBytes
[  5]   1.00-2.00   sec  31.8 MBytes   267 Mbits/sec    0    638 KBytes
[  5]   2.00-3.00   sec  33.2 MBytes   278 Mbits/sec    0    675 KBytes
[  5]   3.00-4.00   sec  30.5 MBytes   256 Mbits/sec    0    675 KBytes
[  5]   4.00-5.00   sec  29.7 MBytes   249 Mbits/sec    0    675 KBytes
[  5]   5.00-6.00   sec  31.7 MBytes   266 Mbits/sec    0    711 KBytes
[  5]   6.00-7.00   sec  30.0 MBytes   251 Mbits/sec    0    711 KBytes
[  5]   7.00-8.00   sec  30.3 MBytes   254 Mbits/sec    0    711 KBytes
[  5]   8.00-9.00   sec  31.7 MBytes   265 Mbits/sec    0    711 KBytes
[  5]   9.00-10.00  sec  30.3 MBytes   255 Mbits/sec    0    711 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   307 MBytes   257 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   306 MBytes   256 Mbits/sec                  receiveriperf Done.

802.11a/b/g/n/ac

rfkill

内核需要开启这个支持,

[*]   RF switch input support

WPEQ-261ACN(BT)

管脚

  • WAKE_L(OPT) 模块输出给系统的,用于唤醒系统
  • CLKREQ_L 模块输出给系统的,提示是否需要给模块提供时钟,低功耗用途
  • W_DISABLE_L(OPT) 系统输出给模块的,可关闭模块射频信号
  • PERST_L 系统给模块的复位

驱动

使用的驱动是ath_10k,选择Atheros 802.11ac wireless cards support

#define ATH10K_FW_DIR            "ath10k"/* QCA988X 1.0 definitions (unsupported) */
#define QCA988X_HW_1_0_CHIP_ID_REV  0x0/* QCA988X 2.0 definitions */
#define QCA988X_HW_2_0_VERSION      0x4100016c
#define QCA988X_HW_2_0_CHIP_ID_REV  0x2
#define QCA988X_HW_2_0_FW_DIR       ATH10K_FW_DIR "/QCA988X/hw2.0"
#define QCA988X_HW_2_0_FW_FILE      "firmware.bin"
#define QCA988X_HW_2_0_OTP_FILE     "otp.bin"
#define QCA988X_HW_2_0_BOARD_DATA_FILE  "board.bin"
#define QCA988X_HW_2_0_PATCH_LOAD_ADDR  0x1234#define ATH10K_FW_API2_FILE       "firmware-2.bin"
#define ATH10K_FW_API3_FILE     "firmware-3.bin"#define ATH10K_FW_UTF_FILE        "utf.bin"/* includes also the null byte */
#define ATH10K_FIRMWARE_MAGIC               "QCA-ATH10K"

加载驱动,

$ sudo lspci -vv -s 04:00.0
04:00.0 Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network AdapterControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-Latency: 0, Cache Line Size: 64 bytesInterrupt: pin A routed to IRQ 131Region 0: Memory at f7200000 (64-bit, non-prefetchable) [size=2M]Expansion ROM at f7400000 [disabled] [size=64K]Capabilities: [40] Power Management version 2Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-Capabilities: [50] MSI: Enable+ Count=1/8 Maskable+ 64bit-Address: fee003b8  Data: 0000Masking: 00fe00fe  Pending: 00000000Capabilities: [70] Express (v2) Endpoint, MSI 00DevCap:    MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64usExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000WDevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-MaxPayload 256 bytes, MaxReadReq 512 bytesDevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64usClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-LnkSta:    Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not SupportedDevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF DisabledLnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-Compliance De-emphasis: -6dBLnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-Capabilities: [100 v1] Advanced Error ReportingUESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-UEMsk:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-UESvrt:   DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-CESta:   RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-CEMsk:   RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-Capabilities: [140 v1] Virtual ChannelCaps:  LPEVC=0 RefClk=100ns PATEntryBits=1Arb:  Fixed- WRR32- WRR64- WRR128-Ctrl:   ArbSelect=FixedStatus: InProgress-VC0: Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-Ctrl:  Enable+ ID=0 ArbSelect=Fixed TC/VC=ffStatus:    NegoPending- InProgress-Capabilities: [160 v1] Device Serial Number 00-00-00-00-00-00-00-00Kernel driver in use: ath10k_pciKernel modules: ath10k_pci$ sudo memtool md 0xf7200000
f7200000: deadbeef deadbeef deadbeef deadbeef                ................
f7200010: deadbeef deadbeef deadbeef deadbeef                ................
f7200020: deadbeef deadbeef deadbeef deadbeef                ................
f7200030: deadbeef deadbeef deadbeef deadbeef                ................
f7200040: deadbeef deadbeef deadbeef deadbeef                ................
f7200050: deadbeef deadbeef deadbeef deadbeef                ................
f7200060: deadbeef deadbeef deadbeef deadbeef                ................
f7200070: deadbeef deadbeef deadbeef deadbeef                ................
f7200080: deadbeef deadbeef deadbeef deadbeef                ................
f7200090: deadbeef deadbeef deadbeef deadbeef                ................
f72000a0: deadbeef deadbeef deadbeef deadbeef                ................
f72000b0: deadbeef deadbeef deadbeef deadbeef                ................
f72000c0: deadbeef deadbeef deadbeef deadbeef                ................
f72000d0: deadbeef deadbeef deadbeef deadbeef                ................
f72000e0: deadbeef deadbeef deadbeef deadbeef                ................
f72000f0: deadbeef deadbeef deadbeef deadbeef                ................
$ sudo memtool md 0xf7280000
f7280000: 000002d3 00000001 00000000 00001801                ................
f7280010: 00001000 0000106a 00006da4 00002840                ....j....m..@(..
f7280020: 00003184 00000000 00000000 00000000                .1..............
f7280030: 00000000 00000000 00000000 00000000                ................
f7280040: 00000000 00000000 00000000 00000000                ................
f7280050: 00000000 00000000 00000000 00000000                ................
f7280060: 00000000 00000000 00000000 00000000                ................
f7280070: 00000000 00000000 00000000 00000000                ................
f7280080: 00000000 00000000 00000000 00000000                ................
f7280090: 00000000 00000000 00000000 00000000                ................
f72800a0: 00000000 00000000 00000000 00000000                ................
f72800b0: 00000000 00000000 00000000 00000000                ................
f72800c0: 00000000 00000000 00000000 00000000                ................
f72800d0: 00000000 00000000 00000000 00000000                ................
f72800e0: 00000000 00000000 00000000 00000000                ................
f72800f0: 00000000 00000000 00000000 00000000                ................
$ uname -a
Linux qe-pc 5.3.0-62-generic #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ sudo dmesg
[    0.000000] microcode: microcode updated early to revision 0xd6, date = 2020-04-27
[    0.000000] Linux version 5.3.0-62-generic (buildd@lcy01-amd64-004) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 (Ubuntu 5.3.0-62.56~18.04.1-generic 5.3.18)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-62-generic root=UUID=e06d0026-9e0b-4014-bb55-efe51b0b1db4 ro quiet splash vt.handoff=1
...
[    1.166246] pci 0000:04:00.0: [168c:003c] type 00 class 0x028000
[    1.166275] pci 0000:04:00.0: reg 0x10: [mem 0xf7200000-0xf73fffff 64bit]
[    1.166320] pci 0000:04:00.0: reg 0x30: [mem 0xf7400000-0xf740ffff pref]
[    1.166389] pci 0000:04:00.0: supports D1 D2
[    1.166389] pci 0000:04:00.0: PME# supported from D0 D1 D2 D3hot D3cold
...
[    4.904377] ath10k_pci 0000:04:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[    5.090421] ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043222ff sub 0000:0000
[    5.090423] ath10k_pci 0000:04:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[    5.090542] ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00037 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 a4a52adb
[    5.177177] ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[    6.299615] ath10k_pci 0000:04:00.0: unsupported HTC service id: 1536
[    6.318851] ath10k_pci 0000:04:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
[    6.396351] ath: EEPROM regdomain: 0x0
[    6.396353] ath: EEPROM indicates default country code should be used
[    6.396353] ath: doing EEPROM country->regdmn map search
[    6.396354] ath: country maps to regdmn code: 0x3a
[    6.396354] ath: Country alpha2 being used: US
[    6.396354] ath: Regpair used: 0x3a
[    6.399092] ath10k_pci 0000:04:00.0 wlp4s0: renamed from wlan0
...
[  622.364317] rfkill: input handler disabled

在zynq上出了点bug,在zu开发板上就没识别到,这个模块必须先上电,否则无法linkup,

$ modprobe ath10k_pci
pci 0000:00:00.0: enabling device (0140 -> 0142)
ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
ath10k_pci 0000:01:00.0: failed to wake up: -110
ath10k_pci: probe of 0000:01:00.0 failed with error -110
xilinx-pcie 50000000.pciex: Slave Completer Abort
xilinx-pcie 50000000.pciex: Slave Completer Abort
Bus error
Unhandled fault: imprecise external abort (0x1406) at 0x80c80004

性能

5G双频,性能,

# iperf3 -c 192.168.43.30
Connecting to host 192.168.43.30, port 5201
[  5] local 192.168.43.1 port 53816 connected to 192.168.43.30 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  22.3 MBytes   187 Mbits/sec    0    421 KBytes
[  5]   1.00-2.00   sec  27.2 MBytes   228 Mbits/sec    0    444 KBytes
[  5]   2.00-3.00   sec  25.7 MBytes   216 Mbits/sec    0    465 KBytes
[  5]   3.00-4.00   sec  27.6 MBytes   231 Mbits/sec    0    465 KBytes
[  5]   4.00-5.00   sec  27.2 MBytes   229 Mbits/sec    0    495 KBytes
[  5]   5.00-6.00   sec  27.2 MBytes   228 Mbits/sec    0    495 KBytes
[  5]   6.00-7.00   sec  26.9 MBytes   226 Mbits/sec    0    495 KBytes
[  5]   7.00-8.00   sec  26.8 MBytes   225 Mbits/sec    0    495 KBytes
[  5]   8.00-9.00   sec  25.1 MBytes   211 Mbits/sec    0    547 KBytes
[  5]   9.00-10.00  sec  27.2 MBytes   228 Mbits/sec    0    583 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   263 MBytes   221 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   262 MBytes   220 Mbits/sec                  receiveriperf Done.
# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.43.30, port 42696
[  5] local 192.168.43.1 port 5201 connected to 192.168.43.30 port 42698
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  36.1 MBytes   303 Mbits/sec
[  5]   1.00-2.00   sec  38.0 MBytes   319 Mbits/sec
[  5]   2.00-3.00   sec  38.9 MBytes   326 Mbits/sec
[  5]   3.00-4.00   sec  36.8 MBytes   309 Mbits/sec
[  5]   4.00-5.00   sec  37.2 MBytes   312 Mbits/sec
[  5]   5.00-5.03   sec  1.30 MBytes   332 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-5.03   sec   188 MBytes   314 Mbits/sec                  receiver

WPEB-265AXI(BT)

采用博通的bcm43752a2,支持WIFI6E,采用厂商给的bcmdhd驱动,不是从博通官网下载的,目前只调通了2.4g,性能如下,

# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.43.30, port 43592
[  5] local 192.168.43.1 port 5201 connected to 192.168.43.30 port 43594
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  9.39 MBytes  78.7 Mbits/sec
[  5]   1.00-2.00   sec  11.3 MBytes  94.5 Mbits/sec
[  5]   2.00-3.00   sec  13.4 MBytes   113 Mbits/sec
[  5]   3.00-4.00   sec  14.5 MBytes   122 Mbits/sec
[  5]   4.00-5.00   sec  14.2 MBytes   119 Mbits/sec
[  5]   5.00-5.12   sec  1.54 MBytes   109 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-5.12   sec  64.3 MBytes   105 Mbits/sec                  receiver
# iperf3 -c 192.168.43.30
Connecting to host 192.168.43.30, port 5201
[  5] local 192.168.43.1 port 42240 connected to 192.168.43.30 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  9.02 MBytes  75.6 Mbits/sec    0    486 KBytes
[  5]   1.00-2.00   sec  13.6 MBytes   114 Mbits/sec   33    706 KBytes
[  5]   2.00-3.00   sec  10.4 MBytes  87.4 Mbits/sec    0    803 KBytes
[  5]   3.00-4.00   sec  15.2 MBytes   127 Mbits/sec    0    875 KBytes
[  5]   4.00-5.00   sec  16.2 MBytes   136 Mbits/sec    0    928 KBytes
[  5]   5.00-6.00   sec  15.3 MBytes   129 Mbits/sec    0    962 KBytes
[  5]   6.00-7.00   sec  14.1 MBytes   118 Mbits/sec    2    700 KBytes
[  5]   7.00-8.00   sec  16.3 MBytes   137 Mbits/sec    0    754 KBytes
[  5]   8.00-9.00   sec  18.8 MBytes   158 Mbits/sec    0    792 KBytes
[  5]   9.00-10.00  sec  16.8 MBytes   141 Mbits/sec    0    814 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   146 MBytes   122 Mbits/sec   35             sender
[  5]   0.00-10.00  sec   144 MBytes   121 Mbits/sec                  receiveriperf Done.

驱动加载信息,尝试搜索频段,失败,802.11ac初始化失败,

# dmesg | grep dhd
[dhd] dhd_module_init: in Dongle Host Driver, version 100.10.545.16_S8 (r826445-20201221-1)
[dhd] ======== dhd_wlan_init_plat_data ========
[dhd] dhd_wlan_init_gpio: WL_REG_ON=-1
[dhd] dhd_wifi_platform_load: Enter
[dhd] dhdpcie_pci_probe : no mutex held. set lock
[dhd] PCI_PROBE:  bus 1, slot 0,vendor 14E4, device 449D(good PCI location)
[dhd] dhdpcie_init: found adapter info 'DHD generic adapter'
[dhd] Disable CTO
[dhd] ******** Perform FLR ********
[dhd] read_config: reg=0x88 read val=0xb080
[dhd] read_config: reg=0x88 read val=0x8080
[dhd] ******** FLR Succedeed ********
[dhd] DHD: dongle ram size is set to 1310720(orig 1310720) at 0x170000
[dhd] dhd_conf_set_chiprev : chip=0xaae8, chiprev=2
[dhd] dhd_pktid_map_init:2095: pktid_audit init succeeded 1025
[dhd] dhd_pktid_map_init:2095: pktid_audit init succeeded 1025
[dhd] dhd_pktid_map_init:2095: pktid_audit init succeeded 36865
[dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[dhd] dhd_attach(): thread:dhd_watchdog_thread:3f1 started
[dhd] dhd_deferred_work_init: work queue initialized
[dhd] dhd_tcpack_suppress_set: TCP ACK Suppress mode 0 -> mode 3
[dhd] dhd_cpumasks_init CPU masks primary(big)=0x0 secondary(little)=0xfe
[dhd] dhdpcie_bus_attach: making DHD_BUS_DOWN
[dhd] dhdpcie_init: rc_dev from dev->bus->self (10ee:7124) is (ptrval)
[dhd] dhdpcie_access_cap: PCI Cap(0x1e) not supported.
[dhd] dhd_bus_is_rc_ep_l1ss_capable RC is not l1ss capable
[dhd] dhdpcie_init: rc_ep_aspm_cap: 1 rc_ep_l1ss_cap: 0
[dhd] dhdpcie_request_irq: MSI enabled
[dhd] dhd_bus_download_firmware: firmware path=/lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin, nvram path=/lib/firmware/bcmdhd/nvram_ap6275p.txt
[dhd] dhdpcie_dump_resource: BAR0(VA): 0x(ptrval), BAR0(PA): 0x40400000, SIZE: 32768
[dhd] dhdpcie_dump_resource: BAR1(VA): 0x(ptrval), BAR1(PA): 0x40000000, SIZE: 4194304
[dhd] dhd_conf_read_config : Ignore config file /lib/firmware/bcmdhd/config.txt
[dhd] dhd_conf_set_path_params : Final fw_path=/lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin
[dhd] dhd_conf_set_path_params : Final nv_path=/lib/firmware/bcmdhd/nvram_ap6275p.txt
[dhd] dhd_conf_set_path_params : Final clm_path=/lib/firmware/bcmdhd/clm_bcm43752a2_pcie_ag.blob
[dhd] dhd_conf_set_path_params : Final conf_path=/lib/firmware/bcmdhd/config.txt
[dhd] dhd_os_open_image1: /lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin (818176 bytes) open success
[dhd] dhdpcie_download_code_file: dhd_tcm_test_enable 0
[dhd] dhdpcie_download_code_file: download firmware /lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin
[dhd] dhd_os_open_image1: /lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin (818176 bytes) open success
[dhd] dhd_os_open_image1: /lib/firmware/bcmdhd/nvram_ap6275p.txt (8576 bytes) open success
[dhd] dhdpcie_download_nvram: dhd_get_download_buffer len 8576
[dhd] NVRAM version:  AP12275_PB33_PB18_PR33_PR18_NVRAM_V1.3_20210113_FCC
[dhd] dhdpcie_download_nvram: process_nvram_vars len 5948
[dhd] dhdpcie_bus_write_vars: Download, Upload and compare of NVRAM succeeded.
[dhd] dhd_bus_aer_config: Configure AER registers for EP
[dhd] dhd_bus_aer_config: Configure AER registers for RC
[dhd] dhdpcie_access_cap: PCI Cap(0x01) not supported.
[dhd] dhd_bus_aer_config: Invalid RC's PCIE_ADV_CORR_ERR_MASK: 0xffffffff
[dhd] dhdpcie_readshared: PCIe shared addr (0x001ef954) read took 56383 usec before dongle is ready
[dhd] H2D DMA WR INDX : array size 172 = 4 * 43
[dhd] D2H DMA RD INDX : array size 16 = 4 * 4
[dhd] D2H DMA WR INDX : array size 16 = 4 * 4
[dhd] H2D DMA RD INDX : array size 172 = 4 * 43
[dhd] dhdpcie_readshared: max H2D queues 40
[dhd] FW supports debug buf dest ? N
[dhd] dhd_bus_start: Initializing 43 h2drings
[dhd] dhd_prot_init:3207: h2d_max_txpost = 512
[dhd] dhd_prot_init:3216: MAX_RXBUFPOST = 511
[dhd] ENABLING DW:0
[dhd] IDMA inited
[dhd] Enable hostcap: EXTD TXS in txcpl
[dhd] dhd_prot_d2h_sync_init(): D2H sync mechanism is NONE
[dhd] dhd_bus_hostready : Read PCICMD Reg: 0x00100546
[dhd] dhd_bus_dump_dar_registers: dar_clk_ctrl(0xa08:0x1030040) dar_pwr_ctrl(0xa0c:0x30000) dar_intstat(0xa10:0x0)
[dhd] dhd_bus_dump_dar_registers: dar_errlog(0xa60:0x0) dar_erraddr(0xa64:0x0) dar_pcie_mbint(0xa68:0x0)
[dhd] dhd_bus_hostready: Ring Hostready:1
[dhd] Attach flowrings pool for 40 rings
[dhd] iDMA enabled PCIEControl = 00000001
[dhd] dhd_send_d2h_ringcreate ringid: 3 idx: 46 max_h2d: 43
[dhd] info buffer post after ring create
[dhd] dhd_sync_with_dongle: GET_REVINFO device 0x449d, vendor 0x14e4, chipnum 0xaae8
[dhd] dhd_sync_with_dongle: RxBuf Post : 2048
[dhd] dhd_tcpack_suppress_set 382: already set to 3
[dhd] dhd_os_open_image1: /lib/firmware/bcmdhd/clm_bcm43752a2_pcie_ag.blob (28865 bytes) open success
[dhd] dhd_check_current_clm_data: ----- This FW is not included CLM data -----
[dhd] dhd_check_current_clm_data: ----- This FW is included CLM data -----
[dhd] Firmware up: op_mode=0x0002, MAC=00:0e:8e:9c:9f:28
[dhd] dhd_preinit_ioctls: event_log_max_sets: 26 ret: 0
[dhd]   Driver: 100.10.545.16_S8 (r826445-20201221-1)
[dhd] dhd_pno_init: Support Android Location Service
[dhd] dhd_ecounter_autoconfig Ecounter autoconfig in FW not supported
[dhd] [INIT] logset:8 is preserve/chatty
[dhd] [INIT] logset:10 is preserve/chatty
[dhd] dhd_conf_set_country : set country XZ, revision 0
[dhd] dhd_rx_frame: net device is NOT registered. drop event packet
[dhd] dhd_conf_set_country : Country code: XZ (XZ/0)
[dhd] Dongle Host Driver, version 100.10.545.16_S8 (r826445-20201221-1)
[dhd] Register interface [wlan0]  MAC: 00:0e:8e:9c:9f:28
[dhd] dhd_tcpack_suppress_set: TCP ACK Suppress mode 3 -> mode 0
[dhd] dhd_bus_devreset: == Power OFF ==
[dhd] dhd_bus_devreset: making dhdpub up FALSE
[dhd] dhd_bus_stop: making DHD_BUS_DOWN
[dhd] dhd_dpc_kill: tasklet disabled
[dhd] dhd_bus_devreset: making DHD_BUS_DOWN
[dhd] dhd_bus_devreset:  WLAN OFF Done
[dhd] wifi_platform_set_power = 0, delay: 0 msec
[dhd] ======== PULL WL_REG_ON(-1) LOW! ========
[dhd] dhdpcie_pci_probe : the lock is released.
[dhd] dhd_module_init: Exit err=0
[dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[dhd] dhd_open: Enter wlan0
[dhd] dhd_open : no mutex held. set lock
[dhd]
[dhd-wlan0] wl_android_wifi_on : in g_wifi_on=0
[dhd] wifi_platform_set_power = 1, delay: 200 msec
[dhd] ======== PULL WL_REG_ON(-1) HIGH! ========
[dhd] dhd_bus_devreset: == Power ON ==
[dhd] Disable CTO
[dhd] DHD: dongle ram size is set to 1310720(orig 1310720) at 0x170000
[dhd] dhdpcie_request_irq: MSI enabled
[dhd] dhd_bus_download_firmware: firmware path=/lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin, nvram path=/lib/firmware/bcmdhd/nvram_ap6275p.txt
[dhd] dhdpcie_dump_resource: BAR0(VA): 0x(ptrval), BAR0(PA): 0x40400000, SIZE: 32768
[dhd] dhdpcie_dump_resource: BAR1(VA): 0x(ptrval), BAR1(PA): 0x40000000, SIZE: 4194304
[dhd] dhd_conf_read_config : Ignore config file /lib/firmware/bcmdhd/config.txt
[dhd] dhd_conf_set_path_params : Final fw_path=/lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin
[dhd] dhd_conf_set_path_params : Final nv_path=/lib/firmware/bcmdhd/nvram_ap6275p.txt
[dhd] dhd_conf_set_path_params : Final clm_path=/lib/firmware/bcmdhd/clm_bcm43752a2_pcie_ag.blob
[dhd] dhd_conf_set_path_params : Final conf_path=/lib/firmware/bcmdhd/config.txt
[dhd] dhdpcie_download_code_file: dhd_tcm_test_enable 0
[dhd] dhdpcie_download_code_file: download firmware /lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin
[dhd] dhd_os_open_image1: /lib/firmware/bcmdhd/fw_bcm43752a2_pcie_ag_apsta.bin (818176 bytes) open success
[dhd] dhd_os_open_image1: /lib/firmware/bcmdhd/nvram_ap6275p.txt (8576 bytes) open success
[dhd] dhdpcie_download_nvram: dhd_get_download_buffer len 8576
[dhd] NVRAM version:  AP12275_PB33_PB18_PR33_PR18_NVRAM_V1.3_20210113_FCC
[dhd] dhdpcie_download_nvram: process_nvram_vars len 5948
[dhd] dhdpcie_bus_write_vars: Download, Upload and compare of NVRAM succeeded.
[dhd] dhd_bus_aer_config: Configure AER registers for EP
[dhd] dhd_bus_aer_config: Configure AER registers for RC
[dhd] dhdpcie_access_cap: PCI Cap(0x01) not supported.
[dhd] dhd_bus_aer_config: Invalid RC's PCIE_ADV_CORR_ERR_MASK: 0xffffffff
[dhd] dhdpcie_readshared: PCIe shared addr (0x001ef954) read took 56383 usec before dongle is ready
[dhd] H2D DMA WR INDX : array size 172 = 4 * 43
[dhd] D2H DMA RD INDX : array size 16 = 4 * 4
[dhd] D2H DMA WR INDX : array size 16 = 4 * 4
[dhd] H2D DMA RD INDX : array size 172 = 4 * 43
[dhd] dhdpcie_readshared: max H2D queues 40
[dhd] FW supports debug buf dest ? N
[dhd] dhd_bus_start: Initializing 43 h2drings
[dhd] dhd_prot_init:3207: h2d_max_txpost = 512
[dhd] dhd_prot_init:3216: MAX_RXBUFPOST = 511
[dhd] ENABLING DW:0
[dhd] IDMA inited
[dhd] Enable hostcap: EXTD TXS in txcpl
[dhd] dhd_prot_d2h_sync_init(): D2H sync mechanism is NONE
[dhd] dhd_bus_hostready : Read PCICMD Reg: 0x00100546
[dhd] dhd_bus_dump_dar_registers: dar_clk_ctrl(0xa08:0x1030040) dar_pwr_ctrl(0xa0c:0x30000) dar_intstat(0xa10:0x0)
[dhd] dhd_bus_dump_dar_registers: dar_errlog(0xa60:0x0) dar_erraddr(0xa64:0x0) dar_pcie_mbint(0xa68:0x0)
[dhd] dhd_bus_hostready: Ring Hostready:2
[dhd] iDMA enabled PCIEControl = 00000001
[dhd] dhd_send_d2h_ringcreate ringid: 3 idx: 46 max_h2d: 43
[dhd] info buffer post after ring create
[dhd] dhd_sync_with_dongle: GET_REVINFO device 0x449d, vendor 0x14e4, chipnum 0xaae8
[dhd] dhd_sync_with_dongle: RxBuf Post : 2048
[dhd] dhd_tcpack_suppress_set: TCP ACK Suppress mode 0 -> mode 3
[dhd] dhd_os_open_image1: /lib/firmware/bcmdhd/clm_bcm43752a2_pcie_ag.blob (28865 bytes) open success
[dhd] dhd_check_current_clm_data: ----- This FW is not included CLM data -----
[dhd] dhd_check_current_clm_data: ----- This FW is included CLM data -----
[dhd] Firmware up: op_mode=0x0002, MAC=00:0e:8e:9c:9f:28
[dhd] dhd_preinit_ioctls: event_log_max_sets: 26 ret: 0
[dhd]   Driver: 100.10.545.16_S8 (r826445-20201221-1)
[dhd] dhd_pno_init: Support Android Location Service
[dhd] dhd_ecounter_autoconfig Ecounter autoconfig in FW not supported
[dhd] [INIT] logset:8 is preserve/chatty
[dhd] [INIT] logset:10 is preserve/chatty
[dhd] dhd_conf_set_country : set country XZ, revision 0
[dhd] dhd_rx_frame: net device is NOT registered. drop event packet
[dhd] dhd_conf_set_country : Country code: XZ (XZ/0)
[dhd] dhd_bus_devreset: WLAN Power On Done
[dhd-wlan0] wl_android_wifi_on : Success
[dhd] dhd_open : the lock is released.
[dhd] dhd_open: Exit wlan0 ret=0
[dhd] [wlan0] tx queue started
[dhd-wlan0] wl_cfg80211_add_del_bss : wl bss 2 bssidx:0
[dhd-wlan0] wl_run_escan : LEGACY_SCAN sync ID: 0, bssidx: 0
[dhd] CFG80211-ERROR) wl_run_escan :  Escan set error (-4)
[dhd] CFG80211-ERROR) wl_run_escan : scan error (-4)
[dhd] CFG80211-ERROR) wl_cfg80211_scan : scan error (-11)
[dhd-wlan0] wl_cfg80211_add_del_bss : wl bss 3 bssidx:0
[dhd-wlan0] wl_run_escan : LEGACY_SCAN sync ID: 1, bssidx: 0
[dhd] CFG80211-ERROR) wl_run_escan :  Escan set error (-4)
[dhd] CFG80211-ERROR) wl_run_escan : scan error (-4)
[dhd] CFG80211-ERROR) wl_cfg80211_scan : scan error (-11)
[dhd-wlan0] wl_cfg80211_add_del_bss : wl bss 2 bssidx:0
[dhd-wlan0] wl_cfg80211_del_station : Disconnect STA : ff:ff:ff:ff:ff:ff scb_val.val 3
[dhd-wlan0] wl_cfg80211_add_del_bss : wl bss 3 bssidx:0

intel 7265AC

在zynq上可以正常加载驱动,

$ lspci -vv
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)Subsystem: Intel Corporation Dual Band Wireless-AC 7260Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx-Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-Interrupt: pin A routed to IRQ 165Region 0: Memory at 40000000 (64-bit, non-prefetchable) [disabled] [size=8K]Capabilities: [c8] Power Management version 3Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+Address: 0000000000000000  Data: 0000Capabilities: [40] Express (v2) Endpoint, MSI 00DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimitedExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+ FLReset-MaxPayload 128 bytes, MaxReadReq 128 bytesDevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <32usClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-DevCap2: Completion Timeout: Range B, TimeoutDis+, LTR+, OBFF Via WAKE#DevCtl2: Completion Timeout: 16ms to 55ms, TimeoutDis-, LTR-, OBFF DisabledLnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-Compliance De-emphasis: -6dBLnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-Capabilities: [100 v1] Advanced Error ReportingUESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-Capabilities: [140 v1] Device Serial Number 48-51-b7-ff-ff-5a-28-37Capabilities: [14c v1] Latency Tolerance ReportingMax snoop latency: 0nsMax no snoop latency: 0nsCapabilities: [154 v1] Vendor Specific Information: ID=cafe Rev=1 Len=014 <?>
root@zynq:~# modprobe iwlwifi
Intel(R) Wireless WiFi driver for Linux, in-tree:
Copyright(c) 2003- 2014 Intel Corporation
iwlwifi 0000:01:00.0: loaded firmware version 25.17.12.0 op_mode iwlmvm
iwlwifi 0000:01:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144
iwlwifi 0000:01:00.0: L1 Disabled - LTR Disabled
iwlwifi 0000:01:00.0: L1 Disabled - LTR Disabled
$ ls -l /lib/firmware
-rw-r--r--    1 root     root        672352 Nov  2  2020 iwlwifi-7260-10.ucode
-rw-r--r--    1 root     root        782300 Nov  2  2020 iwlwifi-7260-12.ucode
-rw-r--r--    1 root     root        680508 Nov  2  2020 iwlwifi-7260-9.ucode
$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 16:25:C6:0F:D0:E9  inet addr:192.168.26.21  Bcast:192.168.26.255  Mask:255.255.255.0inet6 addr: fe80::1425:c6ff:fe0f:d0e9/64 Scope:LinkUP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1RX packets:1764 errors:0 dropped:0 overruns:0 frame:0TX packets:1012 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000 RX bytes:2248915 (2.1 MiB)  TX bytes:83000 (81.0 KiB)Interrupt:145 Base address:0xb000 lo        Link encap:Local Loopback  inet addr:127.0.0.1  Mask:255.0.0.0inet6 addr: ::1/128 Scope:HostUP LOOPBACK RUNNING  MTU:65536  Metric:1RX packets:2 errors:0 dropped:0 overruns:0 frame:0TX packets:2 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:0 RX bytes:100 (100.0 B)  TX bytes:100 (100.0 B)wlan0     Link encap:Ethernet  HWaddr 48:51:B7:5A:28:37  BROADCAST MULTICAST  MTU:1500  Metric:1RX packets:0 errors:0 dropped:0 overruns:0 frame:0TX packets:0 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Realtek

LB-Link公司的产品,产品列表,其中BL-M8188NP1 MINI PCI-E WLAN Module 支持IEEE 802.11 b/g/n,2.4G频段,采用Realtek RTL8188EE芯片,1688批量订货。

rtlwifi驱动分析

开启驱动中的调试打印,

int rtl_pci_probe(struct pci_dev *pdev,const struct pci_device_id *id)
{...// 从pci_device_id中拿到cfgrtlpriv->cfg = (struct rtl_hal_cfg *)(id->driver_data);
...// 初始化调试接口rtl_dbgp_flag_init(hw);
.../*like read eeprom and so on *///pci_read32_sync crash herertlpriv->cfg->ops->read_eeprom_info(hw);//初始化一些软件变量,包括调试接口的global_debuglevelif (rtlpriv->cfg->ops->init_sw_vars(hw)) {RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");err = -ENODEV;goto fail3;}rtlpriv->cfg->ops->init_sw_leds(hw);
...
}

调试接口相关

void rtl_dbgp_flag_init(struct ieee80211_hw *hw)
{struct rtl_priv *rtlpriv = rtl_priv(hw);u8 i;// 设置了所有的标志位rtlpriv->dbg.global_debugcomponents =COMP_ERR | COMP_FW | COMP_INIT | COMP_RECV | COMP_SEND |COMP_MLME | COMP_SCAN | COMP_INTR | COMP_LED | COMP_SEC |COMP_BEACON | COMP_RATE | COMP_RXDESC | COMP_DIG | COMP_TXAGC |COMP_POWER | COMP_POWER_TRACKING | COMP_BB_POWERSAVING | COMP_SWAS |COMP_RF | COMP_TURBO | COMP_RATR | COMP_CMD |COMP_EFUSE | COMP_QOS | COMP_MAC80211 | COMP_REGD | COMP_CHAN |COMP_EASY_CONCURRENT | COMP_EFUSE | COMP_QOS | COMP_MAC80211 |COMP_REGD | COMP_CHAN | COMP_BT_COEXIST;for (i = 0; i < DBGP_TYPE_MAX; i++)rtlpriv->dbg.dbgp_type[i] = 0;/*Init Debug flag enable condition */
}
EXPORT_SYMBOL_GPL(rtl_dbgp_flag_init);
// global_debugcomponents设置了所有的标志位,所以能不能打印就看global_debuglevel
#define RT_TRACE(rtlpriv, comp, level, fmt, ...)            \
do {                                    \if (unlikely(((comp) & rtlpriv->dbg.global_debugcomponents) &&  \((level) <= rtlpriv->dbg.global_debuglevel))) { \printk(KERN_DEBUG KBUILD_MODNAME ":%s():<%lx-%x> " fmt,    \__func__, in_interrupt(), in_atomic(),     \##__VA_ARGS__);                    \}                              \
} while (0)
//drivers\net\wireless\rtlwifi\rtl8192ee\sw.c
int rtl92ee_init_sw_vars(struct ieee80211_hw *hw)
{...rtlpriv->dbg.global_debuglevel = rtlpriv->cfg->mod_params->debug;
...
}
root@zynq:~# pci 0000:00:00.0: enabling device (0140 -> 0143)
rtl8192ee 0000:01:00.0: enabling device (0140 -> 0143)
xilinx-pcie 40000000.pciex: Slave Completer Abort
Unhandled fault: imprecise external abort (0x1406) at 0x36f8c000
Internal error: Oops - BUG: 1406 [#1] PREEMPT SMP ARM
Modules linked in: rtl8192ee(+) btcoexist rtl_pci rtlwifi exfat(O) cpld(O) max6369(O) uio_pdrv_genirq cmem(O) ipv6
CPU: 0 PID: 961 Comm: modprobe Tainted: G           O   3.19.0-fdk-1.0.4-20201026.1453 #22
Hardware name: Xilinx Zynq Platform
task: 6e895a80 ti: 6e922000 task.ti: 6e922000
PC is at pci_read32_sync+0x10/0x14 [rtl_pci]
LR is at rtl92ee_read_eeprom_info+0x30/0x378 [rtl8192ee]
pc : [<3f0a103c>]    lr : [<3f0c4104>]    psr: 600d0013
sp : 6e923d18  ip : 000008b0  fp : 6f1e8400
r10: 000010ec  r9 : 6ead1768  r8 : 6eada0c0
r7 : 6ead03e0  r6 : 6eadb020  r5 : 0000102c  r4 : 6ead10c0
r3 : 80a28000  r2 : 3f0a102c  r1 : 80a280f0  r0 : 00000000
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 18c5387d  Table: 2ea3404a  DAC: 00000015
Process modprobe (pid: 961, stack limit = 0x6e922238)
Stack: (0x6e923d18 to 0x6e924000)
3d00:                                                       6ead03e0 6ead10d8
3d20: 6f1ebc00 6ead10c0 6ead03e0 6eada0c0 6eada0c0 3f0a4ef8 000000d0 6f01eac0
3d40: 6f169564 402510b0 6f01eac8 00001dcb 00000000 6f1d8128 6ead10c0 6eadc0c0
3d60: 6eadb020 6f1ebc68 0000a1ff 40109274 001d8128 40109817 6f1e01a5 6f1ebccc
3d80: 00000000 60030013 3f0d33b0 6f1ebc68 3f0d33e4 6f1ebc00 00000000 3f0d33b0
3da0: 3f0d342c 00000001 6f169564 4027bcc0 4027bc58 6f1ebc68 408c621c 3f0d33e4
3dc0: 3f0d33e4 00000003 6f169540 402fd1cc 6f1ebc68 6f1ebc9c 3f0d33e4 40852e28
3de0: 40843760 402fd3b8 00000000 3f0d33e4 402fd350 402fbaf0 6f0a255c 6f3aabb4
3e00: 3f0d33e4 00000000 6f07b380 402fca90 3f0d21d1 3f0d21d2 00000000 3f0d33e4
3e20: 3f0d9000 00000000 40843760 402fd8bc 3f0d3424 6f169440 3f0d9000 400088e0
3e40: 6fd5b300 6fd5b320 00000001 00000000 00000001 40088608 6fd5b300 00000000
3e60: 00000001 6f778000 3f0d5338 00000000 00000000 4008a0bc 6fd5b300 00000000
3e80: 00000023 6f243080 00000023 6f243080 00000001 6e923f58 6f243080 3f0d52f0
3ea0: 3f0d52fc 3f0d5338 6f169540 400704a0 3f0d52fc 00007fff 4006dbc4 00000022
3ec0: 00000000 00000028 4006dd98 0000024b 40597318 6f243080 80a1f138 000ac798
3ee0: 00000023 000002d2 6f1cea00 00000010 000aba50 00000000 00000000 00000000
3f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3f20: 00000000 00000000 00000000 00000000 000000d2 36d70008 00022310 000ac798
3f40: 00000080 4000de24 6e922000 00000000 000aba50 40070b00 80a03000 00022310
3f60: 80a1eb48 80a1e9a2 80a238a8 0001a450 0001b6c0 00000000 00000000 00000000
3f80: 00000026 00000027 0000001b 0000001f 00000015 00000000 00022310 000ac718
3fa0: 000ac798 4000dca0 00022310 000ac718 36d70008 00022310 000ac798 000ac768
3fc0: 00022310 000ac718 000ac798 00000080 00000009 000ac738 00000001 000aba50
3fe0: 3ed60a58 3ed60a48 0001831c 36e5d2a0 20030010 36d70008 2ff7e821 2ff7ec21
[<3f0a103c>] (pci_read32_sync [rtl_pci]) from [<3f0c4104>] (rtl92ee_read_eeprom_info+0x30/0x378 [rtl8192ee])
[<3f0c4104>] (rtl92ee_read_eeprom_info [rtl8192ee]) from [<3f0a4ef8>] (rtl_pci_probe+0xd9c/0x1b1c [rtl_pci])
[<3f0a4ef8>] (rtl_pci_probe [rtl_pci]) from [<4027bcc0>] (pci_device_probe+0x68/0xb8)
[<4027bcc0>] (pci_device_probe) from [<402fd1cc>] (driver_probe_device+0x8c/0x1cc)
[<402fd1cc>] (driver_probe_device) from [<402fd3b8>] (__driver_attach+0x68/0x8c)
[<402fd3b8>] (__driver_attach) from [<402fbaf0>] (bus_for_each_dev+0x6c/0x90)
[<402fbaf0>] (bus_for_each_dev) from [<402fca90>] (bus_add_driver+0xdc/0x1c4)
[<402fca90>] (bus_add_driver) from [<402fd8bc>] (driver_register+0x8c/0xd0)
[<402fd8bc>] (driver_register) from [<400088e0>] (do_one_initcall+0x100/0x180)
[<400088e0>] (do_one_initcall) from [<400704a0>] (load_module+0x15fc/0x1b98)
[<400704a0>] (load_module) from [<40070b00>] (SyS_init_module+0xc4/0xcc)
[<40070b00>] (SyS_init_module) from [<4000dca0>] (ret_fast_syscall+0x0/0x34)
Code: e59037bc e0811003 e5910000 f57ff04f (e12fff1e)
---[ end trace 764a3da68131617d ]---

配置工具

  • libnl静态编译
  • openssl静态编译
  • wpa_supplicant
  • hostapd
# Makefile
ifeq ($(CC),cc)CC := $(CROSS_COMPILE)gcc
endif
LIBS += $(EXTRA_LIBS)
# .config
# Add support for new DBus control interface
# (fi.w1.hostap.wpa_supplicant1)
# CONFIG_CTRL_IFACE_DBUS_NEW=y# Add introspection support for new DBus control interface
# CONFIG_CTRL_IFACE_DBUS_INTRO=y

编译,

$ readelf -d package/wpa_supplicant-2.9/wpa_supplicant/wpa_supplicantDynamic section at offset 0x35056c contains 28 entries:Tag        Type                         Name/Value0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]0x00000001 (NEEDED)                     Shared library: [librt.so.1]0x00000001 (NEEDED)                     Shared library: [libdl.so.2]0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]0x00000001 (NEEDED)                     Shared library: [libc.so.6]0x0000000c (INIT)                       0xd1640x0000000d (FINI)                       0x28e6dc0x00000019 (INIT_ARRAY)                 0x3480000x0000001b (INIT_ARRAYSZ)               20 (bytes)0x0000001a (FINI_ARRAY)                 0x3480140x0000001c (FINI_ARRAYSZ)               8 (bytes)0x00000004 (HASH)                       0x81680x00000005 (STRTAB)                     0xab5c0x00000006 (SYMTAB)                     0x8d1c0x0000000a (STRSZ)                      7135 (bytes)0x0000000b (SYMENT)                     16 (bytes)0x00000015 (DEBUG)                      0x00x00000003 (PLTGOT)                     0x3586740x00000002 (PLTRELSZ)                   1384 (bytes)0x00000014 (PLTREL)                     REL0x00000017 (JMPREL)                     0xcbfc0x00000011 (REL)                        0xcbc40x00000012 (RELSZ)                      56 (bytes)0x00000013 (RELENT)                     8 (bytes)0x6ffffffe (VERNEED)                    0xcb040x6fffffff (VERNEEDNUM)                 50x6ffffff0 (VERSYM)                     0xc73c0x00000000 (NULL)                       0x0

问题

Direct firmware load for rtlwifi/rtl8188eufw.bin failed with error -2

驱动编译进内核,但是固件放到根文件系统里,所以加载驱动的时候文件系统并没有加载,导致找不到固件,想了一天,想通了,老哥我想通了

Linux WIFI模块驱动移植相关推荐

  1. WiFi模块驱动移植

    项目背景 WiFi模块rlt8812au 替换成rlt8812cu,支持rlt8812cu驱动且保持兼容原有模块 驱动移植 根据厂家提供的驱动包,修改makefile和Kconfig文件,根据需要修改 ...

  2. linux ec20 usb驱动移植,linux下EC20 4G模块驱动移植

    之前有移植过ME909s MU609,主要工作就是把4G模块当做USB设备,挂载在linux上,驱动移植主要是能够让板子识别到模块,并产生SUB多个虚拟的节点,用于操作模块,拨号上网 关于内核的配置, ...

  3. Linux Charger IC 驱动移植总结

    Linux Charger IC 驱动移植总结 文章目录 Linux Charger IC 驱动移植总结 1 设备树的基本知识 设备树的概念 设备树的基本结构 compatible属性 举个栗子 2 ...

  4. Linux 开发板4G转WiFi热点 手机连接热点上网(三 WiFi模块的移植及AP的建立)

    这里对WiFi模块的驱动就不做详细介绍,本篇文章可能会涉及两款WiFi模块,一个是USB接口的WiFi模块,一个是SDIO接口的wifi模块,即AP6212,平台可能涉及爱特梅尔和三星的4418两个平 ...

  5. linux 7260驱动程序,Debian 7.6安装Intel Wireless 7260 wifi模块驱动和固件的方法

    0.内核以及发行版 Version 信息 Debian 7.6 Wheezy Linux fyp-tp 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_ ...

  6. STM32之 ESP8266 WIFI 模块驱动代码-可以通过互联网实现数据远程传输(程序稳定,清晰明了非常容易移植到51单片机上)

    成品展示部分 :(ESP8266只是其中一个小部分而已) 实物图: 基于互联网的农业大棚环境监控系统设计 电路图: 农业大棚环境监控设计电路图(彩色)  调试部分:ESP8266 WIFI 模块串口调 ...

  7. Android 开机自动加载新wifi模块驱动

    在android ROM 开发中经常会遇到产品更换wifi模块的情况,一般常见的wifi驱动android内核中自带都有,无需过多调试,要是碰上内核中没有的就需要根据厂商提供的驱动进行移植. wifi ...

  8. linux不同内核驱动移植问题,基于tiny4412的Linux内核移植 -- MMA7660驱动移植(九-2)...

    作者信息 作者: 彭东林 邮箱:pengdonglin137@163.com QQ:405728433 平台简介 开发板:tiny4412ADK + S700 + 4GB Flash 要移植的内核版本 ...

  9. STM32MP157 Linux系统移植开发篇17:Linux内核摄像头驱动移植

    本文章为<STM32MP157 Linux系统移植开发篇>系列中的一篇,笔者使用的开发平台为华清远见FS-MP1A开发板(STM32MP157开发板).stm32mp157是ARM双核,2 ...

最新文章

  1. [译] 在 Facebook 发一张登机牌,你就有可能被盗号了
  2. 云大计算机专业录取分数线,2016年云南大学艺术类专业录取分数线
  3. 《IBM-PC汇编语言程序设计》(第2版)【沈美明 温冬婵】——第四章——自编解析与答案
  4. 痞子衡嵌入式:第一本Git命令教程(4)- 转移(add/rm/mv)
  5. pip install python -32_pip安装python模块方法
  6. 域传送漏洞(vulhub)
  7. iOS发展系列II - UILabel 使用摘要
  8. java二次指数平滑法预测未来的值
  9. C语言断言assert详解
  10. SFML1 俄罗斯方块代码解析
  11. 计算机网络之IP报文
  12. IP6826无线充电底座方案IC芯片,兼容WPC Qi v1.2.4
  13. 微信小程序开发页面介绍
  14. 阿里和微博的异地多活方案
  15. 自己在VB编程过程中遇到的--不能加载MSCOMCTL.OCX提示
  16. uniapp和vue课程表实现、会议预约实现[表格table相同内容行的合并]
  17. document.forms[0].submit();和document.forms[0].action = ““;问题
  18. 飞飞cms添加广告html,飞飞cms影视系统 安装说明飞飞影视系统 建站流程
  19. 天猫5403亿!京东出王炸,地下物流“胶囊快递”曝光!
  20. Python 两个字典如何实现相加?(相同的键,值相加)

热门文章

  1. 计算机实验三—CPT
  2. 【Godot】通过属性检查器显示对应节点的脚本属性
  3. Android 实现短信接收监听--(短信动态权限添加)
  4. 卡尔曼滤波的细致讲解从一维到多维
  5. VUE定时器任务(每天定时12点执行)
  6. SQL基础系列(七)——CASE表达式
  7. 门户通专访爱思网创始人韩笑:SNS网站必然走向实用化!
  8. 如火般的风马: 快速迁移本地项目到Bluemix云平台
  9. 傅里叶Fourier变换fft-python-scipy-幅值-辐角-相位(一)
  10. 螺旋无限延伸_无限螺旋篇 其之四