UsbRxAggMode in struct hal_data_8188e is set to USB_RX_AGG_DMA and never changed. Remove UsbRxAggMode from the hal_data_8188e structure and remove related dead code. Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx> --- drivers/staging/r8188eu/hal/usb_halinit.c | 46 ++----------------- drivers/staging/r8188eu/hal/usb_ops_linux.c | 14 +----- .../staging/r8188eu/include/rtl8188e_hal.h | 8 ---- 3 files changed, 7 insertions(+), 61 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 1c40d5065f51..24c11c666534 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -53,7 +53,6 @@ void rtl8188eu_interface_configure(struct adapter *adapt) else haldata->UsbBulkOutSize = USB_FULL_SPEED_BULK_SIZE;/* 64 bytes */ - haldata->UsbRxAggMode = USB_RX_AGG_DMA;/* USB_RX_AGG_DMA; */ haldata->UsbRxAggBlockCount = 8; /* unit : 512b */ haldata->UsbRxAggBlockTimeout = 0x6; haldata->UsbRxAggPageCount = 48; /* uint :128 b 0x0A; 10 = MAX_RX_DMA_BUFFER_SIZE/2/haldata->UsbBulkOutSize */ @@ -443,50 +442,15 @@ usb_AggSettingRxUpdate( valueDMA = rtw_read8(Adapter, REG_TRXDMA_CTRL); valueUSB = rtw_read8(Adapter, REG_USB_SPECIAL_OPTION); - switch (haldata->UsbRxAggMode) { - case USB_RX_AGG_DMA: - valueDMA |= RXDMA_AGG_EN; - valueUSB &= ~USB_AGG_EN; - break; - case USB_RX_AGG_USB: - valueDMA &= ~RXDMA_AGG_EN; - valueUSB |= USB_AGG_EN; - break; - case USB_RX_AGG_MIX: - valueDMA |= RXDMA_AGG_EN; - valueUSB |= USB_AGG_EN; - break; - case USB_RX_AGG_DISABLE: - default: - valueDMA &= ~RXDMA_AGG_EN; - valueUSB &= ~USB_AGG_EN; - break; - } + valueDMA |= RXDMA_AGG_EN; + valueUSB &= ~USB_AGG_EN; rtw_write8(Adapter, REG_TRXDMA_CTRL, valueDMA); rtw_write8(Adapter, REG_USB_SPECIAL_OPTION, valueUSB); - switch (haldata->UsbRxAggMode) { - case USB_RX_AGG_DMA: - rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH, haldata->UsbRxAggPageCount); - rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH + 1, haldata->UsbRxAggPageTimeout); - break; - case USB_RX_AGG_USB: - rtw_write8(Adapter, REG_USB_AGG_TH, haldata->UsbRxAggBlockCount); - rtw_write8(Adapter, REG_USB_AGG_TO, haldata->UsbRxAggBlockTimeout); - break; - case USB_RX_AGG_MIX: - rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH, haldata->UsbRxAggPageCount); - rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH + 1, (haldata->UsbRxAggPageTimeout & 0x1F));/* 0x280[12:8] */ - rtw_write8(Adapter, REG_USB_AGG_TH, haldata->UsbRxAggBlockCount); - rtw_write8(Adapter, REG_USB_AGG_TO, haldata->UsbRxAggBlockTimeout); - break; - case USB_RX_AGG_DISABLE: - default: - /* TODO: */ - break; - } -} /* usb_AggSettingRxUpdate */ + rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH, haldata->UsbRxAggPageCount); + rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH + 1, haldata->UsbRxAggPageTimeout); +} static void InitUsbAggregationSetting(struct adapter *Adapter) { diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c index 4a0ab4053e90..b7b51af7f2c3 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -295,18 +295,8 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) recvframe_put(precvframe, skb_len); - switch (haldata->UsbRxAggMode) { - case USB_RX_AGG_DMA: - case USB_RX_AGG_MIX: - pkt_offset = (u16)_RND128(pkt_offset); - break; - case USB_RX_AGG_USB: - pkt_offset = (u16)_RND4(pkt_offset); - break; - case USB_RX_AGG_DISABLE: - default: - break; - } + pkt_offset = (u16)_RND128(pkt_offset); + if (pattrib->pkt_rpt_type == NORMAL_RX) { /* Normal rx packet */ if (pattrib->physt) update_recvframe_phyinfo_88e(precvframe, (struct phy_stat *)pphy_status); diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h index 5dce718c0865..98d909b6d217 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h @@ -72,13 +72,6 @@ struct rt_firmware_hdr { #define DRIVER_EARLY_INT_TIME 0x05 #define BCN_DMA_ATIME_INT_TIME 0x02 -enum usb_rx_agg_mode { - USB_RX_AGG_DISABLE, - USB_RX_AGG_DMA, - USB_RX_AGG_USB, - USB_RX_AGG_MIX -}; - #define MAX_RX_DMA_BUFFER_SIZE_88E \ 0x2400 /* 9k for 88E nornal chip , MaxRxBuff=10k-max(TxReportSize(64*8), * WOLPattern(16*24)) */ @@ -213,7 +206,6 @@ struct hal_data_8188e { u32 UsbBulkOutSize; - enum usb_rx_agg_mode UsbRxAggMode; u8 UsbRxAggBlockCount; /* USB Block count. Block size is * 512-byte in high speed and 64-byte * in full speed */ -- 2.34.1