1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-25 14:44:09 +00:00

Get frame bandwidth from phy_info for RTL8814AU

This commit is contained in:
Sergei Makarenkov 2017-03-14 22:27:15 +03:00
parent 7d44a9021d
commit c7ea94ab57

View File

@ -4099,7 +4099,7 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe)
/*tmp_16bit = CHAN2FREQ(pHalData->CurrentChannel);*/ /*tmp_16bit = CHAN2FREQ(pHalData->CurrentChannel);*/
memcpy(&hdr_buf[rt_len], &tmp_16bit, 2); memcpy(&hdr_buf[rt_len], &tmp_16bit, 2);
rt_len += 2; rt_len += 2;
/* channel flags */ /* channel flags */
tmp_16bit = 0; tmp_16bit = 0;
if (pHalData->CurrentBandType == 0) if (pHalData->CurrentBandType == 0)
@ -4165,9 +4165,15 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe)
hdr_buf[rt_len] |= BIT1; /* MCS index known */ hdr_buf[rt_len] |= BIT1; /* MCS index known */
/* bandwidth */ /* bandwidth */
#ifdef CONFIG_RTL8814A
if(pattrib->physt) {
hdr_buf[rt_len] |= BIT0;
hdr_buf[rt_len+1] |= (pattrib->phy_info.BandWidth & 0x03);
}
#else
hdr_buf[rt_len] |= BIT0; hdr_buf[rt_len] |= BIT0;
hdr_buf[rt_len+1] |= (pattrib->bw & 0x03); hdr_buf[rt_len+1] |= (pattrib->bw & 0x03);
#endif
/* guard interval */ /* guard interval */
hdr_buf[rt_len] |= BIT2; hdr_buf[rt_len] |= BIT2;
hdr_buf[rt_len+1] |= (pattrib->sgi & 0x01) << 2; hdr_buf[rt_len+1] |= (pattrib->sgi & 0x01) << 2;
@ -4554,7 +4560,6 @@ _recv_data_drop:
} }
int recv_func(_adapter *padapter, union recv_frame *rframe);
int recv_func(_adapter *padapter, union recv_frame *rframe) int recv_func(_adapter *padapter, union recv_frame *rframe)
{ {
int ret; int ret;
@ -4568,25 +4573,26 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
recv_frame_monitor(padapter, rframe); recv_frame_monitor(padapter, rframe);
ret = _SUCCESS; ret = _SUCCESS;
goto exit; goto exit;
} else } else {
/* check if need to handle uc_swdec_pending_queue*/
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey)
{
union recv_frame *pending_frame;
int cnt = 0;
/* check if need to handle uc_swdec_pending_queue*/ while((pending_frame=rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) {
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey) cnt++;
{ DBG_COUNTER(padapter->rx_logs.core_rx_dequeue);
union recv_frame *pending_frame; recv_func_posthandle(padapter, pending_frame);
int cnt = 0; }
while((pending_frame=rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) { if (cnt)
cnt++; DBG_871X(FUNC_ADPT_FMT" dequeue %d from uc_swdec_pending_queue\n",
DBG_COUNTER(padapter->rx_logs.core_rx_dequeue); FUNC_ADPT_ARG(padapter), cnt);
recv_func_posthandle(padapter, pending_frame);
} }
if (cnt)
DBG_871X(FUNC_ADPT_FMT" dequeue %d from uc_swdec_pending_queue\n",
FUNC_ADPT_ARG(padapter), cnt);
} }
DBG_COUNTER(padapter->rx_logs.core_rx); DBG_COUNTER(padapter->rx_logs.core_rx);
ret = recv_func_prehandle(padapter, rframe); ret = recv_func_prehandle(padapter, rframe);