mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: FRemove dead code for other than USB
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
5a2939fa9e
commit
2d60bad9ad
66 changed files with 229 additions and 4045 deletions
|
@ -34,15 +34,10 @@
|
|||
|
||||
#include <rtw_mp_ioctl.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_ops.h>
|
||||
#endif //CONFIG_USB_HCI
|
||||
#include <rtw_version.h>
|
||||
|
||||
#include <rtl8188e_hal.h>
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#include <gspi_ops.h>
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
|
||||
#define iwe_stream_add_event(a, b, c, d, e) iwe_stream_add_event(b, c, d, e)
|
||||
|
@ -6955,9 +6950,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
pxmitpriv->free_xmitbuf_cnt, pxmitpriv->free_xmitframe_cnt,
|
||||
pxmitpriv->free_xmit_extbuf_cnt, pxmitpriv->free_xframe_ext_cnt,
|
||||
precvpriv->free_recvframe_cnt);
|
||||
#ifdef CONFIG_USB_HCI
|
||||
DBG_871X("rx_urb_pending_cn=%d\n", precvpriv->rx_pending_cnt);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 0x09:
|
||||
|
@ -9210,11 +9203,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
|
|||
}
|
||||
else if (strcmp(tmp[0], "mac") == 0)
|
||||
{
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
addr = EEPROM_MAC_ADDR_88ES;
|
||||
#else
|
||||
addr = EEPROM_MAC_ADDR_88EU;
|
||||
#endif
|
||||
addr = EEPROM_MAC_ADDR_88EU;
|
||||
|
||||
cnts = 6;
|
||||
|
||||
|
@ -9232,7 +9221,6 @@ static int rtw_mp_efuse_get(struct net_device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
// DBG_871X("%s: MAC address={", __FUNCTION__);
|
||||
*extra = 0;
|
||||
for (i=0; i<cnts; i++)
|
||||
{
|
||||
|
@ -9721,16 +9709,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
//mac,00e04c871200
|
||||
#ifdef CONFIG_USB_HCI
|
||||
addr = EEPROM_MAC_ADDR_88EU;
|
||||
#endif
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
addr = EEPROM_MAC_ADDR_88ES;
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
addr = EEPROM_MAC_ADDR_88EE;
|
||||
#endif
|
||||
addr = EEPROM_MAC_ADDR_88EU;
|
||||
|
||||
cnts = strlen(tmp[1]);
|
||||
if (cnts%2)
|
||||
|
@ -9783,21 +9762,14 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
addr = EEPROM_VID_88EE;
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
addr = EEPROM_VID_88EE;
|
||||
#endif
|
||||
addr = EEPROM_VID_88EE;
|
||||
cnts = strlen(tmp[1]);
|
||||
if (cnts%2)
|
||||
{
|
||||
if (cnts%2) {
|
||||
err = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
cnts /= 2;
|
||||
if (cnts == 0)
|
||||
{
|
||||
if (cnts == 0) {
|
||||
err = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -10702,10 +10674,6 @@ static int rtw_widi_set_probe_request(struct net_device *dev,
|
|||
#include <rtl8188e_hal.h>
|
||||
extern void rtl8188e_cal_txdesc_chksum(struct tx_desc *ptxdesc);
|
||||
#define cal_txdesc_chksum rtl8188e_cal_txdesc_chksum
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
extern void rtl8188es_fill_default_txdesc(struct xmit_frame *pxmitframe, u8 *pbuf);
|
||||
#define fill_default_txdesc rtl8188es_fill_default_txdesc
|
||||
#endif // CONFIG_SDIO_HCI
|
||||
|
||||
static s32 initLoopback(struct adapter *padapter)
|
||||
{
|
||||
|
@ -10926,16 +10894,6 @@ static struct xmit_frame* createloopbackpkt(struct adapter *padapter, u32 size)
|
|||
desc->txdw5 = cpu_to_le32(desc->txdw5);
|
||||
desc->txdw6 = cpu_to_le32(desc->txdw6);
|
||||
desc->txdw7 = cpu_to_le32(desc->txdw7);
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
desc->txdw8 = cpu_to_le32(desc->txdw8);
|
||||
desc->txdw9 = cpu_to_le32(desc->txdw9);
|
||||
desc->txdw10 = cpu_to_le32(desc->txdw10);
|
||||
desc->txdw11 = cpu_to_le32(desc->txdw11);
|
||||
desc->txdw12 = cpu_to_le32(desc->txdw12);
|
||||
desc->txdw13 = cpu_to_le32(desc->txdw13);
|
||||
desc->txdw14 = cpu_to_le32(desc->txdw14);
|
||||
desc->txdw15 = cpu_to_le32(desc->txdw15);
|
||||
#endif
|
||||
|
||||
cal_txdesc_chksum(desc);
|
||||
|
||||
|
|
|
@ -30,14 +30,8 @@
|
|||
#include <rtw_ioctl.h>
|
||||
#include <rtw_version.h>
|
||||
#include <rtw_br_ext.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_hal.h>
|
||||
#include <usb_osintf.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#include <pci_osintf.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BR_EXT
|
||||
#include <rtw_br_ext.h>
|
||||
|
@ -163,11 +157,7 @@ static int rtw_hwpwrp_detect = 1;
|
|||
static int rtw_hwpwrp_detect = 0; //HW power ping detect 0:disable , 1:enable
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
static int rtw_hw_wps_pbc = 1;
|
||||
#else
|
||||
static int rtw_hw_wps_pbc = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
int rtw_mc2u_disable = 0;
|
||||
|
@ -713,15 +703,9 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
|
|||
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_start_drv_threads\n"));
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
#if defined(CONFIG_SDIO_HCI) && defined(CONFIG_CONCURRENT_MODE)
|
||||
if(padapter->adapter_type == PRIMARY_ADAPTER){
|
||||
#endif
|
||||
padapter->xmitThread = kthread_run(rtw_xmit_thread, padapter, "RTW_XMIT_THREAD");
|
||||
if(IS_ERR(padapter->xmitThread))
|
||||
_status = _FAIL;
|
||||
#if defined(CONFIG_SDIO_HCI) && defined(CONFIG_CONCURRENT_MODE)
|
||||
}
|
||||
#endif // CONFIG_SDIO_HCI+CONFIG_CONCURRENT_MODE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
|
@ -805,10 +789,6 @@ void rtw_stop_drv_threads (struct adapter *padapter)
|
|||
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
// Below is to termindate tx_thread...
|
||||
#if defined(CONFIG_SDIO_HCI) && defined(CONFIG_CONCURRENT_MODE)
|
||||
// Only wake-up primary adapter
|
||||
if(padapter->adapter_type == PRIMARY_ADAPTER)
|
||||
#endif //SDIO_HCI + CONCURRENT
|
||||
{
|
||||
_rtw_up_sema(&padapter->xmitpriv.xmit_sema);
|
||||
_rtw_down_sema(&padapter->xmitpriv.terminate_xmitthread_sema);
|
||||
|
@ -1344,13 +1324,6 @@ static const struct net_device_ops rtw_netdev_if2_ops = {
|
|||
};
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_hal.h>
|
||||
#endif
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#include <sdio_hal.h>
|
||||
#endif
|
||||
struct adapter *rtw_drv_if2_init(struct adapter *primary_padapter, void (*set_intf_ops)(struct _io_ops *pops))
|
||||
{
|
||||
int res = _FAIL;
|
||||
|
|
|
@ -196,7 +196,6 @@ void _rtw_skb_queue_purge(struct sk_buff_head *list)
|
|||
_rtw_skb_free(skb);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
inline void *_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
|
@ -214,8 +213,6 @@ inline void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr
|
|||
usb_buffer_free(dev, size, addr, dma);
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_USB_HCI */
|
||||
|
||||
#ifdef DBG_MEM_ALLOC
|
||||
|
||||
struct rtw_mem_stat {
|
||||
|
@ -567,7 +564,6 @@ inline void dbg_rtw_skb_queue_purge(struct sk_buff_head *list, enum mstat_f flag
|
|||
dbg_rtw_skb_free(skb, flags, func, line);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
inline void *dbg_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma, const enum mstat_f flags, const char *func, int line)
|
||||
{
|
||||
void *p;
|
||||
|
@ -596,7 +592,6 @@ inline void dbg_rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *a
|
|||
, size
|
||||
);
|
||||
}
|
||||
#endif /* CONFIG_USB_HCI */
|
||||
#endif /* DBG_MEM_ALLOC */
|
||||
|
||||
void* rtw_malloc2d(int h, int w, int size)
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
|
||||
#include <osdep_intf.h>
|
||||
#include <ethernet.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_ops.h>
|
||||
#endif
|
||||
|
||||
//init os related resource in struct recv_priv
|
||||
int rtw_os_recv_resource_init(struct recv_priv *precvpriv, struct adapter *padapter)
|
||||
|
@ -77,7 +74,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, struct recv_buf *pre
|
|||
{
|
||||
int res=_SUCCESS;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
struct usb_device *pusbd = pdvobjpriv->pusbdev;
|
||||
|
||||
|
@ -105,9 +101,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, struct recv_buf *pre
|
|||
if(precvbuf->pallocated_buf == NULL)
|
||||
return _FAIL;
|
||||
#endif //CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
||||
#endif //CONFIG_USB_HCI
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -116,8 +109,6 @@ int rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *prec
|
|||
{
|
||||
int ret = _SUCCESS;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
|
@ -134,10 +125,6 @@ int rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *prec
|
|||
//usb_kill_urb(precvbuf->purb);
|
||||
usb_free_urb(precvbuf->purb);
|
||||
}
|
||||
|
||||
#endif //CONFIG_USB_HCI
|
||||
|
||||
|
||||
if(precvbuf->pskb)
|
||||
rtw_skb_free(precvbuf->pskb);
|
||||
|
||||
|
@ -478,8 +465,6 @@ void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf)
|
|||
{
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
precvbuf->ref_cnt--;
|
||||
|
||||
//free skb in recv_buf
|
||||
|
@ -492,15 +477,8 @@ void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf)
|
|||
{
|
||||
rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
precvbuf->pskb = NULL;
|
||||
#endif
|
||||
|
||||
}
|
||||
void _rtw_reordering_ctrl_timeout_handler (void *FunctionContext);
|
||||
|
||||
void _rtw_reordering_ctrl_timeout_handler (void *FunctionContext)
|
||||
{
|
||||
struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)FunctionContext;
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#include <xmit_osdep.h>
|
||||
#include <hal_intf.h>
|
||||
#include <rtw_version.h>
|
||||
#ifndef CONFIG_USB_HCI
|
||||
|
||||
#error "CONFIG_USB_HCI shall be on!\n"
|
||||
|
||||
#endif
|
||||
|
||||
#include <usb_vendor_req.h>
|
||||
#include <usb_ops.h>
|
||||
|
|
|
@ -522,46 +522,35 @@ _func_enter_;
|
|||
int bmcast = IS_MCAST(pattrib->dst);
|
||||
u8 agg_num = 1;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
if(pxmitframe->agg_num>1)
|
||||
agg_num = pxmitframe->agg_num;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
if(pxmitframe->agg_num>1)
|
||||
agg_num = pxmitframe->agg_num;
|
||||
#endif
|
||||
|
||||
if(bmcast)
|
||||
{
|
||||
psta = rtw_get_bcmc_stainfo(padapter);
|
||||
|
||||
} else {
|
||||
else
|
||||
psta = rtw_get_stainfo(pstapriv, pattrib->dst);
|
||||
}
|
||||
if(psta)
|
||||
{
|
||||
switch(pattrib->priority)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
psta->tx_bk_cnt += agg_num;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
psta->tx_vi_cnt += agg_num;
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
psta->tx_vo_cnt += agg_num;
|
||||
break;
|
||||
case 0:
|
||||
case 3:
|
||||
default:
|
||||
psta->tx_be_cnt += agg_num;
|
||||
break;
|
||||
if(psta) {
|
||||
switch(pattrib->priority) {
|
||||
case 1:
|
||||
case 2:
|
||||
psta->tx_bk_cnt += agg_num;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
psta->tx_vi_cnt += agg_num;
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
psta->tx_vo_cnt += agg_num;
|
||||
break;
|
||||
case 0:
|
||||
case 3:
|
||||
default:
|
||||
psta->tx_be_cnt += agg_num;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,6 @@ void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib)
|
|||
|
||||
int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz)
|
||||
{
|
||||
#ifdef CONFIG_USB_HCI
|
||||
int i;
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
struct usb_device *pusbd = pdvobjpriv->pusbdev;
|
||||
|
@ -158,23 +157,11 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb
|
|||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
#if defined(CONFIG_PCI_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz);
|
||||
if (pxmitbuf->pallocated_buf == NULL)
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ);
|
||||
#endif
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz)
|
||||
{
|
||||
#ifdef CONFIG_USB_HCI
|
||||
int i;
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
struct usb_device *pusbd = pdvobjpriv->pusbdev;
|
||||
|
@ -197,12 +184,6 @@ void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitb
|
|||
if(pxmitbuf->pallocated_buf)
|
||||
rtw_mfree(pxmitbuf->pallocated_buf, free_sz);
|
||||
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
|
||||
#endif
|
||||
#if defined(CONFIG_PCI_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
if(pxmitbuf->pallocated_buf)
|
||||
rtw_mfree(pxmitbuf->pallocated_buf, free_sz);
|
||||
#endif
|
||||
}
|
||||
|
||||
#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5)
|
||||
|
@ -244,20 +225,6 @@ void rtw_os_xmit_schedule(struct adapter *padapter)
|
|||
{
|
||||
struct adapter *pri_adapter = padapter;
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
if(!padapter)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
pri_adapter = padapter->pbuddy_adapter;
|
||||
#endif
|
||||
|
||||
if (_rtw_queue_empty(&pri_adapter->xmitpriv.pending_xmitbuf_queue) == _FALSE)
|
||||
_rtw_up_sema(&pri_adapter->xmitpriv.xmit_sema);
|
||||
|
||||
|
||||
#else
|
||||
_irqL irqL;
|
||||
struct xmit_priv *pxmitpriv;
|
||||
|
||||
|
@ -274,7 +241,6 @@ void rtw_os_xmit_schedule(struct adapter *padapter)
|
|||
}
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void rtw_check_xmit_resource(struct adapter *padapter, _pkt *pkt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue