WifiChipAidlImpl: cache unsupported usable channel query - #4
CeRRiLLo89 wants to merge 1 commit into
Conversation
|
Ready for maintainer review. The affected vendor/framework incompatibility was reproduced on the official Validation completed for the current pull request head: targeted FrameworksWifiTests: 2 passed / 0 failed; Runtime validation of a ROM containing the source change remains pending. The locally built ROM cannot be installed as an update because it is signed |
f157424 to
67dd45a
Compare
Cache ERROR_NOT_SUPPORTED from getUsableChannels() for the lifetime of WifiChipAidlImpl, avoiding repeated unsupported HAL calls. Keep transient errors such as ERROR_BUSY retryable and add unit coverage for both behaviors.
|
Revalidated the issue on the official crDroid 20260831 raphael build with the previous exact-build workaround disabled. Starting SoftAP produced 13 consecutive getUsableChannels() failures with ServiceSpecificException code 4 (ERROR_NOT_SUPPORTED) in approximately 1.9 seconds. SoftAP itself still started successfully on 5 GHz (5180 MHz), confirming that the reproduced issue is the repeated unsupported HAL query rather than a SoftAP startup failure. Updated the PR description with the current runtime evidence. No source changes were made. |
Summary
Cache an explicit
ERROR_NOT_SUPPORTEDresponse from the AIDL Wi-Fi HAL forgetUsableChannels().After the HAL reports that the operation is unsupported, subsequent calls on
the same
WifiChipAidlImplinstance returnnullwithout repeating theunsupported Binder transaction.
Problem
The AIDL contract allows
getUsableChannels()to returnWifiStatusCode.ERROR_NOT_SUPPORTED.The current implementation handles that result as a generic
ServiceSpecificException, so later framework queries can repeatedly invokean operation which the HAL has already declared unsupported.
This affects compatibility with older vendor Wi-Fi implementations such as
the one used by Xiaomi Mi 9T Pro / Redmi K20 Pro (
raphael).Change
ERROR_NOT_SUPPORTEDresponse.WifiChipAidlImplinstance.service-specific errors.
ERROR_BUSY.This source change is intentionally narrower than the previous exact-build
binary workaround used on the affected device.
That workaround bypassed the usable-channel query more broadly, while this
pull request first calls the HAL and disables later calls only after receiving
an explicit
ERROR_NOT_SUPPORTEDresult.Tests
Added unit coverage verifying that:
ERROR_NOT_SUPPORTEDreaches the HAL once and is then cached.ERROR_BUSYis not cached and the HAL is queried again.Local validation was completed with the
lineage_raphael userdebugtarget anda physical Xiaomi Mi 9T Pro / Redmi K20 Pro (
raphael) running Android 16 /crDroid 12.11.
Executed tests:
Result:
FrameworksWifiTestscompilation: passed.ERROR_NOT_SUPPORTEDcaching: passed.ERROR_BUSYretry: passed.The tests use a mocked AIDL HAL. They validate the framework-side behavior but
do not replace runtime validation with the affected vendor HAL.
Pull request head
Current review head:
This is the squashed review head.
Its source tree is identical to the previously validated head:
No functional or test changes were introduced by the squash, so the previous
source-build and targeted-test results remain applicable.
Device context
Device:
Current official build used for reproduction:
The previous exact-build
service-wifi.jarcompatibility workaround from the20260623 build is disabled and was not active during the current reproduction.
Runtime reproduction on current official build
The vendor/framework incompatibility was revalidated on the official crDroid
20260831raphael build.Starting SoftAP produced 13 consecutive
getUsableChannels()failures with:The 13 failures occurred in approximately 1.9 seconds.
code 4corresponds toWifiStatusCode.ERROR_NOT_SUPPORTED, which is thespecific HAL result handled by this pull request.
SoftAP itself still started successfully:
Therefore, the reproduced issue is the repeated unsupported HAL query rather
than a SoftAP startup failure.
Validation status
20260623: completed.20260831with the previous workarounddisabled: completed.
lineage_raphael userdebugbuild containing this change: completed.pending.
The complete local ROM build containing this source change passed compilation,
packaging, VINTF and ZIP integrity checks.
The local ROM package was not installed because it is signed with the AOSP
test key, while the installed official crDroid ROM trusts the crDroid release
key.
The current official
20260831build confirms that the originalvendor/framework incompatibility is still reproducible. It does not yet
contain this pull request, so runtime validation of the fix itself in an
official release remains pending.
This pull request is ready for maintainer review.