ath11k: tolerate non-PASS regulatory status from QSDK firmware#1103
Closed
firasshaari wants to merge 1 commit into
Closed
ath11k: tolerate non-PASS regulatory status from QSDK firmware#1103firasshaari wants to merge 1 commit into
firasshaari wants to merge 1 commit into
Conversation
QSDK firmware (e.g. WLAN.HK.2.7.0.1-01744) sends WMI_REG_CHAN_LIST_CC_EVENT with status_code != REG_SET_CC_STATUS_PASS (typically ALPHA2_NOT_FOUND). The host-side regulatory event handler in wmi.c rejects the event entirely with -EINVAL, leaving the firmware DFS regulatory context broken. Consequence: 5 GHz DFS vdev_start fails with status 4 (invalid regdomain). Non-DFS channels work because firmware is lenient there. In the earlier backports-6.1.24 driver (ApNos 4.2.4), this status_code check did not exist -- regulatory processing went through a different path that ignored the firmware status and processed whatever rules it sent. Fix: downgrade the fatal check to a debug log and continue processing the regulatory rules the firmware provided. The firmware includes usable rules even with a non-PASS status. Tested on CIG WF196 (IPQ8074 + QCN9074) with WLAN.HK.2.7.0.1-01744. DFS channels 52, 64, and 116 start successfully after this patch. Signed-off-by: Firas Shaari <firas@80211networks.com>
8fceb40 to
9fd154c
Compare
Contributor
|
I cannot find the corresponding Jira ticket |
Contributor
|
I have the feeling that this is just papering over a deeper issue. just ignoring the errors from the FW feels utterly wrong. the FW will not be ensuring the regd compliant restrictions after this patch. |
Contributor
Author
|
@blogic sounds good. I have assigned this ticket to the CIG team. Let's wait for their feedback before we spend more time on this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CIG WF196 (IPQ8074 + QCN9074) running ApNos v5.0.0 (OpenWrt 25.12.3) fails to start 5 GHz on any DFS channel:
Non-DFS channels (36, 149) work. DFS channels (52, 64, 100, 116) all fail. Regression from ApNos 4.2.4 on the same hardware + firmware.
Root cause
QSDK firmware (WLAN.HK.2.7.0.1-01744) sends
WMI_REG_CHAN_LIST_CC_EVENTwithstatus_code != REG_SET_CC_STATUS_PASS(typicallyREG_CURRENT_ALPHA2_NOT_FOUND).In backports-6.1.24 (ApNos 4.2.4): the regulatory event handler had no status_code check -- it processed whatever rules the firmware sent regardless of status.
The current QSDK backports added a check at
wmi.cthat rejects the event entirely with-EINVALwhen status is non-PASS. This leaves the firmware DFS regulatory context broken -- firmware then refuses DFS vdev_start because it never received a valid channel list for DFS bands.Fix
Downgrade the fatal check to a debug log and continue processing the regulatory rules the firmware provided:
if (reg_info->status_code != REG_SET_CC_STATUS_PASS) { - ath11k_warn(ab, "Failed to set the requested Country regulatory setting\n"); - return -EINVAL; + ath11k_dbg(ab, ATH11K_DBG_REG, + "regulatory status %d, continuing with available rules\n", + reg_info->status_code); }Patch location:
feeds/qca-wifi-6/mac80211/patches/pending/a-106-ath11k-tolerate-non-PASS-regulatory-status-from-QSDK-FW.patchVerification
Tested on CIG WF196 (IPQ8074 + QCN9074) with firmware WLAN.HK.2.7.0.1-01744:
Scope
Affects all QCA wifi-6 APs using QSDK-era firmware (WLAN.HK.2.x) with the current QSDK backports. Does not affect QCA wifi-7 or MediaTek targets.
Note: This PR is based on
main~1(3f602f67) to avoidef629637which introduced a broken ucentral-schema Makefile (missingPKG_SOURCE_VERSION). That commit should be reverted separately.