1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-09-20 13:10:40 +00:00

Merge pull request #2 from fariouche/v5.2.20

fix scan timeout in driver
This commit is contained in:
Christian B 2018-08-18 15:27:54 +02:00 committed by GitHub
commit 47682c97b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -923,7 +923,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
if (res == _SUCCESS) {
pmlmepriv->scan_start_time = rtw_get_current_time();
#if 0 /*fariouche: looking at other wlan drivers, they do not handle timeout. It is conflicting with long scans */
#ifdef CONFIG_SCAN_BACKOP
if (rtw_mi_buddy_check_mlmeinfo_state(padapter, WIFI_FW_AP_STATE)) {
if (is_supported_5g(padapter->registrypriv.wireless_mode)
@ -934,7 +934,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
} else
#endif /* CONFIG_SCAN_BACKOP */
mlme_set_scan_to_timer(pmlmepriv, SCANNING_TIMEOUT);
#endif
rtw_led_control(padapter, LED_CTL_SITE_SURVEY);
} else
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);

View File

@ -1195,17 +1195,17 @@ PHY_GetTxPowerIndex_8814A(
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);
s8 powerDiffByRate = 0;
s8 txPower = 0, limit = 0;
u8 tx_num = MgntQuery_NssTxRate(Rate );
u8 ntx_idx = MgntQuery_NssTxRate(Rate );
BOOLEAN bIn24G = FALSE;
s8 tpt_offset = 0;
/* RTW_INFO( "===>%s\n", __FUNCTION__ ); */
txPower = (s8) PHY_GetTxPowerIndexBase( pAdapter, RFPath, Rate, tx_num, BandWidth, Channel, &bIn24G );
txPower = (s8) PHY_GetTxPowerIndexBase( pAdapter, RFPath, Rate, ntx_idx, BandWidth, Channel, &bIn24G );
powerDiffByRate = PHY_GetTxPowerByRate( pAdapter, (u8)(!bIn24G), RFPath, Rate );
limit = PHY_GetTxPowerLimit( pAdapter, pAdapter->registrypriv.RegPwrTblSel, (u8)(!bIn24G), pHalData->current_channel_bw, RFPath, Rate,tx_num, pHalData->current_channel);
limit = PHY_GetTxPowerLimit( pAdapter, pAdapter->registrypriv.RegPwrTblSel, (u8)(!bIn24G), pHalData->current_channel_bw, RFPath, Rate,ntx_idx, pHalData->current_channel);
tpt_offset = PHY_GetTxPowerTrackingOffset(pAdapter, RFPath, Rate);
powerDiffByRate = powerDiffByRate > limit ? limit : powerDiffByRate;
@ -1222,6 +1222,7 @@ PHY_GetTxPowerIndex_8814A(
phy_TxPwrAdjInPercentage(pAdapter, (u8 *)&txPower);
if (tic) {
tic->ntx_idx = ntx_idx;
tic->base = txPower;
tic->by_rate = powerDiffByRate;
tic->limit = limit;