1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 13:24:36 +00:00

Cleaned out unsupported chipsets from usb_intfs.c

This commit is contained in:
kimocoder 2019-08-17 15:14:11 +02:00
parent 65e47eab43
commit e1258a0dde
4 changed files with 80 additions and 206 deletions

View File

@ -1 +0,0 @@
options 88XXau rtw_power_mgnt=0 rtw_enusbss=0

80
docs/hostapd.conf Normal file
View File

@ -0,0 +1,80 @@
### hostapd configuration file
### for RTL8812AU and hostapd 2.5
### Operates at 135 Mbps in 802.11n/ht mode. iperf measures ~8.00 MBytes/sec 67.1 Mbits/sec
### I was not able to get 802.11ac/vht mode with additional side-channels configured with the driver.
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan0
driver=nl80211
bridge=br0
### IEEE 802.11
ssid=test
hw_mode=a
channel=36
max_num_sta=128
auth_algs=1
### DFS
country_code=NO
ieee80211d=1
ieee80211h=1
### IEEE 802.11n
ieee80211n=1
ht_capab=[HT20][HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]
### IEEE 802.11ac
ieee80211ac=1
#vht_oper_chwidth=1
#vht_capab=[HT40-]
#vht_oper_centr_freq_seg0_idx=46
### IEEE 802.11i
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=test
rsn_pairwise=CCMP
### WMM
wmm_enabled=1
uapsd_advertisement_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
### TX queue parameters
tx_queue_data3_aifs=7
tx_queue_data3_cwmin=15
tx_queue_data3_cwmax=1023
tx_queue_data3_burst=0
tx_queue_data2_aifs=3
tx_queue_data2_cwmin=15
tx_queue_data2_cwmax=63
tx_queue_data2_burst=0
tx_queue_data1_aifs=1
tx_queue_data1_cwmin=7
tx_queue_data1_cwmax=15
tx_queue_data1_burst=3.0
tx_queue_data0_aifs=1
tx_queue_data0_cwmin=3
tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5

View File

@ -1 +0,0 @@
https://github.com/armbian/build/blob/master/patch/kernel/pine64-default/wifi-0005-realtek-881xAU-update-to-5a5d0f.patch

View File

@ -35,12 +35,10 @@ extern int rtw_ampdu_enable;/* for enable tx_ampdu */
int ui_pid[3] = {0, 0, 0};
#endif
extern int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
static int rtw_suspend(struct usb_interface *intf, pm_message_t message);
static int rtw_resume(struct usb_interface *intf);
static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device_id *pdid);
static void rtw_dev_remove(struct usb_interface *pusb_intf);
@ -96,13 +94,11 @@ static void rtw_dev_shutdown(struct device *dev)
#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200
#define USB_DEVICE_ID_MATCH_INT_NUMBER 0x0400
#define USB_DEVICE_ID_MATCH_INT_INFO \
(USB_DEVICE_ID_MATCH_INT_CLASS | \
USB_DEVICE_ID_MATCH_INT_SUBCLASS | \
USB_DEVICE_ID_MATCH_INT_PROTOCOL)
#define USB_DEVICE_AND_INTERFACE_INFO(vend, prod, cl, sc, pr) \
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
| USB_DEVICE_ID_MATCH_DEVICE, \
@ -136,20 +132,10 @@ static void rtw_dev_shutdown(struct device *dev)
/* ----------------------------------------------------------------------- */
#endif
#define USB_VENDER_ID_REALTEK 0x0BDA
/* DID_USB_v916_20130116 */
static struct usb_device_id rtw_usb_id_tbl[] = {
#ifdef CONFIG_RTL8188E
/*=== Realtek demoboard ===*/
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8179), .driver_info = RTL8188E}, /* 8188EUS */
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179), .driver_info = RTL8188E}, /* 8188ETV */
/*=== Customer ID ===*/
/****** 8188EUS ********/
{USB_DEVICE(0x07B8, 0x8179), .driver_info = RTL8188E}, /* Abocom - Abocom */
#endif
#ifdef CONFIG_RTL8812A
/*=== Realtek demoboard ===*/
@ -225,24 +211,6 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
{USB_DEVICE(0x2357, 0x0120), .driver_info = RTL8821}, /* TP Link - T2U Plus */
#endif
#ifdef CONFIG_RTL8192E
/*=== Realtek demoboard ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x818B, 0xff, 0xff, 0xff), .driver_info = RTL8192E}, /* Default ID */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x818C, 0xff, 0xff, 0xff), .driver_info = RTL8192E}, /* Default ID */
#endif
#ifdef CONFIG_RTL8723B
/* === Realtek demoboard === */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB720, 0xff, 0xff, 0xff), .driver_info = RTL8723B}, /* 8723BU 1*1 */
/* {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xB720),.driver_info = RTL8723B}, 8723BU */
#endif
#ifdef CONFIG_RTL8703B
/*=== Realtek demoboard ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB703, 0xff, 0xff, 0xff), .driver_info = RTL8703B}, /* 8723CU 1*1 */
/* {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xB703), .driver_info = RTL723C}, */ /* 8723CU 1*1 */
#endif /* CONFIG_RTL8703B */
#ifdef CONFIG_RTL8814A
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8813), .driver_info = RTL8814A},
{USB_DEVICE(0x2001, 0x331A), .driver_info = RTL8814A}, /* D-Link - D-Link */
@ -260,52 +228,11 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
{USB_DEVICE(0x0846, 0x9054), .driver_info = RTL8814A}, /* Netgear A7000 */
#endif /* CONFIG_RTL8814A */
#ifdef CONFIG_RTL8188F
/*=== Realtek demoboard ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xF179, 0xff, 0xff, 0xff), .driver_info = RTL8188F}, /* 8188FU 1*1 */
#endif
#ifdef CONFIG_RTL8188GTV
/*=== Realtek demoboard ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x018C, 0xff, 0xff, 0xff), .driver_info = RTL8188GTV}, /* 8188GTV 1*1 */
#endif
#ifdef CONFIG_RTL8822B
/*=== Realtek demoboard ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB82C, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Default ID for USB multi-function */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB812, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Default ID for USB Single-function, WiFi only */
/*=== Customer ID ===*/
{USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Alpha - Alpha*/
#endif /* CONFIG_RTL8822B */
#ifdef CONFIG_RTL8723D
/*=== Realtek demoboard ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xD723, 0xff, 0xff, 0xff), .driver_info = RTL8723D}, /* 8723DU 1*1 */
#endif
#ifdef CONFIG_RTL8192F
/*=== Realtek demoboard ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xF192, 0xff, 0xff, 0xff), .driver_info = RTL8192F}, /* 8192FU 2*2 */
#endif
#ifdef CONFIG_RTL8821C
/*=== Realtek demoboard ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xb82b, 0xff, 0xff, 0xff), .driver_info = RTL8821C}, /* 8821CU */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xb820, 0xff, 0xff, 0xff), .driver_info = RTL8821C}, /* 8821CU */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xC821, 0xff, 0xff, 0xff), .driver_info = RTL8821C}, /* 8821CU */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xC820, 0xff, 0xff, 0xff), .driver_info = RTL8821C}, /* 8821CU */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xC82A, 0xff, 0xff, 0xff), .driver_info = RTL8821C}, /* 8821CU */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xC82B, 0xff, 0xff, 0xff), .driver_info = RTL8821C}, /* 8821CU */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xC811, 0xff, 0xff, 0xff), .driver_info = RTL8821C}, /* 8811CU */
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x8811, 0xff, 0xff, 0xff), .driver_info = RTL8821C}, /* 8811CU */
/*=== Customer ID ===*/
#endif
#ifdef CONFIG_RTL8710B
/*=== Realtek dongle ===*/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB711, 0xff, 0xff, 0xff), .driver_info = RTL8710B}, /* 8710B = 8188GU 1*1 */
#endif
{} /* Terminating entry */
};
@ -401,7 +328,6 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
_rtw_mutex_init(&dvobj->usb_vendor_req_mutex);
#endif
#ifdef CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC
dvobj->usb_alloc_vendor_req_buf = rtw_zmalloc(MAX_USB_IO_CTL_SIZE);
if (dvobj->usb_alloc_vendor_req_buf == NULL) {
@ -437,70 +363,16 @@ static void rtw_decide_chip_type_by_usb_info(struct dvobj_priv *pdvobjpriv, cons
{
pdvobjpriv->chip_type = pdid->driver_info;
#ifdef CONFIG_RTL8188E
if (pdvobjpriv->chip_type == RTL8188E)
rtl8188eu_set_hw_type(pdvobjpriv);
#endif
#if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A)
if (pdvobjpriv->chip_type == RTL8812 || pdvobjpriv->chip_type == RTL8821)
rtl8812au_set_hw_type(pdvobjpriv);
#endif
#ifdef CONFIG_RTL8192E
if (pdvobjpriv->chip_type == RTL8192E)
rtl8192eu_set_hw_type(pdvobjpriv);
#endif
#ifdef CONFIG_RTL8723B
if (pdvobjpriv->chip_type == RTL8723B)
rtl8723bu_set_hw_type(pdvobjpriv);
#endif
#ifdef CONFIG_RTL8814A
if (pdvobjpriv->chip_type == RTL8814A)
rtl8814au_set_hw_type(pdvobjpriv);
#endif /* CONFIG_RTL8814A */
#ifdef CONFIG_RTL8188F
if (pdvobjpriv->chip_type == RTL8188F)
rtl8188fu_set_hw_type(pdvobjpriv);
#endif
#ifdef CONFIG_RTL8188GTV
if (pdvobjpriv->chip_type == RTL8188GTV)
rtl8188gtvu_set_hw_type(pdvobjpriv);
#endif
#ifdef CONFIG_RTL8703B
if (pdvobjpriv->chip_type == RTL8703B)
rtl8703bu_set_hw_type(pdvobjpriv);
#endif /* CONFIG_RTL8703B */
#ifdef CONFIG_RTL8822B
if (pdvobjpriv->chip_type == RTL8822B)
rtl8822bu_set_hw_type(pdvobjpriv);
#endif /* CONFIG_RTL8822B */
#ifdef CONFIG_RTL8723D
if (pdvobjpriv->chip_type == RTL8723D)
rtl8723du_set_hw_type(pdvobjpriv);
#endif /* CONFIG_RTL8723D */
#ifdef CONFIG_RTL8821C
if (pdvobjpriv->chip_type == RTL8821C)
rtl8821cu_set_hw_type(pdvobjpriv);
#endif /* CONFIG_RTL8821C */
#ifdef CONFIG_RTL8710B
if (pdvobjpriv->chip_type == RTL8710B)
rtl8710bu_set_hw_type(pdvobjpriv);
#endif /* CONFIG_RTL8710B */
#ifdef CONFIG_RTL8192F
if (pdvobjpriv->chip_type == RTL8192F)
rtl8192fu_set_hw_type(pdvobjpriv);
#endif /* CONFIG_RTL8192F */
}
static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf, const struct usb_device_id *pdid)
@ -517,13 +389,10 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf, const s
struct usb_endpoint_descriptor *pendp_desc;
struct usb_device *pusbd;
pdvobjpriv = devobj_init();
if (pdvobjpriv == NULL)
goto exit;
pdvobjpriv->pusbintf = usb_intf ;
pusbd = pdvobjpriv->pusbdev = interface_to_usbdev(usb_intf);
usb_set_intfdata(usb_intf, pdvobjpriv);
@ -689,7 +558,6 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)
{
struct dvobj_priv *dvobj = usb_get_intfdata(usb_intf);
usb_set_intfdata(usb_intf, NULL);
if (dvobj) {
/* Modify condition for 92DU DMDP 2010.11.18, by Thomas */
@ -756,73 +624,15 @@ u8 rtw_set_hal_ops(_adapter *padapter)
if (rtw_hal_data_init(padapter) == _FAIL)
return _FAIL;
#ifdef CONFIG_RTL8188E
if (rtw_get_chip_type(padapter) == RTL8188E)
rtl8188eu_set_hal_ops(padapter);
#endif
#if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A)
if (rtw_get_chip_type(padapter) == RTL8812 || rtw_get_chip_type(padapter) == RTL8821)
rtl8812au_set_hal_ops(padapter);
#endif
#ifdef CONFIG_RTL8192E
if (rtw_get_chip_type(padapter) == RTL8192E)
rtl8192eu_set_hal_ops(padapter);
#endif
#ifdef CONFIG_RTL8723B
if (rtw_get_chip_type(padapter) == RTL8723B)
rtl8723bu_set_hal_ops(padapter);
#endif
#ifdef CONFIG_RTL8814A
if (rtw_get_chip_type(padapter) == RTL8814A)
rtl8814au_set_hal_ops(padapter);
#endif /* CONFIG_RTL8814A */
#ifdef CONFIG_RTL8188F
if (rtw_get_chip_type(padapter) == RTL8188F)
rtl8188fu_set_hal_ops(padapter);
#endif
#ifdef CONFIG_RTL8188GTV
if (rtw_get_chip_type(padapter) == RTL8188GTV)
rtl8188gtvu_set_hal_ops(padapter);
#endif
#ifdef CONFIG_RTL8703B
if (rtw_get_chip_type(padapter) == RTL8703B)
rtl8703bu_set_hal_ops(padapter);
#endif /* CONFIG_RTL8703B */
#ifdef CONFIG_RTL8822B
if (rtw_get_chip_type(padapter) == RTL8822B)
rtl8822bu_set_hal_ops(padapter);
#endif /* CONFIG_RTL8822B */
#ifdef CONFIG_RTL8723D
if (rtw_get_chip_type(padapter) == RTL8723D)
rtl8723du_set_hal_ops(padapter);
#endif /* CONFIG_RTL8723D */
#ifdef CONFIG_RTL8821C
if (rtw_get_chip_type(padapter) == RTL8821C) {
if (rtl8821cu_set_hal_ops(padapter) == _FAIL)
return _FAIL;
}
#endif
#ifdef CONFIG_RTL8710B
if (rtw_get_chip_type(padapter) == RTL8710B)
rtl8710bu_set_hal_ops(padapter);
#endif /* CONFIG_RTL8710B */
#ifdef CONFIG_RTL8192F
if (rtw_get_chip_type(padapter) == RTL8192F)
rtl8192fu_set_hal_ops(padapter);
#endif
if (_FAIL == rtw_hal_ops_check(padapter))
return _FAIL;
@ -839,7 +649,6 @@ static void usb_intf_start(_adapter *padapter)
rtw_hal_inirp_init(padapter);
hal->usb_intf_start = _TRUE;
}
static void usb_intf_stop(_adapter *padapter)
@ -859,7 +668,6 @@ static void usb_intf_stop(_adapter *padapter)
rtw_write_port_cancel(padapter);
/* todo:cancel other irps */
hal->usb_intf_start = _FALSE;
}
@ -997,7 +805,6 @@ int rtw_hw_resume(_adapter *padapter)
pwrpriv->bips_processing = _FALSE;
_exit_pwrlock(&pwrpriv->lock);
return 0;
error_exit:
RTW_INFO("%s, Open net dev failed\n", __FUNCTION__);
@ -1013,7 +820,6 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
PADAPTER padapter;
int ret = 0;
dvobj = usb_get_intfdata(pusb_intf);
pwrpriv = dvobj_to_pwrctl(dvobj);
pdbgpriv = &dvobj->drv_dbg;
@ -1116,7 +922,6 @@ int rtw_resume_process(_adapter *padapter)
}
#endif/* CONFIG_AUTOSUSPEND */
return ret;
}
@ -1129,7 +934,6 @@ static int rtw_resume(struct usb_interface *pusb_intf)
struct mlme_ext_priv *pmlmeext;
int ret = 0;
dvobj = usb_get_intfdata(pusb_intf);
pwrpriv = dvobj_to_pwrctl(dvobj);
pdbgpriv = &dvobj->drv_dbg;
@ -1171,8 +975,6 @@ static int rtw_resume(struct usb_interface *pusb_intf)
return ret;
}
#ifdef CONFIG_AUTOSUSPEND
void autosuspend_enter(_adapter *padapter)
{
@ -1318,7 +1120,6 @@ _adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj,
padapter->dvobj = dvobj;
rtw_set_drv_stopped(padapter);/*init*/
dvobj->padapters[dvobj->iface_nums++] = padapter;
@ -1341,7 +1142,6 @@ _adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj,
if (rtw_set_hal_ops(padapter) == _FAIL)
goto free_hal_data;
padapter->intf_start = &usb_intf_start;
padapter->intf_stop = &usb_intf_stop;
@ -1565,7 +1365,6 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
rtd2885_wlan_netlink_sendMsg("linkup", "8712");
#endif
status = _SUCCESS;
#if 0 /* not used now */
@ -1656,12 +1455,10 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
RTW_INFO("-r871xu_dev_remove, done\n");
#ifdef CONFIG_INTEL_PROXIM
rtw_sw_export = NULL;
#endif
return;
}
@ -1725,7 +1522,6 @@ static void __exit rtw_drv_halt(void)
rtw_mstat_dump(RTW_DBGDUMP);
}
module_init(rtw_drv_entry);
module_exit(rtw_drv_halt);