mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove dead code for other than USB
The vendor code has pieces of code for PCI, SDIO, and GSPI. Remove it and CONFIG_USB_HCI. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
c5e461c221
commit
0e4009c999
46 changed files with 78 additions and 1448 deletions
|
@ -31,24 +31,14 @@
|
|||
#include <rtw_ioctl_set.h>
|
||||
#include <rtw_ioctl_query.h>
|
||||
#include <rtw_mp_ioctl.h>
|
||||
|
||||
//#ifdef CONFIG_MP_INCLUDED
|
||||
#include <rtw_mp_ioctl.h>
|
||||
//#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_ops.h>
|
||||
#endif //CONFIG_USB_HCI
|
||||
#include <rtw_version.h>
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
#include <rtw_mp.h>
|
||||
#endif //#ifdef CONFIG_MP_INCLUDED
|
||||
#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)
|
||||
|
@ -6601,9 +6591,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
|
||||
DBG_88E("free_xmitbuf_cnt=%d, free_xmitframe_cnt=%d, free_xmit_extbuf_cnt=%d\n",
|
||||
pxmitpriv->free_xmitbuf_cnt, pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmit_extbuf_cnt);
|
||||
#ifdef CONFIG_USB_HCI
|
||||
DBG_88E("rx_urb_pending_cn=%d\n", precvpriv->rx_pending_cnt);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 0x09:
|
||||
|
@ -9049,16 +9037,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
}
|
||||
|
||||
//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
|
||||
|
||||
cnts = strlen(tmp[1]);
|
||||
if (cnts%2)
|
||||
{
|
||||
|
@ -9111,12 +9090,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
}
|
||||
|
||||
// pidvid,da0b7881
|
||||
#ifdef CONFIG_USB_HCI
|
||||
addr = EEPROM_VID_88EE;
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
addr = EEPROM_VID_88EE;
|
||||
#endif
|
||||
cnts = strlen(tmp[1]);
|
||||
if (cnts%2)
|
||||
{
|
||||
|
@ -11271,10 +11245,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(PADAPTER padapter)
|
||||
{
|
||||
|
@ -11486,17 +11456,6 @@ static struct xmit_frame* createloopbackpkt(PADAPTER 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);
|
||||
|
||||
//2 5. coalesce
|
||||
|
|
|
@ -150,11 +150,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;
|
||||
|
|
|
@ -60,8 +60,6 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv)
|
|||
int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf)
|
||||
{
|
||||
int res=_SUCCESS;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
struct usb_device *pusbd = pdvobjpriv->pusbdev;
|
||||
|
||||
|
@ -90,8 +88,6 @@ int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
return _FAIL;
|
||||
#endif //CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
||||
#endif //CONFIG_USB_HCI
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -100,10 +96,7 @@ int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
{
|
||||
int ret = _SUCCESS;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
struct usb_device *pusbd = pdvobjpriv->pusbdev;
|
||||
|
||||
|
@ -114,20 +107,12 @@ int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
#endif //CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
||||
if (precvbuf->purb)
|
||||
{
|
||||
//usb_kill_urb(precvbuf->purb);
|
||||
usb_free_urb(precvbuf->purb);
|
||||
}
|
||||
|
||||
#endif //CONFIG_USB_HCI
|
||||
|
||||
|
||||
if (precvbuf->pskb)
|
||||
dev_kfree_skb_any(precvbuf->pskb);
|
||||
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
void rtw_handle_tkip_mic_err(_adapter *padapter,u8 bgroup)
|
||||
|
@ -412,8 +397,6 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
{
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
precvbuf->ref_cnt--;
|
||||
|
||||
//free skb in recv_buf
|
||||
|
@ -426,16 +409,9 @@ void rtw_os_read_port(_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)
|
||||
|
||||
void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext)
|
||||
{
|
||||
struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)FunctionContext;
|
||||
rtw_reordering_ctrl_timeout_handler(preorder_ctrl);
|
||||
|
|
|
@ -125,7 +125,6 @@ void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib)
|
|||
|
||||
int rtw_os_xmit_resource_alloc(_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(_adapter *padapter, struct xmit_buf *pxmitbuf,u32
|
|||
}
|
||||
|
||||
}
|
||||
#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(_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(_adapter *padapter, struct xmit_buf *pxmitbuf,u32
|
|||
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)
|
||||
|
@ -250,20 +231,6 @@ void rtw_os_xmit_schedule(_adapter *padapter)
|
|||
{
|
||||
_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;
|
||||
|
||||
|
@ -275,12 +242,9 @@ void rtw_os_xmit_schedule(_adapter *padapter)
|
|||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
if (rtw_txframes_pending(padapter))
|
||||
{
|
||||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue