diff --git a/core/rtw_security.c b/core/rtw_security.c index 4a75a86..f8bea04 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -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; diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 0ae7cc2..f0fa5f5 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -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; } diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index 98e0455..fc346f2 100644 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -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; diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index 3b29044..d6fb55e 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -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 */ diff --git a/include/autoconf.h b/include/autoconf.h index ccd48e7..ffc17ec 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -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 diff --git a/include/rtl8188e_hal.h b/include/rtl8188e_hal.h index 70db6c0..443f78f 100644 --- a/include/rtl8188e_hal.h +++ b/include/rtl8188e_hal.h @@ -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; diff --git a/include/rtl8188e_recv.h b/include/rtl8188e_recv.h index 259ed76..7a85475 100644 --- a/include/rtl8188e_recv.h +++ b/include/rtl8188e_recv.h @@ -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; diff --git a/include/rtw_xmit.h b/include/rtw_xmit.h index a0a29e7..450e8b3 100644 --- a/include/rtw_xmit.h +++ b/include/rtw_xmit.h @@ -24,11 +24,7 @@ #include #include -#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; };