1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-25 14:44:09 +00:00

Fixed frame injection by @svpcom + possible VHT fix

This commit is contained in:
kimocoder 2018-12-19 17:59:51 +01:00
parent 0b69d54bd5
commit 86edaffd71
5 changed files with 59 additions and 55 deletions

View File

@ -112,7 +112,7 @@ CONFIG_AP_WOWLAN = n
######### Notify SDIO Host Keep Power During Syspend ##########
CONFIG_RTW_SDIO_PM_KEEP_POWER = y
###################### MP HW TX MODE FOR VHT #######################
CONFIG_MP_VHT_HW_TX_MODE = y
CONFIG_MP_VHT_HW_TX_MODE = n
###################### Platform Related #######################
CONFIG_PLATFORM_I386_PC = y
CONFIG_PLATFORM_ARM_RPI = n

View File

@ -11844,8 +11844,8 @@ static void rtw_mlmeext_disconnect(_adapter *padapter)
self_action = MLME_ADHOC_STOPPED;
else if (MLME_IS_NULL(padapter))
self_action = MLME_ACTION_NONE;
else
rtw_warn_on(1);
//else
// rtw_warn_on(1);
/* set_opmode_cmd(padapter, infra_client_with_mlme); */

View File

@ -1,5 +1,5 @@
PACKAGE_NAME="realtek-rtl88xxau"
PACKAGE_VERSION="5.2.20.2~20181213"
PACKAGE_VERSION="5.2.20.2~20181219"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=88XXau
PROCS_NUM=`nproc`

View File

@ -118,7 +118,34 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba
} else
SET_TX_DESC_SEQ_8812(ptxdesc, pattrib->seqnum);
if ((pxmitframe->frame_tag & 0x0f) == DATA_FRAMETAG) {
/* injected frame */
if(pattrib->inject == 0xa5) {
SET_TX_DESC_RETRY_LIMIT_ENABLE_8812(ptxdesc, 1);
if (pattrib->retry_ctrl == _TRUE) {
SET_TX_DESC_DATA_RETRY_LIMIT_8812(ptxdesc, 6);
} else {
SET_TX_DESC_DATA_RETRY_LIMIT_8812(ptxdesc, 0);
}
if(pattrib->sgi == _TRUE) {
SET_TX_DESC_DATA_SHORT_8812(ptxdesc, 1);
} else {
SET_TX_DESC_DATA_SHORT_8812(ptxdesc, 0);
}
SET_TX_DESC_DISABLE_FB_8812(ptxdesc, 1); // svpcom: ?
SET_TX_DESC_USE_RATE_8812(ptxdesc, 1);
SET_TX_DESC_TX_RATE_8812(ptxdesc, MRateToHwRate(pattrib->rate));
if (pattrib->ldpc)
SET_TX_DESC_DATA_LDPC_8812(ptxdesc, 1);
SET_TX_DESC_DATA_STBC_8812(ptxdesc, pattrib->stbc & 3);
//SET_TX_DESC_GF_8812(ptxdesc, 1); // no MCS rates if sets, GreenField?
//SET_TX_DESC_LSIG_TXOP_EN_8812(ptxdesc, 1);
//SET_TX_DESC_HTC_8812(ptxdesc, 1);
//SET_TX_DESC_NO_ACM_8812(ptxdesc, 1);
SET_TX_DESC_DATA_BW_8812(ptxdesc, pattrib->bwmode); // 0 - 20 MHz, 1 - 40 MHz, 2 - 80 MHz
} else if ((pxmitframe->frame_tag & 0x0f) == DATA_FRAMETAG) {
/* RTW_INFO("pxmitframe->frame_tag == DATA_FRAMETAG\n"); */
rtl8812a_fill_txdesc_sectype(pattrib, ptxdesc);
@ -326,31 +353,6 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba
SET_TX_DESC_GID_8812(ptxdesc, pattrib->txbf_g_id);
SET_TX_DESC_PAID_8812(ptxdesc, pattrib->txbf_p_aid);
#endif
/* injected frame */
if(pattrib->inject == 0xa5) {
SET_TX_DESC_RETRY_LIMIT_ENABLE_8812(ptxdesc, 1);
if (pattrib->retry_ctrl == _TRUE) {
SET_TX_DESC_DATA_RETRY_LIMIT_8812(ptxdesc, 6);
} else {
SET_TX_DESC_DATA_RETRY_LIMIT_8812(ptxdesc, 0);
}
if(pattrib->sgi == _TRUE) {
SET_TX_DESC_DATA_SHORT_8812(ptxdesc, 1);
} else {
SET_TX_DESC_DATA_SHORT_8812(ptxdesc, 0);
}
SET_TX_DESC_USE_RATE_8812(ptxdesc, 1);
SET_TX_DESC_TX_RATE_8812(ptxdesc, MRateToHwRate(pattrib->rate));
if (pattrib->ldpc)
SET_TX_DESC_DATA_LDPC_8812(ptxdesc, 1);
SET_TX_DESC_DATA_STBC_8812(ptxdesc, pattrib->stbc & 3);
//SET_TX_DESC_GF_8812(ptxdesc, 1); // no MCS rates if sets, GreenField?
//SET_TX_DESC_LSIG_TXOP_EN_8812(ptxdesc, 1);
//SET_TX_DESC_HTC_8812(ptxdesc, 1);
//SET_TX_DESC_NO_ACM_8812(ptxdesc, 1);
SET_TX_DESC_DATA_BW_8812(ptxdesc, pattrib->bwmode); // 0 - 20 MHz, 1 - 40 MHz, 2 - 80 MHz
}
rtl8812a_cal_txdesc_chksum(ptxdesc);
_dbg_dump_tx_info(padapter, pxmitframe->frame_tag, ptxdesc);
return pull;

View File

@ -125,7 +125,33 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
SET_TX_DESC_SEQ_8814A(ptxdesc, pattrib->seqnum);
}
if((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
/* injected frame */
if(pattrib->inject == 0xa5) {
SET_TX_DESC_RETRY_LIMIT_ENABLE_8814A(ptxdesc, 1);
if (pattrib->retry_ctrl == _TRUE) {
SET_TX_DESC_DATA_RETRY_LIMIT_8814A(ptxdesc, 6);
} else {
SET_TX_DESC_DATA_RETRY_LIMIT_8814A(ptxdesc, 0);
}
if(pattrib->sgi == _TRUE) {
SET_TX_DESC_DATA_SHORT_8814A(ptxdesc, 1);
} else {
SET_TX_DESC_DATA_SHORT_8814A(ptxdesc, 0);
}
DriverFixedRate = 0x01;
SET_TX_DESC_DISABLE_FB_8814A(ptxdesc, 1); // svpcom: ?
SET_TX_DESC_USE_RATE_8814A(ptxdesc, 1);
SET_TX_DESC_TX_RATE_8814A(ptxdesc, MRateToHwRate(pattrib->rate));
if (pattrib->ldpc) {
SET_TX_DESC_DATA_LDPC_8814A(ptxdesc, 1);
} else {
SET_TX_DESC_DATA_LDPC_8814A(ptxdesc, 0);
}
SET_TX_DESC_DATA_STBC_8814A(ptxdesc, pattrib->stbc & 3);
SET_TX_DESC_DATA_BW_8814A(ptxdesc, pattrib->bwmode); // 0 - 20 MHz, 1 - 40 MHz, 2 - 80 MHz
}
else if((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
{
//RTW_INFO("pxmitframe->frame_tag == DATA_FRAMETAG\n");
@ -310,30 +336,6 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
SET_TX_DESC_GID_8814A(ptxdesc, pattrib->txbf_g_id);
SET_TX_DESC_PAID_8814A(ptxdesc, pattrib->txbf_p_aid);
/* injected frame */
if(pattrib->inject == 0xa5) {
SET_TX_DESC_RETRY_LIMIT_ENABLE_8814A(ptxdesc, 1);
if (pattrib->retry_ctrl == _TRUE) {
SET_TX_DESC_DATA_RETRY_LIMIT_8814A(ptxdesc, 6);
} else {
SET_TX_DESC_DATA_RETRY_LIMIT_8814A(ptxdesc, 0);
}
if(pattrib->sgi == _TRUE) {
SET_TX_DESC_DATA_SHORT_8814A(ptxdesc, 1);
} else {
SET_TX_DESC_DATA_SHORT_8814A(ptxdesc, 0);
}
SET_TX_DESC_USE_RATE_8814A(ptxdesc, 1);
SET_TX_DESC_TX_RATE_8814A(ptxdesc, MRateToHwRate(pattrib->rate));
if (pattrib->ldpc) {
SET_TX_DESC_DATA_LDPC_8814A(ptxdesc, 1);
} else {
SET_TX_DESC_DATA_LDPC_8814A(ptxdesc, 0);
}
SET_TX_DESC_DATA_STBC_8814A(ptxdesc, pattrib->stbc & 3);
SET_TX_DESC_DATA_BW_8814A(ptxdesc, pattrib->bwmode); // 0 - 20 MHz, 1 - 40 MHz, 2 - 80 MHz
}
rtl8814a_cal_txdesc_chksum(ptxdesc);
_dbg_dump_tx_info(padapter,pxmitframe->frame_tag,ptxdesc);
return pull;