mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-03 21:04:05 +00:00
Fix radiotap header for RTL8814AU
This commit is contained in:
parent
22d89154fd
commit
78dbffdf16
@ -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;
|
||||||
|
#endif
|
||||||
hdr_buf[rt_len + 1] |= (pattrib->sgi & 0x01) << 2;
|
hdr_buf[rt_len + 1] |= (pattrib->sgi & 0x01) << 2;
|
||||||
|
|
||||||
/* 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);
|
||||||
|
@ -299,13 +299,13 @@ odm_config_bb_with_header_file(
|
|||||||
/*if (p_dm->rfe_type == 0)
|
/*if (p_dm->rfe_type == 0)
|
||||||
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type0);
|
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type0);
|
||||||
else if (dm->rfe_type == 2)
|
else if (dm->rfe_type == 2)
|
||||||
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type2);
|
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type2);
|
||||||
else if (dm->rfe_type == 3)
|
else if (dm->rfe_type == 3)
|
||||||
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type3);
|
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type3);
|
||||||
else if (dm->rfe_type == 4)
|
else if (dm->rfe_type == 4)
|
||||||
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type4);
|
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type4);
|
||||||
else if (dm->rfe_type == 5)
|
else if (dm->rfe_type == 5)
|
||||||
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type5);
|
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type5);
|
||||||
else if (dm->rfe_type == 7)
|
else if (dm->rfe_type == 7)
|
||||||
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type7);
|
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type7);
|
||||||
else if (dm->rfe_type == 8)
|
else if (dm->rfe_type == 8)
|
||||||
|
@ -3939,19 +3939,20 @@ int value;
|
|||||||
value = dbm;
|
value = dbm;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(value < 0)
|
if (value < 0)
|
||||||
value = 0;
|
value = 0;
|
||||||
if(value > 40)
|
|
||||||
|
if (value > 40)
|
||||||
value = 40;
|
value = 40;
|
||||||
|
|
||||||
if(type == NL80211_TX_POWER_FIXED) {
|
if (type == NL80211_TX_POWER_FIXED) {
|
||||||
pHalData->CurrentTxPwrIdx = value;
|
pHalData->CurrentTxPwrIdx = value;
|
||||||
rtw_hal_set_tx_power_level(padapter, pHalData->current_channel);
|
rtw_hal_set_tx_power_level(padapter, pHalData->current_channel);
|
||||||
} else
|
} else {
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
}
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
RTW_INFO("%s\n", __func__);
|
RTW_INFO("%s\n", __func__);
|
||||||
|
Loading…
Reference in New Issue
Block a user