after install ath10k_pci module on ls1021a TWR Eva wlp1s0 scan fail

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

after install ath10k_pci module on ls1021a TWR Eva wlp1s0 scan fail

3,462 Views
jiye
Contributor V

I followed the LSDK 1906 and compile the kernel and installed the modules 

I also install the firmware under /lib/firmware/ath10k

root@localhost:/lib/firmware/ath10k/QCA6174/hw3.0# ls
board-2.bin board.bin firmware-4.bin

lspci:

00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0e0a (rev 20)
01:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

iwconfig:

can1 no wireless extensions.

sit0 no wireless extensions.

eth1 no wireless extensions.

wlp1s0 no wireless extensions.

eth0 no wireless extensions.

can0 no wireless extensions.

eth2 no wireless extensions.

lo no wireless extensions.

I can't scan from the interface wlp1s0:

it says :

wlp1s0 Interface doesn't support scanning.

then i did a ifconfig:

wlp1s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether e8:2a:44:84:cb:9f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

why it says ethernet.

Suppose to be wireless 

Labels (1)
0 Kudos
Reply
12 Replies

2,729 Views
jiye
Contributor V

I finally made it work I need to some more experiments to make sure what is the cause? It's more likely the wpa_supplicant service. I used network-manager to make it work :smileyhappy:.

Finally!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thanks for all the efforts you have put.

0 Kudos
Reply

2,729 Views
jiye
Contributor V

After I did what you tell me to do still the same result

<3>CTRL-EVENT-SSID-REENABLED id=2 ssid="xxxxxxxx"
<3>SME: Trying to authenticate with 4c:8b:30:b5:14:c6 (SSID='xxxxxxxx' freq=5785 MHz)
<3>Trying to associate with 4c:8b:30:b5:14:c6 (SSID='xxxxxxxx' freq=5785 MHz)
<3>Associated with 4c:8b:30:b5:14:c6
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=CA
<4>WPA: AES unwrap failed - could not decrypt EAPOL-Key key data
<4>WPA: AES unwrap failed - could not decrypt EAPOL-Key key data
<4>WPA: AES unwrap failed - could not decrypt EAPOL-Key key data
<4>WPA: AES unwrap failed - could not decrypt EAPOL-Key key data
<3>CTRL-EVENT-DISCONNECTED bssid=4c:8b:30:b5:14:c6 reason=2
<3>WPA: 4-Way Handshake failed - pre-shared key may be incorrect
<3>CTRL-EVENT-SSID-TEMP-DISABLED id=2 ssid="xxxxxxxx" auth_failures=8 duration=149 reason=WRONG_KEY
<3>CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
<3>CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
<3>CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
<3>CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>SME: Trying to authenticate with 4c:8b:30:b5:14:c6 (SSID='xxxxxxxx' freq=5785 MHz)
<3>Trying to associate with 4c:8b:30:b5:14:c6 (SSID='xxxxxxxx' freq=5785 MHz)
<3>Associated with 4c:8b:30:b5:14:c6
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=CA
<4>WPA: AES unwrap failed - could not decrypt EAPOL-Key key data
<4>WPA: AES unwrap failed - could not decrypt EAPOL-Key key data
<4>WPA: AES unwrap failed - could not decrypt EAPOL-Key key data

when I used network manager it shows :

wlp1s0: unavailable
"Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter"
wifi (ath10k_pci), E8:2A:44:84:CB:9F, hw, mtu 1500

I can see the mac address of my wifi chip does this mean it has connection issue because of the linux distribution ?

0 Kudos
Reply

2,729 Views
yipingwang
NXP TechSupport
NXP TechSupport

After booting up the target board, please run "lspci -v" to check whether this PCIe device can be detected.

Would you please provide the console log to me when run "lspci -v"?

0 Kudos
Reply

2,729 Views
jiye
Contributor V

Please see below:  lspci -v

=============================================================================

00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0e0a (rev 20) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 54
Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0
Memory behind bridge: 40000000-401fffff
Expansion ROM at 4040200000 [disabled] [size=2K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/16 Maskable- 64bit+
Capabilities: [70] Express Root Port (Slot-), MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] #19
Kernel driver in use: pcieport

01:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
Subsystem: Lite-On Communications Inc QCA6174 802.11ac Wireless Network Adapter
Flags: bus master, fast devsel, latency 0, IRQ 77
Memory at 4040000000 (64-bit, non-prefetchable) [size=2M]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/8 Maskable+ 64bit-
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Virtual Channel
Capabilities: [168] Device Serial Number 00-00-00-00-00-00-00-00
Capabilities: [178] Latency Tolerance Reporting
Capabilities: [180] L1 PM Substates
Kernel driver in use: ath10k_pci
Kernel modules: ath10k_pci

=================================================================================

0 Kudos
Reply

2,728 Views
jiye
Contributor V

I am using SX-PCEAC2     as my wifi module via the PCIe

0 Kudos
Reply

2,728 Views
yipingwang
NXP TechSupport
NXP TechSupport

1. Please configure Linux Kernel as the following, and get Linux Kernel modules ath10k_core.ko and ath10k_pci.ko .

[*] Networking support --->
-*- Wireless --->
<*> cfg80211 - wireless configuration API
[*] cfg80211 certification onus
[*] cfg80211 wireless extensions compatibility
<*> Generic IEEE 802.11 Networking Stack (mac80211)

Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
<*> Atheros 802.11n wireless cards support
<M> Atheros 802.11ac wireless cards support
<M> Atheros ath10k PCI support

2. Please copy board.bin and firmware-<x>.bin to /lib/firmware/ath10k/QCA6174/hw3.0.
Please refer to the link for firmwares https://github.com/kvalo/ath10k-firmware/tree/master/QCA6174/hw3.0<https://eur01.safelinks.protectio...;

3. Please insert ath10k Kernel module.
modprobe ath10k_core
modprobe ath10k_pci

4. Please use ifconfig to check the wireless Ethernet device

0 Kudos
Reply

2,729 Views
jiye
Contributor V

also this is my uboot log:

U-Boot 2019.04-gc873063750 (Jun 27 2019 - 15:04:48 +0800)

CPU:   Freescale LayerScape LS1021E, Version: 2.0, (0x87081120)
Clock Configuration:
       CPU0(ARMV7):1200 MHz, 
       Bus:300  MHz, DDR:800  MHz (1600 MT/s data rate), 
Reset Configuration Word (RCW):
       00000000: 0608000c 00000000 00000000 00000000
       00000010: 30000000 00007900 60040a00 21046000
       00000020: 00000000 00000000 00000000 20000000
       00000030: 00080000 881b7340 00000000 00000000
Model: LS1021A TWR Board
Board: LS1021ATWR
CPLD:  V3.3
PCBA:  V2.0
VBank: 0
I2C:   ready
DRAM:  1 GiB
Using SERDES1 Protocol: 48 (0x30)
Flash: 128 MiB
MMC:   FSL_SDHC: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

EEPROM: NXID v1
In:    serial
Out:   serial
Err:   serial
SEC0: RNG instantiated
Net:   eTSEC1 is in sgmii mode.
eTSEC2 is in sgmii mode.
FSL_MDIO:2 is connected to eTSEC1.  Reconnecting to eTSEC2
PCIe0: pcie@3400000 Root Complex: x1 gen1
PCIe1: pcie@3500000 disabled
eTSEC1 [PRIME], eTSEC2, eTSEC3
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Scanning mmc 0:2...
Found U-Boot script /ls1021atwr_boot.scr
925 bytes read in 11 ms (82 KiB/s)
## Executing script at 80000000
10412608 bytes read in 486 ms (20.4 MiB/s)
18440 bytes read in 13 ms (1.4 MiB/s)
## Booting kernel from Legacy Image at 81000000 ...
   Image Name:   Linux-4.19.46
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    10412544 Bytes = 9.9 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 90000000
   Booting using the fdt blob at 0x90000000
   Loading Kernel Image ... OK
   Using Device Tree in place at 90000000, end 90007807

Starting kernel ...
It tells me that PCIe0: pcie@3400000 Root Complex: x1 gen1
is linked with a network card
But
 root@localhost:/sys/class/net# ifconfig

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 560  bytes 39760 (39.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 560  bytes 39760 (39.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether e8:2a:44:84:cb:9f  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

this tells me wlp1s0 is an Ethernet type and when I perform iwlist wlp1s0 scan it says does not support scanning 
0 Kudos
Reply

2,729 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Elias Bitbaker,

In LSDK 19.06 PCIe feature was disabled, please add the following configuration in Linux Kernel configuration file.

Please run "make ARCH=arm menuconfig" in flexbuild_lsdk1906/build/linux/linux/arm32/LS/output/LSDK-19.06-V4.19.

-> Bus support

   -> PCI controller drivers

       -> DesignWare PCI Core Support

            [*]Freescale Layerscape PCIe controller   

Please modify dts file in arch/arm/boot/dts/ls1021a.dtsi  as the following, Kernel source is in packages/linux/linux.

                pcie@3400000 {
                        compatible = "fsl,ls1021a-pcie", "snps,dw-pcie";
                        reg = <0x00 0x03400000 0x0 0x00010000   /* controller registers */
                               0x40 0x00000000 0x0 0x00002000>; /* configuration space */
                        reg-names = "regs", "config";
                        interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
                                           <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */
                        interrupt-names = "pme", "aer";
                        fsl,pcie-scfg = <&scfg 0>;
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
                        num-lanes = <4>;
                        bus-range = <0x0 0xff>;
                        ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000   /* downstream I/O */
                                  0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
                        msi-parent = <&msi1>, <&msi2>;
                        #interrupt-cells = <1>;
                        interrupt-map-mask = <0 0 0 7>;
                        interrupt-map = <0000 0 0 1 &gic GIC_SPI 91  IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 2 &gic GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 3 &gic GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 4 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
                };

After rebuild Linux Kernel and boot up the target board, please run "lspci -v" to check whether the PCIe device can be detected.

0 Kudos
Reply

2,729 Views
jiye
Contributor V

Also I did not see .dtsi file I only saw .dtb I convert into .dts to do the modification 

0 Kudos
Reply

2,729 Views
jiye
Contributor V

this is my original one:

pcie@3400000 {
compatible = "fsl,ls1021a-pcie", "snps,dw-pcie";
reg = <0x0 0x3400000 0x0 0x10000 0x40 0x0 0x0 0x2000>;
reg-names = "regs", "config";
interrupts = <0x0 0xb5 0x4 0x0 0xb7 0x4>; 
interrupt-names = "pme", "aer";
fsl,pcie-scfg = <0x12 0x0>;
#address-cells = <0x3>;
#size-cells = <0x2>;
device_type = "pci";
num-lanes = <0x4>;
bus-range = <0x0 0xff>;
ranges = <0x81000000 0x0 0x0 0x40 0x10000 0x0 0x10000 0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>;
msi-parent = <0x13 0x14>;
#interrupt-cells = <0x1>;
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x0 0x5b 0x4 0x0 0x0 0x0 0x2 0x1 0x0 0xbc 0x4 0x0 0x0 0x0 0x3 0x1 0x0 0xbe 0x4 0x0 0x0 0x0 0x4 0x1 0x0 0xc0 0x4>;
status = "disabled";
};

yours is 

interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
                                           <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */

   interrupt-map = <0000 0 0 1 &gic GIC_SPI 91  IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 2 &gic GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 3 &gic GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 4 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
                };

are these name conventions are still valid? 

0 Kudos
Reply

2,729 Views
jiye
Contributor V

it shows me syntax error in this line 

interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */

would you be able to verify?

0 Kudos
Reply

2,729 Views
jiye
Contributor V

I achieved to the step 4 and use ifconfig to see the interface wlp1s0

But it shows me does not support scanning. Plug or unplug the wifi module

wont make any difference for the lspci

Without the SX-PCEAC2 attached on the board it shows the same result:

root@localhost:/lib/firmware/ath10k/QCA6174/hw3.0# lspci

00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0e0a (rev 20)

01:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless

Network Adapter (rev ff)

So without or with the SX-PCEAC2 it shows the same result.

It seems like the device 1021a TWR can not recognise the wifi module.

Then I read

http://cache.freescale.com/files/32bit/doc/ref_manual/TWR-LS1021ARM.pdf

section 2.8

Do you think is because the board is not configured correctly

0 Kudos
Reply