mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-03 21:04:05 +00:00
Merge pull request #50 from evilphish/v5.1.5
merge changes from evilphish & kimocoder
This commit is contained in:
commit
7cab5665e3
@ -3567,6 +3567,25 @@ void start_ap_mode(_adapter *padapter)
|
||||
|
||||
}
|
||||
|
||||
void rtw_ap_bcmc_sta_flush(_adapter *padapter)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
int cam_id = -1;
|
||||
u8 *addr = adapter_mac_addr(padapter);
|
||||
|
||||
cam_id = rtw_iface_bcmc_id_get(padapter);
|
||||
if (cam_id != INVALID_SEC_MAC_CAM_ID) {
|
||||
RTW_PRINT("clear group key for "ADPT_FMT" addr:"MAC_FMT", camid:%d\n",
|
||||
ADPT_ARG(padapter), MAC_ARG(addr), cam_id);
|
||||
clear_cam_entry(padapter, cam_id);
|
||||
rtw_camid_free(padapter, cam_id);
|
||||
rtw_iface_bcmc_id_set(padapter, INVALID_SEC_MAC_CAM_ID); /*init default value*/
|
||||
}
|
||||
#else
|
||||
invalidate_cam_all(padapter);
|
||||
#endif
|
||||
}
|
||||
|
||||
void stop_ap_mode(_adapter *padapter)
|
||||
{
|
||||
_irqL irqL;
|
||||
@ -3599,6 +3618,7 @@ void stop_ap_mode(_adapter *padapter)
|
||||
#endif
|
||||
|
||||
rtw_sta_flush(padapter, _TRUE);
|
||||
rtw_ap_bcmc_sta_flush(padapter);
|
||||
|
||||
/* free_assoc_sta_resources */
|
||||
rtw_free_all_stainfo(padapter);
|
||||
|
@ -3731,7 +3731,7 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12 ,0))
|
||||
mon_ndev->needs_free_netdev = true;
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 9))
|
||||
mon_ndev->priv_destructor = rtw_ndev_destructor;
|
||||
#else
|
||||
mon_ndev->destructor = rtw_ndev_destructor;
|
||||
|
@ -665,26 +665,7 @@ static int usb_reprobe_switch_usb_mode(PADAPTER Adapter)
|
||||
if (registry_par->switch_usb_mode == 0)
|
||||
goto exit;
|
||||
|
||||
#if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8814A)
|
||||
if (IS_HIGH_SPEED_USB(Adapter)) {
|
||||
if ((rtw_read8(Adapter, 0x74) & (BIT(2)|BIT(3))) != BIT(3)) {
|
||||
rtw_write8(Adapter, 0x74, 0x8);
|
||||
rtw_write8(Adapter, 0x70, 0x2);
|
||||
rtw_write8(Adapter, 0x3e, 0x1);
|
||||
rtw_write8(Adapter, 0x3d, 0x3);
|
||||
/* usb disconnect */
|
||||
rtw_write8(Adapter, 0x5, 0x80);
|
||||
ret = _TRUE;
|
||||
}
|
||||
|
||||
} else if (IS_SUPER_SPEED_USB(Adapter)) {
|
||||
rtw_write8(Adapter, 0x70, rtw_read8(Adapter, 0x70) & (~BIT(1)));
|
||||
rtw_write8(Adapter, 0x3e, rtw_read8(Adapter, 0x3e) & (~BIT(0)));
|
||||
}
|
||||
#else
|
||||
rtw_hal_set_hwreg(Adapter, HW_VAR_USB_MODE, &ret);
|
||||
#endif
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user