Fix FCS on 8812 and 8814

This commit is contained in:
cail 2018-03-24 15:40:05 -07:00
parent 5b0b95be6a
commit 14109ecfdb
2 changed files with 12 additions and 4 deletions

View File

@ -3608,8 +3608,15 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe)
if (pattrib->mfrag) if (pattrib->mfrag)
hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_FRAG; hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_FRAG;
/* always append FCS */ #ifdef CONFIG_RX_PACKET_APPEND_FCS
/* hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_FCS; */ // Start by always indicating FCS is there:
hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_FCS;
// Next, test for prior conditions that will remove FCS, and update flag accordingly:
if(check_fwstate(&padapter->mlmepriv,WIFI_MONITOR_STATE) == _FALSE)
if((pattrib->pkt_rpt_type == NORMAL_RX) && (pHalData->ReceiveConfig & RCR_APPFCS))
hdr_buf[rt_len] &= ~IEEE80211_RADIOTAP_F_FCS;
#endif
if (0) if (0)
hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_DATAPAD; hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_DATAPAD;

View File

@ -357,7 +357,8 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr)
} }
#ifdef CONFIG_RX_PACKET_APPEND_FCS #ifdef CONFIG_RX_PACKET_APPEND_FCS
if(pattrib->pkt_rpt_type == NORMAL_RX) if (check_fwstate(&padapter->mlmepriv, WIFI_MONITOR_STATE) == _FALSE)
if ((pattrib->pkt_rpt_type == NORMAL_RX) && (pHalData->ReceiveConfig & RCR_APPFCS))
pattrib->pkt_len -= IEEE80211_FCS_LEN; pattrib->pkt_len -= IEEE80211_FCS_LEN;
#endif #endif
if(rtw_os_alloc_recvframe(padapter, precvframe, if(rtw_os_alloc_recvframe(padapter, precvframe,