mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-15 02:16:08 +00:00
Fix radiotap header for 8814au chipset
This commit is contained in:
parent
2293742a84
commit
54ed666a16
2
88XXau.mod
Normal file
2
88XXau.mod
Normal file
File diff suppressed because one or more lines are too long
@ -4018,6 +4018,12 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe,
|
|||||||
rtap_hdr = (struct ieee80211_radiotap_header *)&hdr_buf[0];
|
rtap_hdr = (struct ieee80211_radiotap_header *)&hdr_buf[0];
|
||||||
rtap_hdr->it_version = PKTHDR_RADIOTAP_VERSION;
|
rtap_hdr->it_version = PKTHDR_RADIOTAP_VERSION;
|
||||||
|
|
||||||
|
#ifdef CONFIG_RTL8814A
|
||||||
|
/* RTL8814AU rx descriptor has no bandwidth, ldpc, stbc and sgi info */
|
||||||
|
/* fixup bandwidth */
|
||||||
|
pattrib->bw = pattrib->phy_info.band_width & 0x03;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* tsft */
|
/* tsft */
|
||||||
if (pattrib->tsfl) {
|
if (pattrib->tsfl) {
|
||||||
u64 tmp_64bit;
|
u64 tmp_64bit;
|
||||||
@ -4140,13 +4146,15 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe,
|
|||||||
hdr_buf[rt_len + 1] |= (pattrib->bw & 0x03);
|
hdr_buf[rt_len + 1] |= (pattrib->bw & 0x03);
|
||||||
|
|
||||||
/* guard interval */
|
/* guard interval */
|
||||||
|
#ifndef CONFIG_RTL8814A
|
||||||
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;
|
||||||
|
#endif
|
||||||
/* STBC */
|
/* STBC */
|
||||||
|
#ifndef CONFIG_RTL8814A
|
||||||
hdr_buf[rt_len] |= BIT5;
|
hdr_buf[rt_len] |= BIT5;
|
||||||
hdr_buf[rt_len + 1] |= (pattrib->stbc & 0x03) << 5;
|
hdr_buf[rt_len + 1] |= (pattrib->stbc & 0x03) << 5;
|
||||||
|
#endif
|
||||||
rt_len += 2;
|
rt_len += 2;
|
||||||
|
|
||||||
/* MCS rate index */
|
/* MCS rate index */
|
||||||
@ -4179,7 +4187,9 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe,
|
|||||||
hdr_buf[rt_len + 2] |= (pattrib->sgi & 0x01) << 2;
|
hdr_buf[rt_len + 2] |= (pattrib->sgi & 0x01) << 2;
|
||||||
|
|
||||||
/* LDPC extra OFDM symbol */
|
/* LDPC extra OFDM symbol */
|
||||||
|
#ifndef CONFIG_RTL8814A
|
||||||
tmp_16bit |= BIT4;
|
tmp_16bit |= BIT4;
|
||||||
|
#endif
|
||||||
hdr_buf[rt_len + 2] |= (pattrib->ldpc & 0x01) << 4;
|
hdr_buf[rt_len + 2] |= (pattrib->ldpc & 0x01) << 4;
|
||||||
|
|
||||||
memcpy(&hdr_buf[rt_len], &tmp_16bit, 2);
|
memcpy(&hdr_buf[rt_len], &tmp_16bit, 2);
|
||||||
@ -4516,29 +4526,23 @@ exit:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
s32 rtw_recv_entry(union recv_frame *precvframe)
|
s32 rtw_recv_entry(union recv_frame *precvframe)
|
||||||
{
|
{
|
||||||
_adapter *padapter;
|
_adapter *padapter;
|
||||||
struct recv_priv *precvpriv;
|
struct recv_priv *precvpriv;
|
||||||
s32 ret = _SUCCESS;
|
s32 ret = _SUCCESS;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
padapter = precvframe->u.hdr.adapter;
|
padapter = precvframe->u.hdr.adapter;
|
||||||
|
|
||||||
precvpriv = &padapter->recvpriv;
|
precvpriv = &padapter->recvpriv;
|
||||||
|
|
||||||
|
|
||||||
ret = recv_func(padapter, precvframe);
|
ret = recv_func(padapter, precvframe);
|
||||||
if (ret == _FAIL) {
|
if (ret == _FAIL) {
|
||||||
goto _recv_entry_drop;
|
goto _recv_entry_drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
precvpriv->rx_pkts++;
|
precvpriv->rx_pkts++;
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
_recv_entry_drop:
|
_recv_entry_drop:
|
||||||
@ -4548,8 +4552,6 @@ _recv_entry_drop:
|
|||||||
padapter->mppriv.rx_pktloss = precvpriv->rx_drop;
|
padapter->mppriv.rx_pktloss = precvpriv->rx_drop;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5087,4 +5089,3 @@ void dump_rx_bh_tk(void *sel, struct recv_priv *recv)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif /* DBG_RX_BH_TRACKING */
|
#endif /* DBG_RX_BH_TRACKING */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user