mirror of
https://github.com/shenmintao/aic8800d80.git
synced 2026-09-26 17:44: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>
96 lines
2.2 KiB
C
96 lines
2.2 KiB
C
/**
|
|
******************************************************************************
|
|
*
|
|
* @file rwnx_pci.c
|
|
*
|
|
* Copyright (C) RivieraWaves 2012-2019
|
|
*
|
|
******************************************************************************
|
|
*/
|
|
#include <linux/pci.h>
|
|
#include <linux/module.h>
|
|
|
|
#include "rwnx_defs.h"
|
|
#include "rwnx_dini.h"
|
|
#include "rwnx_v7.h"
|
|
#include "rwnx_pci.h"
|
|
|
|
#define PCI_VENDOR_ID_DINIGROUP 0x17DF
|
|
#define PCI_DEVICE_ID_DINIGROUP_DNV6_F2PCIE 0x1907
|
|
|
|
#define PCI_DEVICE_ID_XILINX_CEVA_VIRTEX7 0x7011
|
|
|
|
static const struct pci_device_id rwnx_pci_ids[] = {
|
|
{PCI_DEVICE(PCI_VENDOR_ID_DINIGROUP, PCI_DEVICE_ID_DINIGROUP_DNV6_F2PCIE)},
|
|
{PCI_DEVICE(PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_XILINX_CEVA_VIRTEX7)},
|
|
{0,}
|
|
};
|
|
|
|
|
|
/* Uncomment this for depmod to create module alias */
|
|
/* We don't want this on development platform */
|
|
//MODULE_DEVICE_TABLE(pci, rwnx_pci_ids);
|
|
|
|
static int rwnx_pci_probe(struct pci_dev *pci_dev,
|
|
const struct pci_device_id *pci_id)
|
|
{
|
|
struct rwnx_plat *rwnx_plat = NULL;
|
|
void *drvdata;
|
|
int ret = -ENODEV;
|
|
|
|
RWNX_DBG(RWNX_FN_ENTRY_STR);
|
|
|
|
if (pci_id->vendor == PCI_VENDOR_ID_DINIGROUP) {
|
|
ret = rwnx_dini_platform_init(pci_dev, &rwnx_plat);
|
|
} else if (pci_id->vendor == PCI_VENDOR_ID_XILINX) {
|
|
ret = rwnx_v7_platform_init(pci_dev, &rwnx_plat);
|
|
}
|
|
|
|
if (ret)
|
|
return ret;
|
|
|
|
rwnx_plat->pci_dev = pci_dev;
|
|
|
|
ret = rwnx_platform_init(rwnx_plat, &drvdata);
|
|
pci_set_drvdata(pci_dev, drvdata);
|
|
|
|
if (ret)
|
|
rwnx_plat->deinit(rwnx_plat);
|
|
|
|
return ret;
|
|
}
|
|
|
|
static void rwnx_pci_remove(struct pci_dev *pci_dev)
|
|
{
|
|
struct rwnx_hw *rwnx_hw;
|
|
struct rwnx_plat *rwnx_plat;
|
|
|
|
RWNX_DBG(RWNX_FN_ENTRY_STR);
|
|
|
|
rwnx_hw = pci_get_drvdata(pci_dev);
|
|
rwnx_plat = rwnx_hw->plat;
|
|
|
|
rwnx_platform_deinit(rwnx_hw);
|
|
rwnx_plat->deinit(rwnx_plat);
|
|
|
|
pci_set_drvdata(pci_dev, NULL);
|
|
}
|
|
|
|
static struct pci_driver rwnx_pci_drv = {
|
|
.name = KBUILD_MODNAME,
|
|
.id_table = rwnx_pci_ids,
|
|
.probe = rwnx_pci_probe,
|
|
.remove = rwnx_pci_remove
|
|
};
|
|
|
|
int rwnx_pci_register_drv(void)
|
|
{
|
|
return pci_register_driver(&rwnx_pci_drv);
|
|
}
|
|
|
|
void rwnx_pci_unregister_drv(void)
|
|
{
|
|
pci_unregister_driver(&rwnx_pci_drv);
|
|
}
|
|
|