Add RTL8811AU support via RF_TYPE_ID autodetect#21
Open
josephnef wants to merge 1 commit into
Open
Conversation
RTL8811AU is the 1T1R cut of the same Jaguar silicon as RTL8812AU. The 1T1R BB/RF/TX-power paths are already implemented (PHY_BB8812_Config_1T, numTotalRfPath loops, per-BW L1pkVal branches) but were unreachable because read_chip_version_8812a hardcoded RFType=RF_TYPE_2T2R. - EepromManager: derive RFType from REG_SYS_CFG bit 27 (RF_TYPE_ID); keep registry_priv::special_rf_path as a manual override for mis-burnt EFUSE. - demo: try a small allow-list of known Realtek PIDs (0x8812, 0x0811, 0xa811, 0xb811) instead of hardcoding 0x8812. PID 0xc811 is intentionally excluded because it is shared with the unrelated RTL8811CU chipset. Refs #20 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
EepromManager::read_chip_version_8812ahardcodedRFType = RF_TYPE_2T2R, so the existing 1T1R code paths (PHY_BB8812_Config_1T, thenumTotalRfPathloops inPHY_RF6052_Config_8812/ TX power, per-BWL1pkValbranches, 2.4 GHz eLNA threshold) were unreachable on RTL8811AU dongles even though the driver could otherwise drive the chip.RFTypefromREG_SYS_CFGbit 27 (RF_TYPE_ID) the same way Realtek's upstream rtl8812au driver does — set → 1T1R (RTL8811AU), clear → 2T2R (RTL8812AU). Same firmware, same power sequence, same EFUSE layout; only the chain count and a handful of BB constants differ, all of which are already conditionalised.registry_priv::special_rf_path == 1still forces 1T1R after autodetect, in case a board's EFUSE/strap is mis-burnt.demo/main.cppnow tries0x8812 → 0x0811 → 0xa811 → 0xb811before giving up.0xc811is intentionally excluded — it is shared with the unrelated RTL8811CU chipset, which uses a different driver family entirely and is not supported by this code.Test plan
Need hardware verification before merge:
WiFiDriverDemo, confirm log showsRF_Type is 2 TotalTxPath is 2and beacon RX still works on ch36/20 MHz.lsusb— VID0bda, PID one of0811/a811/b811/8812, notc811), runWiFiDriverDemo, confirm log showsRF_Type is 0 TotalTxPath is 1and beacons are received.WiFiDriverTxDemoon the 8811AU and confirm the hardcoded beacon is seen by a separate sniffer.kRealtekProductIdstable still links under_MSC_VER,__ANDROID__,__APPLE__paths (compile-tested on macOS; the table isstatic constexpr, no platform-specific behaviour).Open questions for the reporter (#20)
lsusbshow for your dongle? We need the exact VID:PID to confirm it's an AU and not a CU (which we can't support — separate silicon, separate driver).registry_priv::RFE_Type = 64andAmplifierType_*defaults may need adjusting based on whatHal_ReadRFEType_8812Areports from your EFUSE.TxBBSwing_*defaults are EFUSE-driven; calibration on 1T1R SKUs may surface tuning needs.Refs #20
🤖 Generated with Claude Code