mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-03 21:04:05 +00:00
Fix radiotap header for 8814
This commit is contained in:
parent
cccd2f324c
commit
33d12b04c5
@ -3964,6 +3964,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;
|
||||||
@ -4082,22 +4088,19 @@ 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.band_width & 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 */
|
||||||
|
#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;
|
||||||
|
#endif
|
||||||
hdr_buf[rt_len + 1] |= (pattrib->stbc & 0x03) << 5;
|
hdr_buf[rt_len + 1] |= (pattrib->stbc & 0x03) << 5;
|
||||||
|
|
||||||
rt_len += 2;
|
rt_len += 2;
|
||||||
@ -4132,7 +4135,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);
|
||||||
|
Loading…
Reference in New Issue
Block a user