Git Product home page Git Product logo

nrc7292_sw_pkg's Introduction

NRC7292 Software Package for Host mode (Linux OS)

Notice

Caution

The software package released here is specifically designed for the NRC7292 EVK, and the accompanying board data files in https://github.com/newracom/nrc7292_sw_pkg/tree/master/package/evk/binary and https://github.com/newracom/nrc7292_sw_pkg/tree/master/package/evk/sw_pkg/nrc_pkg/sw/firmware are intended solely for this model. If users plan to use this software package with other devices that incorporate the NRC7292 chip, they should utilize the board data file supplied by the device's vendor.

Important

For support regarding the SAE Hash-to-Element (H2E), please refer to https://github.com/newracom/nrc7292_sw_pkg/blob/master/README-H2E.md

Release roadmap

  • v1.5.1 (2024.05.10): Hotfix
  • v1.5 (2023.10.31)
  • v1.4.1 (2023.09.08)
  • v1.4 (2023.06.16)
  • v1.3.4_rev14 (2022.12.01)
  • v1.3.4_rev13 (2022.11.30)
  • v1.3.4_rev12 (2022.10.28)
  • v1.3.4_rev11 (2022.10.14)
  • v1.3.4_rev10 (2022.10.05)
  • v1.3.4_rev09 (2022.09.29)
  • v1.3.4_rev08 (2022.08.30)
  • v1.3.4_rev07 (2022.08.10)
  • v1.3.4_rev06 (2022.07.22)
  • v1.3.4_rev05 (2022.07.08)
  • v1.3.4_rev04 (2022.06.30)
  • v1.3.4_rev03 (2022.05.24)
  • v1.3.4_rev02 (2022.01.19)
  • v1.3.4_rev01 (2021.12.20)
  • v1.3.4 (2021.10.22)
  • v1.3.3 (2021.04.26)
  • v1.3.2 (2020.09.16)
  • v1.3.1 (2020.08.05)
  • v1.3.0 (2020.05.30)

Latest release

Release package contents

  • package: NRC7292 software package for global regulatory domains
  package
  ├── doc
  ├── evk
  │   ├── binary
  │   └── sw_pkg
  │       └── nrc_pkg
  └── src
      ├── cli_app
      ├── ft232h-usb-spi
      ├── nrc
      └── nrc_hspi_simple

NRC7292 Software Package User Guide

Get NRC7292 Software Package

NRC7292 Software package is provided in this repository. Please refer to the following git command to get it.

cd ~/
git clone https://github.com/newracom/nrc7292_sw_pkg.git

Prepare host platform (Raspberry Pi 3 Model B+)

Install Newracom Device Tree (DT) overlay

You can get Device Tree Source (DTS) for NRC7292 in dts directory. Please install DT overlay by following commands below.

cd /boot/overlays
sudo dtc -I dts -O dtb -o newracom.dtbo newracom.dts
sudo vi /boot/config.txt
  dtoverlay=newracom

Install release package

Please upload the contents in host/evk/sw_pkg to sw_pkg directory on host platform, and follow below commands to install release package.

cd sw_pkg
chmod +x ./update.sh
./update.sh

And you can also install key binaries or build host driver as below.

(Optional) Install firmware/driver/cli_app binaries

Please follow below commands to install firmware, driver and cli_app.

cd evk/binary
cp ./cli_app ~/nrc_pkg/script
cp ./nrc.ko ~/nrc_pkg/sw/driver
cp ./nrc7292_cspi.bin ~/nrc_pkg/sw/firmware

(Optional) Build host driver

You can get the pre-built host driver in nrc_pkg/sw/driver, but you can build it by youself by following below commands.

cd package/src/nrc
make clean
make
cp nrc.ko ~/nrc_pkg/sw/driver

Apply a specific package

If you want to apply a specific package to your exiting package directory, you can choose one of following methods.

Method #1: replace the whole package

Let's assume that you have v1.3.0 and want to apply v1.3.1 to your package location.

  1. Download a specific package you want.
    • If it is official release version 1.3.1
      1. Go to https://github.com/newracom/nrc7292_sw_pkg/releases and choose the release package you want. sw_pkg_release
      2. Downalod the compressed package: zip version or tar.gz version
      3. Check the filename: nrc7292_sw_pkg-1.3.1.zip or nrc7292_sw_pkg-1.3.1.tar.gz
    • If it is the latest pacakge
      1. Click "Code" and then click "Download ZIP" sw_pkg_latest
      2. Check the filename: nrc7292_sw_pkg-master.zip
  2. Replace your old package directory with the one you downloaded.

Method #2: pull down a branch

This needs your cloned repository and the internet connection.

  1. Move to the repository directory
    cd repo/nrc7292_sw_pkg
    
  2. Pull down a branch
    • If you want to pull down the latest one from master branch
    git pull
    
    • If you want to change into a specific branch by using tag version
    git tag -l
    git checkout v1.3.1
    

Run NRC7292 Software Package

Configure start script

There are a couple of configurable parameters as below.

# Default Configuration (you can change value you want here)
##################################################################################
# Raspbery Pi Conf.
max_cpuclock      = 1         # Set Max CPU Clock : 0(off) or 1(on)
##################################################################################
# Firmware Conf.
model             = 7292      # 7292/7393/7394
fw_download       = 1         # 0(FW Download off) or 1(FW Download on)
fw_name           = 'uni_s1g.bin'
##################################################################################
# DEBUG Conf.
# NRC Driver log
driver_debug      = 0         # NRC Driver debug option : 0(off) or 1(on)
dbg_flow_control  = 0         # Print TRX slot and credit status in real-time
#--------------------------------------------------------------------------------#
# WPA Supplicant Log (STA Only)
supplicant_debug  = 0         # WPA Supplicant debug option : 0(off) or 1(on)
#--------------------------------------------------------------------------------#
# HOSTAPD Log (AP Only)
hostapd_debug     = 0         # Hostapd debug option    : 0(off) or 1(on)
#################################################################################
# CSPI Conf. (Default)
spi_clock    = 20000000       # SPI Master Clock Frequency
spi_bus_num  = 0              # SPI Master Bus Number
spi_cs_num   = 0              # SPI Master Chipselect Number
spi_gpio_irq = 5              # NRC-CSPI EIRQ GPIO Number
                              # BBB is 60 recommanded.
spi_polling_interval = 0      # NRC-CSPI Polling Interval (msec)

#
# NOTE:
#  - NRC-CSPI EIRQ Input Interrupt: spi_gpio_irq >= 0 and spi_polling_interval <= 0
#  - NRC-CSPI EIRQ Input Polling  : spi_gpio_irq >= 0 and spi_polling_interval > 0
#  - NRC-CSPI Registers Polling   : spi_gpio_irq < 0 and spi_polling_interval > 0
#
#--------------------------------------------------------------------------------#
# FT232H USB-SPI Conf. (FT232H CSPI Conf)
ft232h_usb_spi = 0            # FTDI FT232H USB-SPI bridge
                              # 0 : Unused
                              # 1 : NRC-CSPI_EIRQ Input Polling
                              # 2 : NRC-CSPI Registers Polling
#################################################################################
# RF Conf.
max_txpwr         = 24       # Maximum TX Power (in dBm)
epa               = 0        # (7394 only) External PA : 0(none) or 1(used)
bd_name           = ''       # board data name (bd defines max TX Power per CH/MCS/CC)
                             # specify your bd name here. If not, follow naming rules in strBDName()
##################################################################################
# PHY Conf.
guard_int         = 'long'   # Guard Interval ('long'(LGI) or 'short'(SGI))
##################################################################################
# MAC Conf.
# S1G Short Beacon (AP & MESH Only)
#  If disabled, AP sends only S1G long beacon every BI
#  Recommend using S1G short beacon for network efficiency (Default: enabled)
short_bcn_enable  = 1        # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# Legacy ACK enable (AP & STA)
#  If disabled, AP/STA sends only NDP ack frame
#  Recommend using NDP ack mode  (Default: disable)
legacy_ack_enable  = 0        # 0 (NDP ack mode) or 1 (legacy ack mode)
#--------------------------------------------------------------------------------#
# Beacon Bypass enable (STA only)
#  If enabled, STA receives beacon frame from other APs even connected
#  Recommend that STA only receives beacon frame from AP connected while connecting  (Default: disable)
beacon_bypass_enable  = 0        # 0 (Receive beacon frame from only AP connected while connecting)
                                 # 1 (Receive beacon frame from all APs even while connecting)
#--------------------------------------------------------------------------------#
# AMPDU (Aggregated MPDU)
#  Enable AMPDU for full channel utilization and throughput enhancement (Default: auto)
#  disable(0): AMPDU is deactivated
#   manual(1): AMPDU is activated and BA(Block ACK) session is made by manual
#     auto(2): AMPDU is activated and BA(Block ACK) session is made automatically
ampdu_enable      = 2        # 0 (disable) 1 (manual) 2 (auto)
#--------------------------------------------------------------------------------#
# 1M NDP (Block) ACK
#  Enable 1M NDP ACK on 2/4MHz BW instead of 2M NDP ACK
#  Note: if enabled, throughput can be decreased on high MCS
ndp_ack_1m        = 0        # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# NDP Probe Request
#  For STA, "scan_ssid=1" in wpa_supplicant's conf should be set to use
ndp_preq          = 0        # 0 (Legacy Probe Req) 1 (NDP Probe Req)
#--------------------------------------------------------------------------------#
# CQM (Channel Quality Manager) (STA Only)
#  STA can disconnect according to Channel Quality (Beacon Loss or Poor Signal)
#  Note: if disabled, STA keeps connection regardless of Channel Quality
cqm_enable        = 1        # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# RELAY (Do NOT use! it will be deprecated)
relay_type        = 1        # 0 (wlan0: STA, wlan1: AP) 1 (wlan0: AP, wlan1: STA)
relay_nat         = 1        # 0 (not use NAT) 1 (use NAT - no need to add routing table)
#--------------------------------------------------------------------------------#
# Power Save (STA Only)
#  3-types PS: (0)Always on (2)Deep_Sleep(TIM) (3)Deep_Sleep(nonTIM)
#     TIM Mode : check beacons during PS to receive BU from AP
#  nonTIM Mode : Not check beacons during PS (just wake up by TX or EXT INT)
power_save        = 0        # STA (power save type 0~3)
ps_timeout        = '3s'     # STA (timeout before going to sleep) (min:1000ms)
sleep_duration    = '3s'     # STA (sleep duration only for nonTIM deepsleep) (min:1000ms)
listen_interval   = 1000     # STA (listen interval in BI unit) (max:65535)
                             # Listen Interval time should be less than bss_max_idle time to avoid association reject
#--------------------------------------------------------------------------------#
# BSS MAX IDLE PERIOD (aka. keep alive) (AP Only)
#  STA should follow (i.e STA should send any frame before period),if enabled on AP
#  Period is in unit of 1000TU(1024ms, 1TU=1024us)
#  Note: if disabled, AP removes STAs' info only with explicit disconnection like deauth
bss_max_idle_enable = 1      # 0 (disable) or 1 (enable)
bss_max_idle        = 1800   # time interval (e.g. 1800: 1843.2 sec) (1 ~ 65535)
#--------------------------------------------------------------------------------#
#  SW encryption/decryption (default HW offload)
sw_enc              = 0     # 0 (HW), 1 (SW), 2 (HYBRID: SW GTK HW PTK)
#--------------------------------------------------------------------------------#
# Mesh Options (Mesh Only)
#  Manual Peering & Static IP
peer                = 0     # 0 (disable) or Peer MAC Address
static_ip           = 0     # 0 (disable) or Static IP Address
batman              = 0     # 0 (disable) or 'bat0' (B.A.T.M.A.N routing protocol)
#--------------------------------------------------------------------------------#
# Self configuration (AP Only)
#  AP scans the clearest CH and then starts with it
self_config       = 0        # 0 (disable)  or 1 (enable)
prefer_bw         = 0        # 0: no preferred bandwidth, 1: 1M, 2: 2M, 4: 4M
dwell_time        = 100      # max dwell is 1000 (ms), min: 10ms, default: 100ms
#--------------------------------------------------------------------------------#
# Credit num of AC_BE for flow control between host and target (Test only)
credit_ac_be      = 40        # number of buffer (min: 40, max: 120)
#--------------------------------------------------------------------------------#
# Filter tx deauth frame for Multi Connection Test (STA Only) (Test only)
discard_deauth    = 1         # 1: discard TX deauth frame on STA
#--------------------------------------------------------------------------------#
# Use bitmap encoding for NDP (block) ack operation (NRC7292 only)
bitmap_encoding   = 1         # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# User scrambler reversely (NRC7292 only)
reverse_scrambler = 1         # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# Use bridge setup in br0 interface
use_bridge_setup = 0         # AP & STA : 0 (not use bridge setup) or n (use bridge setup with eth(n-1))
                             # RELAY : 0 (not use bridge setup) or 1 (use bridge setup with wlan0,wlan1)
##################################################################################

You can apply your parameters by updating start.py script file.

vi nrc_pkg/script/start.py

Access Point (AP) running procedure

The following is the parameters for start.py script file.

Usage:
        start.py [sta_type] [security_mode] [country] [channel] [sniffer_mode]
        start.py [sta_type] [security_mode] [country] [mesh_mode] [mesh_peering] [mesh_ip]
Argument:
        sta_type      [0:STA   |  1:AP  |  2:SNIFFER  | 3:RELAY |  4:MESH | 5:IBSS]
        security_mode [0:Open  |  1:WPA2-PSK  |  2:WPA3-OWE  |  3:WPA3-SAE | 4:WPS-PBC]                
        country       [US:USA  |  JP:Japan  |  TW:Taiwan  | EU:EURO | CN:China |                       
                       AU:Australia  |  NZ:New Zealand  | K1:Korea-USN  | K2:Korea-MIC]                
        -----------------------------------------------------------
        channel       [S1G Channel Number]   * Only for Sniffer & AP
        sniffer_mode  [0:Local | 1:Remote]   * Only for Sniffer
        mesh_mode     [0:MPP | 1:MP | 2:MAP] * Only for Mesh
        mesh_peering  [Peer MAC address]     * Only for Mesh
        mesh_ip       [Static IP address]    * Only for Mesh
        ibss_ip       [0:DHCPC or static IP | 1:DHCPS]    * Only for IBSS
Example:
        OPEN mode STA for US                : ./start.py 0 0 US
        Security mode AP for US                : ./start.py 1 1 US
        Local Sniffer mode on CH 40 for Japan  : ./start.py 2 0 JP 40 0
        SAE mode Mesh AP for US                : ./start.py 4 3 US 2
        Mesh Point with static ip              : ./start.py 4 3 US 1 192.168.222.1                     
        Mesh Point with manual peering         : ./start.py 4 3 US 1 8c:0f:fa:00:29:46                 
        Mesh Point with manual peering & ip    : ./start.py 4 3 US 1 8c:0f:fa:00:29:46 192.168.222.1   
        OPEN mode IBSS for US with DHCP server      : ./start.py 5 0 US 1
        Security mode IBSS for US with DHCPC client : ./start.py 5 1 US 0
        Security mode IBSS for US with static IP    : ./start.py 5 1 US 0 192.168.200.17
Note:
        sniffer_mode should be set as '1' when running sniffer on remote terminal
        MPP, MP mode support only Open, WPA3-SAE security mode

The following shows an example of AP running for US channel, and its channel can be configured in nrc_pkg/script/conf/US/ap_halow_open.conf. For WPA2/WPA3 modes, please refer to nrc_pkg/script/conf/US/ap_halow_[sae|owe|wpa2].conf files.

cd nrc_pkg/script
./start.py 1 0 US

Station (STA) running procedure

The following shows an example of STA running for US channel, and its channel can be configured in nrc_pkg/script/conf/US/sta_halow_open.conf. For WPA2/WPA3 modes, please refer to nrc_pkg/script/conf/US/sta_halow_[sae|owe|wpa2].conf files.

cd nrc_pkg/script
./start.py 0 0 US

Sniffer running procedure

The following shows an example of local mode sniffer running for US channel 159.

cd nrc_pkg/script
./start.py 2 0 US 159 0

nrc7292_sw_pkg's People

Contributors

avamander avatar droidifi avatar fhunleth avatar jrddunbr avatar matlinuxer2 avatar newracom avatar teledatics avatar yuji-sasaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nrc7292_sw_pkg's Issues

Duty Cycle EU

Is there a way to set/change a duty cycle with EU settings?
The only setting i could find was in the CLI-App, but the set and show commands are only available with JP settings.

MAC frame PV1 of 802.11ah

Dear

How can I configure an NRC7292 from sx-newah, to work with 802.11ah header reduction. Since after capturing with the Sniffer a PV0 frame is displayed and not a PV1.
image
Best regards.

Incorrect behavior of the driver, when GPIOs are busy

I have checked the operation of the driver with kernel 4.14.70-v7+ on Rapsberry Pi 3.
I have exported the GPIOs used by the EVK:
root@raspberrypi:/home/pi# echo 5 > /sys/class/gpio/export
root@raspberrypi:/home/pi# echo 5 > /sys/class/gpio/export
Then I have loaded the driver as usual.
Instead of the error message informing about busy GPIO resources, I have got the following errors in the kernel:

[   76.463975] nrc: loading out-of-tree module taints kernel.
[   76.469823] nrc-cspi: probe of spi0.0 failed with error -22
[   76.470302] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[   76.470307] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[   76.470320] pgd = 80004000
[   76.470325] [00000004] *pgd=00000000
[   76.470341] Internal error: Oops: 17 [#1] SMP ARM
[   76.470349] Modules linked in: nrc(O+) fuse snd_bcm2835(C) snd_pcm snd_timer snd spi_bcm2835 uio_pdrv_genirq uio fixed mac80211 cfg80211 rfkill i2c_dev ip_tables x_tables ipv6
[   76.470429] CPU: 0 PID: 661 Comm: irq/169-spi-irq Tainted: G         C O    4.14.70-v7+ #1144
[   76.470432] Hardware name: BCM2835
[   76.470439] task: aa891e00 task.stack: aaa1a000
[   76.470589] PC is at spi_update_status+0x1c/0x224 [nrc]
[   76.470679] LR is at spi_irq+0x20/0x3c [nrc]
[   76.470686] pc : [<7f3077e8>]    lr : [<7f307b58>]    psr: 68000013
[   76.470691] sp : aaa1bee0  ip : aaa1bf08  fp : aaa1bf04
[   76.470696] r10: 801775b8  r9 : b2e66b00  r8 : b4641800
[   76.470702] r7 : aa8c3000  r6 : b4641800  r5 : 00000000  r4 : aa8c2c00
[   76.470708] r3 : 7f307b38  r2 : 00000000  r1 : aa8c2c00  r0 : aa8c3000
[   76.470718] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   76.470724] Control: 10c5383d  Table: 3449806a  DAC: 00000055
[   76.470730] Process irq/169-spi-irq (pid: 661, stack limit = 0xaaa1a210)
[   76.470737] Stack: (0xaaa1bee0 to 0xaaa1c000)
[   76.470748] bee0: aa8c2c00 b2e66b24 b4641800 00000001 b4641800 b2e66b00 aaa1bf1c aaa1bf08
[   76.470761] bf00: 7f307b58 7f3077d8 b2e66b00 b2e66b24 aaa1bf3c aaa1bf20 801775e4 7f307b44
[   76.470772] bf20: 00000004 aaa1a000 b2e66b24 00000000 aaa1bf7c aaa1bf40 80177930 801775c4
[   76.470782] bf40: 00000000 80c882c4 00000000 80177724 b5df441c b5df4400 00000000 b2e66e40
[   76.470793] bf60: b2e66b00 801777e8 b5df441c b471bb58 aaa1bfac aaa1bf80 8013dacc 801777f4
[   76.470805] bf80: 80102d94 b2e66e40 8013d990 00000000 00000000 00000000 00000000 00000000
[   76.470815] bfa0: 00000000 aaa1bfb0 8010810c 8013d99c 00000000 00000000 00000000 00000000
[   76.470825] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   76.470835] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[   76.471052] [<7f3077e8>] (spi_update_status [nrc]) from [<7f307b58>] (spi_irq+0x20/0x3c [nrc])
[   76.471160] [<7f307b58>] (spi_irq [nrc]) from [<801775e4>] (irq_thread_fn+0x2c/0x44)
[   76.471179] [<801775e4>] (irq_thread_fn) from [<80177930>] (irq_thread+0x148/0x20c)
[   76.471198] [<80177930>] (irq_thread) from [<8013dacc>] (kthread+0x13c/0x16c)
[   76.471224] [<8013dacc>] (kthread) from [<8010810c>] (ret_from_fork+0x14/0x28)
[   76.471236] Code: e52de004 e8bd4000 e5905054 e1a07000 (e5953004) 
[   76.471247] ---[ end trace da7ce380b3fd4612 ]---
[   76.471284] genirq: exiting task "irq/169-spi-irq" (661) is an active IRQ thread (irq 169)
[   76.717236] irq 169: nobody cared (try booting with the "irqpoll" option)
[   76.717245] CPU: 0 PID: 661 Comm: irq/169-spi-irq Tainted: G      D  C O    4.14.70-v7+ #1144
[   76.717247] Hardware name: BCM2835
[   76.717272] [<8010ffd8>] (unwind_backtrace) from [<8010c240>] (show_stack+0x20/0x24)
[   76.717283] [<8010c240>] (show_stack) from [<80787b24>] (dump_stack+0xd4/0x118)
[   76.717297] [<80787b24>] (dump_stack) from [<80178f5c>] (__report_bad_irq+0x38/0xd0)
[   76.717306] [<80178f5c>] (__report_bad_irq) from [<80179360>] (note_interrupt+0x280/0x2d0)
[   76.717314] [<80179360>] (note_interrupt) from [<80176418>] (handle_irq_event_percpu+0x5c/0x68)
[   76.717322] [<80176418>] (handle_irq_event_percpu) from [<80176478>] (handle_irq_event+0x54/0x78)
[   76.717330] [<80176478>] (handle_irq_event) from [<8017a570>] (handle_level_irq+0xb4/0x140)
[   76.717340] [<8017a570>] (handle_level_irq) from [<80175338>] (generic_handle_irq+0x34/0x44)
[   76.717349] [<80175338>] (generic_handle_irq) from [<804caf9c>] (bcm2835_gpio_irq_handle_bank+0x88/0xac)
[   76.717359] [<804caf9c>] (bcm2835_gpio_irq_handle_bank) from [<804cb04c>] (bcm2835_gpio_irq_handler+0x8c/0x124)
[   76.717367] [<804cb04c>] (bcm2835_gpio_irq_handler) from [<80175338>] (generic_handle_irq+0x34/0x44)
[   76.717376] [<80175338>] (generic_handle_irq) from [<804c44d8>] (bcm2836_chained_handle_irq+0x38/0x50)
[   76.717384] [<804c44d8>] (bcm2836_chained_handle_irq) from [<80175338>] (generic_handle_irq+0x34/0x44)
[   76.717391] [<80175338>] (generic_handle_irq) from [<80175978>] (__handle_domain_irq+0x6c/0xc4)
[   76.717400] [<80175978>] (__handle_domain_irq) from [<80101504>] (bcm2836_arm_irqchip_handle_irq+0xa8/0xac)
[   76.717408] [<80101504>] (bcm2836_arm_irqchip_handle_irq) from [<807a36bc>] (__irq_svc+0x5c/0x7c)
[   76.717412] Exception stack(0xaaa1bc48 to 0xaaa1bc90)
[   76.717417] bc40:                   b6b81ba8 00000000 b4641800 00000000 b4641800 b2e66b00
[   76.717423] bc60: b464185c b4641810 80c97e04 aaa1bf48 aa891e00 aaa1bcb4 80c04174 aaa1bc98
[   76.717427] bc80: 80177514 80177518 68000113 ffffffff
[   76.717434] [<807a36bc>] (__irq_svc) from [<80177518>] (irq_finalize_oneshot+0x98/0x138)
[   76.717443] [<80177518>] (irq_finalize_oneshot) from [<801777a8>] (irq_thread_dtor+0x84/0xc4)
[   76.717450] [<801777a8>] (irq_thread_dtor) from [<8013be50>] (task_work_run+0xbc/0xe0)
[   76.717460] [<8013be50>] (task_work_run) from [<80121e60>] (do_exit+0x3b8/0xb9c)
[   76.717466] [<80121e60>] (do_exit) from [<8010c498>] (die+0x254/0x34c)
[   76.717475] [<8010c498>] (die) from [<801145a8>] (__do_kernel_fault.part.0+0x74/0x84)
[   76.717485] [<801145a8>] (__do_kernel_fault.part.0) from [<807a40a4>] (do_page_fault+0x248/0x3a4)
[   76.717491] [<807a40a4>] (do_page_fault) from [<801011e0>] (do_DataAbort+0x48/0xc4)
[   76.717497] [<801011e0>] (do_DataAbort) from [<807a3634>] (__dabt_svc+0x54/0x80)
[   76.717501] Exception stack(0xaaa1be90 to 0xaaa1bed8)
[   76.717505] be80:                                     aa8c3000 aa8c2c00 00000000 7f307b38
[   76.717510] bea0: aa8c2c00 00000000 b4641800 aa8c3000 b4641800 b2e66b00 801775b8 aaa1bf04
[   76.717515] bec0: aaa1bf08 aaa1bee0 7f307b58 7f3077e8 68000013 ffffffff
[   76.717593] [<807a3634>] (__dabt_svc) from [<7f3077e8>] (spi_update_status+0x1c/0x224 [nrc])
[   76.717684] [<7f3077e8>] (spi_update_status [nrc]) from [<7f307b58>] (spi_irq+0x20/0x3c [nrc])
[   76.717733] [<7f307b58>] (spi_irq [nrc]) from [<801775e4>] (irq_thread_fn+0x2c/0x44)
[   76.717741] [<801775e4>] (irq_thread_fn) from [<80177930>] (irq_thread+0x148/0x20c)
[   76.717748] [<80177930>] (irq_thread) from [<8013dacc>] (kthread+0x13c/0x16c)
[   76.717756] [<8013dacc>] (kthread) from [<8010810c>] (ret_from_fork+0x14/0x28)
[   76.717758] handlers:
[   76.717762] [<8017649c>] irq_default_primary_handler threaded [<7f307b38>] spi_irq [nrc]
[   76.717809] Disabling IRQ #169
[   77.067471] pgd = aa9b8000
[   77.067475] [00000004] *pgd=2a865835, *pte=00000000, *ppte=00000000
[   77.067489] Internal error: Oops: 17 [#2] SMP ARM
[   77.067492] Modules linked in: nrc(O+) fuse snd_bcm2835(C) snd_pcm snd_timer snd spi_bcm2835 uio_pdrv_genirq uio fixed mac80211 cfg80211 rfkill i2c_dev ip_tables x_tables ipv6
[   77.067534] CPU: 3 PID: 659 Comm: insmod Tainted: G      D  C O    4.14.70-v7+ #1144
[   77.067536] Hardware name: BCM2835
[   77.067539] task: aa856900 task.stack: b471a000
[   77.067612] PC is at spi_update_status+0x1c/0x224 [nrc]
[   77.067657] LR is at spi_start+0xec/0x148 [nrc]
[   77.067660] pc : [<7f3077e8>]    lr : [<7f307adc>]    psr: 60000013
[   77.067663] sp : b471bc38  ip : b471bc60  fp : b471bc5c
[   77.067665] r10: 00000010  r9 : 7f314e3c  r8 : 00000000
[   77.067669] r7 : aa8c3000  r6 : aa8c2c00  r5 : 00000000  r4 : aa8c2c40
[   77.067671] r3 : 00000001  r2 : b44067b4  r1 : b440642c  r0 : aa8c3000
[   77.067676] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   77.067679] Control: 10c5383d  Table: 2a9b806a  DAC: 00000055
[   77.067682] Process insmod (pid: 659, stack limit = 0xb471a210)
[   77.067685] Stack: (0xb471bc38 to 0xb471c000)
[   77.067689] bc20:                                                       aa8c2c40 7f316fe8
[   77.067695] bc40: aa8c2c00 aa8c3000 00000000 7f314e3c b471bc84 b471bc60 7f307adc 7f3077d8
[   77.067700] bc60: 7f311fcc aa8c2c00 aa8c2c00 ffffffe0 7f314e3c 7f314c90 b471bc9c b471bc88
[   77.067706] bc80: 7f2ff598 7f3079fc b2df1dc0 b2df0dc0 b471bcbc b471bca0 7f2fe2f4 7f2ff4f0
[   77.067711] bca0: 7f314ca0 7f314ca0 7f314e3c fffffdfb b471bcdc b471bcc0 80545fd0 7f2fe298
[   77.067717] bcc0: 7f314ca0 80d1a060 80d1a064 00000000 b471bd0c b471bce0 805445b0 80545f80
[   77.067723] bce0: 00000000 7f314ca0 7f314e3c 7f314cd4 00000000 00000001 7f3153c8 b44313c8
[   77.067728] bd00: b471bd2c b471bd10 80544728 80544378 b696b558 00000000 7f314e3c 8054466c
[   77.067734] bd20: b471bd54 b471bd30 805425cc 80544678 b696b558 b4406e34 b696b56c 7f314e3c
[   77.067739] bd40: b4406800 80c5fb58 b471bd64 b471bd58 80543ef4 8054255c b471bd8c b471bd68
[   77.067745] bd60: 805439d0 80543ed4 7f31119c b471bd78 7f314e3c 7f323000 00000000 7f315380
[   77.067750] bd80: b471bda4 b471bd90 80544e9c 80543830 00000000 7f323000 b471bdb4 b471bda8
[   77.067756] bda0: 80545f20 80544e20 b471bdcc b471bdb8 7f323038 80545edc 7f315380 7f323000
[   77.067761] bdc0: b471be3c b471bdd0 80101bf0 7f32300c 80227330 3646a000 802668cc aa871700
[   77.067767] bde0: 00004554 80277634 b471be3c b471bdf8 80277634 80272eb4 80278ad8 80277f7c
[   77.067773] be00: 00000001 00004554 b46cb780 a0000013 bbcf9000 7f315380 00000001 7f315380
[   77.067778] be20: 00000001 b46cbd40 00000001 7f3153c8 b471be64 b471be40 801a97c8 80101bac
[   77.067784] be40: b471be64 b471be50 802669c0 b471bf38 00000001 b44313c0 b471bf14 b471be68
[   77.067789] be60: 801a87ec 801a9760 7f31538c 00007fff 7f315380 801a5974 b471bf2c 7f31556c
[   77.067795] be80: 809c44e8 7f3154b0 7f315480 00000017 7f315494 b471bf38 b471bee4 b471bea8
[   77.067800] bea0: 80291624 8028b32c aa82acc0 00000000 00000000 00000000 00000000 00000000
[   77.067805] bec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   77.067811] bee0: 00000000 00000000 7fffffff 00000000 00000003 00bf6008 0000017b 7fffffff
[   77.067817] bf00: 00000000 00000000 b471bfa4 b471bf18 801a9140 801a6bd0 7fffffff 00000000
[   77.067822] bf20: 00000003 8016d00c 00000002 bbcf9000 00031628 00000000 bbd11e2b bbcf9000
[   77.067828] bf40: 00031628 bbd29f20 bbd29d64 bbd1cebc 0001f000 000243a0 00000000 00000000
[   77.067833] bf60: 00000000 0000af00 0000002a 0000002b 00000024 0000001c 00000017 00000000
[   77.067838] bf80: 5f660ef0 c0241600 00000005 0003f040 80108204 b471a000 00000000 b471bfa8
[   77.067843] bfa0: 80108060 801a90b0 c0241600 00000005 00000003 00bf6008 00000000 76f64794
[   77.067849] bfc0: c0241600 00000005 0003f040 0000017b 00000000 7e9f4c94 00000005 00bf6008
[   77.067854] bfe0: 7e9f4ab0 7e9f4aa0 0002212c 76ef64f0 60000010 00000003 00000000 00000000
[   77.067951] [<7f3077e8>] (spi_update_status [nrc]) from [<7f307adc>] (spi_start+0xec/0x148 [nrc])
[   77.068039] [<7f307adc>] (spi_start [nrc]) from [<7f2ff598>] (nrc_hif_init+0xb4/0xc0 [nrc])
[   77.068126] [<7f2ff598>] (nrc_hif_init [nrc]) from [<7f2fe2f4>] (nrc_platform_probe+0x68/0x130 [nrc])
[   77.068182] [<7f2fe2f4>] (nrc_platform_probe [nrc]) from [<80545fd0>] (platform_drv_probe+0x5c/0xc0)
[   77.068191] [<80545fd0>] (platform_drv_probe) from [<805445b0>] (driver_probe_device+0x244/0x300)
[   77.068198] [<805445b0>] (driver_probe_device) from [<80544728>] (__driver_attach+0xbc/0xc0)
[   77.068208] [<80544728>] (__driver_attach) from [<805425cc>] (bus_for_each_dev+0x7c/0xb0)
[   77.068216] [<805425cc>] (bus_for_each_dev) from [<80543ef4>] (driver_attach+0x2c/0x30)
[   77.068222] [<80543ef4>] (driver_attach) from [<805439d0>] (bus_add_driver+0x1ac/0x224)
[   77.068228] [<805439d0>] (bus_add_driver) from [<80544e9c>] (driver_register+0x88/0x108)
[   77.068235] [<80544e9c>] (driver_register) from [<80545f20>] (__platform_driver_register+0x50/0x58)
[   77.068283] [<80545f20>] (__platform_driver_register) from [<7f323038>] (nrc_init+0x38/0x1000 [nrc])
[   77.068344] [<7f323038>] (nrc_init [nrc]) from [<80101bf0>] (do_one_initcall+0x50/0x17c)
[   77.068355] [<80101bf0>] (do_one_initcall) from [<801a97c8>] (do_init_module+0x74/0x20c)
[   77.068364] [<801a97c8>] (do_init_module) from [<801a87ec>] (load_module+0x1c28/0x23a0)
[   77.068372] [<801a87ec>] (load_module) from [<801a9140>] (SyS_finit_module+0x9c/0xac)
[   77.068381] [<801a9140>] (SyS_finit_module) from [<80108060>] (ret_fast_syscall+0x0/0x28)
[   77.068387] Code: e52de004 e8bd4000 e5905054 e1a07000 (e5953004) 
[   77.068394] ---[ end trace da7ce380b3fd4613 ]---
root@raspberrypi:/home/pi# 

spi_master spi0: failed to transfer one message from queue

I have seen other people post this issue a few times with different solutions, but I am still having problems initializing the driver reliably. I have an sxnewah evaluation board, and a custom board with the sxnewah module. I was hoping all I would have to do is hook up the reset pin, but I'm not sure that does anything at all. A full power cycle seems to make successful driver loading much more likely, but not perfect. How do I solve this problem once and for all? Is this a software problem, or a hardware problem? I'm on kernel 5.10, and driver 1.3.4 revision 3.

[28839.019397] nrc: unknown parameter 'spi_gpio_poll' ignored
[28839.051225] start FW 300
[28839.257613] nrc-cspi spi0.0: SPI transfer timed out
[28839.262664] spi_master spi0: failed to transfer one message from queue
[28839.269780] ------------[ cut here ]------------
[28839.274527] WARNING: CPU: 0 PID: 166688 at ../newah_driver-custom/nrc-hif-cspi.c:364 _c_spi_read_regs+0x208/0x230 [nrc]
[28839.285322] Modules linked in: nrc(O) mac80211 libarc4 tun 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) v3d bcm2835_isp(C) bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) gpu_sched v4l2_mem2mem videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 raspberrypi_hwmon videobuf2_common brcmfmac i2c_brcmstb brcmutil videodev spi_bcm2835 vc_sm_cma(C) mc snd_bcm2835(C) snd_soc_bcm2835_i2s vc4 cec drm_kms_helper drm rpivid_mem cfg80211 drm_panel_orientation_quirks syscopyarea sysfillrect sysimgblt rfkill fb_sys_fops pps_gpio backlight pps_core uio_pdrv_genirq nvmem_rmem uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[28839.350567] CPU: 0 PID: 166688 Comm: kworker/0:0 Tainted: G         C O      5.10.92-v8 #1
[28839.358839] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[28839.365322] Workqueue: events nrc_check_start [nrc]
[28839.370216] pstate: 20000005 (nzCv daif -PAN -UAO -TCO BTYPE=--)
[28839.376260] pc : _c_spi_read_regs+0x208/0x230 [nrc]
[28839.381174] lr : _c_spi_read_regs+0x19c/0x230 [nrc]
[28839.386056] sp : ffffffc017083940
[28839.389373] x29: ffffffc017083940 x28: 0000000000000000 
[28839.394699] x27: ffffff80463c54c8 x26: ffffffc0114ce788 
[28839.400022] x25: 0000000000000000 x24: 0000000000000001 
[28839.405344] x23: 0000000000000000 x22: ffffff804764f800 
[28839.410667] x21: 0000000000000020 x20: 0000000000000010 
[28839.415989] x19: ffffffc017083c78 x18: ffffffc0970834a7 
[28839.421310] x17: 000000000000000c x16: 000000000000000c 
[28839.426632] x15: 0000000000000006 x14: 0720072007200720 
[28839.431955] x13: 0720072007200765 x12: 0775076507750771 
[28839.437276] x11: 0720076d076f0772 x10: ffffffc01135d990 
[28839.442598] x9 : ffffffc0107e348c x8 : ffffffc017083c2c 
[28839.447920] x7 : ffffffc0112e9000 x6 : ffffffc0112e9210 
[28839.453242] x5 : 0000000000000001 x4 : 0000000000000000 
[28839.458565] x3 : ffffff8043884320 x2 : 0000000000000000 
[28839.463886] x1 : ffffff8040999e40 x0 : 00000000000000ff 
[28839.469209] Call trace:
[28839.471690]  _c_spi_read_regs+0x208/0x230 [nrc]
[28839.476255]  c_spi_read_regs+0x34/0x70 [nrc]
[28839.480557]  spi_wait_ack+0x54/0xb0 [nrc]
[28839.484599]  nrc_fw_check_next_frag+0x108/0x140 [nrc]
[28839.489683]  nrc_download_fw+0x2fc/0x380 [nrc]
[28839.494160]  nrc_check_start+0x630/0x780 [nrc]
[28839.498615]  process_one_work+0x1d8/0x4c0
[28839.502628]  worker_thread+0x144/0x470
[28839.506385]  kthread+0x14c/0x160
[28839.509618]  ret_from_fork+0x10/0x38
[28839.513197] ---[ end trace 04658f747fb730c6 ]---
[28839.517981] ------------[ cut here ]------------
[28839.522619] kernel BUG at ../newah_driver-custom/nrc-fw.c:193!
[28839.528459] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[28839.533948] Modules linked in: nrc(O) mac80211 libarc4 tun 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) v3d bcm2835_isp(C) bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) gpu_sched v4l2_mem2mem videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 raspberrypi_hwmon videobuf2_common brcmfmac i2c_brcmstb brcmutil videodev spi_bcm2835 vc_sm_cma(C) mc snd_bcm2835(C) snd_soc_bcm2835_i2s vc4 cec drm_kms_helper drm rpivid_mem cfg80211 drm_panel_orientation_quirks syscopyarea sysfillrect sysimgblt rfkill fb_sys_fops pps_gpio backlight pps_core uio_pdrv_genirq nvmem_rmem uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[28839.599169] CPU: 0 PID: 166688 Comm: kworker/0:0 Tainted: G        WC O      5.10.92-v8 #1
[28839.607440] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[28839.613923] Workqueue: events nrc_check_start [nrc]
[28839.618816] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
[28839.624856] pc : nrc_fw_check_next_frag+0x12c/0x140 [nrc]
[28839.630289] lr : nrc_fw_check_next_frag+0x108/0x140 [nrc]
[28839.635693] sp : ffffffc017083ca0
[28839.639009] x29: ffffffc017083ca0 x28: 0000000000000000 
[28839.644333] x27: ffffff80463c54c8 x26: ffffffc0114ce788 
[28839.649656] x25: 0000000000000000 x24: 0000000000000001 
[28839.654978] x23: 0000000000000000 x22: ffffff8043851400 
[28839.660301] x21: ffffff8047671ec0 x20: ffffff8042ff5400 
[28839.665624] x19: ffffff80463bf880 x18: ffffffc0970834a7 
[28839.670946] x17: 000000000000000c x16: 000000000000000c 
[28839.676267] x15: 0000000000000006 x14: 0720072007200720 
[28839.681589] x13: 0720072007200765 x12: 0775076507750771 
[28839.686912] x11: 0720076d076f0772 x10: ffffffc01135d990 
[28839.692235] x9 : ffffffc00906b6f8 x8 : ffffff8040999e40 
[28839.697558] x7 : ffffffc0112e9000 x6 : ffffffc0112e9210 
[28839.702880] x5 : 0000000000000001 x4 : 0000000000000000 
[28839.708202] x3 : 00000000000004f5 x2 : 0000000000000000 
[28839.713523] x1 : 0000000000000000 x0 : 00000000fffffffb 
[28839.718846] Call trace:
[28839.721327]  nrc_fw_check_next_frag+0x12c/0x140 [nrc]
[28839.726412]  nrc_download_fw+0x2fc/0x380 [nrc]
[28839.730887]  nrc_check_start+0x630/0x780 [nrc]
[28839.735342]  process_one_work+0x1d8/0x4c0
[28839.739357]  worker_thread+0x144/0x470
[28839.743113]  kthread+0x14c/0x160
[28839.746348]  ret_from_fork+0x10/0x38
[28839.749933] Code: d4210000 52800000 17ffffd8 d4210000 (d4210000) 
[28839.756036] ---[ end trace 04658f747fb730c7 ]---
[28839.760660] note: kworker/0:0[166688] exited with preempt_count 1
[28839.767119] ------------[ cut here ]------------
[28839.771775] WARNING: CPU: 0 PID: 0 at kernel/rcu/tree.c:624 rcu_eqs_enter.constprop.0+0x138/0x140
[28839.780654] Modules linked in: nrc(O) mac80211 libarc4 tun 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) v3d bcm2835_isp(C) bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) gpu_sched v4l2_mem2mem videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 raspberrypi_hwmon videobuf2_common brcmfmac i2c_brcmstb brcmutil videodev spi_bcm2835 vc_sm_cma(C) mc snd_bcm2835(C) snd_soc_bcm2835_i2s vc4 cec drm_kms_helper drm rpivid_mem cfg80211 drm_panel_orientation_quirks syscopyarea sysfillrect sysimgblt rfkill fb_sys_fops pps_gpio backlight pps_core uio_pdrv_genirq nvmem_rmem uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[28839.845875] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D WC O      5.10.92-v8 #1
[28839.853537] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[28839.859984] pstate: 20000085 (nzCv daIf -PAN -UAO -TCO BTYPE=--)
[28839.866001] pc : rcu_eqs_enter.constprop.0+0x138/0x140
[28839.871146] lr : rcu_eqs_enter.constprop.0+0x24/0x140
[28839.876200] sp : ffffffc0112e3ea0
[28839.879517] x29: ffffffc0112e3ea0 x28: 0000000001150018 
[28839.884842] x27: 000000003b357834 x26: ffffffc0112eff40 
[28839.890164] x25: 0000000000000000 x24: 0000000000000000 
[28839.895486] x23: ffffffc010e3ca60 x22: ffffffc011039138 
[28839.900808] x21: 0000000000000000 x20: ffffffc0112e97c8 
[28839.906131] x19: ffffffc01103af80 x18: 000000000000000e 
[28839.911453] x17: 0000000000000001 x16: 0000000000000001 
[28839.916775] x15: 0000001d5b6ef58c x14: 0000000eadb77ac6 
[28839.922098] x13: 0000000000000029 x12: 0000000000000040 
[28839.927420] x11: ffffff8040400000 x10: ffffff8040400002 
[28839.932742] x9 : ffffffc010b42e08 x8 : ffffff8040400028 
[28839.938063] x7 : ffffffc0112e9000 x6 : ffffffc0112e9210 
[28839.943385] x5 : 0000000000000001 x4 : 0000000000000000 
[28839.948706] x3 : ffffffc011025000 x2 : 4000000000000000 
[28839.954028] x1 : 4000000000000002 x0 : ffffff80fb794f80 
[28839.959350] Call trace:
[28839.961804]  rcu_eqs_enter.constprop.0+0x138/0x140
[28839.966602]  rcu_idle_enter+0x1c/0x30
[28839.970273]  default_idle_call+0x38/0x1d4
[28839.974289]  do_idle+0x260/0x2b0
[28839.977522]  cpu_startup_entry+0x34/0x80
[28839.981450]  rest_init+0xe0/0xf0
[28839.984685]  arch_call_rest_init+0x1c/0x28
[28839.988787]  start_kernel+0x540/0x578
[28839.992451] ---[ end trace 04658f747fb730c8 ]---

Jetson Nano: ieee80211_register_hw failed (-22)

[  868.010318] nrc80211 nrc80211: max_speed_hz = 16000000
               
[  868.011197] nrc80211 nrc80211: Newracom IEEE802.11 C-SPI: chipid=7292, sw_id=1020716, board_id=5797B0DE
               
[  868.011201] nrc80211 nrc80211: Boot loader
               
[  868.011327] nrc80211 nrc80211: credit[ 0] :  4
[  868.011332] nrc80211 nrc80211: credit[ 1] : 40
[  868.011335] nrc80211 nrc80211: credit[ 2] :  8
[  868.011338] nrc80211 nrc80211: credit[ 3] :  8
[  868.011341] nrc80211 nrc80211: credit[ 4] :  0
[  868.011344] nrc80211 nrc80211: credit[ 5] :  0
[  868.011347] nrc80211 nrc80211: credit[ 6] :  4
[  868.011350] nrc80211 nrc80211: credit[ 7] : 40
[  868.011353] nrc80211 nrc80211: credit[ 8] :  8
[  868.011356] nrc80211 nrc80211: credit[ 9] :  8
[  868.011359] nrc80211 nrc80211: credit[10] :  0
[  868.011362] nrc80211 nrc80211: credit[11] :  0
[  868.011459] nrc80211 nrc80211: start()
[  868.031595] nrc80211 nrc80211: [nrc_check_fw_file, 327] Checking firmware... (nrc7292_cspi.bin)
               
[  868.031600] nrc80211 nrc80211: [nrc_check_fw_file, 336] OK...(ffffff800d001000, 0x510dc)
               
[  868.031604] nrc80211 nrc80211: [spi_check_fw++]
               
[  868.031797] nrc80211 nrc80211: [spi_check_fw, 1242] sys.sw_id = 0x1020716
               
[  868.031806] nrc80211 nrc80211: [spi_check_fw--]
               
[  868.031814] nrc80211 nrc80211: FW download....nrc7292_cspi.bin
               
[  868.031820] nrc80211 nrc80211: suspend()
[  868.031826] nrc80211 nrc80211: [spi_suspend] drv_state:-1 wowlan_enabled:0 power_save:0
               
[  868.031829] start FW 330
[  868.700800] end FW
[  871.776982] nrc80211 nrc80211: [spi_check_fw++]
               
[  871.781301] nrc80211 nrc80211: [spi_check_fw, 1242] sys.sw_id = 0x1ec01c8
               
[  871.781356] nrc80211 nrc80211: [spi_check_fw--]
               
[  871.828820] nrc80211 nrc80211: system ready
[  871.828823] nrc80211 nrc80211: ready
[  871.828827] nrc80211 nrc80211:   -- type: 19
[  871.828829] nrc80211 nrc80211:   -- length: 50
[  871.828832] nrc80211 nrc80211:   -- version: 0x00000002
[  871.828835] nrc80211 nrc80211:   -- tx_head_size: 12
[  871.828838] nrc80211 nrc80211:   -- rx_head_size: 36
[  871.828840] nrc80211 nrc80211:   -- payload_align: 0
[  871.828843] nrc80211 nrc80211:   -- hw_version: 65535
[  871.828846] nrc80211 nrc80211:   -- cap_mask: 0x39
[  871.828849] nrc80211 nrc80211:   -- cap_li: 100, 100
[  871.828851] nrc80211 nrc80211:   -- cap_idle: 100, 0
[  871.828855] nrc80211 nrc80211:   -- mac_addr[0]: 84:25:3f:9c:09:c4
[  871.828858] nrc80211 nrc80211:   -- mac_addr[1]: 86:25:3f:9c:09:c4
[  871.828860] nrc80211 nrc80211:   -- cap_mask[0]: 0x2
[  871.828863] nrc80211 nrc80211:   -- cap_mask[1]: 0x0
[  871.828931] ------------[ cut here ]------------
[  871.833608] WARNING: CPU: 1 PID: 1099 at /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/net/wireless/core.c:579 wiphy_register+0x3e0/0x778 [cfg80211]
[  871.847226] Modules linked in: nrc(O) bnep fuse xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xt_addrtype iptable_filter iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack br_netfilter zram overlay userspace_alert nvgpu mac80211 cfg80211 ip_tables x_tables

[  871.847290] CPU: 1 PID: 1099 Comm: kworker/1:2 Tainted: G           O    4.9.253-tegra #1
[  871.847293] Hardware name: NVIDIA Jetson Nano 2GB Developer Kit (DT)
[  871.847359] Workqueue: events nrc_check_start [nrc]
[  871.847364] task: ffffffc0786ac600 task.stack: ffffffc076fa8000
[  871.847434] PC is at wiphy_register+0x3e0/0x778 [cfg80211]
[  871.847534] LR is at ieee80211_register_hw+0x3e8/0xa30 [mac80211]
[  871.847539] pc : [<ffffff8000f97970>] lr : [<ffffff8001052e78>] pstate: 00400045
[  871.847541] sp : ffffffc076fabb90
[  871.847544] x29: ffffffc076fabb90 x28: ffffff80012f07d8 
[  871.847551] x27: 0000000000000000 x26: 0000000000000035 
[  871.847558] x25: ffffffc0642911a0 x24: ffffffc064291578 
[  871.847565] x23: 0000000000000001 x22: 000000000000002f 
[  871.847571] x21: 0000000000000003 x20: 0000000010081891 
[  871.847578] x19: ffffffc0642902a0 x18: 00000000000012c8 
[  871.847585] x17: 0000000000000000 x16: 0000000000000000 
[  871.847591] x15: 0000000000001470 x14: 0000000000001450 
[  871.847597] x13: 0000000000001620 x12: 00000000000016f8 
[  871.847604] x11: 0000000000001608 x10: 0000000000000050 
[  871.847610] x9 : 0000000000000002 x8 : 0000000000000002 
[  871.847617] x7 : 000000000000077c x6 : 00000000000000ac 
[  871.847623] x5 : ffffff80012eb7fc x4 : 0000000000000002 
[  871.847630] x3 : ffffff80012eb7fc x2 : ffffff80012eb720 
[  871.847636] x1 : 00000000000000ac x0 : ffffff80012eb708 

[  871.847645] ---[ end trace 162af6f4113576e8 ]---
[  871.852252] Call trace:
[  871.852323] [<ffffff8000f97970>] wiphy_register+0x3e0/0x778 [cfg80211]
[  871.852416] [<ffffff8001052e78>] ieee80211_register_hw+0x3e8/0xa30 [mac80211]
[  871.852473] [<ffffff80012d58c0>] nrc_register_hw+0x580/0x768 [nrc]
[  871.852529] [<ffffff80012d7ba8>] nrc_check_start+0x4c8/0x7e8 [nrc]
[  871.852538] [<ffffff80080d40cc>] process_one_work+0x1e4/0x4b0
[  871.852543] [<ffffff80080d43e8>] worker_thread+0x50/0x4c8
[  871.852548] [<ffffff80080db0bc>] kthread+0xec/0xf0
[  871.852554] [<ffffff80080838a0>] ret_from_fork+0x10/0x30
[  871.852665] nrc80211 nrc80211: ieee80211_register_hw failed (-22)
[  871.852722] failed to register hw
[  871.856052] nrc80211 nrc80211: -nrc_check_start:error!!

Used v1.3.4_rev03 and latest drivers, same issue

Happen SIOCSIFFLAGS: Operation not permitted

Hi Sirs,
Please help ! Thank you so much
We use:
AHPI7292S REV 0C 2021-01-22 + Raspberry PI 4
OS: Linux raspberrypi 5.10.63-v7l+
Have Done: setup follow UG-7292-018-Raspberry_Pi_setup.pdf
kernel headers be installed manually using the kernel source
make nrc.ko OK and copy this one to target
sudo ./start.py 1 0 TW
Happen:
sudo insmod /home/pi/nrc_pkg/sw/driver/nrc.ko hifspeed=20000000 spi_bus_num=0 spi_cs_num=0 spi_gpio_irq=5 spi_polling_interval=0 fw_name=uni_s1g.bin bss_max_idle=180 ndp_preq=1 auto_ba=1 listen_interval=1000
SIOCSIFFLAGS: Operation not permitted

dmesg:
[ 619.743905] start FW 333
[ 620.184203] end FW
[ 623.208490] nrc80211 nrc80211: size of bd file is 2128
[ 623.208540] nrc80211 nrc80211: Major 01 Minor 04 Total len 0840 Num_Data_Groups 0009 Checksum 38AB
[ 623.208550] nrc80211 nrc80211: target version is not matched(1 : 0)
pi@raspberrypi:~/nrc_pkg/script $


pi@raspberrypi:~/nrc_pkg/script $ sudo ./start.py 1 0 TW
Done.
Done.

Model : 7292
STA Type : AP
Country : TW
Security Mode : OPEN
CAL. USE : ON
AMPDU : ON
Download FW : uni_s1g.bin
Max TX Power : 24
BSS MAX IDLE : 180

NRC AP setting for HaLow...
[*] Set Max CPU Clock on RPi
1400000
1400000
1400000
1400000
Done
[0] Clear
sudo: iptables: command not found
sudo: iptables: command not found
[1] Copy and Set Module Parameters
total 672
drwxr-xr-x 2 pi pi 4096 11月 9 13:29 .
drwxr-xr-x 4 pi pi 4096 11月 7 16:53 ..
-rwxrwxrwx 1 pi pi 281 11月 7 16:53 copy
-rwxr-xr-x 1 pi pi 2128 11月 7 16:53 nrc7292_bd.dat
-rwxr-xr-x 1 pi pi 335356 11月 7 16:53 nrc7292_cspi.bin
-rwxr-xr-x 1 root root 335356 11月 18 09:37 uni_s1g.bin
-rwxr-xr-x 1 root root 335356 11月 18 09:37 /lib/firmware/uni_s1g.bin

AP INTERFACE : wlan0
AP STATIC IP : 192.168.200.1
NET MASK NUM : 24

Config for AP is done!
IP and DHCP config done
[2] Set Initial Country
[3] Loading module
sudo insmod /home/pi/nrc_pkg/sw/driver/nrc.ko hifspeed=20000000 spi_bus_num=0 spi_cs_num=0 spi_gpio_irq=5 spi_polling_interval=0 fw_name=uni_s1g.bin bss_max_idle=180 ndp_preq=1 auto_ba=1 listen_interval=1000
SIOCSIFFLAGS: Operation not permitted
pi@raspberrypi:/nrc_pkg/script $ uname -a
Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux
pi@raspberrypi:
/nrc_pkg/script $


pi@raspberrypi:~/nrc_pkg/script $ dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.10.63-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1459 SMP Wed Oct 6 16:41:57 BST 2021
[ 0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.1
[ 0.000000] random: fast init done
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000001ac00000, size 320 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000002fffffff]
[ 0.000000] Normal empty
[ 0.000000] HighMem [mem 0x0000000030000000-0x00000000fbffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000003b3fffff]
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000fbffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff]
[ 0.000000] On node 0 totalpages: 1012736
[ 0.000000] DMA zone: 1728 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 196608 pages, LIFO batch:63
[ 0.000000] HighMem zone: 816128 pages, LIFO batch:63
[ 0.000000] percpu: Embedded 20 pages/cpu s50828 r8192 d22900 u81920
[ 0.000000] pcpu-alloc: s50828 r8192 d22900 u81920 alloc=20*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1011008
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=DC:A6:32:58:BC:68 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=PARTUUID=1e81428a-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] software IO TLB: mapped [mem 0x0000000014890000-0x0000000018890000] (64MB)
[ 0.000000] Memory: 3601132K/4050944K available (10240K kernel code, 1364K rwdata, 3192K rodata, 2048K init, 891K bss, 122132K reserved, 327680K cma-reserved, 3264512K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 34315 entries in 68 pages
[ 0.000000] ftrace: allocated 68 pages with 2 groups
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] Rude variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 25)
[ 0.000000] random: get_random_bytes called from start_kernel+0x3c8/0x59c with crng_init=1
[ 0.000008] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[ 0.000027] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[ 0.000086] bcm2835: system timer (irq = 26)
[ 0.000735] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[ 0.000752] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[ 0.000771] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[ 0.000788] Switching to timer-based delay loop, resolution 18ns
[ 0.001052] Console: colour dummy device 80x30
[ 0.001123] printk: console [tty1] enabled
[ 0.001183] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=540000)
[ 0.001217] pid_max: default: 32768 minimum: 301
[ 0.001384] LSM: Security Framework initializing
[ 0.001574] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.001600] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.003146] cgroup: Disabling memory control group subsystem
[ 0.003386] CPU: Testing write buffer coherency: ok
[ 0.003866] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.005099] Setting up static identity map for 0x200000 - 0x20003c
[ 0.005301] rcu: Hierarchical SRCU implementation.
[ 0.006242] smp: Bringing up secondary CPUs ...
[ 0.007508] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.008917] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.010249] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.010408] smp: Brought up 1 node, 4 CPUs
[ 0.010430] SMP: Total of 4 processors activated (432.00 BogoMIPS).
[ 0.010446] CPU: All CPU(s) started in HYP mode.
[ 0.010461] CPU: Virtualization extensions available.
[ 0.011411] devtmpfs: initialized
[ 0.026041] VFP support v0.3: implementor 41 architecture 3 part 40 variant 8 rev 0
[ 0.026262] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.026292] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.034736] pinctrl core: initialized pinctrl subsystem
[ 0.035864] NET: Registered protocol family 16
[ 0.040025] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[ 0.040880] audit: initializing netlink subsys (disabled)
[ 0.041157] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
[ 0.041755] thermal_sys: Registered thermal governor 'step_wise'
[ 0.042523] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.042541] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.042971] Serial: AMBA PL011 UART driver
[ 0.086934] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[ 0.100875] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-10-29T10:47:33, variant start
[ 0.110885] raspberrypi-firmware soc:firmware: Firmware hash is b8a114e5a9877e91ca8f26d1a5ce904b2ad3cf13
[ 0.151923] Kprobes globally optimized
[ 0.157260] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[ 0.161743] vgaarb: loaded
[ 0.162226] SCSI subsystem initialized
[ 0.162450] usbcore: registered new interface driver usbfs
[ 0.162511] usbcore: registered new interface driver hub
[ 0.162607] usbcore: registered new device driver usb
[ 0.163013] usb_phy_generic phy: supply vcc not found, using dummy regulator
[ 0.165028] clocksource: Switched to clocksource arch_sys_counter
[ 1.125417] VFS: Disk quotas dquot_6.6.0
[ 1.125523] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 1.125692] FS-Cache: Loaded
[ 1.125911] CacheFiles: Loaded
[ 1.127064] simple-framebuffer 3e3cf000.framebuffer: framebuffer at 0x3e3cf000, 0x7f8000 bytes, mapped to 0x(ptrval)
[ 1.127085] simple-framebuffer 3e3cf000.framebuffer: format=a8r8g8b8, mode=1920x1080x32, linelength=7680
[ 1.127579] Console: switching to colour frame buffer device 240x67
[ 1.138418] simple-framebuffer 3e3cf000.framebuffer: fb0: simplefb registered!
[ 1.148289] NET: Registered protocol family 2
[ 1.148548] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 1.149887] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 1.149928] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 1.150098] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 1.150177] TCP: Hash tables configured (established 8192 bind 8192)
[ 1.150352] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 1.150390] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 1.151064] NET: Registered protocol family 1
[ 1.151810] RPC: Registered named UNIX socket transport module.
[ 1.151826] RPC: Registered udp transport module.
[ 1.151842] RPC: Registered tcp transport module.
[ 1.151856] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.151880] PCI: CLS 0 bytes, default 64
[ 1.155428] Initialise system trusted keyrings
[ 1.155676] workingset: timestamp_bits=14 max_order=20 bucket_order=6
[ 1.164071] zbud: loaded
[ 1.165958] FS-Cache: Netfs 'nfs' registered for caching
[ 1.166727] NFS: Registering the id_resolver key type
[ 1.166777] Key type id_resolver registered
[ 1.166792] Key type id_legacy registered
[ 1.166931] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.166948] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 1.167998] Key type asymmetric registered
[ 1.168015] Asymmetric key parser 'x509' registered
[ 1.168210] bounce: pool size: 64 pages
[ 1.168258] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 1.168480] io scheduler mq-deadline registered
[ 1.168496] io scheduler kyber registered
[ 1.173341] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[ 1.173374] brcm-pcie fd500000.pcie: No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[ 1.173456] brcm-pcie fd500000.pcie: MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[ 1.173546] brcm-pcie fd500000.pcie: IB MEM 0x0000000000..0x00bfffffff -> 0x0400000000
[ 1.227166] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[ 1.227564] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[ 1.227585] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.227607] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[ 1.227698] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[ 1.227943] pci 0000:00:00.0: PME# supported from D0 D3hot
[ 1.231463] PCI: bus0: Fast back to back transfers disabled
[ 1.231489] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 1.231896] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[ 1.232024] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[ 1.232460] pci 0000:01:00.0: PME# supported from D0 D3cold
[ 1.235969] PCI: bus1: Fast back to back transfers disabled
[ 1.235993] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 1.236075] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
[ 1.236099] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
[ 1.236182] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 1.236209] pci 0000:00:00.0: bridge window [mem 0x600000000-0x6000fffff]
[ 1.236628] pcieport 0000:00:00.0: enabling device (0140 -> 0142)
[ 1.236868] pcieport 0000:00:00.0: PME: Signaling with IRQ 81
[ 1.244171] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 1.247631] iproc-rng200 fe104000.rng: hwrng registered
[ 1.248003] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[ 1.248970] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[ 1.261564] brd: module loaded
[ 1.274330] loop: module loaded
[ 1.276337] Loading iSCSI transport class v2.0-870.
[ 1.279643] libphy: Fixed MDIO Bus: probed
[ 1.281548] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[ 1.295111] libphy: bcmgenet MII bus: probed
[ 1.395208] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[ 1.396427] usbcore: registered new interface driver r8152
[ 1.396494] usbcore: registered new interface driver lan78xx
[ 1.396572] usbcore: registered new interface driver smsc95xx
[ 1.398207] xhci_hcd 0000:01:00.0: enabling device (0140 -> 0142)
[ 1.398381] xhci_hcd 0000:01:00.0: xHCI Host Controller
[ 1.398429] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[ 1.401815] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000060000000890
[ 1.403186] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[ 1.403205] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.403222] usb usb1: Product: xHCI Host Controller
[ 1.403239] usb usb1: Manufacturer: Linux 5.10.63-v7l+ xhci-hcd
[ 1.403255] usb usb1: SerialNumber: 0000:01:00.0
[ 1.404003] hub 1-0:1.0: USB hub found
[ 1.404104] hub 1-0:1.0: 1 port detected
[ 1.404792] xhci_hcd 0000:01:00.0: xHCI Host Controller
[ 1.404820] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[ 1.404846] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[ 1.405428] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[ 1.405448] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.405465] usb usb2: Product: xHCI Host Controller
[ 1.405483] usb usb2: Manufacturer: Linux 5.10.63-v7l+ xhci-hcd
[ 1.405500] usb usb2: SerialNumber: 0000:01:00.0
[ 1.406231] hub 2-0:1.0: USB hub found
[ 1.406308] hub 2-0:1.0: 4 ports detected
[ 1.408167] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 1.408544] dwc_otg: FIQ enabled
[ 1.408559] dwc_otg: NAK holdoff enabled
[ 1.408573] dwc_otg: FIQ split-transaction FSM enabled
[ 1.408591] Module dwc_common_port init
[ 1.409062] usbcore: registered new interface driver uas
[ 1.409193] usbcore: registered new interface driver usb-storage
[ 1.409400] mousedev: PS/2 mouse device common for all mice
[ 1.411247] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 1.414932] sdhci: Secure Digital Host Controller Interface driver
[ 1.414949] sdhci: Copyright(c) Pierre Ossman
[ 1.415729] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.419374] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.419724] hid: raw HID events driver (C) Jiri Kosina
[ 1.419958] usbcore: registered new interface driver usbhid
[ 1.419973] usbhid: USB HID core driver
[ 1.426417] Initializing XFRM netlink socket
[ 1.426461] NET: Registered protocol family 17
[ 1.426588] Key type dns_resolver registered
[ 1.427009] Registering SWP/SWPB emulation handler
[ 1.427188] registered taskstats version 1
[ 1.427215] Loading compiled-in X.509 certificates
[ 1.428091] Key type ._fscrypt registered
[ 1.428108] Key type .fscrypt registered
[ 1.428123] Key type fscrypt-provisioning registered
[ 1.440257] uart-pl011 fe201000.serial: there is not valid maps for state default
[ 1.440519] uart-pl011 fe201000.serial: cts_event_workaround enabled
[ 1.440603] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 38, base_baud = 0) is a PL011 rev2
[ 1.448482] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[ 1.453124] of_cfs_init
[ 1.453407] of_cfs_init: OK
[ 1.487408] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[ 1.488074] Waiting for root device PARTUUID=1e81428a-02...
[ 1.588201] mmc0: new ultra high speed DDR50 SDHC card at address 5048
[ 1.589177] mmcblk0: mmc0:5048 SD32G 29.7 GiB
[ 1.591443] mmcblk0: p1 p2
[ 1.611661] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[ 1.611680] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[ 1.685069] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[ 1.867786] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[ 1.867809] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 1.867826] usb 1-1: Product: USB2.0 Hub
[ 1.870033] hub 1-1:1.0: USB hub found
[ 1.870313] hub 1-1:1.0: 4 ports detected
[ 2.016659] EXT4-fs (mmcblk0p2): recovery complete
[ 2.018503] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.018589] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 2.019298] devtmpfs: mounted
[ 2.029354] Freeing unused kernel memory: 2048K
[ 2.029682] Run /sbin/init as init process
[ 2.029697] with arguments:
[ 2.029711] /sbin/init
[ 2.029725] splash
[ 2.029739] with environment:
[ 2.029754] HOME=/
[ 2.029768] TERM=linux
[ 2.195098] usb 1-1.1: new low-speed USB device number 3 using xhci_hcd
[ 2.368816] systemd[1]: System time before build time, advancing clock.
[ 2.371849] usb 1-1.1: New USB device found, idVendor=09da, idProduct=0260, bcdDevice= 2.50
[ 2.371871] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2.371889] usb 1-1.1: Product: USB Keyboard
[ 2.371906] usb 1-1.1: Manufacturer:
[ 2.398350] input: USB Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/0003:09DA:0260.0001/input/input0
[ 2.465989] hid-generic 0003:09DA:0260.0001: input,hidraw0: USB HID v1.10 Keyboard [ USB Keyboard] on usb-0000:01:00.0-1.1/input0
[ 2.471103] NET: Registered protocol family 10
[ 2.472595] Segment Routing with IPv6
[ 2.494359] input: USB Keyboard System Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:09DA:0260.0002/input/input1
[ 2.539404] systemd[1]: systemd 247.3-6+rpi1 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
[ 2.540303] systemd[1]: Detected architecture arm.
[ 2.541996] systemd[1]: Set hostname to .
[ 2.556763] input: USB Keyboard Consumer Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:09DA:0260.0002/input/input2
[ 2.557969] hid-generic 0003:09DA:0260.0002: input,hidraw1: USB HID v1.10 Device [ USB Keyboard] on usb-0000:01:00.0-1.1/input1
[ 2.665225] usb 1-1.2: new low-speed USB device number 4 using xhci_hcd
[ 2.804791] usb 1-1.2: New USB device found, idVendor=09da, idProduct=000a, bcdDevice= 0.14
[ 2.804815] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2.804833] usb 1-1.2: Product: USB Mouse
[ 2.804850] usb 1-1.2: Manufacturer: A4Tech
[ 3.230830] systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[ 3.415878] systemd[1]: Queued start job for default target Graphical Interface.
[ 3.417781] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.420345] systemd[1]: Created slice system-getty.slice.
[ 3.420719] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.421795] systemd[1]: Created slice system-modprobe.slice.
[ 3.421937] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.422878] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[ 3.423727] systemd[1]: Created slice User and Session Slice.
[ 3.424296] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ 3.425878] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 3.426667] systemd[1]: Reached target Slices.
[ 3.426913] systemd[1]: Reached target Swap.
[ 3.427952] systemd[1]: Listening on Syslog Socket.
[ 3.428729] systemd[1]: Listening on fsck to fsckd communication Socket.
[ 3.429176] systemd[1]: Listening on initctl Compatibility Named Pipe.
[ 3.430348] systemd[1]: Listening on Journal Audit Socket.
[ 3.431143] systemd[1]: Listening on Journal Socket (/dev/log).
[ 3.432157] systemd[1]: Listening on Journal Socket.
[ 3.437884] systemd[1]: Listening on udev Control Socket.
[ 3.438765] systemd[1]: Listening on udev Kernel Socket.
[ 3.439698] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[ 3.444732] systemd[1]: Mounting POSIX Message Queue File System...
[ 3.451028] systemd[1]: Mounting RPC Pipe File System...
[ 3.458304] systemd[1]: Mounting Kernel Debug File System...
[ 3.465701] systemd[1]: Mounting Kernel Trace File System...
[ 3.466223] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped.
[ 3.479299] systemd[1]: Starting Restore / save the current clock...
[ 3.487998] systemd[1]: Starting Set the console keyboard layout...
[ 3.495856] systemd[1]: Starting Create list of static device nodes for the current kernel...
[ 3.503191] systemd[1]: Starting Load Kernel Module configfs...
[ 3.510904] systemd[1]: Starting Load Kernel Module drm...
[ 3.519337] systemd[1]: Starting Load Kernel Module fuse...
[ 3.523448] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[ 3.537186] systemd[1]: Starting File System Check on Root Device...
[ 3.556491] systemd[1]: Starting Journal Service...
[ 3.566661] fuse: init (API version 7.32)
[ 3.572020] systemd[1]: Starting Load Kernel Modules...
[ 3.580084] systemd[1]: Starting Coldplug All udev Devices...
[ 3.610466] systemd[1]: Mounted POSIX Message Queue File System.
[ 3.611368] systemd[1]: Mounted RPC Pipe File System.
[ 3.612240] systemd[1]: Mounted Kernel Debug File System.
[ 3.613129] systemd[1]: Mounted Kernel Trace File System.
[ 3.616419] systemd[1]: Finished Restore / save the current clock.
[ 3.619936] systemd[1]: Finished Create list of static device nodes for the current kernel.
[ 3.622154] systemd[1]: [email protected]: Succeeded.
[ 3.623982] systemd[1]: Finished Load Kernel Module configfs.
[ 3.626742] systemd[1]: [email protected]: Succeeded.
[ 3.628404] systemd[1]: Finished Load Kernel Module fuse.
[ 3.640416] systemd[1]: Mounting FUSE Control File System...
[ 3.653367] systemd[1]: Mounting Kernel Configuration File System...
[ 3.674936] i2c /dev entries driver
[ 3.681004] systemd[1]: Started File System Check Daemon to report status.
[ 3.691515] systemd[1]: [email protected]: Succeeded.
[ 3.692960] systemd[1]: Finished Load Kernel Module drm.
[ 3.694369] systemd[1]: Mounted FUSE Control File System.
[ 3.698613] systemd[1]: Mounted Kernel Configuration File System.
[ 3.793491] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 3.873024] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 3.917610] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[ 3.927354] systemd[1]: Finished File System Check on Root Device.
[ 3.933494] systemd[1]: Starting Remount Root and Kernel File Systems...
[ 3.982293] systemd[1]: Finished Load Kernel Modules.
[ 3.991616] systemd[1]: Starting Apply Kernel Variables...
[ 4.017724] systemd[1]: Started Journal Service.
[ 4.161729] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 4.225752] systemd-journald[130]: Received client request to flush runtime journal.
[ 4.243134] systemd-journald[130]: File /var/log/journal/6863a4a704a449d0b3397f55bec3e7ce/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 5.255204] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[ 5.285218] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[ 5.302032] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[ 5.302685] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[ 5.447885] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.450231] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 5.450257] [vc_sm_connected_init]: start
[ 5.464299] [vc_sm_connected_init]: installed successfully
[ 5.470046] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.510671] mc: Linux media interface: v0.10
[ 5.616706] bcm2835_audio bcm2835_audio: card created with 8 channels
[ 5.689610] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode
[ 5.690436] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode
[ 5.711725] videodev: Linux video capture interface: v2.00
[ 5.849143] checking generic (3e3cf000 7f8000) vs hw (0 ffffffffffffffff)
[ 5.849168] fb0: switching to vc4drmfb from simple
[ 5.849860] Console: switching to colour dummy device 80x30
[ 5.891193] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.892652] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 5.896330] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.927186] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.931643] Registered IR keymap rc-cec
[ 5.931910] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 5.932161] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input3
[ 5.937918] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.944112] vc4_hdmi fef00700.hdmi: Could not register sound card: -517
[ 5.954207] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[ 5.954715] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[ 5.955253] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[ 5.955592] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[ 5.955622] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[ 5.955652] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[ 5.955676] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[ 5.955698] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[ 5.955908] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[ 5.985232] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.118757] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 6.121122] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 1
[ 6.138964] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 6.139010] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 6.143752] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 6.143798] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 6.145417] Registered IR keymap rc-cec
[ 6.145626] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 6.145869] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input4
[ 6.147219] vc4_hdmi fef00700.hdmi: Could not register sound card: -517
[ 6.149492] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 6.149535] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[ 6.152382] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[ 6.152424] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[ 6.274130] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 6.307165] Registered IR keymap rc-cec
[ 6.307365] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 6.307583] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input5
[ 6.311568] vc4_hdmi fef00700.hdmi: Could not register sound card: -517
[ 6.702666] input: A4Tech USB Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:09DA:000A.0003/input/input6
[ 6.703271] a4tech 0003:09DA:000A.0003: input,hidraw2: USB HID v1.10 Mouse [A4Tech USB Mouse] on usb-0000:01:00.0-1.2/input0
[ 6.712635] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 6.731997] Registered IR keymap rc-cec
[ 6.732192] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 6.732422] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input7
[ 6.733463] vc4_hdmi fef00700.hdmi: Could not register sound card: -517
[ 7.358854] 8021q: 802.1Q VLAN Support v1.8
[ 7.601271] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[ 7.602743] bcmgenet fd580000.ethernet eth0: Link is Down
[ 7.655178] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SSFS
[ 7.831927] random: crng init done
[ 7.831948] random: 7 urandom warning(s) missed due to ratelimiting
[ 7.977577] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 8.020669] Registered IR keymap rc-cec
[ 8.020871] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 8.021286] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input8
[ 8.040572] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[ 8.141778] Registered IR keymap rc-cec
[ 8.141998] rc rc1: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1
[ 8.142236] input: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input9
[ 8.149559] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[ 8.150045] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[ 8.150377] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.150725] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.151069] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.151338] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.151706] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.197029] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0
[ 8.298195] Console: switching to colour frame buffer device 240x67
[ 8.324968] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
[ 9.721225] systemd-journald[130]: File /var/log/journal/6863a4a704a449d0b3397f55bec3e7ce/user-1000.journal corrupted or uncleanly shut down, renaming and replacing.
[ 10.480750] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 10.481619] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 10.687283] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 10.688725] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 10.692112] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 11.756031] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 11.756060] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 12.237056] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 12.237983] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 12.252788] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 12.253137] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 12.253444] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[ 13.199596] ICMPv6: process `dhcpcd' is using deprecated sysctl (syscall) net.ipv6.neigh.eth0.retrans_time - use net.ipv6.neigh.eth0.retrans_time_ms instead
[ 32.142583] v3d fec00000.v3d: MMU error from client L2T (0) at 0xba1000, pte invalid
[ 619.712808] nrc: loading out-of-tree module taints kernel.
[ 619.743896] nrc80211 nrc80211: [spi_suspend] drv_state:-1 wowlan_enabled:0 power_save:0

[ 619.743905] start FW 333
[ 620.184203] end FW
[ 623.208490] nrc80211 nrc80211: size of bd file is 2128
[ 623.208540] nrc80211 nrc80211: Major 01 Minor 04 Total len 0840 Num_Data_Groups 0009 Checksum 38AB
[ 623.208550] nrc80211 nrc80211: target version is not matched(1 : 0)
pi@raspberrypi:~/nrc_pkg/script $

Driver compile failed on latest release(v1.3.4_rev03)

Just tried latest release and found the driver compiled failed. Information collected below:

Error message:

pi@raspberrypi:~/nrc7292_sw_pkg/package/host/src/nrc $ make

make[1]: Entering directory '/usr/src/linux-headers-5.15.32-v7l+'
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-mac80211.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-trx.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-init.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-debug.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/hif.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/wim.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-hif-debug.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-hif-uart.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-hif-ssp.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-fw.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-netlink.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-ssp.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-hif-cspi.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/mac80211-ext.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-stats.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-pm.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-dump.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-hif-sdio.o
  CC [M]  /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-bd.o
/home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-bd.c: In function ‘nrc_check_bd’:
/home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-bd.c:921:11: error: implicit declaration of function ‘get_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
  921 |  old_fs = get_fs();
      |           ^~~~~~
      |           sget_fc
/home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-bd.c:921:11: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
/home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-bd.c:922:2: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
  922 |  set_fs(KERNEL_DS);
      |  ^~~~~~
      |  sget_fc
/home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-bd.c:922:9: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
  922 |  set_fs(KERNEL_DS);
      |         ^~~~~~~~~
      |         KERNFS_NS
/home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-bd.c:922:9: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-bd.o] Error 1
make[1]: *** [Makefile:1868: /home/pi/nrc7292_sw_pkg/package/host/src/nrc] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.32-v7l+'
make: *** [Makefile:61: modules] Error 2
pi@raspberrypi:~/nrc7292_sw_pkg/package/host/src/nrc $ 

nrc7292_sw_pkg commit: 5f11f25

OS: Raspberry Pi 4 (32-bit)

pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

kernel version: 5.15.32

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux

Are there any examples for mesh networking?

I notice mesh is listed as a feature added is the release description. I also found mesh.py, but it's not immediately obvious to me how to use it. Are there any examples available for using the mesh capabilities of the module?

BD file is invalid..Exit!!

Hi, I try to deloy this project with raspberry pi CM4, my test module is AHPI7292S. I follow the documentation 'UG-7292-018-Raspberry_Pi_setup.pdf', set everything up , then build the driver module 'nrc.ko' from source code. but when I start an AP module with 'start.py' script, there are some error message in the kernel. I check the source code, find it is caused by the file 'nrc7292_bd.dat',
image

I know the board data file can be dsiabled, when I disabled it, the driver works well. but I am not sure it is a good choice to disable it,
is there any potential risk or issue? If I want to enable it, what should I do? is there any way to generate the matched board data file?
look forward to your replay.

Bugs related to print function in start.py

Hi everyone,

I am trying to start an AP on my Raspberry Pi 4B with and I get something like this

pi@raspberrypi:~/nrc_pkg/script $ ./start.py 1 0 EU
  File "/home/pi/nrc_pkg/script/./start.py", line 351
    print "country: " + country +", prefer_bw: " + str(prefer_bw)+ ", dwell_time: " + str(dwell_time)
          ^
SyntaxError: invalid syntax
pi@raspberrypi:~/nrc_pkg/script $ vi start.py 
pi@raspberrypi:~/nrc_pkg/script $ ./start.py 1 0 EU
  File "/home/pi/nrc_pkg/script/./start.py", line 624
    print "[*] Self configuration start!"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("[*] Self configuration start!")?

I'm running Python 3.9.2 on my Pi and I am not sure what caused this and whether it is the version that made this bug as I just allow the system to do the update by simply execute sudo apt update. I also do not follow closely on what Python updates from 3.7 to 3.8 to 3.9.

I believe that this is not a fatal bug. Just report to you guys and hope it will get fixed for better user experience.

Unknown symbol in module when insmod nrc.ko

I follow the whole procedure, then run
./start.py 1 0 EU
in Loading module step, error occured as following

sudo insmod /home/pi/nrc_pkg/sw/driver/nrc.ko hifspeed=20000000 spi_bus_num=0 spi_cs_num=0 spi_gpio_irq=5 spi_polling_interval=0 fw_name=uni_s1g.bin bss_max_idle=180 ndp_preq=1 auto_ba=1 listen_interval=1000
insmod: ERROR: could not insert module /home/pi/nrc_pkg/sw/driver/nrc.ko: Unknown symbol in module
I install module manually, the same erro ...
image

How to solve " Unknown symbol in module"
Thanks.

Cannot insmod the driver with rapspberry pi cm4 and 64 bit OS.

I bought AHPI7292S modules, but has not received yet. So I compile the driver before, when i run start script, segment default happenned.

Is the reason of no hardware devive?

uname -a

Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

cat /boot/config.txt

image

Log is as followings:

pi@raspberrypi:~/nrc_pkg/script $ ./start.py 1 0 US
Done.
Done.
------------------------------
Model            : 7292
STA Type         : AP
Country          : US
Security Mode    : OPEN
CAL. USE         : ON
AMPDU            : ON
Download FW      : uni_s1g.bin
Max TX Power     : 24
BSS MAX IDLE     : 180
------------------------------
NRC AP setting for HaLow...
[*] Set Max CPU Clock on RPi
1400000
1400000
1400000
1400000
Done
[0] Clear
hostapd: no process found
wireshark-gtk: no process found
rmmod: ERROR: Module nrc is not currently loaded
rm: cannot remove '/home/pi/nrc_pkg/script/conf/temp_self_config.conf': No such file or directory
rm: cannot remove '/home/pi/nrc_pkg/script/conf/temp_hostapd_config.conf': No such file or directory
Failed to stop dnsmasq.service: Unit dnsmasq.service not loaded.
[1] Copy and Set Module Parameters
total 672
drwxr-xr-x 2 pi   pi     4096 Jul 11 05:08 .
drwxr-xr-x 4 pi   pi     4096 Jul 11 05:08 ..
-rwxrwxrwx 1 pi   pi      281 Jul 11 05:08 copy
-rwxr-xr-x 1 pi   pi     1980 Jul 11 05:08 nrc7292_bd.dat
-rwxr-xr-x 1 pi   pi   331996 Jul 11 05:08 nrc7292_cspi.bin
-rwxr-xr-x 1 root root 331996 Jul 11 05:08 uni_s1g.bin
-rwxr-xr-x 1 root root 331996 Jul 11 05:08 /lib/firmware/uni_s1g.bin
====================================
 AP INTERFACE     : wlan0
 AP STATIC IP     : 192.168.200.1 
 NET MASK NUM     : 24 
====================================
Config for AP is done!
IP and DHCP config done
[2] Set Country
[3] Loading module
sudo insmod /home/pi/nrc_pkg/sw/driver/nrc.ko  hifspeed=20000000 spi_bus_num=0 spi_cs_num=0 spi_gpio_irq=5 spi_polling_interval=0 fw_name=uni_s1g.bin bss_max_idle=180 ndp_preq=1 auto_ba=1 listen_interval=1000
Segmentation fault

Message from syslogd@raspberrypi at Jul 11 05:08:32 ...
 kernel:[ 3773.740823] Internal error: Oops: 96000005 [#1] PREEMPT SMP

Message from syslogd@raspberrypi at Jul 11 05:08:32 ...
 kernel:[ 3773.747832] Code: 35000780 531e7421 52814402 d2800000 (f9403f57) 

Message from syslogd@raspberrypi at Jul 11 05:08:32 ...
 kernel:[ 3773.747841] Internal error: Oops: 96000005 [#2] PREEMPT SMP

Message from syslogd@raspberrypi at Jul 11 05:08:32 ...
 kernel:[ 3773.748359] Code: b9000abf b9414a60 7100001f 540003ac (b942cec0) 
wlan0: ERROR while getting interface flags: No such device
rmmod: ERROR: Module nrc is in use

How to change from -bw :2 Mhz (NRC Auto)

Hi all,

How can I change bandwith to 1 or 4 MHz? Defaults to 2 MHz?

Setup: 2x Raspberry Pi 3 B+ and 2x AHPI7292S from ALFA Network Inc. Operating in host mode
with start.py - AP and STA. Hoping someone can help.

Thanks,
Tristan

Does the driver support wireless ad-hoc mode?

I was trying to setup 2 HaLow Board in ad-hoc mode. However, I encountered error as below:

sudo iwconfig wlan0 mode ad-hoc
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Operation not supported.

Still having issues with driver failing to load.

I was hoping that something would happen to fix this issue but I finally got around to building the latest version of the driver and I am still having the problem where the driver does not load about half of the time. Below is my dmesg.

sudo insmod /home/pi/nrc_pkg/sw/driver/nrc.ko  hifspeed=10000000 spi_bus_num=0 spi_cs_num=0 spi_gpio_irq=5 spi_polling_interval=0 fw_name=uni_s1g.bin auto_ba=1 sw_enc=1 listen_interval=1000

[   35.501069] ------------[ cut here ]------------
[   35.505702] WARNING: CPU: 3 PID: 510 at ../newah_driver-custom/nrc-hif-cspi.c:364 _c_spi_read_regs+0x204/0x230 [nrc]
[   35.516287] Modules linked in: nrc(O+) fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine rng_core authenc libdes imx8mq_interconnect imx_interconnect imx8m_ddrc caam secvio error governor_userspace imx_bus snd_soc_fsl_sai crct10dif_ce ax88179_178a imx_sdma snd_i2smic_rpi(O) fuse
[   35.543360] CPU: 3 PID: 510 Comm: insmod Tainted: G           O      5.15.32 #1
[   35.550669] Hardware name: Google i.MX8MQ Phanbell (DT)
[   35.555893] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   35.562855] pc : _c_spi_read_regs+0x204/0x230 [nrc]
[   35.567768] lr : _c_spi_read_regs+0x194/0x230 [nrc]
[   35.572680] sp : ffff80000b153340
[   35.575991] x29: ffff80000b153340 x28: 0000000000000013 x27: 0000000000000100
[   35.583131] x26: ffff8000013cfec0 x25: ffff8000013d0000 x24: ffff000005972a00
[   35.590271] x23: ffff000005972b10 x22: ffff00000559e800 x21: 0000000000000010
[   35.597409] x20: 0000000000000000 x19: ffff000005972b10 x18: 0000000000000020
[   35.604550] x17: 0000000000001298 x16: 0000000000001258 x15: 00000000000002a7
[   35.611689] x14: 00000000000001a1 x13: 0000000000000000 x12: 0000000000000007
[   35.618827] x11: 0000000000000000 x10: 00000000000002a7 x9 : 0000000000000000
[   35.625966] x8 : ffff00003fd99f00 x7 : 0000000000000000 x6 : 0000000000000000
[   35.633105] x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff000004ceeb80
[   35.640244] x2 : 0000000000000000 x1 : ffff000008358dc0 x0 : 00000000000000ff
[   35.647385] Call trace:
[   35.649830]  _c_spi_read_regs+0x204/0x230 [nrc]
[   35.654398]  c_spi_read_regs+0x2c/0x70 [nrc]
[   35.658704]  c_spi_probe+0xb0/0x200 [nrc]
[   35.662747]  spi_probe+0x88/0xf0
[   35.665980]  really_probe.part.0+0x9c/0x310
[   35.670167]  __driver_probe_device+0x98/0x150
[   35.674526]  driver_probe_device+0xc8/0x160
[   35.678709]  __driver_attach+0xfc/0x190
[   35.682547]  bus_for_each_dev+0x70/0xd0
[   35.686383]  driver_attach+0x28/0x40
[   35.689960]  bus_add_driver+0x108/0x1f0
[   35.693797]  driver_register+0x7c/0x130
[   35.697634]  __spi_register_driver+0xcc/0xe0
[   35.701905]  nrc_hif_cspi_init+0xd4/0x150 [nrc]
[   35.706470]  nrc_hif_init+0x1c/0xd0 [nrc]
[   35.710514]  nrc_platform_probe+0x5c/0x120 [nrc]
[   35.715166]  platform_probe+0x6c/0xe0
[   35.718830]  really_probe.part.0+0x9c/0x310
[   35.723015]  __driver_probe_device+0x98/0x150
[   35.727373]  driver_probe_device+0xc8/0x160
[   35.731557]  __driver_attach+0xfc/0x190
[   35.735394]  bus_for_each_dev+0x70/0xd0
[   35.739230]  driver_attach+0x28/0x40
[   35.742806]  bus_add_driver+0x108/0x1f0
[   35.746643]  driver_register+0x7c/0x130
[   35.750480]  __platform_driver_register+0x2c/0x40
[   35.755187]  nrc_init+0x5c/0x1000 [nrc]
[   35.759058]  do_one_initcall+0x50/0x1b0
[   35.762895]  do_init_module+0x44/0x240
[   35.766647]  load_module+0x1f70/0x2680
[   35.770397]  __do_sys_finit_module+0xb8/0x100
[   35.774755]  __arm64_sys_finit_module+0x24/0x30
[   35.779286]  invoke_syscall+0x48/0x120
[   35.783037]  el0_svc_common.constprop.0+0xcc/0xf0
[   35.787743]  do_el0_svc+0x28/0x90
[   35.791057]  el0_svc+0x20/0x60
[   35.794114]  el0t_64_sync_handler+0x1a8/0x1b0
[   35.798470]  el0t_64_sync+0x1a0/0x1a4
[   35.802133] ---[ end trace f940fce3dceca63c ]---
[   35.806836] [Error] failed to read register(0x0).
[   35.811554] nrc-cspi: probe of spi0.0 failed with error -22
[   35.817318] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000314
[   35.817318] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000078
[   35.817323] Mem abort info:
[   35.826121] Mem abort info:
[   35.826123]   ESR = 0x96000004
[   35.826126]   EC = 0x25: DABT (current EL), IL = 32 bits
[   35.826129]   SET = 0, FnV = 0
[   35.826132]   EA = 0, S1PTW = 0
[   35.826134]   FSC = 0x04: level 0 translation fault
[   35.826137] Data abort info:
[   35.826138]   ISV = 0, ISS = 0x00000004
[   35.826140]   CM = 0, WnR = 0
[   35.826139] imx-sdma 30bd0000.dma-controller: All bds consumed,restart now.
[   35.826143] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000045bda000
[   35.826148] [0000000000000314] pgd=0000000000000000, p4d=0000000000000000
[   35.826156] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[   35.826160] Modules linked in: nrc(O+) fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine rng_core authenc libdes
[   35.834991]   ESR = 0x96000004
[   35.837749]  imx8mq_interconnect imx_interconnect imx8m_ddrc caam secvio error governor_userspace imx_bus snd_soc_fsl_sai crct10dif_ce ax88179_178a imx_sdma snd_i2smic_rpi(O) fuse
[   35.840608]   EC = 0x25: DABT (current EL), IL = 32 bits
[   35.843616] CPU: 3 PID: 510 Comm: insmod Tainted: G        W  O      5.15.32 #1
[   35.843622] Hardware name: Google i.MX8MQ Phanbell (DT)
[   35.843625] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   35.843631] pc : spi_start+0xa4/0x1b0 [nrc]
[   35.848978]   SET = 0, FnV = 0
[   35.851993] lr : spi_start+0x94/0x1b0 [nrc]
[   35.855166]   EA = 0, S1PTW = 0
[   35.860022] sp : ffff80000b1538a0
[   35.860024] x29: ffff80000b1538a0 x28: 0000000000000013 x27: 0000000000000100
[   35.860033] x26: ffff8000013cfec0 x25: ffff800008133d70 x24: 0000000000000027
[   35.860041] x23: 0000000000000033 x22: 0000000000000000 x21: ffff8000013d1cc0
[   35.860051] x20: ffff000005972a00
[   35.862952]   FSC = 0x04: level 0 translation fault
[   35.866755]  x19: ffff000005972a90 x18: 0000000000000020
[   35.866762] x17: 5300737265766972 x16: 643d4d4554535953 x15: 00000002e8c8ae48
[   35.866771] x14: 00000000000003bc x13: 0000000000000001 x12: 0000000000000000
[   35.866779] x11: 0000000000000000
[   35.869759] Data abort info:
[   35.876697]  x10: 00000000000003c6 x9 : 0000000000000000
[   35.876703] x8 : ffff00003fd71f80 x7 : 0000000000000000 x6 : 0000000000000000
[   35.876711] x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000362f0000
[   35.876719] x2 : 0000000000200003 x1 : 0000000000000003 x0 : 0000000000000000
[   35.883181]   ISV = 0, ISS = 0x00000004

[   35.889943] Call trace:
[   35.889946]  spi_start+0xa4/0x1b0 [nrc]
[   35.895567]   CM = 0, WnR = 0
[   35.908045]  nrc_hif_init+0xb4/0xd0 [nrc]
[   35.908066] imx-sdma 30bd0000.dma-controller: All bds consumed,restart now.
[   35.908084]  nrc_platform_probe+0x5c/0x120 [nrc]
[   35.911173] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000454c6000
[   35.927127]  platform_probe+0x6c/0xe0
[   35.927138]  really_probe.part.0+0x9c/0x310
[   35.927144]  __driver_probe_device+0x98/0x150
[   35.932456] [0000000000000078] pgd=0000000000000000
[   35.939752]  driver_probe_device+0xc8/0x160
[   35.939758]  __driver_attach+0xfc/0x190
[   35.939765]  bus_for_each_dev+0x70/0xd0
[   35.945005] , p4d=0000000000000000
[   35.951942]  driver_attach+0x28/0x40
[   35.951948]  bus_add_driver+0x108/0x1f0
[   35.951953]  driver_register+0x7c/0x130
[   35.951959]  __platform_driver_register+0x2c/0x40

[   35.959188]  nrc_init+0x5c/0x1000 [nrc]
[   36.141919]  do_one_initcall+0x50/0x1b0
[   36.145757]  do_init_module+0x44/0x240
[   36.149509]  load_module+0x1f70/0x2680
[   36.153260]  __do_sys_finit_module+0xb8/0x100
[   36.157618]  __arm64_sys_finit_module+0x24/0x30
[   36.162150]  invoke_syscall+0x48/0x120
[   36.165900]  el0_svc_common.constprop.0+0xcc/0xf0
[   36.170606]  do_el0_svc+0x28/0x90
[   36.173921]  el0_svc+0x20/0x60
[   36.176978]  el0t_64_sync_handler+0x1a8/0x1b0
[   36.181334]  el0t_64_sync+0x1a0/0x1a4
[   36.184999] Code: b9000abf b9414a60 7100001f 540003ac (b94316c0) 
[   36.191093] ---[ end trace f940fce3dceca63d ]---
[   36.195708] Internal error: Oops: 96000004 [#2] PREEMPT SMP
[   36.201284] Modules linked in: nrc(O+) fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine rng_core authenc libdes imx8mq_interconnect imx_interconnect imx8m_ddrc caam secvio error governor_userspace imx_bus snd_soc_fsl_sai crct10dif_ce ax88179_178a imx_sdma snd_i2smic_rpi(O) fuse
[   36.228360] CPU: 1 PID: 513 Comm: nrc-spi-rx Tainted: G      D W  O      5.15.32 #1
[   36.236017] Hardware name: Google i.MX8MQ Phanbell (DT)
[   36.241241] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   36.248202] pc : spi_rx_thread+0x7c/0x950 [nrc]
[   36.252788] lr : spi_rx_thread+0x54/0x950 [nrc]
[   36.257354] sp : ffff80000b2a3db0
[   36.260666] x29: ffff80000b2a3db0 x28: 0000000000000000 x27: 0000000000000000
[   36.267806] x26: 0000000000000000 x25: ffff8000013d1cc0 x24: ffff00000937a020
[   36.274944] x23: ffff8000013bd2a0 x22: ffff80000b1537e8 x21: ffff0000080f2940
[   36.282083] x20: ffff000005972a00 x19: ffff000005972a90 x18: 0000000000000000
[   36.289222] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[   36.296361] x14: 00000000000003ae x13: 0000000000000001 x12: 0000000000000000
[   36.303501] x11: 0000000000000001 x10: 0000000000000950 x9 : ffff80000b2a3da0
[   36.310639] x8 : ffff0000080f32f0 x7 : ffff00003fd71f00 x6 : 0000000000000000
[   36.317778] x5 : 00000000410fd030 x4 : 0000000000000000 x3 : ffff0000080f3024
[   36.324917] x2 : 0000000000000a20 x1 : 0000000000000000 x0 : 0000000000000000
[   36.332056] Call trace:
[   36.334502]  spi_rx_thread+0x7c/0x950 [nrc]
[   36.338721]  kthread+0x154/0x160
[   36.341954]  ret_from_fork+0x10/0x20
[   36.345535] Code: 35000780 531e7421 52814402 d2800000 (f9403f56) 
[   36.351629] ---[ end trace f940fce3dceca63e ]---
[   62.429477] cfg80211: failed to load regulatory.db

Why the driver accessed SPI device simultaneously in two different ways?

I started to port the driver to 5.8.6 kernel running on RK3399 platform. Trying to compile it and getting running, I have found a strange thing. The driver makes a copy of the structure describing the underlying SPI device:

memcpy(&priv->spi_r, spi, sizeof(*spi));

And then uses both the copy and the original structure to communicate with the device. For example:
status = spi_sync_transfer(spi_r, &xfer[1], 3);

and
status = spi_sync_transfer(spi, &xfer[4], 1);

or

status = spi_sync_transfer(spi_r, &xfer[1], 1);

and
status = spi_sync_transfer(spi, &xfer[2], 1);

The above is used only in the "alternated mode", but anyway it looks a little annoying.
Doesn't it lead to the inconsistent state of the SPI hardware?

Can't build driver on Pi4 64bit

I'm trying to build the driver from here: /nrc7292_sw_pkg/package/host/src/nrc (I just checked out from git yesterday).

My kernel version is Linux raspberrypi4 5.15.67-v8+ #1584 SMP PREEMPT Mon Sep 12 13:06:37 BST 2022 aarch64 GNU/Linux

It gets pretty far but gets stuck when it can't find some functions such as _raw_spin_unlock. I see they get created in the nrc.mod.c during the build though. So far I haven't found much about this while searching other than another forum saying it might be an RPI4 kernel bug. Any idea what might cause this?

  LD [M]  /home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/nrc.o
  MODPOST /home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/Module.symvers
ERROR: modpost: "_raw_spin_unlock" [/home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/nrc.ko] undefined!
ERROR: modpost: "__const_udelay" [/home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/nrc.ko] undefined!
ERROR: modpost: "__rcu_read_unlock" [/home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/nrc.ko] undefined!
ERROR: modpost: "cpu_hwcap_keys" [/home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/nrc.ko] undefined!
ERROR: modpost: "__rcu_read_lock" [/home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/nrc.ko] undefined!
ERROR: modpost: "arm64_const_caps_ready" [/home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/nrc.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:133: /home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/Module.symvers] Error 1
make[2]: *** Deleting file '/home/pi/work/newah/nrc7292_sw_pkg/package/host/src/nrc/Module.symvers'
make[1]: *** [Makefile:1814: modules] Error 2
make[1]: Leaving directory '/home/pi/linux-dc0f752f772617d43912718917bace425753e80c'
make: *** [Makefile:61: modules] Error 2

After reset, it is not clear when it is safe to load the driver

The driver crashes if the NRC7292 is unresponsive (as reported in #7 ). However, after reset (enforced by the reset pin of the module) it takes some significant time until the module is ready. Is there any way to detect reliably when the module is ready?
Waiting always 15 seconds after deasserting reset is suboptimal.

Porting to kernel 5.4.x or 5.8.x

I have tried to port your driver to Orange Pi RK3399, running Armbian with kernel 5.8.6.
Unfortunately, my efforts failed and it was difficult to isolate the cause of the problem.
It can be the problem with the hardware, the problem with newer kernel, or the problem with migration from 32-bit to 64-bit platform.

To limit possible error causes I have split porting into a few steps. The first one was to port the driver to the newer kernel (5.x) running on the same HW, still in 32-bits.

Therefore, I have started with porting the driver to newer kernel on Raspberry Pi3. There is Raspbian version running the 5.4.51-v7+ kernel.
I had to introduce a few changes, that can be identified by that compare. Quite a lot of them are just the "printk" calls added do detect problems faced on different stages of debugging. In fact there were two changes needed: the modification of the nrc_mac_cancel_roc function, moving the .policy field from genl_opd to genl_family.

I also needed to use UART for debugging (connection via SSH didn't allow to capture all crash messages), so I had to modify the dt overlay, disabling the changes done to UART (fragments 3 and 4):

/*
 * Device Tree overlay for Newracom
 */

/dts-v1/;
/plugin/;

/* this includes disabling SPI and pi3-disable-bt overlay
*/

/{
        compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

        fragment@0 {
                target = <&spi0>;
                __overlay__ {
                        status = "okay";

                        spidev@0{
                                status = "disabled";
                        };

                        spidev@1{
                                status = "disabled";
                        };
                };
        };

        fragment@1 {
                target = <&uart1>;
                __overlay__ {
                        status = "disabled";
                };
        };

        fragment@2 {
                target = <&uart0>;
                __overlay__ {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins>;
                        status = "okay";
                };
        };
/*
        fragment@3 {
                target = <&uart0_pins>;
                __overlay__ {
                        brcm,pins;
                        brcm,function;
                        brcm,pull;
                };
        };

        fragment@4 {
                target-path = "/aliases";
                __overlay__ {
                        serial0 = "/soc/uart@7e201000";
                        serial1 = "/soc/uart@7e215040";
                };
        };
*/
};

At the end of boot/config.txt I had to add:

[all]
#dtoverlay=vc4-fkms-v3d
enable_uart=1
dtoverlay=pi3-disable-bt
dtoverlay=newracom-overlay

After that I was able to load the driver, and wlan0 was visible. However dmesg reported certain errors:

[  115.796487] nrc: loading out-of-tree module taints kernel.
[  115.805515] size*hdev: 40 , hdev: b2968400, hdev+1:b2968440
[  115.805525] WZab cspi_init hdev=b2968400, priv=b2968440,
[  115.805531] WZab cspi_init priv=b2968440, hdev=b2968400,
[  115.805671] WZab cspi_init spi=b2969400,
[  115.805704] WZab probe hdev=b2968400, priv=b2968440, spi=b2969400
[  115.806013] WZab spi_start dev=b2968400, priv=b2968440, spi=b2969400
[  115.838258] start FW 297
[  116.269369] end FW
[  119.318061] ------------[ cut here ]------------
[  119.318404] WARNING: CPU: 0 PID: 71 at net/wireless/core.c:867 wiphy_register+0x968/0xb94 [cfg80211]
[  119.318414] Modules linked in: nrc(O) mac80211 libarc4 8021q garp stp llc brcmfmac brcmutil sha256_generic libsha256 cfg80211 rfkill raspberrypi_hwmo6
[  119.318605] CPU: 0 PID: 71 Comm: kworker/0:2 Tainted: G         C O      5.4.51-v7+ #1333
[  119.318610] Hardware name: BCM2835
[  119.318712] Workqueue: events nrc_check_start [nrc]
[  119.318718] Backtrace: 
[  119.318742] [<8010d480>] (dump_backtrace) from [<8010d778>] (show_stack+0x20/0x24)
[  119.318754]  r6:b5e94000 r5:00000000 r4:80d95cb8 r3:10aae77c
[  119.318771] [<8010d758>] (show_stack) from [<808cdbe4>] (dump_stack+0xe0/0x124)
[  119.318787] [<808cdb04>] (dump_stack) from [<8012002c>] (__warn+0xec/0x104)
[  119.318801]  r8:00000363 r7:00000009 r6:7f29b8a0 r5:00000000 r4:00000000 r3:10aae77c
[  119.318815] [<8011ff40>] (__warn) from [<801200fc>] (warn_slowpath_fmt+0xb8/0xc0)
[  119.318828]  r9:7f29b8a0 r8:00000363 r7:7f237978 r6:00000009 r5:00000000 r4:80d04f48
[  119.319082] [<80120048>] (warn_slowpath_fmt) from [<7f237978>] (wiphy_register+0x968/0xb94 [cfg80211])
[  119.319097]  r9:00000001 r8:0000001e r7:7f2af540 r6:b2054298 r5:80d04f48 r4:b20541c0
[  119.319627] [<7f237010>] (wiphy_register [cfg80211]) from [<7f32d54c>] (ieee80211_register_hw+0x87c/0xc4c [mac80211])
[  119.319641]  r10:00000035 r9:80d04f48 r8:00000000 r7:b20554c0 r6:00000004 r5:000000d4
[  119.319647]  r4:b20544c0
[  119.319963] [<7f32ccd0>] (ieee80211_register_hw [mac80211]) from [<7f3e2240>] (nrc_register_hw+0x4f4/0x61c [nrc])
[  119.319976]  r10:01011162 r9:00000000 r8:00000001 r7:00000000 r6:b20566e0 r5:b20556e0
[  119.319982]  r4:b20544c0
[  119.320136] [<7f3e1d4c>] (nrc_register_hw [nrc]) from [<7f3e3a90>] (nrc_check_start+0x3c4/0x63c [nrc])
[  119.320150]  r10:7f3f5728 r9:7f3f9710 r8:b20556e0 r7:00000002 r6:b2055968 r5:b2056968
[  119.320155]  r4:b2021d48
[  119.320244] [<7f3e36cc>] (nrc_check_start [nrc]) from [<8013c2e4>] (process_one_work+0x17c/0x4b4)
[  119.320258]  r10:00000000 r9:00000000 r8:00000000 r7:b6b2f500 r6:b6b2c340 r5:b5d8b880
[  119.320263]  r4:b2056968
[  119.320279] [<8013c168>] (process_one_work) from [<8013cb4c>] (worker_thread+0x54/0x5b4)
[  119.320292]  r10:b5d8b880 r9:b5e94038 r8:80d03d00 r7:b6b2c358 r6:00000008 r5:b5d8b894
[  119.320298]  r4:b6b2c340
[  119.320313] [<8013caf8>] (worker_thread) from [<80142f30>] (kthread+0x13c/0x168)
[  119.320327]  r10:b5d7a15c r9:b651fe74 r8:8013caf8 r7:b5d8b880 r6:00000000 r5:b5d8c740
[  119.320333]  r4:b5d7a140
[  119.320347] [<80142df4>] (kthread) from [<801010ac>] (ret_from_fork+0x14/0x28)
[  119.320354] Exception stack(0xb5e95fb0 to 0xb5e95ff8)
[  119.320365] 5fa0:                                     00000000 00000000 00000000 00000000
[  119.320377] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  119.320387] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  119.320401]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:80142df4
[  119.320408]  r4:b5d8c740 r3:80104648
[  119.320417] ---[ end trace d8afe13983672bd7 ]---
[  119.321029] failed to register hw
[  119.321046] ------------[ cut here ]------------
[  119.321072] WARNING: CPU: 0 PID: 71 at lib/refcount.c:190 refcount_sub_and_test_checked+0xc0/0xc4
[  119.321082] refcount_t: underflow; use-after-free.
[  119.321090] Modules linked in: nrc(O) mac80211 libarc4 8021q garp stp llc brcmfmac brcmutil sha256_generic libsha256 cfg80211 rfkill raspberrypi_hwmo6
[  119.321267] CPU: 0 PID: 71 Comm: kworker/0:2 Tainted: G        WC O      5.4.51-v7+ #1333
[  119.321272] Hardware name: BCM2835
[  119.321357] Workqueue: events nrc_check_start [nrc]
[  119.321363] Backtrace: 
[  119.321381] [<8010d480>] (dump_backtrace) from [<8010d778>] (show_stack+0x20/0x24)
[  119.321392]  r6:b5e94000 r5:00000000 r4:80d95cb8 r3:10aae77c
[  119.321408] [<8010d758>] (show_stack) from [<808cdbe4>] (dump_stack+0xe0/0x124)
[  119.321424] [<808cdb04>] (dump_stack) from [<8012002c>] (__warn+0xec/0x104)
[  119.321437]  r8:000000be r7:00000009 r6:80ad704c r5:00000000 r4:b5e95dcc r3:10aae77c
[  119.321451] [<8011ff40>] (__warn) from [<801200c8>] (warn_slowpath_fmt+0x84/0xc0)
[  119.321464]  r9:80ad704c r8:000000be r7:80572700 r6:00000009 r5:80ad70b0 r4:80d04f48
[  119.321479] [<80120048>] (warn_slowpath_fmt) from [<80572700>] (refcount_sub_and_test_checked+0xc0/0xc4)
[  119.321492]  r9:7f3f9710 r8:b20556e0 r7:00000002 r6:b2055668 r5:b20544c0 r4:00000000
[  119.321506] [<80572640>] (refcount_sub_and_test_checked) from [<8057271c>] (refcount_dec_and_test_checked+0x18/0x1c)
[  119.321513]  r4:b20542a8 r3:00000001
[  119.321527] [<80572704>] (refcount_dec_and_test_checked) from [<808d36c0>] (kobject_put+0x2c/0xdc)
[  119.321542] [<808d3694>] (kobject_put) from [<80621dc0>] (put_device+0x20/0x24)
[  119.321551]  r6:b2055668 r5:b20544c0 r4:00000004
[  119.321798] [<80621da0>] (put_device) from [<7f2362c8>] (wiphy_free+0x1c/0x20 [cfg80211])
[  119.322266] [<7f2362ac>] (wiphy_free [cfg80211]) from [<7f32cac4>] (ieee80211_free_hw+0x80/0xa8 [mac80211])
[  119.322568] [<7f32ca44>] (ieee80211_free_hw [mac80211]) from [<7f3e1d40>] (nrc_free_hw+0x20/0x2c [nrc])
[  119.322579]  r6:b2055968 r5:b2056968 r4:b20556e0 r3:10aae77c
[  119.322730] [<7f3e1d20>] (nrc_free_hw [nrc]) from [<7f3e3b04>] (nrc_check_start+0x438/0x63c [nrc])
[  119.322738]  r5:b2056968 r4:b2021d48
[  119.322823] [<7f3e36cc>] (nrc_check_start [nrc]) from [<8013c2e4>] (process_one_work+0x17c/0x4b4)
[  119.322836]  r10:00000000 r9:00000000 r8:00000000 r7:b6b2f500 r6:b6b2c340 r5:b5d8b880
[  119.322842]  r4:b2056968
[  119.322858] [<8013c168>] (process_one_work) from [<8013cb4c>] (worker_thread+0x54/0x5b4)
[  119.322872]  r10:b5d8b880 r9:b5e94038 r8:80d03d00 r7:b6b2c358 r6:00000008 r5:b5d8b894
[  119.322877]  r4:b6b2c340
[  119.322892] [<8013caf8>] (worker_thread) from [<80142f30>] (kthread+0x13c/0x168)
[  119.322906]  r10:b5d7a15c r9:b651fe74 r8:8013caf8 r7:b5d8b880 r6:00000000 r5:b5d8c740
[  119.322911]  r4:b5d7a140
[  119.322925] [<80142df4>] (kthread) from [<801010ac>] (ret_from_fork+0x14/0x28)
[  119.322932] Exception stack(0xb5e95fb0 to 0xb5e95ff8)
[  119.322942] 5fa0:                                     00000000 00000000 00000000 00000000
[  119.322954] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  119.322964] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  119.322978]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:80142df4
[  119.322985]  r4:b5d8c740 r3:80104648
[  119.322994] ---[ end trace d8afe13983672bd8 ]---

and after a few minutes system crashed in an absolutely unrelated procedure.

[  164.400096] 8<--- cut here ---
[  164.409140] Unable to handle kernel NULL pointer dereference at virtual address 00000a18
[  164.423397] pgd = f8fa9218
[  164.432176] [00000a18] *pgd=00000000
[  164.441759] Internal error: Oops: 17 [#1] SMP ARM
[  164.452543] Modules linked in: nrc(O) mac80211 libarc4 8021q garp stp llc brcmfmac brcmutil sha256_generic libsha256 cfg80211 rfkill raspberrypi_hwmo6
[  164.514170] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        WC O      5.4.51-v7+ #1333
[  164.529448] Hardware name: BCM2835
[  164.540212] PC is at assign_and_init_hc+0x40/0x67c
[  164.552452] LR is at dwc_otg_hcd_select_transactions+0x1f8/0x2d8
[  164.565929] pc : [<806ca8fc>]    lr : [<806cd460>]    psr: 20000193
[  164.579714] sp : 80d01bc0  ip : 80d01c10  fp : 80d01c0c
[  164.592546] r10: 80d04f48  r9 : b2ade5c0  r8 : b5e6001c
[  164.605393] r7 : b5e60000  r6 : b4e08700  r5 : 00000a00  r4 : b5e60000
[  164.619536] r3 : 10aae77c  r2 : b664d600  r1 : b4e08700  r0 : b5e60000
[  164.633589] Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  164.648359] Control: 10c5383d  Table: 32bc406a  DAC: 00000055
[  164.661602] Process swapper/0 (pid: 0, stack limit = 0x6ed72037)
[  164.675152] Stack: (0x80d01bc0 to 0x80d02000)
[  164.687006] 1bc0: 802dcbd0 802dabc8 00000000 8040003e b2ade300 80d04f48 00000000 10aae77c
[  164.702761] 1be0: 00000001 b5e60000 b4e08728 b5e60014 80d74f00 b5e6001c 00000008 80d750df
[  164.718529] 1c00: 80d01c4c 80d01c10 806cd460 806ca8c8 b5e60038 00000002 b2ade300 80d750aa
[  164.734372] 1c20: 80d01c4c b5e60000 b657f480 b4e08700 00000001 00000002 b2ade300 b2adebc0
[  164.750231] 1c40: 80d01c6c 80d01c50 806d0718 806cd274 00000002 b5e60000 b657f480 bb8005c8
[  164.766129] 1c60: 80d01c94 80d01c70 806d0b9c 806d05cc 00000002 b657f480 b2adebc0 bb8005c8
[  164.782021] 1c80: b5e60000 00000002 80d01cb4 80d01c98 806d0cb4 806d0b08 b2adebc0 b657f480
[  164.797961] 1ca0: bb8005c0 b5e60000 80d01cf4 80d01cb8 806d19f4 806d0c5c 00000002 80144ad0
[  164.813914] 1cc0: 80dd3268 00000000 136a77f7 00000000 b5e60000 00000002 00000002 bb8005c0
[  164.829961] 1ce0: b657f480 b2adebc0 80d01d44 80d01cf8 806d300c 806d1750 b5e60000 b5e6001c
[  164.846099] 1d00: 80d01d4c 80d01d10 00000000 bb8005cc 00000023 00000002 00000000 00000006
[  164.862320] 1d20: 00000040 b5e60000 00000000 02000008 f301080e 00000002 80d01d64 80d01d48
[  164.878610] 1d40: 806d3368 806d2bf0 b5e60000 b5daa000 80d74f00 00000001 80d01d94 80d01d68
[  164.894957] 1d60: 806d3690 806d32c0 806cf9d8 b657c740 b6465368 00000038 00000000 00000000
[  164.911267] 1d80: 80d01e00 80d04f68 80d01da4 80d01d98 806cf9f4 806d33b4 80d01db4 80d01da8
[  164.927587] 1da0: 8069e334 806cf9e4 80d01dfc 80d01db8 80181af8 8069e30c 80616568 808cafcc
[  164.943877] 1dc0: b6465300 80d9b800 80d9b818 80d00038 00000000 80d04f48 b6465368 b6465300
[  164.960225] 1de0: 00000001 b645e000 80d00000 b73ff900 80d01e24 80d01e00 80181ca4 80181a44
[  164.976605] 1e00: 00000000 10aae77c 80d01e24 b6465300 b6465368 00000000 80d01e44 80d01e28
[  164.993039] 1e20: 80181d48 80181c74 0000a745 b6465300 00000000 00000000 80d01e5c 80d01e48
[  165.009506] 1e40: 801865bc 80181d00 801864fc 80d05984 80d01e6c 80d01e60 80180ab0 80186508
[  165.025927] 1e60: 80d01e84 80d01e70 8058e7e8 80180a88 8058e7ac 80ca42e4 80d01e94 80d01e88
[  165.042275] 1e80: 80180ab0 8058e7b8 80d01ebc 80d01e98 801811fc 80180a88 80d01ed8 00000000
[  165.058672] 1ea0: 60000013 ffffffff 80d01f0c 80d9b18d 80d01ed4 80d01ec0 80102228 8018119c
[  165.075154] 1ec0: 10aae77c 80109b98 80d01f34 80d01ed8 80101a3c 801021d4 80109b94 00000000
[  165.091705] 1ee0: 60000093 8011a520 80d04f68 80d00000 80d04fb0 00000001 80d9b18d 80c69a40
[  165.108313] 1f00: b73ff900 80d01f34 80d0535c 80d01f28 00000000 80109b98 60000013 ffffffff
[  165.124994] 1f20: 80109b94 00000000 80d01f44 80d01f38 808eea44 80109b70 80d01f6c 80d01f48
[  165.141723] 1f40: 80153bc0 808eea1c 80d01f50 000000ce 80dac618 80dac5c0 80c69a40 00000000
[  165.158520] 1f60: 80d01f7c 80d01f70 80153f20 80153ae0 80d01f94 80d01f80 808e7e68 80153f04
[  165.175312] 1f80: 80c99260 80d04f48 80d01fa4 80d01f98 80c00bd8 808e7db8 80d01ff4 80d01fa8
[  165.192091] 1fa0: 80c010a8 80c00bcc ffffffff ffffffff 00000000 80c007b0 00000000 80c69a40
[  165.208878] 1fc0: 10afe34f 00000000 00000000 80c00330 00000055 10c0387d 00000c42 2eff8e00
[  165.225713] 1fe0: 410fd034 10c5387d 00000000 80d01ff8 00000000 80c00be8 00000000 00000000
[  165.242578] Backtrace: 
[  165.253677] [<806ca8bc>] (assign_and_init_hc) from [<806cd460>] (dwc_otg_hcd_select_transactions+0x1f8/0x2d8)
[  165.272414]  r10:80d750df r9:00000008 r8:b5e6001c r7:80d74f00 r6:b5e60014 r5:b4e08728
[  165.289115]  r4:b5e60000
[  165.300496] [<806cd268>] (dwc_otg_hcd_select_transactions) from [<806d0718>] (release_channel+0x158/0x1fc)
[  165.319260]  r10:b2adebc0 r9:b2ade300 r8:00000002 r7:00000001 r6:b4e08700 r5:b657f480
[  165.335885]  r4:b5e60000
[  165.346775] [<806d05c0>] (release_channel) from [<806d0b9c>] (halt_channel+0xa0/0x154)
[  165.362870]  r6:bb8005c8 r5:b657f480 r4:b5e60000 r3:00000002
[  165.376695] [<806d0afc>] (halt_channel) from [<806d0cb4>] (complete_non_periodic_xfer+0x64/0x84)
[  165.393796]  r8:00000002 r7:b5e60000 r6:bb8005c8 r5:b2adebc0 r4:b657f480 r3:00000002
[  165.409928] [<806d0c50>] (complete_non_periodic_xfer) from [<806d19f4>] (handle_hc_xfercomp_intr+0x2b0/0x468)
[  165.428397]  r7:b5e60000 r6:bb8005c0 r5:b657f480 r4:b2adebc0
[  165.442577] [<806d1744>] (handle_hc_xfercomp_intr) from [<806d300c>] (dwc_otg_hcd_handle_hc_n_intr+0x428/0x6d0)
[  165.461397]  r10:b2adebc0 r9:b657f480 r8:bb8005c0 r7:00000002 r6:00000002 r5:b5e60000
[  165.478046]  r4:00000000
[  165.489318] [<806d2be4>] (dwc_otg_hcd_handle_hc_n_intr) from [<806d3368>] (dwc_otg_hcd_handle_hc_intr+0xb4/0xf4)
[  165.508588]  r10:00000002 r9:f301080e r8:02000008 r7:00000000 r6:b5e60000 r5:00000040
[  165.525517]  r4:00000006
[  165.537029] [<806d32b4>] (dwc_otg_hcd_handle_hc_intr) from [<806d3690>] (dwc_otg_hcd_handle_intr+0x2e8/0x388)
[  165.556158]  r7:00000001 r6:80d74f00 r5:b5daa000 r4:b5e60000
[  165.571076] [<806d33a8>] (dwc_otg_hcd_handle_intr) from [<806cf9f4>] (dwc_otg_hcd_irq+0x1c/0x28)
[  165.589182]  r10:80d04f68 r9:80d01e00 r8:00000000 r7:00000000 r6:00000038 r5:b6465368
[  165.606381]  r4:b657c740 r3:806cf9d8
[  165.619242] [<806cf9d8>] (dwc_otg_hcd_irq) from [<8069e334>] (usb_hcd_irq+0x34/0x48)
[  165.636409] [<8069e300>] (usb_hcd_irq) from [<80181af8>] (__handle_irq_event_percpu+0xc0/0x230)
[  165.654617] [<80181a38>] (__handle_irq_event_percpu) from [<80181ca4>] (handle_irq_event_percpu+0x3c/0x8c)
[  165.673930]  r10:b73ff900 r9:80d00000 r8:b645e000 r7:00000001 r6:b6465300 r5:b6465368
[  165.691476]  r4:80d04f48
[  165.703663] [<80181c68>] (handle_irq_event_percpu) from [<80181d48>] (handle_irq_event+0x54/0x78)
[  165.722365]  r6:00000000 r5:b6465368 r4:b6465300
[  165.736794] [<80181cf4>] (handle_irq_event) from [<801865bc>] (handle_level_irq+0xc0/0x16c)
[  165.755049]  r6:00000000 r5:00000000 r4:b6465300 r3:0000a745
[  165.770631] [<801864fc>] (handle_level_irq) from [<80180ab0>] (generic_handle_irq+0x34/0x44)
[  165.789101]  r4:80d05984 r3:801864fc
[  165.802689] [<80180a7c>] (generic_handle_irq) from [<8058e7e8>] (bcm2836_chained_handle_irq+0x3c/0x50)
[  165.822183] [<8058e7ac>] (bcm2836_chained_handle_irq) from [<80180ab0>] (generic_handle_irq+0x34/0x44)
[  165.841739]  r4:80ca42e4 r3:8058e7ac
[  165.855511] [<80180a7c>] (generic_handle_irq) from [<801811fc>] (__handle_domain_irq+0x6c/0xc4)
[  165.874572] [<80181190>] (__handle_domain_irq) from [<80102228>] (bcm2836_arm_irqchip_handle_irq+0x60/0xa4)
[  165.894779]  r8:80d9b18d r7:80d01f0c r6:ffffffff r5:60000013 r4:00000000 r3:80d01ed8
[  165.913013] [<801021c8>] (bcm2836_arm_irqchip_handle_irq) from [<80101a3c>] (__irq_svc+0x5c/0x7c)
[  165.932448] Exception stack(0x80d01ed8 to 0x80d01f20)
[  165.948035] 1ec0:                                                       80109b94 00000000
[  165.966861] 1ee0: 60000093 8011a520 80d04f68 80d00000 80d04fb0 00000001 80d9b18d 80c69a40
[  165.985705] 1f00: b73ff900 80d01f34 80d0535c 80d01f28 00000000 80109b98 60000013 ffffffff
[  166.004569]  r4:80109b98 r3:10aae77c
[  166.018809] [<80109b64>] (arch_cpu_idle) from [<808eea44>] (default_idle_call+0x34/0x48)
[  166.037683] [<808eea10>] (default_idle_call) from [<80153bc0>] (do_idle+0xec/0x170)
[  166.056168] [<80153ad4>] (do_idle) from [<80153f20>] (cpu_startup_entry+0x28/0x2c)
[  166.074609]  r8:00000000 r7:80c69a40 r6:80dac5c0 r5:80dac618 r4:000000ce r3:80d01f50
[  166.093272] [<80153ef8>] (cpu_startup_entry) from [<808e7e68>] (rest_init+0xbc/0xc0)
[  166.111949] [<808e7dac>] (rest_init) from [<80c00bd8>] (arch_call_rest_init+0x18/0x1c)
[  166.130774]  r4:80d04f48 r3:80c99260
[  166.145187] [<80c00bc0>] (arch_call_rest_init) from [<80c010a8>] (start_kernel+0x4cc/0x500)
[  166.164591] [<80c00bdc>] (start_kernel) from [<00000000>] (0x0)
[  166.181471] Code: e5995018 e1a07000 e5922018 e50b3030 (e5953018) 
[  166.198429] ---[ end trace d8afe13983672bd9 ]---
[  166.213776] Kernel panic - not syncing: Fatal exception in interrupt
[  166.230894] CPU3: stopping
[  166.244185] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G      D WC O      5.4.51-v7+ #1333
[  166.262758] Hardware name: BCM2835
[  166.276648] Backtrace: 
[  166.289530] [<8010d480>] (dump_backtrace) from [<8010d778>] (show_stack+0x20/0x24)
[  166.307658]  r6:b653c000 r5:00000000 r4:80d95cb8 r3:10aae77c
[  166.323800] [<8010d758>] (show_stack) from [<808cdbe4>] (dump_stack+0xe0/0x124)
[  166.341595] [<808cdb04>] (dump_stack) from [<80110364>] (handle_IPI+0x334/0x3bc)
[  166.359350]  r8:80da6a80 r7:00000000 r6:00000003 r5:80ca42e4 r4:80dac928 r3:10aae77c
[  166.377424] [<80110030>] (handle_IPI) from [<80102268>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[  166.396685]  r10:00000000 r9:b653c000 r8:80d9b18d r7:b653df6c r6:ffffffff r5:60000013
[  166.414710]  r4:00000003
[  166.427307] [<801021c8>] (bcm2836_arm_irqchip_handle_irq) from [<80101a3c>] (__irq_svc+0x5c/0x7c)
[  166.446395] Exception stack(0xb653df38 to 0xb653df80)
[  166.461501] df20:                                                       80109b94 00000000
[  166.479826] df40: 60000093 8011a520 80d04f68 b653c000 80d04fb0 00000008 80d9b18d 410fd034
[  166.498069] df60: 00000000 b653df94 80d0535c b653df88 00000000 80109b98 60000013 ffffffff
[  166.516218]  r4:80109b98 r3:10aae77c
[  166.529634] [<80109b64>] (arch_cpu_idle) from [<808eea44>] (default_idle_call+0x34/0x48)
[  166.547664] [<808eea10>] (default_idle_call) from [<80153bc0>] (do_idle+0xec/0x170)
[  166.565251] [<80153ad4>] (do_idle) from [<80153f20>] (cpu_startup_entry+0x28/0x2c)
[  166.582705]  r8:0000406a r7:80dac938 r6:10c0387d r5:00000003 r4:0000008a r3:10aae77c
[  166.600341] [<80153ef8>] (cpu_startup_entry) from [<8010fdbc>] (secondary_start_kernel+0x130/0x13c)
[  166.619307] [<8010fc8c>] (secondary_start_kernel) from [<001027ac>] (0x1027ac)
[  166.636351]  r5:00000055 r4:3652806a
[  166.649653] CPU2: stopping
[  166.661950] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G      D WC O      5.4.51-v7+ #1333
[  166.679536] Hardware name: BCM2835
[  166.692432] Backtrace: 
[  166.704295] [<8010d480>] (dump_backtrace) from [<8010d778>] (show_stack+0x20/0x24)
[  166.721344]  r6:b653a000 r5:00000000 r4:80d95cb8 r3:10aae77c
[  166.736435] [<8010d758>] (show_stack) from [<808cdbe4>] (dump_stack+0xe0/0x124)
[  166.753149] [<808cdb04>] (dump_stack) from [<80110364>] (handle_IPI+0x334/0x3bc)
[  166.769895]  r8:80da6a80 r7:00000000 r6:00000002 r5:80ca42e4 r4:80dac928 r3:10aae77c
[  166.786966] [<80110030>] (handle_IPI) from [<80102268>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[  166.805281]  r10:00000000 r9:b653a000 r8:80d9b18d r7:b653bf6c r6:ffffffff r5:60000013
[  166.822471]  r4:00000002
[  166.834191] [<801021c8>] (bcm2836_arm_irqchip_handle_irq) from [<80101a3c>] (__irq_svc+0x5c/0x7c)
[  166.852363] Exception stack(0xb653bf38 to 0xb653bf80)
[  166.866602] bf20:                                                       80109b94 00000000
[  166.884061] bf40: 60000093 8011a520 80d04f68 b653a000 80d04fb0 00000004 80d9b18d 410fd034
[  166.901519] bf60: 00000000 b653bf94 80d0535c b653bf88 00000000 80109b98 60000013 ffffffff
[  166.918959]  r4:80109b98 r3:10aae77c
[  166.931681] [<80109b64>] (arch_cpu_idle) from [<808eea44>] (default_idle_call+0x34/0x48)
[  166.949041] [<808eea10>] (default_idle_call) from [<80153bc0>] (do_idle+0xec/0x170)
[  166.965943] [<80153ad4>] (do_idle) from [<80153f20>] (cpu_startup_entry+0x28/0x2c)
[  166.982752]  r8:0000406a r7:80dac938 r6:10c0387d r5:00000002 r4:0000008a r3:10aae77c
[  166.999743] [<80153ef8>] (cpu_startup_entry) from [<8010fdbc>] (secondary_start_kernel+0x130/0x13c)
[  167.018102] [<8010fc8c>] (secondary_start_kernel) from [<001027ac>] (0x1027ac)
[  167.034618]  r5:00000055 r4:3652806a
[  167.403550] SMP: failed to stop secondary CPUs
[  167.417120] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

There are two problems. The first one is - why the firmware download is not detected correctly. I have verified that hijacking UART has nothing to do with that. In Raspbian working with the old kernel the same modification of DT and config.txt does not lead to crash.
The second problem is why unsuccessful loading of the FW ends with incorrect handling of kobjects, which finally leads to memory corruption and delayed crash.

PV1 Headers

Hello Newracom,
I am currently testing the connection between two of your equipment. Everything is working fine but I would like to test the use of PV1 headers for a research project. You seem to indicate in a message that it is possible to make particular request concerning this mechanism.

Thank you for your inquiry.
PV1 MAC header was supported in SDK v1.1.0.
But WFA HaLow TG found a PV1 security ambiguity issue in IEEE 802.11ah standard and reported this issue to IEEE 802.11 WG.
And WFA HaLow TG also decided to postpone the PV1 interoperability test until the clarification of this issue.
Since then, PV1 was disabled in the SDK.
If you have any specific requirements for PV1 in your product, please let us know.

Is it possible to integrate the PV1 short header mechanism in the SDK 1.3.4 despite the security flaws found ? Would you have a solution to propose me ?
Thank you very much

MAC Frame preamble period

Dear Sir,

Is there any option to set the WiFi MAC Frame preamble period?
I searched the cli_app CMD and start.py, but I could not find any option to set the 'preamble period.'

STA cannot connect AP.

I met a issue with raspberry pi OS(2022-04-04).
MY AP ruan ok, bu STA run error.

pi@raspberrypi:~/nrc_pkg/script $ sudo ./start.py 0 0 US
Done.
Done.
------------------------------
Model            : 7292
STA Type         : STA
Country          : US
Security Mode    : OPEN
CAL. USE         : ON
AMPDU            : ON
CQM              : ON
Download FW      : uni_s1g.bin
TX Power         : 17
Power Save Type  : Always On
Listen Interval  : 1000
------------------------------
NRC STA setting for HaLow...
[*] Set Max CPU Clock on RPi
1400000
1400000
1400000
1400000
Done
[0] Clear
wpa_supplicant: no process found
hostapd: no process found
wireshark-gtk: no process found
rmmod: ERROR: Module nrc is not currently loaded
rm: cannot remove '/home/pi/nrc_pkg/script/conf/temp_self_config.conf': No such file or directory
rm: cannot remove '/home/pi/nrc_pkg/script/conf/temp_hostapd_config.conf': No such file or directory
[1] Copy
total 336
drwxr-xr-x 2 pi pi   4096 Jul 20 00:43 .
drwxr-xr-x 4 pi pi   4096 Jul 20 00:43 ..
-rwxr-xr-x 1 pi pi    362 May 25 01:40 copy
-rwxr-xr-x 1 pi pi    562 May 25 01:40 nrc7292_bd.dat
-rwxr-xr-x 1 pi pi 325628 May 25 01:40 nrc7292_cspi.bin
-rwxr-xr-x 1 root root 325628 May 25 01:40 /lib/firmware/uni_s1g.bin
====================================
 STA INTERFACE    : wlan0
 USE DHCP Client 
====================================
Config for STA is done!
IP and DHCP config done
[2] Set Module Parameters
[3] Loading module
sudo modprobe nrc  hifspeed=20000000 spi_bus_num=0 spi_cs_num=0 spi_gpio_irq=5 spi_polling_interval=0 fw_name=uni_s1g.bin power_save=0 auto_ba=1 listen_interval=1000 credit_ac_be=40
[4] Set tx power
family ID request : receive error
FAIL
family ID request : receive error
FAIL
[5] Set guard interval
family ID request : receive error
FAIL
[6] Set cal_use
family ID request : receive error
FAIL
[*] Start DHCPCD and DNSMASQ
[6] Start wpa_supplicant on wlan0
Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
[7] Connect and DHCP
Waiting for IP
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Waiting for IP
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Waiting for IP
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Waiting for IP
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Waiting for IP
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Waiting for IP
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Waiting for IP
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
Waiting for IP
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1

Error insmod nrc.ko to MTK Platform (-22)

Dear @newracom ,

As discussion #13, I also bump into the same error message when I were porting nrc driver into platform with mtk8365p1.
You mentioned that we'll need to disable “Device Drivers -> SPI support ->User mode SPI device driver support”.
(This configuration is exact the "CONFIG_SPI_SPIDEV" which I therefore set it as n)

Change

  1. Disable CONFIG_SPI_SPIDEV. Here's my config file about SPI:
CONFIG_SPI=y
CONFIG_SPI_MT65XX=y
CONFIG_SPI_SPIDEV=n
CONFIG_SPI_MASTER=y
  1. Disable spidev0. (just like the overlay mentioned in newracom-overlay.dts) Here's the DTS I defined:
&spi {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_spi>;
	/*mediatek,pad-select = <0>;*/
	status = "okay";

	spidev0: spi@0 {
		compatible = "nrc-cspi";
		reg = <1>;
		spi-max-frequency = <1000000>;
		status = "disabled";
	};
};
pinctrl_spi: spi@0 {
                pins_spi {
                        pinmux = <MT8168_PIN_26_SPI_CS__FUNC_SPI_CSB>,
                                 <MT8168_PIN_27_SPI_CK__FUNC_SPI_CLK>,
                                 <MT8168_PIN_28_SPI_MI__FUNC_SPI_MI>,
                                 <MT8168_PIN_29_SPI_MO__FUNC_SPI_MO>;
                        bias-disable;
                };
        };

Result

Then the following is the comparison of result between before and after we made the change.

Before

  1. There's spidev0.0 node in /dev/
$ ls /dev | grep spi
spidev0.0
$ cat /sys/class/spi_master/spi0/spi0.0/modalias
spi:spidev
  1. Error message when I insmod
$ insmod nrc.ko
[14132.397476] <1>-(1)[7070:insmod]mtk-spi 1100a000.spi: chipselect 0 already in use
[14132.398450] <1>-(1)[7070:insmod]failed to initialize hif
[14132.398481] <1>-(1)[7070:insmod]nrc80211: probe of nrc80211 failed with error -22

After

  1. There's spidev0.0 node in /dev/
$ ls /dev | grep spi
(empty)

And no spi0.0 in /sys/class/spi_master/spi0/

$ ls /sys/class/spi_master/spi0/
device/     of_node/    power/      statistics/ subsystem/  uevent
  1. Error message when I insmod
$ insmod /lib/modules/4.14.87/kernel/drivers/nrc/nrc.ko
[  519.969046] <0>-(0)[19493:insmod]------------[ cut here ]------------
[  519.969930] <0>-(0)[19493:insmod]WARNING: CPU: 0 PID: 19493 at /mnt/mtk/src/kernel/linux/v4.14/drivers/nrc/nrc-hif-cspi.c:309 _c_spi_read_regs+0x1fc/0x218 [nrc]
[  519.971754] <0>-(0)[19493:insmod]Modules linked in: nrc bf504000 bf525000 131072 49152 (+) wlan_mt7663_sdio bf282000   (null) 1949696 0 (O) btmtksdio bf23a000   (null) 241664 0 (O) [last unloaded: wlan_mt7663_sdio]
[  519.974261] <0>-(0)[19493:insmod]CPU: 0 PID: 19493 Comm: insmod Tainted: G        W  O    4.14.87 #1
[  519.975425] <0>-(0)[19493:insmod]Hardware name: Generic DT based system
[  519.976264] <0>-(0)[19493:insmod]Backtrace:
[  519.976815] <0>-(0)[19493:insmod][<c010eb98>] (dump_backtrace) from [<c010ef1c>] (show_stack+0x18/0x1c)
[  519.978002] <0>-(0)[19493:insmod] r7:00000135 r6:600a0013 r5:00000000 r4:c12b26bc
[  519.978952] <0>-(0)[19493:insmod][<c010ef04>] (show_stack) from [<c0c9e370>] (dump_stack+0x8c/0xa0)
[  519.980096] <0>-(0)[19493:insmod][<c0c9e2e4>] (dump_stack) from [<c012b940>] (__warn+0xe4/0x10c)
[  519.981206] <0>-(0)[19493:insmod] r7:00000135 r6:bf5113c0 r5:00000009 r4:bf518970
[  519.982154] <0>-(0)[19493:insmod][<c012b85c>] (__warn) from [<c012ba7c>] (warn_slowpath_null+0x28/0x30)
[  519.983342] <0>-(0)[19493:insmod] r7:dc387934 r6:00000010 r5:dd2df800 r4:dd2f8894
[  519.984324] <0>-(0)[19493:insmod][<c012ba54>] (warn_slowpath_null) from [<bf5113c0>] (_c_spi_read_regs+0x1fc/0x218 [nrc])
[  519.985708] <0>-(0)[19493:insmod]Backtrace aborted due to bad pc <bf5111c8>
[  519.986629] <0>-(0)[19493:insmod]---[ end trace 896fb840ec376b67 ]---
[  519.987478] <0>-(0)[19493:insmod]nrc-cspi: probe of spi0.0 failed with error -22
[  519.988580] <0>-(0)[19493:insmod]failed to initialize hif
[  519.989312] <0>-(0)[19493:insmod]nrc80211: probe of nrc80211 failed with error -22

p.s. I've change the pin of irq as 21 in nrc-init.c

int spi_gpio_irq = 21; // assign gpio 21 as spi_irq

Is there any other thing I'll need to double check or modify?

cannot insmod nrc module

Dear newracom:
I am trying to running the module on a Pi CM4. I get an Oops on insmod. I am attaching the kernel trace, and the kernel version is 5.10. Could you please check and see if you can help me out? I have checked UG-7292-018-Raspberry_Pi_setup.pdf. Thank you
nrc-log.txt
.

Porting to RK3399-based platform incorrect response to C_SPI_READ command

When I use the driver on the RK3399-based platform, the board responds for the C_SPI_READ command with:
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f, while the last byte is supposed to contain C_SPI_ACK = 0x47.
I have checked the signals with the oscilloscope, and they seem to be correct, however the CS0 and SCK lines have illegal levels (ca. 0.9V) before the first transfer is started.
To avoid problems caused by transients, I have duplicated the attempt to read the register 0. However in both cases the board responds in the same incorrect way.
By the way, there is a problem in the driver because the failure to contact the board triggers the whole cascade of errors.
Below are the messages captured during the test.
The sources used for tests are available in https://github.com/wzab/nrc7292-buildroot in branch rpi_n10_5.6.19.

# . ./test1
[   38.435976] WZab STF: 0
[   38.435976]  buffer:ff,ff,ff,ff,ff,ff,ff,5f
[   38.436622] ------------[ cut here ]------------
[   38.437082] WARNING: CPU: 3 PID: 308 at /home/wzab/pados_roboczy_wifi/git/nrc7292-buildroot/buildroot-2020.08/output/build/nrc-module-1.0/./nrc-hif-cspi.c:537 _c_spi_r]
[   38.438593] Modules linked in: nrc(O+) mac80211 libarc4 cfg80211 rfkill ipv6 nf_defrag_ipv6 rockchipdrm realtek analogix_dp dw_mipi_dsi dw_hdmi cec drm_kms_helper dwma]
[   38.440812] CPU: 3 PID: 308 Comm: modprobe Tainted: G           O      5.7.2 #1
[   38.441456] Hardware name: Radxa ROCK Pi N10 (DT)
[   38.441876] pstate: 20000005 (nzCv daif -PAN -UAO)
[   38.442319] pc : _c_spi_read_regs+0x284/0x2a0 [nrc]
[   38.442769] lr : _c_spi_read_regs+0x23c/0x2a0 [nrc]
[   38.443200] sp : ffff8000120eb3c0
[   38.443495] x29: ffff8000120eb3d0 x28: ffff800012185000 
[   38.443967] x27: 0000000000000100 x26: ffff0000b82e33b8 
[   38.444438] x25: ffff800009133e10 x24: ffff0000b6c8a540 
[   38.444909] x23: 0000000050200000 x22: 0000000000000000 
[   38.445379] x21: ffff0000b6c8a540 x20: 0000000000000010 
[   38.445850] x19: ffff0000b9006200 x18: 0000000000000010 
[   38.446321] x17: 0000000000000001 x16: 0000000000000001 
[   38.446792] x15: ffff0000b9006670 x14: 0720072007200720 
[   38.447263] x13: 0720072007200720 x12: 0720072007200720 
[   38.447734] x11: 0720072007200720 x10: 0720072007200720 
[   38.448205] x9 : 0720072007200720 x8 : 0720072007200720 
[   38.448676] x7 : 0720072007200720 x6 : 0000000000000163 
[   38.449146] x5 : 0000000000000001 x4 : 0000000000000000 
[   38.449617] x3 : 0000000000000000 x2 : f45439dc40a32c00 
[   38.450087] x1 : 0000000000000000 x0 : 000000000000005f 
[   38.450559] Call trace:
[   38.450799]  _c_spi_read_regs+0x284/0x2a0 [nrc]
[   38.451219]  c_spi_read_regs+0x2c/0x70 [nrc]
[   38.451616]  c_spi_probe+0xc8/0x360 [nrc]
[   38.451976]  spi_drv_probe+0x80/0xe0
[   38.452298]  really_probe+0xd8/0x320
[   38.452617]  driver_probe_device+0x58/0xf0
[   38.452984]  device_driver_attach+0x74/0x80
[   38.453356]  __driver_attach+0x58/0xe0
[   38.453692]  bus_for_each_dev+0x70/0xc0
[   38.454033]  driver_attach+0x24/0x30
[   38.454353]  bus_add_driver+0x14c/0x1f0
[   38.454694]  driver_register+0x64/0x120
[   38.455037]  __spi_register_driver+0x5c/0x70
[   38.455433]  nrc_hif_cspi_init+0xdc/0x170 [nrc]
[   38.455853]  nrc_hif_init+0x14/0xb0 [nrc]
[   38.456227]  nrc_platform_probe+0x58/0x120 [nrc]
[   38.456639]  platform_drv_probe+0x54/0xb0
[   38.456996]  really_probe+0xd8/0x320
[   38.457316]  driver_probe_device+0x58/0xf0
[   38.457682]  device_driver_attach+0x74/0x80
[   38.458054]  __driver_attach+0x58/0xe0
[   38.458389]  bus_for_each_dev+0x70/0xc0
[   38.458730]  driver_attach+0x24/0x30
[   38.459050]  bus_add_driver+0x14c/0x1f0
[   38.459391]  driver_register+0x64/0x120
[   38.459735]  __platform_driver_register+0x48/0x60
[   38.460169]  nrc_init+0x60/0xc0 [nrc]
[   38.460499]  do_one_initcall+0x54/0x1b0
[   38.460843]  do_init_module+0x54/0x210
[   38.461178]  load_module+0x1d08/0x22c0
[   38.461513]  __do_sys_finit_module+0xd8/0xf0
[   38.461892]  __arm64_sys_finit_module+0x20/0x30
[   38.462297]  el0_svc_common.constprop.0+0x6c/0x170
[   38.462723]  do_el0_svc+0x24/0x90
[   38.463021]  el0_sync_handler+0x114/0x180
[   38.463378]  el0_sync+0x158/0x180
[   38.463674] ---[ end trace a7ad204e2bf6293f ]---
[   38.464367] WZab STF: 0
[   38.464367]  buffer:ff,ff,ff,ff,ff,ff,ff,5f
[   38.464980] ------------[ cut here ]------------
[   38.465409] WARNING: CPU: 4 PID: 308 at /home/wzab/pados_roboczy_wifi/git/nrc7292-buildroot/buildroot-2020.08/output/build/nrc-module-1.0/./nrc-hif-cspi.c:537 _c_spi_r]
[   38.466907] Modules linked in: nrc(O+) mac80211 libarc4 cfg80211 rfkill ipv6 nf_defrag_ipv6 rockchipdrm realtek analogix_dp dw_mipi_dsi dw_hdmi cec drm_kms_helper dwma]
[   38.469095] CPU: 4 PID: 308 Comm: modprobe Tainted: G        W  O      5.7.2 #1
[   38.469733] Hardware name: Radxa ROCK Pi N10 (DT)
[   38.470146] pstate: 20000005 (nzCv daif -PAN -UAO)
[   38.470578] pc : _c_spi_read_regs+0x284/0x2a0 [nrc]
[   38.471016] lr : _c_spi_read_regs+0x23c/0x2a0 [nrc]
[   38.471443] sp : ffff8000120eb3c0
[   38.471734] x29: ffff8000120eb3d0 x28: ffff800012185000 
[   38.472200] x27: 0000000000000100 x26: ffff0000b82e33b8 
[   38.472666] x25: ffff800009133e10 x24: ffff0000b6c8a540 
[   38.473131] x23: 0000000050200000 x22: 0000000000000000 
[   38.473596] x21: ffff0000b6c8a540 x20: 0000000000000010 
[   38.474061] x19: ffff0000b9006200 x18: 0000000000000010 
[   38.474526] x17: 0000000000000000 x16: 0000000000000000 
[   38.474992] x15: ffff0000b9006670 x14: 0720072007200720 
[   38.475457] x13: 0720072007200720 x12: 0720072007200720 
[   38.475922] x11: 0720072007200720 x10: 0720072007200720 
[   38.476387] x9 : 0720072007200720 x8 : 0720072007200720 
[   38.476852] x7 : 0720072007200720 x6 : 00000000000001a3 
[   38.477318] x5 : 0000000000000000 x4 : 0000000000000000 
[   38.477783] x3 : 00000000ffffffff x2 : f45439dc40a32c00 
[   38.478248] x1 : 0000000000000000 x0 : 000000000000005f 
[   38.478714] Call trace:
[   38.478940]  _c_spi_read_regs+0x284/0x2a0 [nrc]
[   38.479349]  c_spi_read_regs+0x2c/0x70 [nrc]
[   38.479733]  c_spi_probe+0x2c4/0x360 [nrc]
[   38.480099]  spi_drv_probe+0x80/0xe0
[   38.480416]  really_probe+0xd8/0x320
[   38.480731]  driver_probe_device+0x58/0xf0
[   38.481091]  device_driver_attach+0x74/0x80
[   38.481460]  __driver_attach+0x58/0xe0
[   38.481791]  bus_for_each_dev+0x70/0xc0
[   38.482128]  driver_attach+0x24/0x30
[   38.482443]  bus_add_driver+0x14c/0x1f0
[   38.482782]  driver_register+0x64/0x120
[   38.483119]  __spi_register_driver+0x5c/0x70
[   38.483503]  nrc_hif_cspi_init+0xdc/0x170 [nrc]
[   38.483910]  nrc_hif_init+0x14/0xb0 [nrc]
[   38.484272]  nrc_platform_probe+0x58/0x120 [nrc]
[   38.484678]  platform_drv_probe+0x54/0xb0
[   38.485031]  really_probe+0xd8/0x320
[   38.485346]  driver_probe_device+0x58/0xf0
[   38.485706]  device_driver_attach+0x74/0x80
[   38.486074]  __driver_attach+0x58/0xe0
[   38.486404]  bus_for_each_dev+0x70/0xc0
[   38.486741]  driver_attach+0x24/0x30
[   38.487056]  bus_add_driver+0x14c/0x1f0
[   38.487395]  driver_register+0x64/0x120
[   38.487732]  __platform_driver_register+0x48/0x60
[   38.488154]  nrc_init+0x60/0xc0 [nrc]
[   38.488479]  do_one_initcall+0x54/0x1b0
[   38.488817]  do_init_module+0x54/0x210
[   38.489147]  load_module+0x1d08/0x22c0
[   38.489476]  __do_sys_finit_module+0xd8/0xf0
[   38.489851]  __arm64_sys_finit_module+0x20/0x30
[   38.490250]  el0_svc_common.constprop.0+0x6c/0x170
[   38.490671]  do_el0_svc+0x24/0x90
[   38.490965]  el0_sync_handler+0x114/0x180
[   38.491317]  el0_sync+0x158/0x180
[   38.491610] ---[ end trace a7ad204e2bf62940 ]---
[   38.492046] nrc-cspi: probe of spi1.0 failed with error -22
[   38.492810] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[   38.492823] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[   38.493598] Mem abort info:
[   38.494363] Mem abort info:
[   38.494609]   ESR = 0x96000006
[   38.494856]   ESR = 0x96000006
[   38.495126]   EC = 0x25: DABT (current EL), IL = 32 bits
[   38.495394]   EC = 0x25: DABT (current EL), IL = 32 bits
[   38.495857]   SET = 0, FnV = 0
[   38.496321]   SET = 0, FnV = 0
[   38.496589]   EA = 0, S1PTW = 0
[   38.496858]   EA = 0, S1PTW = 0
[   38.497139] Data abort info:
[   38.497141]   ISV = 0, ISS = 0x00000006
[   38.497418] Data abort info:
[   38.497671]   CM = 0, WnR = 0
[   38.498008]   ISV = 0, ISS = 0x00000006
[   38.498262] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000b8231000
[   38.498521]   CM = 0, WnR = 0
[   38.498857] [0000000000000000] pgd=00000000b8099003, pud=00000000b810a003, pmd=0000000000000000
[   38.499420] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000b8231000
[   38.499681] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[   38.500438] [0000000000000000] pgd=00000000b8099003, pud=00000000b810a003, pmd=0000000000000000
[   38.501000] Modules linked in: nrc(O+) mac80211 libarc4 cfg80211 rfkill ipv6 nf_defrag_ipv6 rockchipdrm realtek analogix_dp dw_mipi_dsi dw_hdmi cec drm_kms_helper dwma]
[   38.504417] CPU: 5 PID: 310 Comm: irq/120-spi-irq Tainted: G        W  O      5.7.2 #1
[   38.505107] Hardware name: Radxa ROCK Pi N10 (DT)
[   38.505520] pstate: 40000005 (nZcv daif -PAN -UAO)
[   38.505952] pc : spi_update_status+0x20/0x1e0 [nrc]
[   38.506391] lr : spi_irq+0x1c/0x50 [nrc]
[   38.506735] sp : ffff800012523d40
[   38.507026] x29: ffff800012523d40 x28: ffff0000b9337000 
[   38.507492] x27: ffff0000b9337000 x26: ffff800010154b90 
[   38.507958] x25: 0000000000000001 x24: ffff0000b6c8a800 
[   38.508424] x23: ffff0000b9337000 x22: ffff0000b9662600 
[   38.508889] x21: 0000000000000000 x20: ffff0000b9662600 
[   38.509354] x19: ffff0000b6c8a000 x18: 0000000000000000 
[   38.509819] x17: 0000000000000000 x16: 0000000000000000 
[   38.510284] x15: 0000ac35a66361be x14: 0000000000000000 
[   38.510749] x13: 000000000000034c x12: 0000000000000000 
[   38.511214] x11: 0000000000000000 x10: 0000000000000040 
[   38.511679] x9 : ffff800011a91d28 x8 : ffff800011a91d20 
[   38.512144] x7 : 0000000000000000 x6 : 0000000000000000 
[   38.512609] x5 : 0000000000000000 x4 : 0000000000000000 
[   38.513075] x3 : 0000000000000100 x2 : ffff80000911ed50 
[   38.513540] x1 : ffff0000b6c8a000 x0 : ffff0000b6c8a800 
[   38.514005] Call trace:
[   38.514234]  spi_update_status+0x20/0x1e0 [nrc]
[   38.514642]  spi_irq+0x1c/0x50 [nrc]
[   38.514962]  irq_thread_fn+0x2c/0xa0
[   38.515277]  irq_thread+0x150/0x250
[   38.515586]  kthread+0x138/0x160
[   38.515870]  ret_from_fork+0x10/0x24
[   38.516187] Code: a9025bf5 a90363f7 aa0003f8 f9403c15 (a94006b7) 
[   38.516721] ---[ end trace a7ad204e2bf62941 ]---
[   38.517126] Internal error: Oops: 96000006 [#2] PREEMPT SMP
[   38.517143] genirq: exiting task "irq/120-spi-irq" (310) is an active IRQ thread (irq 120)
[   38.517614] Modules linked in: nrc(O+) mac80211 libarc4 cfg80211 rfkill ipv6 nf_defrag_ipv6 rockchipdrm realtek analogix_dp dw_mipi_dsi dw_hdmi cec drm_kms_helper dwma]
[   38.520501] CPU: 4 PID: 308 Comm: modprobe Tainted: G      D W  O      5.7.2 #1
[   38.521139] Hardware name: Radxa ROCK Pi N10 (DT)
[   38.521552] pstate: 80000005 (Nzcv daif -PAN -UAO)
[   38.521983] pc : spi_update_status+0x20/0x1e0 [nrc]
[   38.522419] lr : spi_start+0xd4/0x140 [nrc]
[   38.522787] sp : ffff8000120eb8b0
[   38.523078] x29: ffff8000120eb8b0 x28: ffff800012185000 
[   38.523543] x27: 0000000000000100 x26: ffff0000b82e33b8 
[   38.524008] x25: ffff800009133e10 x24: ffff0000b6c8a800 
[   38.524474] x23: ffff800009133390 x22: ffff0000b6c8a800 
[   38.524939] x21: 0000000000000000 x20: ffff800009135000 
[   38.525404] x19: ffff0000b6c8a070 x18: 0000000000000001 
[   38.525869] x17: 0000000000000000 x16: 0000000000000000 
[   38.526334] x15: ffff0000b9006670 x14: ffffffffffffffff 
[   38.526799] x13: ff00000000000000 x12: 0000000000000038 
[   38.527265] x11: 0000000000000000 x10: 7f7f7f7f7f7f7f7f 
[   38.527730] x9 : 0000000000000000 x8 : ffff0000b64090c0 
[   38.528195] x7 : 0001000000000000 x6 : 0000000000000007 
[   38.528660] x5 : ffff0000b924ff88 x4 : ffff0000b924fb08 
[   38.529125] x3 : 0000000000000001 x2 : 0000000000000001 
[   38.529591] x1 : ffff800009135b60 x0 : ffff0000b6c8a800 
[   38.530056] Call trace:
[   38.530283]  spi_update_status+0x20/0x1e0 [nrc]
[   38.530690]  spi_start+0xd4/0x140 [nrc]
[   38.531036]  nrc_hif_init+0x90/0xb0 [nrc]
[   38.531398]  nrc_platform_probe+0x58/0x120 [nrc]
[   38.531806]  platform_drv_probe+0x54/0xb0
[   38.532159]  really_probe+0xd8/0x320
[   38.532474]  driver_probe_device+0x58/0xf0
[   38.532835]  device_driver_attach+0x74/0x80
[   38.533204]  __driver_attach+0x58/0xe0
[   38.533534]  bus_for_each_dev+0x70/0xc0
[   38.533871]  driver_attach+0x24/0x30
[   38.534186]  bus_add_driver+0x14c/0x1f0
[   38.534524]  driver_register+0x64/0x120
[   38.534863]  __platform_driver_register+0x48/0x60
[   38.535285]  nrc_init+0x60/0xc0 [nrc]
[   38.535607]  do_one_initcall+0x54/0x1b0
[   38.535945]  do_init_module+0x54/0x210
[   38.536275]  load_module+0x1d08/0x22c0
[   38.536605]  __do_sys_finit_module+0xd8/0xf0
[   38.536980]  __arm64_sys_finit_module+0x20/0x30
[   38.537379]  el0_svc_common.constprop.0+0x6c/0x170
[   38.537800]  do_el0_svc+0x24/0x90
[   38.538093]  el0_sync_handler+0x114/0x180
[   38.538446]  el0_sync+0x158/0x180
[   38.538740] Code: a9025bf5 a90363f7 aa0003f8 f9403c15 (a94006b7) 
[   38.539273] ---[ end trace a7ad204e2bf62942 ]---
Segmentation fault
# [   38.781093] irq 120: nobody cared (try booting with the "irqpoll" option)
[   38.781711] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D W  O      5.7.2 #1
[   38.782349] Hardware name: Radxa ROCK Pi N10 (DT)
[   38.782766] Call trace:
[   38.782995]  dump_backtrace+0x0/0x1a0
[   38.783325]  show_stack+0x18/0x30
[   38.783625]  dump_stack+0xb8/0x104
[   38.783932]  __report_bad_irq+0x4c/0xdc
[   38.784276]  note_interrupt+0x2d4/0x380
[   38.784619]  handle_irq_event_percpu+0x88/0x90
[   38.785015]  handle_irq_event+0x48/0xd0
[   38.785356]  handle_level_irq+0xb8/0x140
[   38.785706]  generic_handle_irq+0x30/0x50
[   38.786065]  rockchip_irq_demux+0xac/0x1d0
[   38.786430]  generic_handle_irq+0x30/0x50
[   38.786788]  __handle_domain_irq+0x64/0xc0
[   38.787153]  gic_handle_irq+0x60/0x160
[   38.787488]  el1_irq+0xb8/0x180
[   38.787772]  cpuidle_enter_state+0x90/0x300
[   38.788144]  cpuidle_enter+0x38/0x50
[   38.788465]  call_cpuidle+0x1c/0x40
[   38.788776]  do_idle+0x1f4/0x290
[   38.789065]  cpu_startup_entry+0x28/0x50
[   38.789416]  rest_init+0xd8/0xe8
[   38.789708]  arch_call_rest_init+0x10/0x1c
[   38.790074]  start_kernel+0x4a4/0x4dc
[   38.790399] handlers:
[   38.790605] [<000000003c5614da>] irq_default_primary_handler threaded [<00000000ca6bdd86>] spi_irq [nrc]
[   38.791474] Disabling IRQ #120

imx8mq no spi activity

Due to the relative unavailability of raspberry pies I am trying to get the nrc7292 to work with an google coral dev board which uses an imx8mq cpu. Running the nrc_simple sanity check produces no output according to an oscilloscope. I'm new to imx, so I don't know if this requires use of spi_imx.c in addition to the regular spi.c code from the linux kernal. Spi1.0 seems to exist, and spidev does not. Below is the output from the commands if that helps.

$ sudo insmod /lib/modules/$(uname -r)/extra/nrc_simple.ko spi_bus_num=1 spi_cs_num=0 hifspeed=10000000
[  660.919948] ### [nrc_simple] Value of paramters ###
[  660.924872] - bus_num: 1
[  660.927476] - chip_select: 0
[  660.930399] - max_speed_hz: 20000000
[  660.934321] [nrc_hspi_probe,L166]
[  660.937912] ------------[ cut here ]------------
[  660.942539] WARNING: CPU: 2 PID: 217441 at ../newah_simple-custom/nrc_hspi_simple_driver.c:151 c_spi_read_regs.constprop.0+0x138/0x178 [nrc_simple]
[  660.955771] Modules linked in: nrc_simple(O+) fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine rng_core authenc libdes imx8mq_interconnect imx_interconnect crct10dif_ce imx8m_ddrc governor_userspace imx_bus caam secvio error fuse [last unloaded: nrc_simple]
[  660.981014] CPU: 2 PID: 217441 Comm: insmod Tainted: G        W  O      5.15.32 #1
[  660.988586] Hardware name: Google i.MX8MQ Phanbell (DT)
[  660.993811] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  661.000774] pc : c_spi_read_regs.constprop.0+0x138/0x178 [nrc_simple]
[  661.007223] lr : c_spi_read_regs.constprop.0+0x124/0x178 [nrc_simple]
[  661.013671] sp : ffff80000c37b5b0
[  661.016984] x29: ffff80000c37b5b0 x28: 0000000000000013 x27: 0000000000000100
[  661.024126] x26: ffff80000131b140 x25: ffff800008133d70 x24: 0000000000000021
[  661.031266] x23: 0000000000000026 x22: ffff800009d710e0 x21: ffff80000131b050
[  661.038406] x20: ffff80000c37b8c8 x19: ffff0000058ab800 x18: 0000000000000030
[  661.045546] x17: 0000000000000180 x16: ffff80000131a030 x15: 0000000000000000
[  661.052686] x14: 00000000000000eb x13: 0000000000000024 x12: 0000000000000000
[  661.059827] x11: ffff00003fd9afec x10: 0000000000000110 x9 : 0000000000000000
[  661.066966] x8 : ffff00003fdafec0 x7 : 0000000000000000 x6 : 0000000000000000
[  661.074107] x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff0000045d6380
[  661.081246] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
[  661.088387] Call trace:
[  661.090834]  c_spi_read_regs.constprop.0+0x138/0x178 [nrc_simple]
[  661.096936]  nrc_hspi_probe+0x50/0xc4 [nrc_simple]
[  661.101734]  spi_probe+0x88/0xf0
[  661.104970]  really_probe.part.0+0x9c/0x310
[  661.109159]  __driver_probe_device+0x98/0x150
[  661.113520]  driver_probe_device+0xc8/0x160
[  661.117707]  __driver_attach+0xfc/0x190
[  661.121547]  bus_for_each_dev+0x70/0xd0
[  661.125386]  driver_attach+0x28/0x40
[  661.128965]  bus_add_driver+0x108/0x1f0
[  661.132805]  driver_register+0x7c/0x130
[  661.136645]  __spi_register_driver+0xcc/0xe0
[  661.140920]  nrc_init+0xd8/0x1000 [nrc_simple]
[  661.145373]  do_one_initcall+0x50/0x1b0
[  661.149214]  do_init_module+0x44/0x240
[  661.152968]  load_module+0x1f70/0x2680
[  661.156721]  __do_sys_finit_module+0xb8/0x100
[  661.161081]  __arm64_sys_finit_module+0x24/0x30
[  661.165615]  invoke_syscall+0x48/0x120
[  661.169368]  el0_svc_common.constprop.0+0xcc/0xf0
[  661.174075]  do_el0_svc+0x28/0x90
[  661.177393]  el0_svc+0x20/0x60
[  661.180451]  el0t_64_sync_handler+0x1a8/0x1b0
[  661.184811]  el0t_64_sync+0x1a0/0x1a4
[  661.188476] ---[ end trace 8eec052da0c4e7a5 ]---
[  661.193344] [Error] failed to read register(0x0).
[  661.198075] nrc-hspi-simple: probe of spi1.0 failed with error -5
[  661.204344] done successfully.
$ cat /sys/class/spi_master/spi1/spi1.0/modalias 
spi:nrc-hspi-simple
$ ls /dev/s*
/dev/stderr  /dev/stdin   /dev/stdout

start.py 1 0 US not working with onboard WiFi & BT enabled

Platform: RPi4
I am trying to start the NRC7292 radio in AP mode with onboard WiFi enabled, but the ifconfig wlan0 up command in start.py script fails with

SIOCSIFFLAGS: Operation not permitted

dmesg

[   45.189114] v3d fec00000.v3d: MMU error from client CLE (4) at 0x9241000, pte invalid
[   45.292364] nrc: loading out-of-tree module taints kernel.
[   45.313051] nrc80211 nrc80211: [spi_suspend] drv_state:-1 wowlan_enabled:0 power_save:0
[   45.313068] start FW 332
[   45.746537] end FW
[   48.795723] nrc80211 nrc80211: size of bd file is 2128
[   48.795779] nrc80211 nrc80211: Major 01 Minor 04 Total len 0840 Num_Data_Groups 0009 Checksum 38AB
[   48.795787] nrc80211 nrc80211: target version is not matched(2 : 0)

Last few lines of /boot/config.txt (see dtoverlay=disable-spidev-overlay)

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Disable compensation for displays with overscan
disable_overscan=1
dtoverlay=disable-spidev-overlay
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[all]
enable_uart=1

Rename wlan0 to wlan2

$ cat /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e4:5f:01:1e:4c:a6", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="wlan2"

/etc/wpa_supplicant

$ ls -l /etc/wpa_supplicant/
total 52
-rwxr-xr-x 1 root root   937 Feb 25  2021 action_wpa.sh
-rw-r--r-- 1 root root 25569 Feb 25  2021 functions.sh
-rwxr-xr-x 1 root root  4696 Feb 25  2021 ifupdown.sh
-rw-r--r-- 1 root root    83 Apr 11 19:11 unsued_wpa_supplicant.conf
-rw-r--r-- 1 root root   159 Sep 12 18:15 unsued_wpa_supplicant-wlan0.conf
-rw-r--r-- 1 root root   159 Sep 12 19:32 wpa_supplicant-wlan2.conf

raspi-blacklist.conf is empty.

Please let me know if you any further information.

Driver crashes the system, when there is SPI communication problem

If somebody loads the driver, while the modul is inaccessible, it crashes the kernel.
I have added diagnostic messages to see what is going on.
My driver with added debugging messages is available at wzab@4c0431e .
However similar problem happens also with standard driver.
I attach the dump from the console: crash2.cap.gz

The driver reads from the SPI all 0xff bytes (because the module is not available):
[ 49.545244] nrc80211 nrc80211: read_regs:ff,ff,ff,ff,ff,ff,ff,ff
The c_spi_probe function fails:
[ 49.701466] nrc-cspi: probe of spi5.0 failed with error -22
But the spi_driver is registered, tries to communicate with the hardware and tries to dereference the non-initialized pointer.

[   49.701466] nrc-cspi: probe of spi5.0 failed with error -22
[   49.702099] nrc80211 nrc80211: Registered driver = 0
[   49.702099] 
[   49.702672] nrc80211 nrc80211: Successfully registered driver = 0
[   49.702672] 
[   49.703346] nrc80211 nrc80211: start()
[   49.706981] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[   49.707097] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[   49.707103] pgd = ffffff80095c8000
[   49.707119] [00000000] *pgd=00000000bfffe003, *pud=00000000bfffe003, *pmd=0000000000000000

Which crashes the kernel.

Failed to initialize hostapd interface for mesh.

I'm trying to run start.py to set up a mesh portal. Things look like they are going well until wpa_supplicant tries to initialize the interface. I am also not sure if the channel pair not allowed message matters. Any idea where I'm going wrong?

$ python nrc7292_sw_pkg/package/host/evk/sw_pkg/nrc_pkg/script/start.py 4 3 US 0
Done.
Done.
------------------------------
Model            : 7292
STA Type         : MESH
Country          : US
Security Mode    : WPA3-SAE
CAL. USE         : ON
AMPDU            : ON
Download FW      : uni_s1g.bin
TX Power         : 17
Mesh Mode        : Mesh Portal
------------------------------
NRC MESH setting for HaLow...
[*] Set Max CPU Clock on RPi
[0] Clear
wpa_supplicant: no process found
hostapd: no process found
wireshark-gtk: no process found
rmmod: ERROR: Module nrc is not currently loaded
rm: can't remove '/home/br2rauc/nrc7292_sw_pkg/package/host/evk/sw_pkg/nrc_pkg/script/conf/temp_self_config.conf': No such file or directory
[ 5731.442686] audit: type=1325 audit(1655868925.759:8): table=nat family=2 entries=0 op=xt_register pid=1270926 comm="modprobe"
[ 5731.454669] audit: type=1325 audit(1655868925.771:9): table=nat family=2 entries=5 op=xt_replace pid=1270916 comm="iptables"
[ 5731.491099] audit: type=1325 audit(1655868925.807:10): table=filter family=2 entries=4 op=xt_replace pid=1270939 comm="iptables"
[1] Copy
total 648
drwxr-xr-x    2 user     user          4096 Jun 22 03:35 .
drwxr-xr-x    4 user     user          4096 Jun 11 03:18 ..
-rwxr-xr-x    1 user     user           491 Jun 17 18:43 copy
-rwxr-xr-x    1 user     user           562 Jun 11 03:18 nrc7292_bd.dat
-rwxr-xr-x    1 user     user        323076 Jun 11 03:18 nrc7292_cspi.bin
-rwxr-xr-x    1 root     root        323076 Jun 22 03:35 uni_s1g.bin
-rwxr-xr-x    1 root     root        323076 Jun 22 03:35 /lib/firmware/uni_s1g.bin
====================================
 MESH INTERFACE   : wlan0 
 USE DHCP Client 
====================================
Config for Mesh Portal is done!
IP and DHCP config done
[2] Set Module Parameters
[3] Loading module
sudo insmod /lib/modules/5.10.92-v8/extra/nrc.ko  hifspeed=2000000 spi_bus_num=0 spi_cs_num=0 spi_gpio_irq=5 spi_gpio_poll=-1 fw_name=uni_s1g.bin power_save=0 ndp_preq=1 auto_ba=1 sw_enc=1 listen_interval=1000 credit_ac_be=40
x
[ 5733.039142] start FW 321
[ 5734.821509] end FW
spi_gpio_poll
[4] Set tx power
Tx power : 17                   Calibration_use : ON
OK
Board Data use                   : off
OK
[5] Set guard interval
guard interval : long
OK
[6] Set cal_use
Calibration_use : on                    Country  : US
OK
[*] Start DHCPCD and DNSMASQ
Job for dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xeu dnsmasq.service" for details.
wpa_supplicant: no process found
[7] Start wpa_supplicant on wlan0
Successfully initialized wpa_supplicant
[ 5744.942164] Failed to load board data, error:1
wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
HT40 channel pair (159, 155) not allowed
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED 
wlan0: Unable to setup interface.
Failed to initialize hostapd interface for mesh
wlan0: Failed to init mesh
wlan0: leaving mesh
wlan0: interface state DISABLED->DISABLED
wlan0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started
wlan0: mesh leave error=-107
wlan0: Could not join mesh
[8] Start NAT
[ 5745.939412] audit: type=1325 audit(1655868940.255:11): table=filter family=2 entries=4 op=xt_replace pid=1274181 comm="iptables"
[ 5745.978409] audit: type=1325 audit(1655868940.295:12): table=nat family=2 entries=5 op=xt_replace pid=1274189 comm="iptables"
[ 5746.018299] audit: type=1325 audit(1655868940.335:13): table=filter family=2 entries=4 op=xt_replace pid=1274201 comm="iptables"
[ 5746.068107] audit: type=1325 audit(1655868940.383:14): table=nat family=2 entries=5 op=xt_replace pid=1274209 comm="iptables"
[ 5746.105864] audit: type=1325 audit(1655868940.419:15): table=filter family=2 entries=5 op=xt_replace pid=1274221 comm="iptables"
[ 5746.145032] audit: type=1325 audit(1655868940.459:16): table=nat family=2 entries=6 op=xt_replace pid=1274228 comm="iptables"
Waiting for IP
Waiting for IP
Waiting for IP
Waiting for IP
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Traceback (most recent call last):
  File "/home/br2rauc/nrc7292_sw_pkg/package/host/evk/sw_pkg/nrc_pkg/script/start.py", line 725, in <module>
    run_mpp('wlan0', str(sys.argv[3]), strSecurity(), supplicant_debug, peer, static_ip)
  File "/home/br2rauc/nrc7292_sw_pkg/package/host/evk/sw_pkg/nrc_pkg/script/mesh.py", line 134, in run_mpp
    time.sleep(1)
KeyboardInterrupt

I'm using buildroot with the 64 bit 5.10 kernel on a pi4 with the sx-newah US dev board.

Cannot install nrc.ko in raspberry-linux 5.15.44-v8+. Please help, thank you in advance.

Environment: uname -a

Linux rakpios 5.15.44-v8+ #1 SMP PREEMPT Wed Jun 8 15:22:35 CST 2022 aarch64 GNU/Linux

I download the lastest raspberry linux kernel, and compile the nrc.ko in 64bit mode. But when I install the driver I built, it failed.

Result of sudo insmod nrc.ko

insmod: ERROR: could not insert module nrc.ko: Invalid parameters

dmesg log:

[ 1750.623465] nrc: no symbol version for module_layout
[ 1750.623545] nrc: loading out-of-tree module taints kernel.
[ 1750.626372] nrc: disagrees about version of symbol ieee80211_stop_tx_ba_session
[ 1750.626389] nrc: Unknown symbol ieee80211_stop_tx_ba_session (err -22)
[ 1750.626467] nrc: disagrees about version of symbol ieee80211_start_tx_ba_cb_irqsafe
[ 1750.626479] nrc: Unknown symbol ieee80211_start_tx_ba_cb_irqsafe (err -22)
[ 1750.626524] nrc: disagrees about version of symbol ieee80211_connection_loss
[ 1750.626535] nrc: Unknown symbol ieee80211_connection_loss (err -22)
[ 1750.626614] nrc: Unknown symbol __ll_sc_atomic64_or (err -2)
[ 1750.626655] nrc: disagrees about version of symbol ieee80211_iterate_interfaces
[ 1750.626667] nrc: Unknown symbol ieee80211_iterate_interfaces (err -22)
[ 1750.626721] nrc: disagrees about version of symbol ieee80211_chswitch_done
[ 1750.626732] nrc: Unknown symbol ieee80211_chswitch_done (err -22)
[ 1750.626842] nrc: Unknown symbol __stack_chk_guard (err -2)
[ 1750.626892] nrc: Unknown symbol vfs_statx (err -2)
[ 1750.626940] nrc: disagrees about version of symbol ieee80211_free_hw
[ 1750.626951] nrc: Unknown symbol ieee80211_free_hw (err -22)
[ 1750.627133] nrc: disagrees about version of symbol ieee80211_iterate_stations_atomic
[ 1750.627147] nrc: Unknown symbol ieee80211_iterate_stations_atomic (err -22)
[ 1750.627208] nrc: Unknown symbol nla_strlcpy (err -2)
[ 1750.627266] nrc: disagrees about version of symbol ieee80211_start_tx_ba_session
[ 1750.627277] nrc: Unknown symbol ieee80211_start_tx_ba_session (err -22)
[ 1750.627319] nrc: disagrees about version of symbol ieee80211_beacon_loss
[ 1750.627330] nrc: Unknown symbol ieee80211_beacon_loss (err -22)
[ 1750.627378] nrc: disagrees about version of symbol ieee80211_nullfunc_get
[ 1750.627389] nrc: Unknown symbol ieee80211_nullfunc_get (err -22)
[ 1750.627442] nrc: disagrees about version of symbol ieee80211_register_hw
[ 1750.627452] nrc: Unknown symbol ieee80211_register_hw (err -22)
[ 1750.627498] nrc: disagrees about version of symbol ieee80211_restart_hw
[ 1750.627508] nrc: Unknown symbol ieee80211_restart_hw (err -22)
[ 1750.627569] nrc: Unknown symbol cfg80211_find_ie_match (err -2)
[ 1750.627636] nrc: disagrees about version of symbol ieee80211_find_sta
[ 1750.627646] nrc: Unknown symbol ieee80211_find_sta (err -22)
[ 1750.627696] nrc: Unknown symbol __ll_sc_atomic64_andnot (err -2)
[ 1750.627744] nrc: disagrees about version of symbol ieee80211_tx_status_irqsafe
[ 1750.627755] nrc: Unknown symbol ieee80211_tx_status_irqsafe (err -22)
[ 1750.627818] nrc: disagrees about version of symbol __cfg80211_alloc_reply_skb
[ 1750.627829] nrc: Unknown symbol __cfg80211_alloc_reply_skb (err -22)
[ 1750.627868] nrc: disagrees about version of symbol __cfg80211_alloc_event_skb
[ 1750.627879] nrc: Unknown symbol __cfg80211_alloc_event_skb (err -22)
[ 1750.627927] nrc: Unknown symbol usleep_range (err -2)
[ 1750.628003] nrc: disagrees about version of symbol ieee80211_stop_tx_ba_cb_irqsafe
[ 1750.628014] nrc: Unknown symbol ieee80211_stop_tx_ba_cb_irqsafe (err -22)
[ 1750.628057] nrc: disagrees about version of symbol wiphy_to_ieee80211_hw
[ 1750.628067] nrc: Unknown symbol wiphy_to_ieee80211_hw (err -22)
[ 1750.628107] nrc: disagrees about version of symbol __cfg80211_send_event_skb
[ 1750.628118] nrc: Unknown symbol __cfg80211_send_event_skb (err -22)
[ 1750.628176] nrc: disagrees about version of symbol ieee80211_queue_delayed_work
[ 1750.628187] nrc: Unknown symbol ieee80211_queue_delayed_work (err -22)
[ 1750.628285] nrc: disagrees about version of symbol wiphy_apply_custom_regulatory
[ 1750.628296] nrc: Unknown symbol wiphy_apply_custom_regulatory (err -22)
[ 1750.628346] nrc: disagrees about version of symbol ieee80211_remain_on_channel_expired
[ 1750.628357] nrc: Unknown symbol ieee80211_remain_on_channel_expired (err -22)
[ 1750.628421] nrc: disagrees about version of symbol ieee80211_wake_queues
[ 1750.628432] nrc: Unknown symbol ieee80211_wake_queues (err -22)
[ 1750.628477] nrc: disagrees about version of symbol ieee80211_tx_prepare_skb
[ 1750.628488] nrc: Unknown symbol ieee80211_tx_prepare_skb (err -22)
[ 1750.628525] nrc: disagrees about version of symbol ieee80211_beacon_get_template
[ 1750.628536] nrc: Unknown symbol ieee80211_beacon_get_template (err -22)
[ 1750.628583] nrc: disagrees about version of symbol ieee80211_free_txskb
[ 1750.628594] nrc: Unknown symbol ieee80211_free_txskb (err -22)
[ 1750.628646] nrc: Unknown symbol printk (err -2)
[ 1750.628691] nrc: disagrees about version of symbol ieee80211_alloc_hw_nm
[ 1750.628701] nrc: Unknown symbol ieee80211_alloc_hw_nm (err -22)
[ 1750.628753] nrc: disagrees about version of symbol ieee80211_tx_dequeue
[ 1750.628764] nrc: Unknown symbol ieee80211_tx_dequeue (err -22)
[ 1750.628814] nrc: disagrees about version of symbol cfg80211_vendor_cmd_reply
[ 1750.628825] nrc: Unknown symbol cfg80211_vendor_cmd_reply (err -22)
[ 1750.628886] nrc: disagrees about version of symbol ieee80211_stop_queue
[ 1750.628897] nrc: Unknown symbol ieee80211_stop_queue (err -22)
[ 1750.628953] nrc: Unknown symbol __ll_sc_atomic_add (err -2)
[ 1750.628991] nrc: disagrees about version of symbol ieee80211_ready_on_channel
[ 1750.629001] nrc: Unknown symbol ieee80211_ready_on_channel (err -22)
[ 1750.629045] nrc: disagrees about version of symbol wdev_to_ieee80211_vif
[ 1750.629056] nrc: Unknown symbol wdev_to_ieee80211_vif (err -22)
[ 1750.629095] nrc: disagrees about version of symbol ieee80211_stop_queues
[ 1750.629106] nrc: Unknown symbol ieee80211_stop_queues (err -22)
[ 1750.629174] nrc: disagrees about version of symbol ieee80211_vif_to_wdev
[ 1750.629185] nrc: Unknown symbol ieee80211_vif_to_wdev (err -22)
[ 1750.629227] nrc: disagrees about version of symbol ieee80211_scan_completed
[ 1750.629238] nrc: Unknown symbol ieee80211_scan_completed (err -22)
[ 1750.629313] nrc: Unknown symbol __ll_sc_atomic_sub (err -2)
[ 1750.629354] nrc: disagrees about version of symbol ieee80211_unregister_hw
[ 1750.629365] nrc: Unknown symbol ieee80211_unregister_hw (err -22)
[ 1750.629499] nrc: Unknown symbol dev_printk (err -2)
[ 1750.629565] nrc: Unknown symbol __alloc_workqueue_key (err -2)
[ 1750.629648] nrc: Unknown symbol cfg80211_find_vendor_ie (err -2)
[ 1750.629692] nrc: Unknown symbol _mcount (err -2)
[ 1750.629748] nrc: disagrees about version of symbol ieee80211_csa_finish
[ 1750.629759] nrc: Unknown symbol ieee80211_csa_finish (err -22)
[ 1750.629798] nrc: disagrees about version of symbol ieee80211_rx_irqsafe
[ 1750.629809] nrc: Unknown symbol ieee80211_rx_irqsafe (err -22)

cannot compile against >5.15

Gateworks/nrc7292#1 has additional details, but I get this built failure on kernel >5.15

  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-uart.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-hif-uart.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_hif_uart"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-uart.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-uart.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-uart.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-uart.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-uart.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-uart.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-uart.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-uart.ver; fi
/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-ssp.c: In function ‘nrc_ssp_register’:
/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-ssp.c:591:18: error: implicit declaration of function ‘spi_busnum_to_master’ [-Werror=implicit-function-declaration]
  591 |         master = spi_busnum_to_master(spi_bus_num);
      |                  ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-ssp.c:591:16: warning: assignment to ‘struct spi_controller *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  591 |         master = spi_busnum_to_master(spi_bus_num);
      |                ^
  x86_64-pc-linux-gnu-gcc -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-hif-cspi.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_hif_cspi"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc -c -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-cspi.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-cspi.c  ; ./tools/objtool/objtool orc generate  --module  --no-fp   --retpoline  --uaccess   /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-cspi.o
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-ssp.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-hif-ssp.o.cmd
  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-ssp.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-hif-ssp.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_hif_ssp"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-ssp.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-ssp.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-ssp.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-ssp.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-ssp.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-ssp.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-ssp.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-hif-ssp.ver; fi
  x86_64-pc-linux-gnu-gcc -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.mac80211-ext.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"mac80211_ext"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc -c -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/mac80211-ext.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/mac80211-ext.c  ; ./tools/objtool/objtool orc generate  --module  --no-fp   --retpoline  --uaccess   /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/mac80211-ext.o
  x86_64-pc-linux-gnu-gcc -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-stats.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_stats"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc -c -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-stats.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-stats.c  ; ./tools/objtool/objtool orc generate  --module  --no-fp   --retpoline  --uaccess   /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-stats.o
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-fw.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-fw.o.cmd
  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-fw.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-fw.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_fw"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-fw.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-fw.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-fw.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-fw.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-fw.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-fw.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-fw.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-fw.ver; fi
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-init.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-init.o.cmd
  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-init.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-init.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_init"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-init.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-init.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-init.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-init.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-init.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-init.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-init.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-init.ver; fi
  x86_64-pc-linux-gnu-gcc -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-pm.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_pm"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc -c -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-pm.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-pm.c  ; ./tools/objtool/objtool orc generate  --module  --no-fp   --retpoline  --uaccess   /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-pm.o
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/wim.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.wim.o.cmd
  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/wim.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.wim.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"wim"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/wim.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_wim.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_wim.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/wim.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_wim.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_wim.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/wim.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_wim.ver; fi
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-debug.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-debug.o.cmd
  x86_64-pc-linux-gnu-gcc -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-dump.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_dump"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc -c -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-dump.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-dump.c  ; ./tools/objtool/objtool orc generate  --module  --no-fp   --retpoline  --uaccess   /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-dump.o
  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-debug.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-debug.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_debug"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-debug.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-debug.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-debug.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-debug.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-debug.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-debug.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-debug.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-debug.ver; fi
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-ssp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/hif.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.hif.o.cmd
  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/hif.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.hif.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"hif"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/hif.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_hif.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_hif.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/hif.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_hif.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_hif.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/hif.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_hif.ver; fi
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-netlink.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-netlink.o.cmd
  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-netlink.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-netlink.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_netlink"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-netlink.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-netlink.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-netlink.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-netlink.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-netlink.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-netlink.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-netlink.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-netlink.ver; fi
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-trx.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-trx.o.cmd
  if x86_64-pc-linux-gnu-objdump -h /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-trx.o | grep -q __ksymtab; then x86_64-pc-linux-gnu-gcc -E -D__GENKSYMS__ -Wp,-MMD,/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-trx.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin=./scripts/gcc-plugins/randomize_layout_plugin.so -fplugin=./scripts/gcc-plugins/stackleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -DRANDSTRUCT_PLUGIN -DSTACKLEAK_PLUGIN -fplugin-arg-stackleak_plugin-track-min-size=100 -fplugin-arg-stackleak_plugin-arch=x86 -DDEBUG -DBUILD_UMAC_DRIVER -DCONFIG_NRC_HIF_CSPI -DENABLE_DYNAMIC_PS -Wall  -DMODULE  -DKBUILD_BASENAME='"nrc_trx"' -DKBUILD_MODNAME='"nrc"' -D__KBUILD_MODNAME=kmod_nrc /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-trx.c | scripts/genksyms/genksyms    -r /dev/null > /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-trx.ver; x86_64-pc-linux-gnu-ld -m elf_x86_64 -r -o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-trx.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-trx.o -T /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-trx.ver; mv -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-trx.o /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-trx.o; rm -f /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.tmp_nrc-trx.ver; fi
/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-cspi.c: In function ‘nrc_hif_cspi_init’:
/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-cspi.c:2123:18: error: implicit declaration of function ‘spi_busnum_to_master’ [-Werror=implicit-function-declaration]
 2123 |         master = spi_busnum_to_master(spi_bus_num);
      |                  ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-hif-cspi.c:2123:16: warning: assignment to ‘struct spi_controller *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 2123 |         master = spi_busnum_to_master(spi_bus_num);
      |                ^
   { echo ; echo '/var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/nrc-mac80211.o: $(wildcard ./tools/objtool/objtool)' ; } >> /var/tmp/portage/net-wireless/nrc7292-9999/work/nrc7292-9999/package/host/src/nrc/.nrc-mac80211.o.cmd

How to evaluate the radio 802.11ah

Please, what tool, application or how can I evaluate the transmission and reception only of the physical layer (RF), without using the MAC layer.

Segmentation fault when trying to load nrc.ko

Hi, me again.

Trying to use start.py to create an AP and this time I got segmentation fault during sudo insmod progress.

I am using a Raspberry Pi 4B and AHPI7292S from ALFA Network Inc.

uname -r gives:

5.10.63-v7l+

Driver info:

pi@raspberrypi:~ $ modinfo /home/pi/nrc_pkg/sw/driver/nrc.ko 
filename:       /home/pi/nrc_pkg/sw/driver/nrc.ko
description:    Newracom 802.11 driver
license:        Dual BSD/GPL
author:         Newracom, Inc.(http://www.newracom.com)
srcversion:     6D4D1721FD73A419C8AA3D5
depends:        mac80211,cfg80211
name:           nrc
vermagic:       5.10.63-v7l+ SMP mod_unload modversions ARMv7 p2v8 
parm:           fw_name:Firmware file name (charp)
parm:           bd_name:Board Data file name (charp)
parm:           hifport:HIF port device name (charp)
parm:           hifspeed:HIF port speed (int)
parm:           spi_bus_num:SPI controller bus number (int)
parm:           spi_cs_num:SPI chip select number (int)
parm:           spi_gpio_irq:SPI gpio irq (int)
parm:           spi_gpio_poll:SPI gpio polling interval (msec) (int)
parm:           spi_gdma_irq:SPI gdma irq (int)
parm:           loopback:HIF loopback (bool)
parm:           lb_count:HIF loopback Buffer count (int)
parm:           disable_cqm:Disable CQM (0: enable, 1: disable) (int)
parm:           listen_interval:Listen Interval (int)
parm:           bss_max_idle:BSS Max Idle (int)
parm:           bss_max_idle_usf_format:BSS Max Idle specified in units of usf (bool)
parm:           enable_short_bi:Enable Short BI (bool)
parm:           enable_monitor:Enable Monitor (bool)
parm:           bss_max_idle_offset:BSS Max Idle Offset (int)
parm:           macaddr:MAC Address (charp)
parm:           power_save:power save (int)
parm:           sleep_duration:deepsleep duration of non-TIM mode power save (array of int)
parm:           wlantest:wlantest (bool)
parm:           ndp_preq:Enable NDP Probe Request (bool)
parm:           ndp_ack_1m:Enable 1M NDP ACK (bool)
parm:           enable_hspi_init:Enable HSPI Initialization (bool)
parm:           nullfunc_enable:Enable null func on mac80211 (bool)
parm:           auto_ba:Enable auto ba session setup on connection / QoS data Tx (bool)
parm:           sw_enc:Use SW Encryption instead of HW Encryption (bool)
parm:           signal_monitor:Enable SIGNAL(RSSI/SNR) Monitor (bool)
parm:           enable_usn:Use configuration of KR USN (Same ac between data and beacon) (bool)
parm:           debug_level_all:Driver debug level all (bool)
parm:           credit_ac_be:credit number for AC_BE (int)

syslog after sudo insmod /home/pi/nrc_pkg/sw/driver/nrc.ko (This gives an output as Segmentation Fault):

[   62.803181] nrc: loading out-of-tree module taints kernel.
[   62.814816] ------------[ cut here ]------------
[   62.814940] WARNING: CPU: 2 PID: 1074 at /home/pi/nrc7292_sw_pkg/package/host/src/nrc/nrc-hif-cspi.c:347 _c_spi_read_regs+0x200/0x220 [nrc]
[   62.814956] Modules linked in: nrc(O+) mac80211 libarc4 snd_soc_hdmi_codec 8021q garp stp llc joydev v3d gpu_sched brcmfmac brcmutil sha256_generic raspberrypi_hwmon cfg80211 rfkill i2c_brcmstb vc4 cec i2c_bcm2835 bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem bcm2835_isp(C) videobuf2_vmalloc bcm2835_mmal_vchiq(C) vc_sm_cma(C) videobuf2_dma_contig spi_bcm2835 videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc snd_bcm2835(C) drm_kms_helper snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer rpivid_mem snd syscopyarea sysfillrect sysimgblt fb_sys_fops w1_gpio wire cn uio_pdrv_genirq uio nvmem_rmem i2c_dev drm drm_panel_orientation_quirks backlight fuse ip_tables x_tables ipv6
[   62.816155] CPU: 2 PID: 1074 Comm: insmod Tainted: G         C O      5.10.63-v7l+ #1488
[   62.816165] Hardware name: BCM2711
[   62.816175] Backtrace: 
[   62.816210] [<c0b83534>] (dump_backtrace) from [<c0b838c8>] (show_stack+0x20/0x24)
[   62.816226]  r7:ffffffff r6:00000000 r5:60000013 r4:c12e6b3c
[   62.816245] [<c0b838a8>] (show_stack) from [<c0b87cb4>] (dump_stack+0xcc/0xf8)
[   62.816265] [<c0b87be8>] (dump_stack) from [<c0220b10>] (__warn+0xfc/0x114)
[   62.816280]  r10:c54dd600 r9:00000009 r8:bf4bd970 r7:0000015b r6:00000009 r5:bf4bd970
[   62.816291]  r4:bf4c6c7c r3:c1205094
[   62.816307] [<c0220a14>] (__warn) from [<c0b84038>] (warn_slowpath_fmt+0x70/0xd8)
[   62.816320]  r7:0000015b r6:bf4c6c7c r5:c1205048 r4:00000000
[   62.816427] [<c0b83fcc>] (warn_slowpath_fmt) from [<bf4bd970>] (_c_spi_read_regs+0x200/0x220 [nrc])
[   62.816441]  r9:c54dd650 r8:00000004 r7:c567d810 r6:00000010 r5:c4f16c00 r4:c54dd690
[   62.816617] [<bf4bd770>] (_c_spi_read_regs [nrc]) from [<bf4bc350>] (c_spi_read_regs+0x58/0xa4 [nrc])
[   62.816630]  r8:bf4bd770 r7:00000010 r6:c54dd690 r5:00000000 r4:c4f16c00
[   62.816795] [<bf4bc2f8>] (c_spi_read_regs [nrc]) from [<bf4bf21c>] (c_spi_probe+0xb4/0x1e4 [nrc])
[   62.816812]  r9:c54dd690 r8:bf4cc88c r7:c54dd650 r6:c4f16c00 r5:00000000 r4:00000000
[   62.816906] [<bf4bf168>] (c_spi_probe [nrc]) from [<c08b3be0>] (spi_drv_probe+0x94/0xb8)
[   62.816920]  r10:00000000 r9:bf4cc600 r8:bf4cc320 r7:00000000 r6:bf4cc310 r5:00000000
[   62.816930]  r4:c4f16c00 r3:bf4bf168
[   62.816951] [<c08b3b4c>] (spi_drv_probe) from [<c084f634>] (really_probe+0x20c/0x3e8)
[   62.816963]  r7:00000000 r6:c140063c r5:c1400634 r4:c4f16c00
[   62.816980] [<c084f428>] (really_probe) from [<c084f9fc>] (driver_probe_device+0x6c/0xc4)
[   62.816994]  r10:00000000 r9:bf4cc600 r8:bf4cc064 r7:c084fc4c r6:bf4cc320 r5:bf4cc320
[   62.817003]  r4:c4f16c00
[   62.817021] [<c084f990>] (driver_probe_device) from [<c084fc44>] (device_driver_attach+0x68/0x70)
[   62.817032]  r5:00000000 r4:c4f16c00
[   62.817049] [<c084fbdc>] (device_driver_attach) from [<c084fcb4>] (__driver_attach+0x68/0xdc)
[   62.817061]  r7:c084fc4c r6:c4f16c00 r5:bf4cc320 r4:00000000
[   62.817094] [<c084fc4c>] (__driver_attach) from [<c084d568>] (bus_for_each_dev+0x84/0xc4)
[   62.817112]  r7:c084fc4c r6:bf4cc320 r5:c1205048 r4:c4e9ebb4
[   62.817129] [<c084d4e4>] (bus_for_each_dev) from [<c084ee94>] (driver_attach+0x2c/0x30)
[   62.817141]  r7:00000000 r6:c4e9ed80 r5:c12f90e0 r4:bf4cc320
[   62.817158] [<c084ee68>] (driver_attach) from [<c084e7cc>] (bus_add_driver+0x1c8/0x1e8)
[   62.817175] [<c084e604>] (bus_add_driver) from [<c0850380>] (driver_register+0x84/0x118)
[   62.817190]  r7:bf4cbe58 r6:c4f16c00 r5:c54dd600 r4:bf4cc320
[   62.817222] [<c08502fc>] (driver_register) from [<c08b3af8>] (__spi_register_driver+0x58/0x5c)
[   62.817234]  r5:c54dd600 r4:bf4cc240
[   62.817337] [<c08b3aa0>] (__spi_register_driver) from [<bf4bf500>] (nrc_hif_cspi_init+0xe0/0x148 [nrc])
[   62.817526] [<bf4bf420>] (nrc_hif_cspi_init [nrc]) from [<bf4b55e8>] (nrc_hif_init+0x1c/0xe0 [nrc])
[   62.817550]  r7:bf4cbe58 r6:bf4cc064 r5:c56c17a0 r4:c56c17a0
[   62.817736] [<bf4b55cc>] (nrc_hif_init [nrc]) from [<bf4b2f00>] (nrc_platform_probe+0x6c/0x134 [nrc])
[   62.817751]  r5:c56c37a0 r4:c56c17a0
[   62.817858] [<bf4b2e94>] (nrc_platform_probe [nrc]) from [<c08518a4>] (platform_drv_probe+0x58/0xa8)
[   62.817872]  r7:00000000 r6:bf4cc064 r5:00000000 r4:bf4cbe68
[   62.817891] [<c085184c>] (platform_drv_probe) from [<c084f634>] (really_probe+0x20c/0x3e8)
[   62.817903]  r7:00000000 r6:c140063c r5:c1400634 r4:bf4cbe68
[   62.817927] [<c084f428>] (really_probe) from [<c084f9fc>] (driver_probe_device+0x6c/0xc4)
[   62.817950]  r10:c1205048 r9:bf4cc600 r8:c529e480 r7:c084fc4c r6:bf4cc064 r5:bf4cc064
[   62.817961]  r4:bf4cbe68
[   62.817990] [<c084f990>] (driver_probe_device) from [<c084fc44>] (device_driver_attach+0x68/0x70)
[   62.818006]  r5:00000000 r4:bf4cbe68
[   62.818035] [<c084fbdc>] (device_driver_attach) from [<c084fcb4>] (__driver_attach+0x68/0xdc)
[   62.818051]  r7:c084fc4c r6:bf4cbe68 r5:bf4cc064 r4:00000000
[   62.818081] [<c084fc4c>] (__driver_attach) from [<c084d568>] (bus_for_each_dev+0x84/0xc4)
[   62.818096]  r7:c084fc4c r6:bf4cc064 r5:c1205048 r4:c4e9ee34
[   62.818125] [<c084d4e4>] (bus_for_each_dev) from [<c084ee94>] (driver_attach+0x2c/0x30)
[   62.818140]  r7:00000000 r6:c4e9e300 r5:c12f0f28 r4:bf4cc064
[   62.818160] [<c084ee68>] (driver_attach) from [<c084e7cc>] (bus_add_driver+0x1c8/0x1e8)
[   62.818189] [<c084e604>] (bus_add_driver) from [<c0850380>] (driver_register+0x84/0x118)
[   62.818202]  r7:00000000 r6:00000002 r5:bf4dd000 r4:bf4cc064
[   62.818232] [<c08502fc>] (driver_register) from [<c08517f8>] (__platform_driver_register+0x50/0x58)
[   62.818245]  r5:bf4dd000 r4:00000000
[   62.818343] [<c08517a8>] (__platform_driver_register) from [<bf4dd040>] (nrc_init+0x40/0x1000 [nrc])
[   62.818450] [<bf4dd000>] (nrc_init [nrc]) from [<c02022a8>] (do_one_initcall+0x50/0x274)
[   62.818461]  r5:bf4dd000 r4:c1205048
[   62.818479] [<c0202258>] (do_one_initcall) from [<c02cc000>] (do_init_module+0x70/0x274)
[   62.818492]  r8:c529e480 r7:c529e440 r6:00000002 r5:c529e480 r4:bf4cc600
[   62.818507] [<c02cbf90>] (do_init_module) from [<c02ce8d0>] (load_module+0x254c/0x28b0)
[   62.818518]  r6:00000002 r5:00000002 r4:c567df30
[   62.818533] [<c02cc384>] (load_module) from [<c02ceebc>] (sys_finit_module+0xc8/0xfc)
[   62.818552]  r10:0000017b r9:c567c000 r8:c0200204 r7:00000003 r6:0002de04 r5:00000000
[   62.818562]  r4:c1205048
[   62.818579] [<c02cedf4>] (sys_finit_module) from [<c0200040>] (ret_fast_syscall+0x0/0x28)
[   62.818589] Exception stack(0xc567dfa8 to 0xc567dff0)
[   62.818604] dfa0:                   00000000 00000002 00000003 0002de04 00000000 b6f61074
[   62.818636] dfc0: 00000000 00000002 6bc88800 0000017b 01eb92d8 00000002 bea56734 00000000
[   62.818649] dfe0: bea56560 bea56550 00023bc0 b6c459e0
[   62.818661]  r7:0000017b r6:6bc88800 r5:00000002 r4:00000000
[   62.818680] ---[ end trace b1e1c50376dc55a0 ]---
[   62.818701] [Error] failed to read register(0x0).
[   62.818737] nrc-cspi: probe of spi0.0 failed with error -22
[   62.819069] 8<--- cut here ---
[   62.819098] Unable to handle kernel NULL pointer dereference at virtual address 000001d4
[   62.819122] pgd = 49794d2e
[   62.819145] [000001d4] *pgd=0566c003, *pmd=e7f0c003
[   62.819199] Internal error: Oops: 207 [#1] SMP ARM
[   62.819213] Modules linked in: nrc(O+) mac80211 libarc4 snd_soc_hdmi_codec 8021q garp stp llc joydev v3d gpu_sched brcmfmac brcmutil sha256_generic raspberrypi_hwmon cfg80211 rfkill i2c_brcmstb vc4 cec i2c_bcm2835 bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem bcm2835_isp(C) videobuf2_vmalloc bcm2835_mmal_vchiq(C) vc_sm_cma(C) videobuf2_dma_contig spi_bcm2835 videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc snd_bcm2835(C) drm_kms_helper snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer rpivid_mem snd syscopyarea sysfillrect sysimgblt fb_sys_fops w1_gpio wire cn uio_pdrv_genirq uio nvmem_rmem i2c_dev drm drm_panel_orientation_quirks backlight fuse ip_tables x_tables ipv6
[   62.819770] CPU: 2 PID: 1074 Comm: insmod Tainted: G        WC O      5.10.63-v7l+ #1488
[   62.819784] Hardware name: BCM2711
[   62.819890] PC is at spi_start+0x9c/0x1a8 [nrc]
[   62.819982] LR is at spi_start+0x9c/0x1a8 [nrc]
[   62.819996] pc : [<bf4bde2c>]    lr : [<bf4bde2c>]    psr: 40000013
[   62.820010] sp : c567dbd0  ip : c567dbd0  fp : c567dbfc
[   62.820024] r10: 00000000  r9 : bf4cc600  r8 : 00000000
[   62.820037] r7 : 00000000  r6 : bf4ce2fc  r5 : c54dd600  r4 : c54dd650
[   62.820051] r3 : c567c000  r2 : 00200002  r1 : c023c418  r0 : c54dd664
[   62.820068] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   62.820083] Control: 30c5383d  Table: 0542a100  DAC: 55555555
[   62.820099] Process insmod (pid: 1074, stack limit = 0x00b10762)
[   62.820114] Stack: (0xc567dbd0 to 0xc567e000)
[   62.820131] dbc0:                                     00000000 bf4b567c bf4bf500 c54dd600
[   62.820149] dbe0: c56c17a0 bf4cc064 bf4cbe58 bf4cc064 c567dc14 c567dc00 bf4b56a0 bf4bdd9c
[   62.820167] dc00: c56c17a0 c56c37a0 c567dc3c c567dc18 bf4b2f00 bf4b55d8 bf4cbe68 00000000
[   62.820183] dc20: bf4cbe68 00000000 bf4cc064 00000000 c567dc5c c567dc40 c08518a4 bf4b2ea0
[   62.820200] dc40: bf4cbe68 c1400634 c140063c 00000000 c567dc94 c567dc60 c084f634 c0851858
[   62.820218] dc60: c529e480 0000003d c567dc94 bf4cbe68 bf4cc064 bf4cc064 c084fc4c c529e480
[   62.820234] dc80: bf4cc600 c1205048 c567dcac c567dc98 c084f9fc c084f434 bf4cbe68 00000000
[   62.820251] dca0: c567dccc c567dcb0 c084fc44 c084f99c 00000000 bf4cc064 bf4cbe68 c084fc4c
[   62.820269] dcc0: c567dcec c567dcd0 c084fcb4 c084fbe8 c4e9ee34 c1205048 bf4cc064 c084fc4c
[   62.820287] dce0: c567dd1c c567dcf0 c084d568 c084fc58 c567dd28 c194da58 c4e9ee34 4f649745
[   62.820304] dd00: bf4cc064 c12f0f28 c4e9e300 00000000 c567dd2c c567dd20 c084ee94 c084d4f0
[   62.820321] dd20: c567dd54 c567dd30 c084e7cc c084ee74 bf4c56d0 c567dd40 bf4cc064 bf4dd000
[   62.820338] dd40: 00000002 00000000 c567dd6c c567dd58 c0850380 c084e610 00000000 bf4dd000
[   62.820355] dd60: c567dd7c c567dd70 c08517f8 c0850308 c567dd94 c567dd80 bf4dd040 c08517b4
[   62.820397] dd80: c1205048 bf4dd000 c567de0c c567dd98 c02022a8 bf4dd00c 00000000 00000cc0
[   62.820415] dda0: c567ddc4 c567ddb0 c0b8e174 c029b4ec c1801e40 c042421c c567de0c c567ddc8
[   62.820440] ddc0: c042421c c03e0d2c c567de04 c567ddd8 c0405d3c 00000008 c567de0c c529e380
[   62.820457] dde0: f08dc000 4f649745 00000002 bf4cc600 c529e480 00000002 c529e440 c529e480
[   62.820474] de00: c567de34 c567de10 c02cc000 c0202264 c567de34 c567de20 c0405ea4 c567df30
[   62.820491] de20: 00000002 00000002 c567df14 c567de38 c02ce8d0 c02cbf9c bf4cc60c 00007fff
[   62.820508] de40: bf4cc600 c02ca9f4 f09160c8 c1205048 c0e2b010 c0e2b028 c0e2afb8 bf4ea95a
[   62.820525] de60: c0e2b078 bf4cc80c bf4cac74 c4f15c18 bf4cc648 c529e448 c0e2ab64 c5670001
[   62.820542] de80: 00000000 c0ee78dc c0ecffd8 00000000 00000000 00000000 00000000 00000000
[   62.820559] dea0: 00000000 00000000 6e72656b 00006c65 00000000 00000000 00000000 00000000
[   62.820576] dec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   62.820593] dee0: 00000000 4f649745 c567df2c c1205048 00000000 0002de04 00000003 c0200204
[   62.820610] df00: c567c000 0000017b c567dfa4 c567df18 c02ceebc c02cc390 c567df2c 7fffffff
[   62.820627] df20: 00000000 00000002 c567df24 f08dc000 f08f993c f08fe840 f08dc000 0003a0c8
[   62.820644] df40: f0915a60 f09158f8 f0906ea8 00023000 00029ae0 0000d2f8 0002dc74 00000000
[   62.820661] df60: 00000000 00000000 0000d2e8 00000026 00000027 0000001f 00000016 00000011
[   62.820678] df80: 00000000 4f649745 00000000 00000002 6bc88800 0000017b 00000000 c567dfa8
[   62.820695] dfa0: c0200040 c02cee00 00000000 00000002 00000003 0002de04 00000000 b6f61074
[   62.820712] dfc0: 00000000 00000002 6bc88800 0000017b 01eb92d8 00000002 bea56734 00000000
[   62.820729] dfe0: bea56560 bea56550 00023bc0 b6c459e0 60000010 00000003 00000000 00000000
[   62.820743] Backtrace: 
[   62.820926] [<bf4bdd90>] (spi_start [nrc]) from [<bf4b56a0>] (nrc_hif_init+0xd4/0xe0 [nrc])
[   62.820930] 8<--- cut here ---
[   62.820947] Unable to handle kernel NULL pointer dereference at virtual address 00000040
[   62.820964]  r8:bf4cc064 r7:bf4cbe58 r6:bf4cc064 r5:c56c17a0 r4:c54dd600
[   62.820970] pgd = 37a5dc2f
[   62.820984] [00000040] *pgd=80000000004003
[   62.821144] [<bf4b55cc>] (nrc_hif_init [nrc]) from [<bf4b2f00>] (nrc_platform_probe+0x6c/0x134 [nrc])
[   62.821153]  r5:c56c37a0 r4:c56c17a0
[   62.821248] [<bf4b2e94>] (nrc_platform_probe [nrc]) from [<c08518a4>] (platform_drv_probe+0x58/0xa8)
[   62.821260]  r7:00000000 r6:bf4cc064 r5:00000000 r4:bf4cbe68
[   62.821276] [<c085184c>] (platform_drv_probe) from [<c084f634>] (really_probe+0x20c/0x3e8)
[   62.821298]  r7:00000000 r6:c140063c r5:c1400634 r4:bf4cbe68
[   62.821305] , *pmd=00000000
[   62.821327] [<c084f428>] (really_probe) from [<c084f9fc>] (driver_probe_device+0x6c/0xc4)
[   62.821343]  r10:c1205048 r9:bf4cc600 r8:c529e480 r7:c084fc4c r6:bf4cc064 r5:bf4cc064
[   62.821356]  r4:bf4cbe68
[   62.821382] [<c084f990>] (driver_probe_device) from [<c084fc44>] (device_driver_attach+0x68/0x70)
[   62.821390]  r5:00000000 r4:bf4cbe68
[   62.821405] [<c084fbdc>] (device_driver_attach) from [<c084fcb4>] (__driver_attach+0x68/0xdc)
[   62.821415]  r7:c084fc4c r6:bf4cbe68 r5:bf4cc064 r4:00000000

[   62.821446] [<c084fc4c>] (__driver_attach) from [<c084d568>] (bus_for_each_dev+0x84/0xc4)
[   62.821456]  r7:c084fc4c r6:bf4cc064 r5:c1205048 r4:c4e9ee34
[   62.821476] [<c084d4e4>] (bus_for_each_dev) from [<c084ee94>] (driver_attach+0x2c/0x30)
[   62.821493]  r7:00000000 r6:c4e9e300 r5:c12f0f28 r4:bf4cc064
[   62.821513] [<c084ee68>] (driver_attach) from [<c084e7cc>] (bus_add_driver+0x1c8/0x1e8)
[   62.821534] [<c084e604>] (bus_add_driver) from [<c0850380>] (driver_register+0x84/0x118)
[   62.821550]  r7:00000000 r6:00000002 r5:bf4dd000 r4:bf4cc064
[   62.821573] [<c08502fc>] (driver_register) from [<c08517f8>] (__platform_driver_register+0x50/0x58)
[   62.821587]  r5:bf4dd000 r4:00000000
[   62.821709] [<c08517a8>] (__platform_driver_register) from [<bf4dd040>] (nrc_init+0x40/0x1000 [nrc])
[   62.821810] [<bf4dd000>] (nrc_init [nrc]) from [<c02022a8>] (do_one_initcall+0x50/0x274)
[   62.821825]  r5:bf4dd000 r4:c1205048
[   62.821846] [<c0202258>] (do_one_initcall) from [<c02cc000>] (do_init_module+0x70/0x274)
[   62.821863]  r8:c529e480 r7:c529e440 r6:00000002 r5:c529e480 r4:bf4cc600
[   62.821894] [<c02cbf90>] (do_init_module) from [<c02ce8d0>] (load_module+0x254c/0x28b0)
[   62.821913]  r6:00000002 r5:00000002 r4:c567df30
[   62.821932] [<c02cc384>] (load_module) from [<c02ceebc>] (sys_finit_module+0xc8/0xfc)
[   62.821950]  r10:0000017b r9:c567c000 r8:c0200204 r7:00000003 r6:0002de04 r5:00000000
[   62.821963]  r4:c1205048
[   62.821982] [<c02cedf4>] (sys_finit_module) from [<c0200040>] (ret_fast_syscall+0x0/0x28)
[   62.821996] Exception stack(0xc567dfa8 to 0xc567dff0)
[   62.822013] dfa0:                   00000000 00000002 00000003 0002de04 00000000 b6f61074
[   62.822030] dfc0: 00000000 00000002 6bc88800 0000017b 01eb92d8 00000002 bea56734 00000000
[   62.822046] dfe0: bea56560 bea56550 00023bc0 b6c459e0
[   62.822062]  r7:0000017b r6:6bc88800 r5:00000002 r4:00000000
[   62.822093] Code: e34b6f4c e58d7000 e3a02602 eb37b55f (e59801d4) 
[   62.822120] ---[ end trace b1e1c50376dc55a1 ]---
[   62.822128] Internal error: Oops: 206 [#2] SMP ARM
[   62.822137] Modules linked in: nrc(O+) mac80211 libarc4 snd_soc_hdmi_codec 8021q garp stp llc joydev v3d gpu_sched brcmfmac brcmutil sha256_generic raspberrypi_hwmon cfg80211 rfkill i2c_brcmstb vc4 cec i2c_bcm2835 bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem bcm2835_isp(C) videobuf2_vmalloc bcm2835_mmal_vchiq(C) vc_sm_cma(C) videobuf2_dma_contig spi_bcm2835 videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc snd_bcm2835(C) drm_kms_helper snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer rpivid_mem snd syscopyarea sysfillrect sysimgblt fb_sys_fops w1_gpio wire cn uio_pdrv_genirq uio nvmem_rmem i2c_dev drm drm_panel_orientation_quirks backlight fuse ip_tables x_tables ipv6
[   62.822681] CPU: 1 PID: 1076 Comm: nrc-spi-rx Tainted: G      D WC O      5.10.63-v7l+ #1488
[   62.822696] Hardware name: BCM2711
[   62.822802] PC is at spi_rx_thread+0xa4/0x9bc [nrc]
[   62.822904] LR is at spi_rx_thread+0x78/0x9bc [nrc]
[   62.822919] pc : [<bf4be850>]    lr : [<bf4be824>]    psr: 60000013
[   62.822933] sp : c4d97ef8  ip : c4d97ef8  fp : c4d97f74
[   62.822946] r10: c54dd600  r9 : bf4ce2fc  r8 : bf4be7ac
[   62.822960] r7 : c4d96000  r6 : 00000000  r5 : c529ee80  r4 : c529e300
[   62.822974] r3 : 00000000  r2 : 00000a20  r1 : 00000000  r0 : 00000000
[   62.822991] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   62.823006] Control: 30c5383d  Table: 054f7d80  DAC: 55555555
[   62.823023] Process nrc-spi-rx (pid: 1076, stack limit = 0xdf9b164c)
[   62.823038] Stack: (0xc4d97ef8 to 0xc4d98000)
[   62.823054] 7ee0:                                                       c0244554 bf4be7ac
[   62.823072] 7f00: c54dd600 c567db54 c4d97f3c c4d97f18 bf4c7054 bf4c6d0c bf4c704c bf4c7038
[   62.823089] 7f20: c529e300 c4d96000 c56c17a0 00000000 c4d97f54 c4d97f40 c0b93864 c032f004
[   62.823106] 7f40: ffffe000 4f649745 c4d97f74 c529e300 c529ee80 00000000 c4d96000 bf4be7ac
[   62.823123] 7f60: c54dd600 c567db54 c4d97fac c4d97f78 c02459f8 bf4be7b8 c529e324 c529e324
[   62.823140] 7f80: ffffe000 c529ee80 c0245888 00000000 00000000 00000000 00000000 00000000
[   62.823157] 7fa0: 00000000 c4d97fb0 c02000ec c0245894 00000000 00000000 00000000 00000000
[   62.823175] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   62.823191] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[   62.823218] Backtrace: 
[   62.823350] [<bf4be7ac>] (spi_rx_thread [nrc]) from [<c02459f8>] (kthread+0x170/0x174)
[   62.823373]  r10:c567db54 r9:c54dd600 r8:bf4be7ac r7:c4d96000 r6:00000000 r5:c529ee80
[   62.823386]  r4:c529e300
[   62.823408] [<c0245888>] (kthread) from [<c02000ec>] (ret_from_fork+0x14/0x28)
[   62.823432] Exception stack(0xc4d97fb0 to 0xc4d97ff8)
[   62.823455] 7fa0:                                     00000000 00000000 00000000 00000000
[   62.823478] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   62.823494] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   62.823513]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0245888
[   62.823533]  r4:c529ee80
[   62.823562] Code: 1a00003d e51b3048 e1a01101 e3a02ea2 (e5935040) 
[   62.823584] ---[ end trace b1e1c50376dc55a2 ]---

Any suggestions?

AMD Architecture Driver Support

Hello!
This is definitely not an issue, but I would like to know if I can connect the AHMB7292S with AMD devices. I am totally new to this newracom's driver but I know that is ARM based so the possible answer is no. But is there any chance to have AMD compatibility?
I would really appreciate your help thank you.

failed to register hw

I have been trying out the latest master branch. I'm not sure why it is not loading the driver. I am using a pi4 on 64 bit kernel 5.15.32-v8. Is this kernel to new?

$sudo insmod /lib/modules/$(uname -r)/extra/nrc.ko  hifspeed=10000000 spi_bus_num=0 spi_cs_num=0 spi_gpio_irq=5 spi_gpio_poll=-1 fw_name=uni_s1g.bin power_save=0 ndp_preq=1 auto_ba=1 sw_enc=1 listen_interval=1000 credit_ac_be=40
[  122.130680] nrc: unknown parameter 'spi_gpio_poll' ignored
[  122.163484] start FW 300
[  122.719501] end FW
[  125.927391] ------------[ cut here ]------------
[  125.932045] WARNING: CPU: 0 PID: 128 at net/wireless/reg.c:2593 wiphy_apply_custom_regulatory+0x114/0x120 [cfg80211]
[  125.942812] Modules linked in: nrc(O) mac80211 libarc4 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) raspberrypi_hwmon bcm2835_isp(C) v3d gpu_sched bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem brcmfmac videobuf2_vmalloc videobuf2_dma_contig brcmutil videobuf2_memops i2c_brcmstb videobuf2_v4l2 videobuf2_common vc_sm_cma(C) snd_soc_bcm2835_i2s spi_bcm2835 vc4 videodev snd_bcm2835(C) cec mc drm_kms_helper cfg80211 rpivid_mem drm rfkill drm_panel_orientation_quirks pps_gpio syscopyarea sysfillrect sysimgblt fb_sys_fops backlight nvmem_rmem uio_pdrv_genirq uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[  126.006882] CPU: 0 PID: 128 Comm: kworker/0:3 Tainted: G         C O      5.15.32-v8 #1
[  126.014903] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[  126.021351] Workqueue: events nrc_check_start [nrc]
[  126.026300] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  126.033273] pc : wiphy_apply_custom_regulatory+0x114/0x120 [cfg80211]
[  126.039920] lr : nrc_register_hw+0x3c8/0x6f0 [nrc]
[  126.044774] sp : ffffffc009c5bc80
[  126.048091] x29: ffffffc009c5bc80 x28: ffffff8046e00242 x27: 0000000000000002
[  126.055247] x26: ffffff80464246e8 x25: ffffff8046420460 x24: 0000000000000000
[  126.062402] x23: ffffff8046420460 x22: ffffffc00110fb30 x21: ffffff8046420300
[  126.069555] x20: 0000000000000000 x19: ffffff8046421fc0 x18: 00000000000024d0
[  126.076709] x17: 00000100000000c8 x16: 0000032000000000 x15: ffffffc001117118
[  126.083863] x14: ffffffc0011171a8 x13: ffffffc001117148 x12: 0000000e00000000
[  126.091017] x11: 0000000000000006 x10: 000000000000002c x9 : ffffffc0010f77a8
[  126.098170] x8 : 000000000000000b x7 : ffffffc001117b68 x6 : 0000000000000009
[  126.105322] x5 : ffffffc00110faf8 x4 : ffffffc001117d18 x3 : 0000000000000007
[  126.112473] x2 : 0000000000200001 x1 : ffffffc00110fb30 x0 : 0000000000200001
[  126.119628] Call trace:
[  126.122077]  wiphy_apply_custom_regulatory+0x114/0x120 [cfg80211]
[  126.128378]  nrc_register_hw+0x3c8/0x6f0 [nrc]
[  126.132883]  nrc_check_start+0x4d0/0x780 [nrc]
[  126.137388]  process_one_work+0x1dc/0x490
[  126.141412]  worker_thread+0x144/0x470
[  126.145168]  kthread+0x144/0x160
[  126.148406]  ret_from_fork+0x10/0x20
[  126.151991] ---[ end trace 0a3ee9eceff2caab ]---
[  126.157302] ------------[ cut here ]------------
[  126.161944] WARNING: CPU: 0 PID: 128 at net/wireless/core.c:886 wiphy_register+0x920/0x940 [cfg80211]
[  126.171415] Modules linked in: nrc(O) mac80211 libarc4 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) raspberrypi_hwmon bcm2835_isp(C) v3d gpu_sched bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem brcmfmac videobuf2_vmalloc videobuf2_dma_contig brcmutil videobuf2_memops i2c_brcmstb videobuf2_v4l2 videobuf2_common vc_sm_cma(C) snd_soc_bcm2835_i2s spi_bcm2835 vc4 videodev snd_bcm2835(C) cec mc drm_kms_helper cfg80211 rpivid_mem drm rfkill drm_panel_orientation_quirks pps_gpio syscopyarea sysfillrect sysimgblt fb_sys_fops backlight nvmem_rmem uio_pdrv_genirq uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[  126.235479] CPU: 0 PID: 128 Comm: kworker/0:3 Tainted: G        WC O      5.15.32-v8 #1
[  126.243497] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[  126.249944] Workqueue: events nrc_check_start [nrc]
[  126.254890] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  126.261862] pc : wiphy_register+0x920/0x940 [cfg80211]
[  126.267214] lr : ieee80211_register_hw+0x828/0xbf0 [mac80211]
[  126.273179] sp : ffffffc009c5bba0
[  126.276495] x29: ffffffc009c5bba0 x28: 0000000000000000 x27: 0000000000000000
[  126.283648] x26: 0000000000000000 x25: 0000000000000000 x24: ffffffc0011e2468
[  126.290801] x23: ffffffc0011e2460 x22: ffffff8046421be0 x21: 0000000000000005
[  126.297953] x20: ffffff8046420000 x19: ffffff8046420300 x18: 0000000000000014
[  126.305106] x17: 0000000007fc16f5 x16: 000000004dd9af0c x15: 00000000d24a0006
[  126.312259] x14: 0000000005ea4a86 x13: 00000000ccedeb6e x12: 0000000000000068
[  126.319411] x11: 00000000000000c0 x10: 00000000ffffffbd x9 : ffffffc000ee4280
[  126.326564] x8 : ffffff8046420438 x7 : 000000007fffffff x6 : 0000000000000005
[  126.333716] x5 : 0000000000000004 x4 : 0000000000000000 x3 : 0000000000000008
[  126.340866] x2 : 000000009c3f2584 x1 : 0000000000000000 x0 : 0000000000000000
[  126.348019] Call trace:
[  126.350467]  wiphy_register+0x920/0x940 [cfg80211]
[  126.355465]  ieee80211_register_hw+0x828/0xbf0 [mac80211]
[  126.361074]  nrc_register_hw+0x584/0x6f0 [nrc]
[  126.365581]  nrc_check_start+0x4d0/0x780 [nrc]
[  126.370085]  process_one_work+0x1dc/0x490
[  126.374109]  worker_thread+0x144/0x470
[  126.377864]  kthread+0x144/0x160
[  126.381103]  ret_from_fork+0x10/0x20
[  126.384687] ---[ end trace 0a3ee9eceff2caac ]---
[  126.389636] failed to register hw
[  126.393027] ------------[ cut here ]------------
[  126.397692] refcount_t: underflow; use-after-free.
[  126.402564] WARNING: CPU: 0 PID: 128 at lib/refcount.c:28 refcount_warn_saturate+0xf8/0x150
[  126.410958] Modules linked in: nrc(O) mac80211 libarc4 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) raspberrypi_hwmon bcm2835_isp(C) v3d gpu_sched bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem brcmfmac videobuf2_vmalloc videobuf2_dma_contig brcmutil videobuf2_memops i2c_brcmstb videobuf2_v4l2 videobuf2_common vc_sm_cma(C) snd_soc_bcm2835_i2s spi_bcm2835 vc4 videodev snd_bcm2835(C) cec mc drm_kms_helper cfg80211 rpivid_mem drm rfkill drm_panel_orientation_quirks pps_gpio syscopyarea sysfillrect sysimgblt fb_sys_fops backlight nvmem_rmem uio_pdrv_genirq uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[  126.475019] CPU: 0 PID: 128 Comm: kworker/0:3 Tainted: G        WC O      5.15.32-v8 #1
[  126.483037] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[  126.489483] Workqueue: events nrc_check_start [nrc]
[  126.494432] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  126.501405] pc : refcount_warn_saturate+0xf8/0x150
[  126.506208] lr : refcount_warn_saturate+0xf8/0x150
[  126.511005] sp : ffffffc009c5bc90
[  126.514320] x29: ffffffc009c5bc90 x28: 0000000000000000 x27: 0000000000000000
[  126.521473] x26: ffffffc001117d38 x25: ffffff8046d4c700 x24: ffffffc001118ed0
[  126.528627] x23: ffffff8046421fc0 x22: ffffff80464220e0 x21: ffffff8046421f60
[  126.535781] x20: ffffff80464207e0 x19: ffffff8046420470 x18: ffffffc089c5b9b7
[  126.542933] x17: 0000000007fc16f5 x16: 000000004dd9af0c x15: 072007200720072e
[  126.550087] x14: 0765076507720766 x13: 072007200720072e x12: 0765076507720766
[  126.557240] x11: 0720072007200720 x10: ffffffc0093eeb48 x9 : ffffffc0080f91f0
[  126.564392] x8 : ffffffc009396b48 x7 : ffffffc0093eeb48 x6 : 80000000fffff000
[  126.571544] x5 : 0000000000000000 x4 : 0000000000000002 x3 : ffffffc00909c008
[  126.578696] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff8042dc9e40
[  126.585848] Call trace:
[  126.588296]  refcount_warn_saturate+0xf8/0x150
[  126.592747]  kobject_put+0x10c/0x120
[  126.596332]  put_device+0x20/0x30
[  126.599659]  wiphy_free+0x20/0x30 [cfg80211]
[  126.604139]  ieee80211_free_hw+0x94/0xc0 [mac80211]
[  126.609228]  nrc_free_hw+0x28/0x40 [nrc]
[  126.613212]  nrc_check_start+0x544/0x780 [nrc]
[  126.617716]  process_one_work+0x1dc/0x490
[  126.621739]  worker_thread+0x144/0x470
[  126.625494]  kthread+0x144/0x160
[  126.628731]  ret_from_fork+0x10/0x20
[  126.632317] ---[ end trace 0a3ee9eceff2caad ]---
[  126.800390] audit: type=1334 audit(1656473733.720:7): prog-id=11 op=LOAD
[  127.479791] tun: Universal TUN/TAP device driver, 1.6
[  128.675013] ------------[ cut here ]------------
[  128.679665] kernel BUG at kernel/fork.c:407!
[  128.683942] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[  128.689435] Modules linked in: tun nrc(O) mac80211 libarc4 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) raspberrypi_hwmon bcm2835_isp(C) v3d gpu_sched bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem brcmfmac videobuf2_vmalloc videobuf2_dma_contig brcmutil videobuf2_memops i2c_brcmstb videobuf2_v4l2 videobuf2_common vc_sm_cma(C) snd_soc_bcm2835_i2s spi_bcm2835 vc4 videodev snd_bcm2835(C) cec mc drm_kms_helper cfg80211 rpivid_mem drm rfkill drm_panel_orientation_quirks pps_gpio syscopyarea sysfillrect sysimgblt fb_sys_fops backlight nvmem_rmem uio_pdrv_genirq uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[  128.753858] CPU: 2 PID: 295 Comm: bash Tainted: G        WC O      5.15.32-v8 #1
[  128.761266] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[  128.767710] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  128.774681] pc : copy_process+0xf00/0x16e0
[  128.778800] lr : copy_process+0xf18/0x16e0
[  128.782905] sp : ffffffc009d5bc00
[  128.786219] x29: ffffffc009d5bc10 x28: ffffff8044f83300 x27: ffffff8046c8dac0
[  128.793374] x26: 0000000000000000 x25: 00000000ffffffff x24: ffffff80493d1e40
[  128.800528] x23: 0000000001200000 x22: ffffffc009d5bd80 x21: ffffffc009562d78
[  128.807680] x20: 0000000000000000 x19: 0000000000000000 x18: 0000000000000000
[  128.814832] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[  128.821982] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[  128.829133] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
[  128.836283] x8 : ffffff8044cc1888 x7 : 0000000000000000 x6 : 000000000000003f
[  128.843433] x5 : 0000000000000040 x4 : fffffffffffffff0 x3 : ffffff8044cbd888
[  128.850583] x2 : 0000000000000008 x1 : 0000000000000000 x0 : 0000000044f83320
[  128.857734] Call trace:
[  128.860181]  copy_process+0xf00/0x16e0
[  128.863940]  kernel_clone+0x98/0x440
[  128.867524]  __do_sys_clone+0x58/0x90
[  128.871194]  __arm64_sys_clone+0x2c/0x40
[  128.875126]  invoke_syscall+0x50/0x120
[  128.878883]  el0_svc_common.constprop.0+0x104/0x130
[  128.883770]  do_el0_svc+0x30/0xa0
[  128.887090]  el0_svc+0x24/0x70
[  128.890153]  el0t_64_sync_handler+0x1a4/0x1b0
[  128.894518]  el0t_64_sync+0x1a0/0x1a4
[  128.898190] Code: f100835f 54fffea1 f94cd31c 17fffcf8 (d4210000) 
[  128.904290] ---[ end trace 0a3ee9eceff2caae ]---
[  128.908910] note: bash[295] exited with preempt_count 1
[  128.917004] ------------[ cut here ]------------
[  128.921648] WARNING: CPU: 2 PID: 0 at kernel/rcu/tree.c:613 rcu_eqs_enter.constprop.0+0xf4/0x110
[  128.930470] Modules linked in: tun nrc(O) mac80211 libarc4 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) raspberrypi_hwmon bcm2835_isp(C) v3d gpu_sched bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem brcmfmac videobuf2_vmalloc videobuf2_dma_contig brcmutil videobuf2_memops i2c_brcmstb videobuf2_v4l2 videobuf2_common vc_sm_cma(C) snd_soc_bcm2835_i2s spi_bcm2835 vc4 videodev snd_bcm2835(C) cec mc drm_kms_helper cfg80211 rpivid_mem drm rfkill drm_panel_orientation_quirks pps_gpio syscopyarea sysfillrect sysimgblt fb_sys_fops backlight nvmem_rmem uio_pdrv_genirq uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[  128.994887] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G      D WC O      5.15.32-v8 #1
[  129.002555] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[  129.008998] pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  129.015968] pc : rcu_eqs_enter.constprop.0+0xf4/0x110
[  129.021031] lr : rcu_eqs_enter.constprop.0+0x1c/0x110
[  129.026092] sp : ffffffc0096e3db0
[  129.029406] x29: ffffffc0096e3db0 x28: 003894b5efb2d4f1 x27: 003473e87592e210
[  129.036560] x26: ffffff8040265ac0 x25: 0000000000000000 x24: 0000000000000000
[  129.043713] x23: ffffffc008ea7050 x22: ffffffc0090ac878 x21: ffffffc0093789e0
[  129.050864] x20: ffffffc009378aec x19: ffffff80fb7c07c0 x18: 0000000000000000
[  129.058015] x17: 0000000000000002 x16: 0000000000000001 x15: 0004c4a76a9e5d74
[  129.065166] x14: 0004c4a76a9e5d74 x13: 0000000000000000 x12: 0000000000000001
[  129.072317] x11: ffffff80fb7a3b80 x10: 00000000000019d0 x9 : ffffffc008b96f58
[  129.079468] x8 : ffffff80402674f0 x7 : 0000000000000000 x6 : ffffffc009379000
[  129.086619] x5 : ffffffc009379238 x4 : 0000000000000001 x3 : ffffffc00909c008
[  129.093768] x2 : 4000000000000000 x1 : ffffffc0093797f8 x0 : 4000000000000002
[  129.100919] Call trace:
[  129.103365]  rcu_eqs_enter.constprop.0+0xf4/0x110
[  129.108079]  rcu_idle_enter+0x1c/0x30
[  129.111751]  default_idle_call+0x38/0x19c
[  129.115767]  do_idle+0x258/0x2a0
[  129.118998]  cpu_startup_entry+0x30/0x90
[  129.122925]  secondary_start_kernel+0x140/0x170
[  129.127464]  __secondary_switched+0x94/0x98
[  129.131657] ---[ end trace 0a3ee9eceff2caaf ]---
[  218.426729] Mem abort info:
[  218.429543]   ESR = 0x96000005
[  218.432649]   EC = 0x25: DABT (current EL), IL = 32 bits
[  218.438021]   SET = 0, FnV = 0
[  218.441100]   EA = 0, S1PTW = 0
[  218.444281]   FSC = 0x05: level 1 translation fault
[  218.449217] Data abort info:
[  218.452146]   ISV = 0, ISS = 0x00000005
[  218.456030]   CM = 0, WnR = 0
[  218.459045] swapper pgtable: 4k pages, 39-bit VAs, pgdp=00000000011be000
[  218.465807] [ffffffffffffffc8] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[  218.474615] Internal error: Oops: 96000005 [#2] PREEMPT SMP
[  218.480212] Modules linked in: tun nrc(O) mac80211 libarc4 8021q garp stp llc snd_soc_hdmi_codec bcm2835_codec(C) raspberrypi_hwmon bcm2835_isp(C) v3d gpu_sched bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) v4l2_mem2mem brcmfmac videobuf2_vmalloc videobuf2_dma_contig brcmutil videobuf2_memops i2c_brcmstb videobuf2_v4l2 videobuf2_common vc_sm_cma(C) snd_soc_bcm2835_i2s spi_bcm2835 vc4 videodev snd_bcm2835(C) cec mc drm_kms_helper cfg80211 rpivid_mem drm rfkill drm_panel_orientation_quirks pps_gpio syscopyarea sysfillrect sysimgblt fb_sys_fops backlight nvmem_rmem uio_pdrv_genirq uio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd sch_fq_codel snd_i2smic_rpi(O) fuse ipv6
[  218.544632] CPU: 1 PID: 20279 Comm: openvpn Tainted: G      D WC O      5.15.32-v8 #1
[  218.552478] Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
[  218.558924] pstate: a0000005 (NzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  218.565898] pc : __netif_receive_skb_core+0x4fc/0xa10
[  218.570970] lr : __netif_receive_skb_core+0xd0/0xa10
[  218.575943] sp : ffffffc00b24ba40
[  218.579260] x29: ffffffc00b24ba40 x28: ffffff8041dd9500 x27: 000000000000a888
[  218.586417] x26: 0000000000000000 x25: 0000000000000008 x24: ffffffc008e3a4d8
[  218.593572] x23: ffffff8049524090 x22: ffffffc00937e2e8 x21: ffffff8049524000
[  218.600724] x20: ffffffffffffffc8 x19: 0000000000000001 x18: 0000000000000000
[  218.607878] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000005
[  218.615030] x14: 0000000000000004 x13: 2e3230312f656764 x12: 0000000000000000
[  218.622182] x11: 0000000000082000 x10: 0000000000000000 x9 : ffffffc0089d63e0
[  218.629336] x8 : ffffff8046c8bc80 x7 : 000000000000001c x6 : ffffffc00937b760
[  218.636488] x5 : 00ffffffffffffff x4 : ffffff8049524080 x3 : ffffffc00909c008
[  218.643640] x2 : ffffff8046c8bc80 x1 : 0000000000000000 x0 : 0000000000000000
[  218.650793] Call trace:
[  218.653241]  __netif_receive_skb_core+0x4fc/0xa10
[  218.657955]  __netif_receive_skb_one_core+0x40/0x90
[  218.662845]  __netif_receive_skb+0x20/0x70
[  218.666950]  netif_receive_skb+0x48/0x1c0
[  218.670967]  tun_get_user+0xbf8/0xd80 [tun]
[  218.675176]  tun_chr_write_iter+0x68/0xb0 [tun]
[  218.679724]  new_sync_write+0xec/0x190
[  218.683484]  vfs_write+0x244/0x2b0
[  218.686893]  ksys_write+0x74/0x100
[  218.690301]  __arm64_sys_write+0x28/0x40
[  218.694233]  invoke_syscall+0x50/0x120
[  218.697994]  el0_svc_common.constprop.0+0x104/0x130
[  218.702882]  do_el0_svc+0x30/0xa0
[  218.706205]  el0_svc+0x24/0x70
[  218.709270]  el0t_64_sync_handler+0x1a4/0x1b0
[  218.713638]  el0t_64_sync+0x1a0/0x1a4
[  218.717312] Code: f9401e94 eb1402ff d100e294 54000140 (79400280) 
[  218.723414] ---[ end trace 0a3ee9eceff2cab0 ]---
[  218.728038] Kernel panic - not syncing: Oops: Fatal exception in interrupt
[  218.734920] SMP: stopping secondary CPUs
[  218.738851] Kernel Offset: disabled
[  218.742340] CPU features: 0x200000d1,00000846
[  218.746700] Memory Limit: none
[  218.749760] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---

Hostapd + nl80211: Could not configure driver mode

Hello Newracom,
First of all, I would like to thank you for the excellent work you have done from a technical point of view but also for the documentation.
I followed your GitHub tutorial to install the NRC7292 driver on a Raspberry Pi 3B+ board in Host mode. When I run the script to start an Access Point ./start 1 0 EU, I get the following error :

[6] Start hostapd on wlan0
Configuration file: /home/pi/nrc_pkg/script/conf/EU/ap_halow_open.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started
$ sudo systemctl status hostapd.service
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
   Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
   Active: activating (start) since Sat 2021-10-30 13:54:51 CEST; 18ms ago
Cntrl PID: 1611
   CGroup: /system.slice/hostapd.service

oct. 30 13:54:51 raspberrypi systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticato
oct. 30 13:54:51 raspberrypi hostapd[1611]: Configuration file:
oct. 30 13:54:51 raspberrypi hostapd[1611]: Could not open configuration file '' for reading.
oct. 30 13:54:51 raspberrypi hostapd[1611]: Failed to set up interface with
oct. 30 13:54:51 raspberrypi hostapd[1611]: Failed to initialize interface
oct. 30 13:54:51 raspberrypi systemd[1]: hostapd.service: Control process exited, code=exited status=1
oct. 30 13:54:51 raspberrypi systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authe

I checked that the SPI link and the drivers were correctly used :

$ lsmod
nrc                   192512  0
mac80211              659456  1 nrc
cfg80211              573440  2 mac80211,nrc
$ cat /sys/class/spi_master/spi0/spi0.0/modalias 
spi:nrc-cspi

but I can't fix this problem and start the hostapd service correctly.
Have you already experienced this type of problem and would you have a solution for me?
Respectful greetings

error when loading the newracom driver (nrc7292) on nvidia jetson nano developer kit.

I am triying to port newracom driver (nrc7292) on nvidia jetson nano developer kit. I am able to build the NRC7292 host driver on jetson nano but when trying to load the Newracom NRC7292 kernel module. I get following errors!

https://i.postimg.cc/QtStc8v8/Screenshot-from-2021-08-03-12-19-12.png

gtnano2@gtnano2:~/nrc7292_sw_pkg/package/host/nrc_driver/source/nrc_driver/nrc$ dmesg

[ 86.621601] nrc: loading out-of-tree module taints kernel.
[ 86.644299] spi-tegra114 7000d400.spi: chipselect 0 already in use
[ 86.650508] failed to initialize hif
[ 86.653917] nrc80211: probe of nrc80211 failed with error -22

gtnano2@gtnano2:~/nrc7292_sw_pkg/package/host/nrc_driver/source/nrc_driver/nrc$

gtnano2@gtnano2:~/nrc7292_sw_pkg$ uname -a
Linux gtnano2 4.9.201-tegra #1 SMP PREEMPT Fri Feb 19 08:40:32 PST 2021 aarch64 aarch64 aarch64 GNU/Linux

I am using the silex SX-newah 802.11ah module.

@newracom @droidifi @wzab``

Bridging eth0 works with AP Mode, not with STA Mode (4addr on, pi4)

I have modified start.py to bridge eth0 to the NRC7292 wlan0.

in run_ap, I have added the following for the AP-mode pi 4:

    os.system("sudo brctl addif br0 " + "eth0")
    os.system("sudo brctl addif br0 " + "wlan0")
    os.system("sudo ifconfig br0 " + getIpAddr("wlan0"))
    os.system("sudo ifconfig " + "wlan0" + " 0.0.0.0")
    os.system("sudo ifconfig " + "eth0" + " 0.0.0.0")
    os.system("sudo ip route add default via " + getNetAddr("br0") + ".1 dev br0")

This works perfectly. The devices wired to the AP-PI4 over Ethernet can ping the PI4 as well as connected STA-Mode Pi 4 units. The STA Pi4 units can ping the device as well as AP-mode pi 4.

I would also like to bridge eth0 of one of the STA Pi4s. In run_sta, I have added the following:

    os.system("sudo iw dev wlan0 set 4addr on")
    os.system("sudo brctl addif br0 " + "eth0")
    os.system("sudo brctl addif br0 " + "wlan0")
    os.system("sudo ifconfig br0 " + getIpAddr("wlan0"))
    os.system("sudo ifconfig " + "wlan0" + " 0.0.0.0")
    os.system("sudo ifconfig " + "eth0" + " 0.0.0.0")
    os.system("sudo ip route add default via " + getNetAddr("br0") + ".1 dev br0")

With 4addr enabled, there are no error messages while making the bridge. Still, the STA loses the ability to ping devices on the network as soon as the bridge is established. Is it possible to bridge STA-Mode wlan0 with eth0? Or are we limited to bridging STA-mode wlan0 to the RPI4s wlan1?

Thanks

CSMA / CA

Dear Newracom

Please I have some questions:

  1. For media access (CSMA / CA), what is the name of the library to define the CCA threshold, variable name and threshold value.
  2. How can I obtain the RSSI and SNR associated with the Rx package and what unit of measure is obtained.

In summary, I want to obtain the values of CCA threshold;
And rssi and snr associated with the Rx packet. Because the rssi and snr values of the show signal and show stats simple rx commands do not vary, in the cases of different powers and with interferences. (Example: rssi = 5 and snr = 28, with various powers and interference, values that are maintained in all cases).

Raspberry Pi4 instructions directory doesn't exist.

I was trying to build the kernel modules for Raspberry Pi4. Really I just want to use the module as a WiFi adapter, and another as a Host so I can test the network performance.

Anyway in the build in git it says to build the source here: cd nrc7292_sw_pkg/package/host/evk/sw_pkg but the directory does not exist anymore? Is there an updated guide for getting host and client mode running on RP4?

Thanks!

nrc7292 looks fine, but no wireless connection

I am on kernel 5.15.32, and nrc7292_sw_pkg 1.3.4r4. In the past, when I have had issues, there was an error message, or a test that failed. Currently the driver loads, and the system does not complain while running, but I am not getting a network connection between devices. I tried all of the tests in the host porting guide, and everything looks right. I am not sure where to go from here.

My method for connecting is:

sudo insmod /lib/modules/$(uname -r)/extra/nrc.ko fw_name=nrc7292_cspi.bin hifspeed=16000000 fw_country=US
sleep 10
sudo ifconfig wlan0 up
sudo killall wpa_supplicant
sudo cli_app set maxagg 1 8
sudo cli_app set txpwr 17
sudo cli_app set gi short
sleep 10
sudo wpa_supplicant -iwlan0 -Dnl80211 -B -c ~/nrc_pkg/script/conf/JP/sta_halow_open.conf
sudo ip addr add 192.168.200.2/24 dev wlan0
sudo insmod /lib/modules/$(uname -r)/extra/nrc.ko fw_name=nrc7292_cspi.bin hifspeed=16000000 fw_country=US
sleep 10
sudo ifconfig wlan0 up
sudo killall hostapd
sudo cli_app set maxagg 1 8
sudo cli_app set txpwr 17
sudo cli_app set gi short
sleep 10
sudo hostapd -B ~/nrc_pkg/script/conf/JP/ap_halow_open.conf 
sudo ip addr add 192.168.200.1/24 dev wlan0

overrun, tx size:151508

Under heavy or moderate use, the mesh point portal is showing the message overrun, tx size:151508 many times. Sometimes this causes the network to stall. Sometimes it is ok. It seems like some devices may be worse than other which could point to a hardware issue. I am wondering if there is a way to solve this. Perhaps by increasing the size of whatever is overrunning.

Undefined 4 bytes before ATComm?

Hi everyone,

I've been using the nrc7292 with raspberry pi 3 b+, and I've noticed using a logic analyzer, that the raspberry (and also the module) Send 4 bytes before an AT Command, besides the command period of 48 bits.

I've realized that it sends "HS" (In ascii) and the length of the AT command, plus another byte of a value in hex being incremented for each command I've send, but I don't know what is this for, or what is this pointing to. Taking care of that the raspberry is constantly resetting the irq, (reading the 12th register) and those "actions" does sum to the value incrementing, I discard the idea in where the 4th byte Is some sort of "slot pointer" or something like that

So... I don't know what is "HS" and why is it sending it, and why does it send the length 2 times (1 in the command period and other in the AT command) and what is that 4th byte, why does it increment and why isn't this information in the documentations.

I hope someone could help me,

Best regards,

Dromopoda.

Error when loading driver compiled from sources

When I try to load driver compiled from the newest version of the sources - 1.3.2, I get the following error:

[  662.495486] nrc: loading out-of-tree module taints kernel.
[  662.509860] ------------[ cut here ]------------
[  662.509983] WARNING: CPU: 0 PID: 1755 at /home/pi/build/nrc7292_sw_pkg/package/host/nrc_driver/source/nrc_driver/nrc/nrc-hif-cspi.c:535 _c_spi_read_regs+0x1d8/0x1f0 [nrc]
[  662.509989] Modules linked in: nrc(O+) iptable_filter iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack fuse snd_bcm2835(C) snd_pcm snd_timer snd spi_bcm2835 evdev joydev fixed uio_pdrv_genirq uio mac80211 cfg80211 rfkill i2c_dev ip_tables x_tables ipv6
[  662.510168] CPU: 0 PID: 1755 Comm: insmod Tainted: G         C O    4.14.70-v7+ #1144
[  662.510173] Hardware name: BCM2835
[  662.510204] [<8010ffd8>] (unwind_backtrace) from [<8010c240>] (show_stack+0x20/0x24)
[  662.510221] [<8010c240>] (show_stack) from [<80787b24>] (dump_stack+0xd4/0x118)
[  662.510238] [<80787b24>] (dump_stack) from [<8011dacc>] (__warn+0xf8/0x110)
[  662.510252] [<8011dacc>] (__warn) from [<8011dbb4>] (warn_slowpath_null+0x30/0x38)
[  662.510351] [<8011dbb4>] (warn_slowpath_null) from [<7f378f3c>] (_c_spi_read_regs+0x1d8/0x1f0 [nrc])
[  662.510549] [<7f378f3c>] (_c_spi_read_regs [nrc]) from [<7f378398>] (c_spi_read_regs+0x4c/0xb0 [nrc])
[  662.510732] [<7f378398>] (c_spi_read_regs [nrc]) from [<7f37a82c>] (spi_update_status+0x60/0x224 [nrc])
[  662.510922] [<7f37a82c>] (spi_update_status [nrc]) from [<7f37aadc>] (spi_start+0xec/0x148 [nrc])
[  662.511100] [<7f37aadc>] (spi_start [nrc]) from [<7f372598>] (nrc_hif_init+0xb4/0xc0 [nrc])
[  662.511274] [<7f372598>] (nrc_hif_init [nrc]) from [<7f3712f4>] (nrc_platform_probe+0x68/0x130 [nrc])
[  662.511373] [<7f3712f4>] (nrc_platform_probe [nrc]) from [<80545fd0>] (platform_drv_probe+0x5c/0xc0)
[  662.511394] [<80545fd0>] (platform_drv_probe) from [<805445b0>] (driver_probe_device+0x244/0x300)
[  662.511411] [<805445b0>] (driver_probe_device) from [<80544728>] (__driver_attach+0xbc/0xc0)
[  662.511428] [<80544728>] (__driver_attach) from [<805425cc>] (bus_for_each_dev+0x7c/0xb0)
[  662.511444] [<805425cc>] (bus_for_each_dev) from [<80543ef4>] (driver_attach+0x2c/0x30)
[  662.511458] [<80543ef4>] (driver_attach) from [<805439d0>] (bus_add_driver+0x1ac/0x224)
[  662.511472] [<805439d0>] (bus_add_driver) from [<80544e9c>] (driver_register+0x88/0x108)
[  662.511497] [<80544e9c>] (driver_register) from [<80545f20>] (__platform_driver_register+0x50/0x58)
[  662.511595] [<80545f20>] (__platform_driver_register) from [<7f396038>] (nrc_init+0x38/0x1000 [nrc])
[  662.511713] [<7f396038>] (nrc_init [nrc]) from [<80101bf0>] (do_one_initcall+0x50/0x17c)
[  662.511742] [<80101bf0>] (do_one_initcall) from [<801a97c8>] (do_init_module+0x74/0x20c)
[  662.511767] [<801a97c8>] (do_init_module) from [<801a87ec>] (load_module+0x1c28/0x23a0)
[  662.511792] [<801a87ec>] (load_module) from [<801a9140>] (SyS_finit_module+0x9c/0xac)
[  662.511821] [<801a9140>] (SyS_finit_module) from [<80108060>] (ret_fast_syscall+0x0/0x28)
[  662.511961] ---[ end trace 55326a9da99a333c ]---
[  662.532586] start FW 297
[  662.533867] ------------[ cut here ]------------
[  662.533986] WARNING: CPU: 0 PID: 29 at /home/pi/build/nrc7292_sw_pkg/package/host/nrc_driver/source/nrc_driver/nrc/nrc-hif-cspi.c:535 _c_spi_read_regs+0x1d8/0x1f0 [nrc]
[  662.534011] Modules linked in: nrc(O) iptable_filter iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack fuse snd_bcm2835(C) snd_pcm snd_timer snd spi_bcm2835 evdev joydev fixed uio_pdrv_genirq uio mac80211 cfg80211 rfkill i2c_dev ip_tables x_tables ipv6
[  662.534163] CPU: 0 PID: 29 Comm: kworker/0:1 Tainted: G        WC O    4.14.70-v7+ #1144
[  662.534168] Hardware name: BCM2835
[  662.534250] Workqueue: events nrc_check_start [nrc]
[  662.534284] [<8010ffd8>] (unwind_backtrace) from [<8010c240>] (show_stack+0x20/0x24)
[  662.534302] [<8010c240>] (show_stack) from [<80787b24>] (dump_stack+0xd4/0x118)
[  662.534318] [<80787b24>] (dump_stack) from [<8011dacc>] (__warn+0xf8/0x110)
[  662.534333] [<8011dacc>] (__warn) from [<8011dbb4>] (warn_slowpath_null+0x30/0x38)
[  662.534419] [<8011dbb4>] (warn_slowpath_null) from [<7f378f3c>] (_c_spi_read_regs+0x1d8/0x1f0 [nrc])
[  662.534589] [<7f378f3c>] (_c_spi_read_regs [nrc]) from [<7f378398>] (c_spi_read_regs+0x4c/0xb0 [nrc])
[  662.534747] [<7f378398>] (c_spi_read_regs [nrc]) from [<7f37850c>] (spi_wait_ack+0x40/0x80 [nrc])
[  662.534904] [<7f37850c>] (spi_wait_ack [nrc]) from [<7f374670>] (nrc_fw_check_next_frag+0x88/0x10c [nrc])
[  662.535061] [<7f374670>] (nrc_fw_check_next_frag [nrc]) from [<7f374984>] (nrc_download_fw+0x170/0x378 [nrc])
[  662.535217] [<7f374984>] (nrc_download_fw [nrc]) from [<7f371954>] (nrc_check_start+0x598/0x610 [nrc])
[  662.535308] [<7f371954>] (nrc_check_start [nrc]) from [<801376e8>] (process_one_work+0x158/0x454)
[  662.535328] [<801376e8>] (process_one_work) from [<80137a48>] (worker_thread+0x64/0x5b8)
[  662.535345] [<80137a48>] (worker_thread) from [<8013dacc>] (kthread+0x13c/0x16c)
[  662.535363] [<8013dacc>] (kthread) from [<8010810c>] (ret_from_fork+0x14/0x28)
[  662.535401] ---[ end trace 55326a9da99a333d ]---
[  662.535434] ------------[ cut here ]------------
[  662.535451] kernel BUG at /home/pi/build/nrc7292_sw_pkg/package/host/nrc_driver/source/nrc_driver/nrc/nrc-fw.c:193!
[  662.535463] Internal error: Oops - BUG: 0 [#1] SMP ARM
[  662.535474] Modules linked in: nrc(O) iptable_filter iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack fuse snd_bcm2835(C) snd_pcm snd_timer snd spi_bcm2835 evdev joydev fixed uio_pdrv_genirq uio mac80211 cfg80211 rfkill i2c_dev ip_tables x_tables ipv6
[  662.535597] CPU: 0 PID: 29 Comm: kworker/0:1 Tainted: G        WC O    4.14.70-v7+ #1144
[  662.535606] Hardware name: BCM2835
[  662.535691] Workqueue: events nrc_check_start [nrc]
[  662.535706] task: b6956900 task.stack: b6a3a000
[  662.535790] PC is at nrc_fw_check_next_frag+0x108/0x10c [nrc]
[  662.535874] LR is at spi_wait_ack+0x64/0x80 [nrc]
[  662.535885] pc : [<7f3746f0>]    lr : [<7f378530>]    psr: a0000013
[  662.535897] sp : b6a3be60  ip : b6a3be28  fp : b6a3be7c
[  662.535907] r10: 00000000  r9 : 00000008  r8 : 00000001
[  662.535918] r7 : 00000000  r6 : aa29d800  r5 : b5e9adc0  r4 : b4cc4c80
[  662.535930] r3 : 00000140  r2 : 00000000  r1 : 7f384eb4  r0 : fffffffb
[  662.535943] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  662.535955] Control: 10c5383d  Table: 35ce006a  DAC: 00000055
[  662.535966] Process kworker/0:1 (pid: 29, stack limit = 0xb6a3a210)
[  662.535978] Stack: (0xb6a3be60 to 0xb6a3c000)
[  662.535995] be60: b4cc4c80 00e9adc0 aa29d800 b4cc4c80 b6a3beb4 b6a3be80 7f374984 7f3745f4
[  662.536012] be80: 92720100 01000000 01020716 b5e9bdc0 b5e9bdc0 b6fc5940 b5e9adc0 00000000
[  662.536029] bea0: 00000008 00000000 b6a3befc b6a3beb8 7f371954 7f374820 8079dad4 80145bf4
[  662.536046] bec0: 80c5f99c b6fc5940 b6fc8900 80137518 b6a3befc b69fe480 b5e9bdc0 b6fc5940
[  662.536063] bee0: b6fc8900 00000000 00000008 00000000 b6a3bf34 b6a3bf00 801376e8 7f3713c8
[  662.536080] bf00: b6fc5958 80c02d00 00000008 b6fc5940 b69fe498 b6fc5940 b6fc5958 80c02d00
[  662.536097] bf20: 00000008 b69fe480 b6a3bf7c b6a3bf38 80137a48 8013759c b6a3bf5c 00000000
[  662.536114] bf40: 80c02d00 80c02d00 80c88262 b6a3a038 b6a3501c b6a35000 00000000 b69ddf00
[  662.536131] bf60: b69fe480 801379e4 b6a3501c b6909e80 b6a3bfac b6a3bf80 8013dacc 801379f0
[  662.536147] bf80: 80102d94 b69ddf00 8013d990 00000000 00000000 00000000 00000000 00000000
[  662.536163] bfa0: 00000000 b6a3bfb0 8010810c 8013d99c 00000000 00000000 00000000 00000000
[  662.536179] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  662.536195] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[  662.536359] [<7f3746f0>] (nrc_fw_check_next_frag [nrc]) from [<7f374984>] (nrc_download_fw+0x170/0x378 [nrc])
[  662.536521] [<7f374984>] (nrc_download_fw [nrc]) from [<7f371954>] (nrc_check_start+0x598/0x610 [nrc])
[  662.536613] [<7f371954>] (nrc_check_start [nrc]) from [<801376e8>] (process_one_work+0x158/0x454)
[  662.536636] [<801376e8>] (process_one_work) from [<80137a48>] (worker_thread+0x64/0x5b8)
[  662.536657] [<80137a48>] (worker_thread) from [<8013dacc>] (kthread+0x13c/0x16c)
[  662.536678] [<8013dacc>] (kthread) from [<8010810c>] (ret_from_fork+0x14/0x28)
[  662.536694] Code: e24bd010 e89da810 e7f001f2 e7f001f2 (e7f001f2) 
[  662.536709] ---[ end trace 55326a9da99a333e ]---

The error seems to be associated with the following line:

        if (priv->ack) {
                ret = nrc_hif_wait_ack(hdev, &index, 1);
                BUG_ON(ret < 0);
        }

nrc_simple always fails on first insmod, but subsequently succeeds

I'm using AHMB7292S wired to the now decade old Beagle Bone White running provided debian 9.9 image with kernel 4.14.108-ti-r143 #1stretch SMP PREEMPT. I'm fairly confident that the wiring is correct as I can successfully load nrc.ko and test according to appendix B of the host driver porting documents succeed, setting regulatory domain, using cli_app etc. (Communications test will have to wait until I receive antennas)

However, the nrc.ko driver only successfully loads AFTER one attempt at loading nrc_simple.ko - which is a strange behaviour I hope to solve.

Here's the dmesg output of the first nrc_simple.ko insert:

$ sudo insmod nrc_simple.ko spi_bus_num=2
[  573.953674] ### [nrc_simple] Value of paramters ###
[  573.965454] - bus_num: 2
[  573.968036] - chip_select: 0
[  573.980239] - max_speed_hz: 20000000
[  573.993692] [nrc_hspi_probe,L184]
[  574.004051] [c_spi_read_regs,L144] spi_set_transfer fin
[  574.017428] [c_spi_read_regs,L152] spi_set_transfer fin
[  574.030812] [c_spi_read_regs,L157] spi_sync_transfer fin
[  574.036401] ------------[ cut here ]------------
[  574.036458] WARNING: CPU: 0 PID: 732 at /home/debian/nrc7292_sw_pkg/package/host/src/nrc_hspi_simple/nrc_hspi_simple_driver.c:163 c_spi_read_regs.constprop.0+0x204/0x258 [nrc_simple]
[  574.036468] Modules linked in: nrc_simple(O+) pru_rproc pruss_intc pruss pruss_soc_bus uio_pdrv_genirq uio usb_f_acm u_serial usb_f_ncm usb_f_mass_storage usb_f_rndis u_ether libcomposite bc_example(O) pvrsrvkm(O)
[  574.036586] CPU: 0 PID: 732 Comm: insmod Tainted: G           O    4.14.108-ti-r143 #1stretch
[  574.036593] Hardware name: Generic AM33XX (Flattened Device Tree)
[  574.036649] [<c0112ad8>] (unwind_backtrace) from [<c010d690>] (show_stack+0x20/0x24)
[  574.036683] [<c010d690>] (show_stack) from [<c0cbf3f4>] (dump_stack+0x80/0x94)
[  574.036705] [<c0cbf3f4>] (dump_stack) from [<c013ebe0>] (__warn+0xf8/0x110)
[  574.036722] [<c013ebe0>] (__warn) from [<c013ed10>] (warn_slowpath_null+0x30/0x38)
[  574.036747] [<c013ed10>] (warn_slowpath_null) from [<bf179238>] (c_spi_read_regs.constprop.0+0x204/0x258 [nrc_simple])
[  574.036796] [<bf179238>] (c_spi_read_regs.constprop.0 [nrc_simple]) from [<bf1792ec>] (nrc_hspi_probe+0x60/0xd0 [nrc_simple])
[  574.036835] [<bf1792ec>] (nrc_hspi_probe [nrc_simple]) from [<c0945028>] (spi_drv_probe+0x8c/0xbc)
[  574.036868] [<c0945028>] (spi_drv_probe) from [<c08940a4>] (driver_probe_device+0x2a0/0x458)
[  574.036889] [<c08940a4>] (driver_probe_device) from [<c089435c>] (__driver_attach+0x100/0x10c)
[  574.036907] [<c089435c>] (__driver_attach) from [<c0891ba8>] (bus_for_each_dev+0x8c/0xd0)
[  574.036925] [<c0891ba8>] (bus_for_each_dev) from [<c0893864>] (driver_attach+0x2c/0x30)
[  574.036942] [<c0893864>] (driver_attach) from [<c08931b4>] (bus_add_driver+0x16c/0x26c)
[  574.036963] [<c08931b4>] (bus_add_driver) from [<c0895188>] (driver_register+0x88/0x104)
[  574.036980] [<c0895188>] (driver_register) from [<c0944f54>] (__spi_register_driver+0x68/0x6c)
[  574.037006] [<c0944f54>] (__spi_register_driver) from [<bf17e0cc>] (nrc_init+0xcc/0x1000 [nrc_simple])
[  574.037034] [<bf17e0cc>] (nrc_init [nrc_simple]) from [<c0101d3c>] (do_one_initcall+0x64/0x19c)
[  574.037065] [<c0101d3c>] (do_one_initcall) from [<c01e72b0>] (do_init_module+0x74/0x20c)
[  574.037085] [<c01e72b0>] (do_init_module) from [<c01e5ec0>] (load_module+0x2208/0x2944)
[  574.037104] [<c01e5ec0>] (load_module) from [<c01e68a8>] (SyS_finit_module+0xdc/0x110)
[  574.037128] [<c01e68a8>] (SyS_finit_module) from [<c0108d40>] (ret_fast_syscall+0x0/0x54)
[  574.050838] ---[ end trace 1e740e7975843688 ]---
[  574.050866] [c_spi_read_regs,L164] WARN_ON(rx[7] != C_SPI_ACK)
[  574.069311] [c_spi_read_regs,L165] rx[7] = 255
[  574.080325] [Error] failed to read register(0x0).
[  574.085692] nrc-hspi-simple: probe of spi2.0 failed with error -5
[  574.092694] done successfully.

There are a few extra calls to pr_err I added to for me to understand what's happening.
At this point, this issue will never appear again until next reboot. Here's a subsequent load of nrc_simple.ko dmesg:

$ sudo rmmod nrc_simple
[  778.961708] +nrc_exit
[  778.966605] [nrc_exit,L266]
[  778.982913] -nrc_exit

$ sudo insmod nrc_simple.ko spi_bus_num=2
[  812.987361] ### [nrc_simple] Value of paramters ###
[  812.999327] - bus_num: 2
[  813.001913] - chip_select: 0
[  813.013730] - max_speed_hz: 20000000
[  813.027566] [nrc_hspi_probe,L184]
[  813.037813] [c_spi_read_regs,L144] spi_set_transfer fin
[  813.051300] [c_spi_read_regs,L152] spi_set_transfer fin
[  813.063421] [c_spi_read_regs,L157] spi_sync_transfer fin
[  813.070009] spi_sys_reg 00 01 72 92 00 00 00 01 01 02 07 16 de b0 97 57
[  813.079315] done successfully.

Is it possible that the state of the NRC7292 has changed after the first unsuccessful load? If not it must be the beagle board pin configuration or kernel state. I don't know where to begin on this one :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.