@robimarko What can be done regarding the order in which the ath11k/bluetooth modules are loaded to eliminate automatic restarts?
What is the card you have in this device?
I think I saw some sequencing patches for QCA6390 BT
BT chip is NXP K32W041.
Then it makes no sense why would ath11k and Bluetooth interefe as they are not even on the same HW
I'm not sure what the main reason is, but I don't have reboots after loading the ath11k modules first.
That is super weird, sadly there is no way to force the loading order when autoprobe is used
What do you think about this change?
--- a/package/kernel/mac80211/ath.mk
+++ b/package/kernel/mac80211/ath.mk
@@ -322,7 +322,11 @@ define KernelPackage/ath11k-ahb
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
DEPENDS+= @TARGET_qualcommax +kmod-ath11k +kmod-qrtr-smd
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k_ahb.ko
+ifeq ($(CONFIG_TARGET_SUBTARGET), "ipq807x")
+ AUTOLOAD:=$(call AutoLoad,99,ath11k_ahb)
+else
AUTOLOAD:=$(call AutoProbe,ath11k_ahb)
+endif
endef
define KernelPackage/ath11k-ahb/description
I dont like it, forcing autoload shouldnt be used
Is there any way to force bluetooth modules to load later?
I'm still facing random restarts on latest 6.6 kernel.
Other than using AutoLoad not really, that is the whole point of AutoProbe
Loading only hci_uart
module (https://github.com/openwrt/openwrt/pull/15118) does not help:
[ 9.166717] kmodloader: loading kernel modules from /etc/modules.d/*
[ 9.238464] hid: raw HID events driver (C) Jiri Kosina
[ 9.245035] Bluetooth: Core ver 2.22
[ 9.245148] NET: Registered PF_BLUETOOTH protocol family
[ 9.247685] Bluetooth: HCI device and connection manager initialized
[ 9.253062] Bluetooth: HCI socket layer initialized
[ 9.259316] Bluetooth: L2CAP socket layer initialized
[ 9.263938] Bluetooth: SCO socket layer initialized
[ 9.270035] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 9.273827] Bluetooth: BNEP filters: protocol multicast
[ 9.279375] Bluetooth: BNEP socket layer initialized
[ 9.284809] Loading modules backported from Linux version v6.6.15-0-g51f354b815c4
[ 9.289528] Backport generated by backports.git 193becf2
[ 9.297494] Bluetooth: HCI UART driver ver 2.3
[ 9.302292] Bluetooth: HCI UART protocol H4 registered
[ 9.306536] Bluetooth: HCI UART protocol BCSP registered
[ 9.312308] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 9.317140] Bluetooth: HIDP socket layer initialized
[ 9.328482] NET: Registered PF_QIPCRTR protocol family
[ 9.330328] Bluetooth: RFCOMM TTY layer initialized
[ 9.332964] Bluetooth: RFCOMM socket layer initialized
[ 9.337715] Bluetooth: RFCOMM ver 1.11
[ 9.351061] urngd: v1.0.2 started.
[ 9.375900] PPP generic driver version 2.4.2
[ 9.376668] NET: Registered PF_PPPOX protocol family
[ 9.387183] ath11k c000000.wifi: ipq8074 hw2.0
[ 9.387216] ath11k c000000.wifi: FW memory mode: 0
[ 9.390748] remoteproc remoteproc0: powering up cd00000.q6v5_wcss
[ 9.395373] remoteproc remoteproc0: Booting fw image IPQ8074/q6_fw.mdt, size 668
[ 9.746555] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
[ 9.748999] ath11k_pci 0000:01:00.0: BAR 0: assigned [mem 0x20400000-0x205fffff 64bit]
[ 9.753104] ath11k_pci 0000:01:00.0: enabling device (0000 -> 0002)
[ 9.761214] ath11k_pci 0000:01:00.0: MSI vectors: 16
[ 9.766933] ath11k_pci 0000:01:00.0: qcn9074 hw1.0
[ 9.772121] ath11k_pci 0000:01:00.0: FW memory mode: 2
[ 5844.356049] pcieport 0000:00:00.0: AER: Multiple Corrected error message received from 0000:00:00.0
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.3.1-00163
S - IMAGE_VARIANT_STRING=HAACANAZA
S - OEM_IMAGE_VERSION_STRING=CRM
Restarts happens even if only 2 modules bluetooth
and hci_uart
are loaded during boot:
[ 9.252827] kmodloader: loading kernel modules from /etc/modules.d/*
[ 9.319729] Bluetooth: Core ver 2.22
[ 9.319844] NET: Registered PF_BLUETOOTH protocol family
[ 9.322408] Bluetooth: HCI device and connection manager initialized
[ 9.327685] Bluetooth: HCI socket layer initialized
[ 9.334021] Bluetooth: L2CAP socket layer initialized
[ 9.338620] Bluetooth: SCO socket layer initialized
[ 9.344561] Loading modules backported from Linux version v6.6.15-0-g51f354b815c4
[ 9.348511] Backport generated by backports.git 193becf2
[ 9.356843] Bluetooth: HCI UART driver ver 2.3
[ 9.361526] Bluetooth: HCI UART protocol H4 registered
[ 9.365809] Bluetooth: HCI UART protocol BCSP registered
[ 9.376463] NET: Registered PF_QIPCRTR protocol family
[ 9.406568] PPP generic driver version 2.4.2
[ 9.407206] NET: Registered PF_PPPOX protocol family
[ 9.408731] urngd: v1.0.2 started.
[ 9.417541] ath11k c000000.wifi: ipq8074 hw2.0
[ 9.418065] ath11k c000000.wifi: FW memory mode: 0
[ 9.422919] remoteproc remoteproc0: powering up cd00000.q6v5_wcss
[ 9.427328] remoteproc remoteproc0: Booting fw image IPQ8074/q6_fw.mdt, size 668
[ 9.778664] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
[ 9.781172] ath11k_pci 0000:01:00.0: BAR 0: assigned [mem 0x20400000-0x205fffff 64bit]
[ 9.785218] ath11k_pci 0000:01:00.0: enabling device (0000 -> 0002)
[ 9.793304] ath11k_pci 0000:01:00.0: MSI vectors: 16
[ 9.799036] ath11k_pci 0000:01:00.0: qcn9074 hw1.0
[ 9.804231] ath11k_pci 0000:01:00.0: FW memory mode: 2
[ 5844.405299] pcieport 0000:00:00.0: AER: Multiple Corrected error message received from 0000:00:00.0
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.3.1-00163
S - IMAGE_VARIANT_STRING=HAACANAZA
Or maybe the restarts are caused by this call:
Could any of these patches may help?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/wireless/ath/ath11k?h=next-20240410&id=515bcdf587f9911f2d5de51524cb7e048d295052
I checked and after loading the firmware from NVMEM (without using the u-boot function), I have the following values:
root@OpenWrt:/# mdio 9* mmd 8:30 0x2680
0x0000
root@OpenWrt:/# mdio 9* mmd 8:30 0xC430
0x000f
root@OpenWrt:/# mdio 9* mmd 8:30 0xC431
0xc060
root@OpenWrt:/# mdio 9* mmd 8:7 0x0010
0x9d81
root@OpenWrt:/# mdio 9* mmd 8:7 0x0000
0x3000
root@OpenWrt:/# mdio 9* mmd 8:4 0xC441
0x0008
Great, the LED provision regs are obviosuly not set(Weird that they did not that with the FW provisioning), I will later see what they are changing in others.
BTW, I wrote wrong, they are not touching 7.1 but 7.10 which changes Autoneg advertising.
They are changing technology abilities and disabling pause and async pause advertising, that is rather crazy.
Loading from u-boot using aq_load_fw
:
root@OpenWrt:/# mdio 9* mmd 8:30 0x2680
0x0000
root@OpenWrt:/# mdio 9* mmd 8:30 0xC430
0xc0ef
root@OpenWrt:/# mdio 9* mmd 8:30 0xC431
0xc0e0
root@OpenWrt:/# mdio 9* mmd 8:7 0x0010
0x9d81
root@OpenWrt:/# mdio 9* mmd 8:7 0x0000
0x3000
root@OpenWrt:/# mdio 9* mmd 8:4 0xC441
0x0008
and initializing interface in u-boot and loading firmware from NVMEM:
root@OpenWrt:/# mdio 9* mmd 8:30 0x2680
0x0000
root@OpenWrt:/# mdio 9* mmd 8:30 0xC430
0x000f
root@OpenWrt:/# mdio 9* mmd 8:30 0xC431
0xc060
root@OpenWrt:/# mdio 9* mmd 8:7 0x0010
0x9d81
root@OpenWrt:/# mdio 9* mmd 8:7 0x0000
0x3000
root@OpenWrt:/# mdio 9* mmd 8:4 0xC441
0x0008
In the second case lan interfaces are not working correctly.
To be able to use interface without u-boot initialization I added this configuration to the mdio_pins
:
gpio-pins {
pins = "gpio44";
function = "gpio";
bias-pull-up;
output-high;
};
Is there any way to check why the radio is not actually broadcasting?
I tried to run the 6GHz radio on firmware 2.4, which runs on OEM software, but even though it starts up correctly, it cannot be searched from the client.
phy2-ap0 ESSID: "6g"
Access Point: *:*:*:*:*:*
Mode: Master Channel: 33 (6.115 GHz) HT Mode: HE80
Center Channel 1: 39 2: unknown
Tx-Power: 16 dBm Link Quality: unknown/70
Signal: unknown Noise: -105 dBm
Bit Rate: unknown
Encryption: WPA3 SAE (CCMP)
Type: nl80211 HW Mode(s): 802.11ax
Hardware: 17CB:1104 17CB:1104 [Qualcomm Atheros QCN6024/9024/9074]
TX power offset: none
Frequency offset: none
Supports VAPs: yes PHY name: phy2
Tue Apr 23 22:45:35 2024 daemon.notice netifd: radio2 (3019): WARNING: Variable 'data' does not exist or is not an array/object
Tue Apr 23 22:45:36 2024 daemon.notice hostapd: Set new config for phy phy2:
Tue Apr 23 22:45:36 2024 daemon.notice wpa_supplicant[1942]: Set new config for phy phy2
Tue Apr 23 22:45:36 2024 daemon.notice wpa_supplicant[1942]: Set new config for phy phy2
Tue Apr 23 22:45:36 2024 daemon.notice hostapd: Set new config for phy phy2: /var/run/hostapd-phy2.conf
Tue Apr 23 22:45:36 2024 daemon.notice hostapd: Restart interface for phy phy2
Tue Apr 23 22:45:36 2024 daemon.notice hostapd: Configuration file: data: driver=nl80211 logger_syslog=127 logger_syslog_level=2 logger_stdout=127 logger_stdout_level=2 country_code=US ieee80211d=1 ieee80211h=1 hw_mode=a beacon_int=100 chanlist=33 tx_queue_data2_burst=2.0 #num_global_macaddr=1 ieee80211n=1 ht_coex=0 ht_capab=[HT40+] op_class=133 ieee80211ac=1 vht_oper_chwidth=1 vht_oper_centr_freq_seg0_idx=39 vht_capab=[MAX-A-MPDU-LEN-EXP0] ieee80211ax=1 he_oper_chwidth=1 he_oper_centr_freq_seg0_idx=39 he_su_beamformer=1 he_su_beamformee=1 he_mu_beamformer=1 he_bss_color=128 he_spr_sr_control=3 he_default_pe_duration=4 he_rts_threshold=1023 he_mu_edca_qos_info_param_count=0 he_mu_edca_qos_info_q_ack=0 he_mu_edca_qos_info_queue_request=0 he_mu_edca_qos_info_txop_request=0 he_mu_edca_ac_be_aifsn=8 he_mu_edca_ac_be_aci=0 he_mu_edca_ac_be_ecwmin=9 he_mu_edca_ac_be_ecwmax=10 he_mu_edca_ac_be_timer=255 he_mu_edca_ac_bk_aifsn=15 he_mu_edca_ac_bk_aci=1 he_mu_edca_ac_bk_ecwmin=9 he_mu_edca_ac_bk_ecwmax=10 he_mu_edca_ac_bk_timer=255 he_
Tue Apr 23 22:45:36 2024 kern.info kernel: [ 3926.920669] br-lan: port 5(phy2-ap0) entered blocking state
Tue Apr 23 22:45:36 2024 kern.info kernel: [ 3926.920709] br-lan: port 5(phy2-ap0) entered disabled state
Tue Apr 23 22:45:36 2024 kern.info kernel: [ 3926.925121] ath11k_pci 0000:01:00.0 phy2-ap0: entered allmulticast mode
Tue Apr 23 22:45:36 2024 kern.info kernel: [ 3926.930804] ath11k_pci 0000:01:00.0 phy2-ap0: entered promiscuous mode
Tue Apr 23 22:45:36 2024 daemon.notice hostapd: phy2-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
Tue Apr 23 22:45:36 2024 kern.info kernel: [ 3926.982087] br-lan: port 5(phy2-ap0) entered blocking state
Tue Apr 23 22:45:36 2024 kern.info kernel: [ 3926.982136] br-lan: port 5(phy2-ap0) entered forwarding state
Tue Apr 23 22:45:36 2024 daemon.notice netifd: Network device 'phy2-ap0' link is up
Tue Apr 23 22:45:36 2024 daemon.notice hostapd: phy2-ap0: interface state COUNTRY_UPDATE->ENABLED
Tue Apr 23 22:45:36 2024 daemon.notice hostapd: phy2-ap0: AP-ENABLED
Tue Apr 23 22:45:36 2024 daemon.notice netifd: Wireless device 'radio2' is now up
Maybe you will be interested to check this new update.
Thanks, the changes have now been merged and everything works fine on the MX8500.
Do all your interfaces (and firmware) work properly now?
If the AQR firmware is loaded from u-boot using aq_load_fw
, then yes, all interfaces work.
The interfaces do not work properly if the AQR firmware is loaded from the system, nothing has changed after this update.