From 12852799201b992c197f7186473a23757a44c85f Mon Sep 17 00:00:00 2001 From: dpShaker Date: Thu, 21 Sep 2017 21:43:47 +0200 Subject: [PATCH] Add support for pre-configured SeqNum via RadioTap See http://www.radiotap.org/fields/TX%20flags value 0x0010 --- core/rtw_xmit.c | 1 + hal/rtl8812a/usb/rtl8812au_xmit.c | 2 +- hal/rtl8814a/usb/rtl8814au_xmit.c | 5 ++++- include/rtw_xmit.h | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index f931d97..1620473 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -3994,6 +3994,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev) pattrib->ldpc = ldpc; pattrib->stbc = stbc; pattrib->retry_ctrl = (txflags & 0x08)?_FALSE:_TRUE; + pattrib->sw_seq = (txflags & 0x10)?_TRUE:_FALSE; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; diff --git a/hal/rtl8812a/usb/rtl8812au_xmit.c b/hal/rtl8812a/usb/rtl8812au_xmit.c index bc5f941..68ee167 100644 --- a/hal/rtl8812a/usb/rtl8812au_xmit.c +++ b/hal/rtl8812a/usb/rtl8812au_xmit.c @@ -112,7 +112,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba /* offset 12 */ - if (!pattrib->qos_en) { + if (!pattrib->qos_en && pattrib->sw_seq == _FALSE) { SET_TX_DESC_HWSEQ_EN_8812(ptxdesc, 1); /* Hw set sequence number */ } else SET_TX_DESC_SEQ_8812(ptxdesc, pattrib->seqnum); diff --git a/hal/rtl8814a/usb/rtl8814au_xmit.c b/hal/rtl8814a/usb/rtl8814au_xmit.c index 8ac5268..9102560 100644 --- a/hal/rtl8814a/usb/rtl8814au_xmit.c +++ b/hal/rtl8814a/usb/rtl8814au_xmit.c @@ -122,7 +122,10 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag if (!pattrib->qos_en) { /* HW sequence, to fix to use 0 queue. todo: 4AC packets to use auto queue select */ - SET_TX_DESC_HWSEQ_EN_8814A(ptxdesc, 1); // Hw set sequence number + if(pattrib->sw_seq == _FALSE) + SET_TX_DESC_HWSEQ_EN_8814A(ptxdesc, 1); // Hw set sequence number + else + SET_TX_DESC_SEQ_8814A(ptxdesc, pattrib->seqnum); SET_TX_DESC_EN_HWEXSEQ_8814A(ptxdesc, 0); SET_TX_DESC_DISQSELSEQ_8814A(ptxdesc, 1); SET_TX_DESC_HW_SSN_SEL_8814A(ptxdesc, 0); diff --git a/include/rtw_xmit.h b/include/rtw_xmit.h index 1fc2d6f..d372338 100644 --- a/include/rtw_xmit.h +++ b/include/rtw_xmit.h @@ -421,6 +421,7 @@ struct pkt_attrib { u8 rate; u8 intel_proxim; u8 retry_ctrl; + u8 sw_seq; u8 mbssid; u8 ldpc; u8 stbc;