mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: Remove CONFIG_USB_TX_AGGREGATION, IDEA_CONDITION, and CONFIG_MINIMAL_MEMORY_USAGE
CONFIG_USB_TX_AGGREGATION is always defined. IDEA_CONDITION is always defined. CONFIG_MINIMAL_MEMORY_USAGE is never defined. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
2462f06b0e
commit
eebbb9babd
8 changed files with 3 additions and 224 deletions
|
@ -181,16 +181,8 @@ _func_enter_;
|
|||
if (((struct xmit_frame*)pxmitframe)->buf_addr==NULL)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
hw_hdr_offset = TXDESC_SIZE +
|
||||
(((struct xmit_frame*)pxmitframe)->pkt_offset * PACKET_OFFSET_SZ);
|
||||
#else
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
hw_hdr_offset = TXDESC_OFFSET+EARLY_MODE_INFO_SIZE;
|
||||
#else
|
||||
hw_hdr_offset = TXDESC_OFFSET;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
pframe = ((struct xmit_frame*)pxmitframe)->buf_addr + hw_hdr_offset;
|
||||
|
||||
|
@ -666,17 +658,8 @@ _func_enter_;
|
|||
if (((struct xmit_frame*)pxmitframe)->buf_addr==NULL)
|
||||
return _FAIL;
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
hw_hdr_offset = TXDESC_SIZE +
|
||||
(((struct xmit_frame*)pxmitframe)->pkt_offset * PACKET_OFFSET_SZ);
|
||||
#else
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
hw_hdr_offset = TXDESC_OFFSET+EARLY_MODE_INFO_SIZE;
|
||||
#else
|
||||
hw_hdr_offset = TXDESC_OFFSET;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
pframe = ((struct xmit_frame*)pxmitframe)->buf_addr + hw_hdr_offset;
|
||||
/* 4 start to encrypt each fragment */
|
||||
if (pattrib->encrypt==_TKIP_){
|
||||
|
@ -1516,16 +1499,8 @@ _func_enter_;
|
|||
if (((struct xmit_frame*)pxmitframe)->buf_addr==NULL)
|
||||
return _FAIL;
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
hw_hdr_offset = TXDESC_SIZE +
|
||||
(((struct xmit_frame*)pxmitframe)->pkt_offset * PACKET_OFFSET_SZ);
|
||||
#else
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
hw_hdr_offset = TXDESC_OFFSET+EARLY_MODE_INFO_SIZE;
|
||||
#else
|
||||
hw_hdr_offset = TXDESC_OFFSET;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
pframe = ((struct xmit_frame*)pxmitframe)->buf_addr + hw_hdr_offset;
|
||||
|
||||
|
|
|
@ -825,15 +825,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe){
|
|||
|
||||
_func_enter_;
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
hw_hdr_offset = TXDESC_SIZE + (pxmitframe->pkt_offset * PACKET_OFFSET_SZ);;
|
||||
#else
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
hw_hdr_offset = TXDESC_OFFSET+ EARLY_MODE_INFO_SIZE;
|
||||
#else
|
||||
hw_hdr_offset = TXDESC_OFFSET;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (pattrib->encrypt ==_TKIP_)/* if (psecuritypriv->dot11PrivacyAlgrthm==_TKIP_PRIVACY_) */
|
||||
{
|
||||
|
@ -1232,15 +1224,7 @@ _func_enter_;
|
|||
|
||||
pbuf_start = pxmitframe->buf_addr;
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
hw_hdr_offset = TXDESC_SIZE + (pxmitframe->pkt_offset * PACKET_OFFSET_SZ);
|
||||
#else
|
||||
#ifdef CONFIG_TX_EARLY_MODE /* for SDIO && Tx Agg */
|
||||
hw_hdr_offset = TXDESC_OFFSET + EARLY_MODE_INFO_SIZE;
|
||||
#else
|
||||
hw_hdr_offset = TXDESC_OFFSET;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
mem_start = pbuf_start + hw_hdr_offset;
|
||||
|
||||
|
@ -1476,21 +1460,12 @@ void rtw_count_tx_stats(PADAPTER padapter, struct xmit_frame *pxmitframe, int sz
|
|||
if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
|
||||
{
|
||||
pxmitpriv->tx_bytes += sz;
|
||||
#if defined(CONFIG_USB_TX_AGGREGATION)
|
||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod += pxmitframe->agg_num;
|
||||
#else
|
||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod++;
|
||||
#endif
|
||||
|
||||
psta = pxmitframe->attrib.psta;
|
||||
if (psta)
|
||||
{
|
||||
if (psta) {
|
||||
pstats = &psta->sta_stats;
|
||||
#if defined(CONFIG_USB_TX_AGGREGATION)
|
||||
pstats->tx_pkts += pxmitframe->agg_num;
|
||||
#else
|
||||
pstats->tx_pkts++;
|
||||
#endif
|
||||
pstats->tx_bytes += sz;
|
||||
}
|
||||
}
|
||||
|
@ -1733,10 +1708,7 @@ _func_enter_;
|
|||
pxframe->pkt = NULL;
|
||||
pxframe->pkt_offset = 1;/* default use pkt_offset to fill tx desc */
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
pxframe->agg_num = 1;
|
||||
#endif
|
||||
|
||||
pxframe->ack_report = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -286,11 +286,9 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
|
|||
ptxdesc->txdw4 |= cpu_to_le32(QOS);/* QoS */
|
||||
|
||||
/* offset 20 */
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
if (pxmitframe->agg_num > 1){
|
||||
ptxdesc->txdw5 |= cpu_to_le32((pxmitframe->agg_num << USB_TXAGG_NUM_SHT) & 0xFF000000);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((pattrib->ether_type != 0x888e) &&
|
||||
(pattrib->ether_type != 0x0806) &&
|
||||
|
@ -588,7 +586,6 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
static u32 xmitframe_need_length(struct xmit_frame *pxmitframe)
|
||||
{
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
|
@ -607,7 +604,6 @@ static u32 xmitframe_need_length(struct xmit_frame *pxmitframe)
|
|||
return len;
|
||||
}
|
||||
|
||||
#define IDEA_CONDITION 1 /* check all packets before enqueue */
|
||||
s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
@ -633,10 +629,6 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
/* dump frame variable */
|
||||
u32 ff_hwaddr;
|
||||
|
||||
#ifndef IDEA_CONDITION
|
||||
int res = _SUCCESS;
|
||||
#endif
|
||||
|
||||
RT_TRACE(_module_rtl8192c_xmit_c_, _drv_info_, ("+xmitframe_complete\n"));
|
||||
|
||||
|
||||
|
@ -659,23 +651,6 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifndef IDEA_CONDITION
|
||||
if (pxmitframe->frame_tag != DATA_FRAMETAG) {
|
||||
RT_TRACE(_module_rtl8192c_xmit_c_, _drv_err_,
|
||||
("xmitframe_complete: frame tag(%d) is not DATA_FRAMETAG(%d)!\n",
|
||||
pxmitframe->frame_tag, DATA_FRAMETAG));
|
||||
continue;
|
||||
}
|
||||
|
||||
/* TID 0~15 */
|
||||
if ((pxmitframe->attrib.priority < 0) ||
|
||||
(pxmitframe->attrib.priority > 15)) {
|
||||
RT_TRACE(_module_rtl8192c_xmit_c_, _drv_err_,
|
||||
("xmitframe_complete: TID(%d) should be 0~15!\n",
|
||||
pxmitframe->attrib.priority));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
pxmitframe->pxmitbuf = pxmitbuf;
|
||||
pxmitframe->buf_addr = pxmitbuf->pbuf;
|
||||
pxmitbuf->priv_data = pxmitframe;
|
||||
|
@ -687,14 +662,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
pxmitframe->pkt_offset = 1; /* first frame of aggregation, reserve offset */
|
||||
#endif
|
||||
|
||||
#ifdef IDEA_CONDITION
|
||||
rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||
#else
|
||||
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||
if (res == false) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* always return ndis_packet after rtw_xmitframe_coalesce */
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
|
@ -775,39 +743,9 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
ptxservq->qcnt--;
|
||||
phwxmit->accnt--;
|
||||
|
||||
#ifndef IDEA_CONDITION
|
||||
/* suppose only data frames would be in queue */
|
||||
if (pxmitframe->frame_tag != DATA_FRAMETAG) {
|
||||
RT_TRACE(_module_rtl8192c_xmit_c_, _drv_err_,
|
||||
("xmitframe_complete: frame tag(%d) is not DATA_FRAMETAG(%d)!\n",
|
||||
pxmitframe->frame_tag, DATA_FRAMETAG));
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* TID 0~15 */
|
||||
if ((pxmitframe->attrib.priority < 0) ||
|
||||
(pxmitframe->attrib.priority > 15)) {
|
||||
RT_TRACE(_module_rtl8192c_xmit_c_, _drv_err_,
|
||||
("xmitframe_complete: TID(%d) should be 0~15!\n",
|
||||
pxmitframe->attrib.priority));
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
pxmitframe->buf_addr = pxmitbuf->pbuf + pbuf;
|
||||
|
||||
#ifdef IDEA_CONDITION
|
||||
rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||
#else
|
||||
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||
if (res == false) {
|
||||
DBG_88E("%s coalesce failed\n",__func__);
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
/* always return ndis_packet after rtw_xmitframe_coalesce */
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
|
||||
|
@ -889,86 +827,6 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
||||
{
|
||||
|
||||
struct hw_xmit *phwxmits;
|
||||
sint hwentry;
|
||||
struct xmit_frame *pxmitframe=NULL;
|
||||
int res=_SUCCESS, xcnt = 0;
|
||||
|
||||
phwxmits = pxmitpriv->hwxmits;
|
||||
hwentry = pxmitpriv->hwxmit_entry;
|
||||
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("xmitframe_complete()\n"));
|
||||
|
||||
if (pxmitbuf==NULL)
|
||||
{
|
||||
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
|
||||
if (!pxmitbuf)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
pxmitframe = rtw_dequeue_xframe(pxmitpriv, phwxmits, hwentry);
|
||||
|
||||
if (pxmitframe)
|
||||
{
|
||||
pxmitframe->pxmitbuf = pxmitbuf;
|
||||
|
||||
pxmitframe->buf_addr = pxmitbuf->pbuf;
|
||||
|
||||
pxmitbuf->priv_data = pxmitframe;
|
||||
|
||||
if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
|
||||
{
|
||||
if (pxmitframe->attrib.priority<=15)/* TID0~15 */
|
||||
{
|
||||
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||
}
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);/* always return ndis_packet after rtw_xmitframe_coalesce */
|
||||
}
|
||||
|
||||
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("xmitframe_complete(): rtw_dump_xframe\n"));
|
||||
|
||||
|
||||
if (res == _SUCCESS)
|
||||
{
|
||||
rtw_dump_xframe(padapter, pxmitframe);
|
||||
}
|
||||
else
|
||||
{
|
||||
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
}
|
||||
|
||||
xcnt++;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}while (0/*xcnt < (NR_XMITFRAME >> 3)*/);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static s32 xmitframe_direct(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
s32 res = _SUCCESS;
|
||||
|
|
|
@ -118,10 +118,8 @@ static void rtl8188eu_interface_configure(_adapter *padapter)
|
|||
|
||||
pHalData->interfaceIndex = pdvobjpriv->InterfaceNumber;
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
pHalData->UsbTxAggMode = 1;
|
||||
pHalData->UsbTxAggDescNum = 0x6; /* only 4 bits */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_RX_AGGREGATION
|
||||
pHalData->UsbRxAggMode = USB_RX_AGG_DMA;/* USB_RX_AGG_DMA; */
|
||||
|
@ -779,7 +777,6 @@ usb_AggSettingTxUpdate(
|
|||
PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
u32 value32;
|
||||
|
||||
|
@ -793,8 +790,6 @@ usb_AggSettingTxUpdate(
|
|||
|
||||
rtw_write32(Adapter, REG_TDECTRL, value32);
|
||||
}
|
||||
|
||||
#endif
|
||||
} /* usb_AggSettingTxUpdate */
|
||||
|
||||
|
||||
|
|
|
@ -85,10 +85,7 @@
|
|||
* Interface Related Config
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define CONFIG_USB_TX_AGGREGATION
|
||||
#define CONFIG_USB_RX_AGGREGATION
|
||||
#endif
|
||||
#define CONFIG_USB_RX_AGGREGATION
|
||||
|
||||
#define CONFIG_PREALLOC_RECV_SKB
|
||||
|
||||
|
@ -126,7 +123,6 @@
|
|||
#ifdef CONFIG_MP_INCLUDED
|
||||
#define MP_DRIVER 1
|
||||
#define CONFIG_MP_IWPRIV_SUPPORT
|
||||
//#undef CONFIG_USB_TX_AGGREGATION
|
||||
//#undef CONFIG_USB_RX_AGGREGATION
|
||||
#else
|
||||
#define MP_DRIVER 0
|
||||
|
@ -166,10 +162,6 @@
|
|||
|
||||
//#endif
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
//#define CONFIG_TX_EARLY_MODE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
#define RTL8188E_EARLY_MODE_PKT_NUM_10 0
|
||||
#endif
|
||||
|
|
|
@ -479,10 +479,8 @@ typedef struct hal_data_8188e
|
|||
u32 IntArray[3];//HISR0,HISR1,HSISR
|
||||
u32 IntrMask[3];
|
||||
u8 C2hArray[16];
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
u8 UsbTxAggMode;
|
||||
u8 UsbTxAggDescNum;
|
||||
#endif
|
||||
#ifdef CONFIG_USB_RX_AGGREGATION
|
||||
u16 HwRxPageSize; // Hardware setting
|
||||
u32 MaxUsbRxAggBlock;
|
||||
|
|
|
@ -36,11 +36,7 @@
|
|||
#define NR_RECVBUFF (4)
|
||||
#endif //CONFIG_SINGLE_RECV_BUF
|
||||
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (15360) // 15k < 16k
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) // about 4K
|
||||
#endif
|
||||
#define MAX_RECVBUF_SZ (15360) // 15k < 16k
|
||||
|
||||
struct phy_stat {
|
||||
unsigned int phydw0;
|
||||
|
|
|
@ -24,11 +24,7 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
#define MAX_XMITBUF_SZ (20480) // 20k
|
||||
#else
|
||||
#define MAX_XMITBUF_SZ (2048)
|
||||
#endif
|
||||
#ifdef CONFIG_SINGLE_XMIT_BUF
|
||||
#define NR_XMITBUFF (1)
|
||||
#else
|
||||
|
@ -266,11 +262,8 @@ struct xmit_frame
|
|||
u8 *buf_addr;
|
||||
struct xmit_buf *pxmitbuf;
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
u8 agg_num;
|
||||
#endif
|
||||
s8 pkt_offset;
|
||||
|
||||
u8 ack_report;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue