mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-12-31 07:03:59 +00:00
Merge pull request #7 from kimocoder/v5.2.20
Fix the get_channel function causing kernel regression
This commit is contained in:
commit
082691d090
@ -1,5 +1,5 @@
|
||||
PACKAGE_NAME="realtek-rtl88xxau"
|
||||
PACKAGE_VERSION="5.2.20.2~20180808"
|
||||
PACKAGE_VERSION="5.2.20.2~20180810"
|
||||
CLEAN="'make' clean"
|
||||
BUILT_MODULE_NAME[0]=88XXau
|
||||
PROCS_NUM=`nproc`
|
||||
|
@ -4850,10 +4850,10 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd
|
||||
bandWidth = adapter_to_dvobj(padapter)->oper_bwmode;
|
||||
//DBG_871X("%s bw %d\n", __func__,adapter_to_dvobj(padapter)->oper_bwmode);
|
||||
} else {
|
||||
bandWidth = pHalData->current_channel;
|
||||
bandWidth = pHalData->current_channel_bw;
|
||||
//DBG_871X("%s dvobj null\n", __func__);
|
||||
}
|
||||
switch(pHalData->current_channel){
|
||||
switch(pHalData->current_channel_bw){
|
||||
case CHANNEL_WIDTH_20:
|
||||
//DBG_871X("%s width 20\n", __func__);
|
||||
width = NL80211_CHAN_WIDTH_20;
|
||||
|
@ -693,26 +693,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