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)
hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_FRAG;
/* always append FCS */
/* hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_FCS; */
#ifdef CONFIG_RX_PACKET_APPEND_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)
hdr_buf[rt_len] |= IEEE80211_RADIOTAP_F_DATAPAD;

View File

@ -357,8 +357,9 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr)
}
#ifdef CONFIG_RX_PACKET_APPEND_FCS
if(pattrib->pkt_rpt_type == NORMAL_RX)
pattrib->pkt_len -= IEEE80211_FCS_LEN;
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;
#endif
if(rtw_os_alloc_recvframe(padapter, precvframe,
(pbuf + pattrib->shift_sz + pattrib->drvinfo_sz + RXDESC_SIZE), pskb) == _FAIL)