mirror of
https://github.com/shenmintao/aic8800d80.git
synced 2026-09-27 01:54:16 +00:00
Sync WiFi driver, firmware, and DKMS configuration from the bluetooth
branch (which itself is radxa USB driver_fw + Linux 6.16/6.17/6.19
kernel compat). aic_btusb and Bluetooth-specific install.sh logic
are intentionally excluded from main.
Driver updates:
- Add Linux kernel 6.12-6.19 compatibility support
- Add Linux 6.16 timer_container_of and wakelock API support
- Add Debian 6.1.0-26 backport support
- Add USB device ID 368b:8d81 support
- Add AIC8800DW device support
- Add TP-Link Archer TX1U Nano support (USB_VENDOR_ID_TENDA_V2:0x0110)
- Add TENDA series device support (U2, U11, U11 PRO)
- Add AIC8800FC_CUS1-6 series support
- Add AIC8800M80_CUS0-8 series support
- Add UGREEN AIC8800D80 adapter support
- Add Mercury (TP-Link OEM) support
- Allow 1 or 3 USB interfaces (BT-disabled SKUs report 1)
New compat modules:
- aicwf_compat_8800d80n.{c,h}
- aicwf_compat_8800dln.{c,h}
Firmware:
- New: fw/aic8800/, fw/aic8800D80N/, fw/aic8800D80X2/, fw/aic8800DLN/
- Updated: fw/aic8800D80/, fw/aic8800DC/
install.sh:
- Loop over all fw/aic8800* variants instead of hard-coding aic8800D80
- Install usb_modeswitch/1111_1111 config for "Pandora" clone adapter
- Verify firmware install by counting variants
dkms.conf: pass KDIR explicitly to make for cross-kernel builds.
Excluded from this commit (BT-only, kept on bluetooth branch):
- drivers/aic8800/aic_btusb/
- modprobe/aic8800-bt.conf
- diagnose_bt.sh
- install.sh btusb auto-load / hciconfig / bluez status checks
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
66 lines
2.3 KiB
C
66 lines
2.3 KiB
C
#include <linux/types.h>
|
|
|
|
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
|
|
typedef struct {
|
|
uint32_t bit_mask[3];
|
|
uint32_t reserved;
|
|
uint32_t dpd_high[96];
|
|
uint32_t dpd_11b[96];
|
|
uint32_t dpd_low[96];
|
|
uint32_t idac_11b[48];
|
|
uint32_t idac_high[48];
|
|
uint32_t idac_low[48];
|
|
uint32_t loft_res[18];
|
|
uint32_t rx_iqim_res[16];
|
|
} rf_misc_ram_t;
|
|
|
|
typedef struct {
|
|
uint32_t bit_mask[4];
|
|
uint32_t dpd_high[96];
|
|
uint32_t loft_res[18];
|
|
} rf_misc_ram_lite_t;
|
|
|
|
#define MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
|
|
#define DPD_RESULT_SIZE_8800DC sizeof(rf_misc_ram_lite_t)
|
|
#endif
|
|
|
|
#ifdef CONFIG_DPD
|
|
extern rf_misc_ram_lite_t dpd_res;
|
|
#endif
|
|
|
|
#ifdef CONFIG_LOFT_CALIB
|
|
extern rf_misc_ram_lite_t loft_res_local;
|
|
#endif
|
|
|
|
int aicwf_patch_table_load(struct rwnx_hw *rwnx_hw, char *filename);
|
|
void aicwf_patch_config_8800dc(struct rwnx_hw *rwnx_hw);
|
|
int aicwf_set_rf_config_8800dc(struct rwnx_hw *rwnx_hw, struct mm_set_rf_calib_cfm *cfm);
|
|
int aicwf_misc_ram_init_8800dc(struct rwnx_hw *rwnx_hw);
|
|
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
|
|
int aicwf_misc_ram_valid_check_8800dc(struct rwnx_hw *rwnx_hw, int *valid_out);
|
|
int aicwf_plat_calib_load_8800dc(struct rwnx_hw *rwnx_hw);
|
|
#endif
|
|
#ifdef CONFIG_DPD
|
|
int aicwf_dpd_calib_8800dc(struct rwnx_hw *rwnx_hw, rf_misc_ram_lite_t *dpd_res);
|
|
int aicwf_dpd_result_apply_8800dc(struct rwnx_hw *rwnx_hw, rf_misc_ram_lite_t *dpd_res);
|
|
#ifndef CONFIG_FORCE_DPD_CALIB
|
|
int aicwf_dpd_result_load_8800dc(struct rwnx_hw *rwnx_hw, rf_misc_ram_lite_t *dpd_res);
|
|
int aicwf_dpd_result_write_8800dc(void *buf, int buf_len);
|
|
#endif
|
|
#endif
|
|
#ifdef CONFIG_LOFT_CALIB
|
|
int aicwf_loft_calib_8800dc(struct rwnx_hw *rwnx_hw, rf_misc_ram_lite_t *loft_res);
|
|
int aicwf_loft_result_apply_8800dc(struct rwnx_hw *rwnx_hw, rf_misc_ram_lite_t *loft_res);
|
|
#endif
|
|
int aicwf_plat_patch_load_8800dc(struct rwnx_hw *rwnx_hw);
|
|
int aicwf_plat_rftest_load_8800dc(struct rwnx_hw *rwnx_hw);
|
|
int rwnx_plat_userconfig_load_8800dc(struct rwnx_hw *rwnx_hw);
|
|
int rwnx_plat_userconfig_load_8800dw(struct rwnx_hw *rwnx_hw);
|
|
#ifdef CONFIG_POWER_LIMIT
|
|
int rwnx_plat_powerlimit_load_8800dcdw(struct rwnx_hw *rwnx_hw, uint16_t chip_id);
|
|
#endif
|
|
void system_config_8800dc(struct rwnx_hw *rwnx_hw);
|
|
int aicwf_patch_var_config_8800dc(struct rwnx_hw *rwnx_hw);
|
|
int set_bbpll_config(struct rwnx_hw *rwnx_hw);
|
|
|