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

@ -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,8 +4573,7 @@ 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*/ /* check if need to handle uc_swdec_pending_queue*/
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey) if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey)
{ {
@ -4586,6 +4590,8 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
DBG_871X(FUNC_ADPT_FMT" dequeue %d from uc_swdec_pending_queue\n", DBG_871X(FUNC_ADPT_FMT" dequeue %d from uc_swdec_pending_queue\n",
FUNC_ADPT_ARG(padapter), cnt); 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);