From c7ea94ab5758cc4d73b5c06f5d2bb084361ce53a Mon Sep 17 00:00:00 2001 From: Sergei Makarenkov Date: Tue, 14 Mar 2017 22:27:15 +0300 Subject: [PATCH] Get frame bandwidth from phy_info for RTL8814AU --- core/rtw_recv.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 6c12b04..18f682b 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -4099,7 +4099,7 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe) /*tmp_16bit = CHAN2FREQ(pHalData->CurrentChannel);*/ memcpy(&hdr_buf[rt_len], &tmp_16bit, 2); rt_len += 2; - + /* channel flags */ tmp_16bit = 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 */ /* 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+1] |= (pattrib->bw & 0x03); - +#endif /* guard interval */ hdr_buf[rt_len] |= BIT2; 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 ret; @@ -4568,25 +4573,26 @@ int recv_func(_adapter *padapter, union recv_frame *rframe) recv_frame_monitor(padapter, rframe); ret = _SUCCESS; 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*/ - if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey) - { - union recv_frame *pending_frame; - int cnt = 0; + while((pending_frame=rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) { + cnt++; + DBG_COUNTER(padapter->rx_logs.core_rx_dequeue); + recv_func_posthandle(padapter, pending_frame); + } - while((pending_frame=rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) { - cnt++; - DBG_COUNTER(padapter->rx_logs.core_rx_dequeue); - 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); } - - 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); ret = recv_func_prehandle(padapter, rframe);