mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-02-08 07:42:49 +00:00
rtl8188eu: Remove code for connections other than USB in os_dep/
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
2abe025887
commit
9c1dc7d65f
6 changed files with 5 additions and 204 deletions
|
@ -3714,21 +3714,6 @@ static int rtw_wx_read32(struct net_device *dev,
|
|||
data32 = rtw_read32(padapter, addr);
|
||||
sprintf(extra, "0x%08X", data32);
|
||||
break;
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) && defined(CONFIG_SDIO_INDIRECT_ACCESS) && defined(DBG_SDIO_INDIRECT_ACCESS)
|
||||
case 11:
|
||||
data32 = rtw_sd_iread8(padapter, addr);
|
||||
sprintf(extra, "0x%02X", data32);
|
||||
break;
|
||||
case 12:
|
||||
data32 = rtw_sd_iread16(padapter, addr);
|
||||
sprintf(extra, "0x%04X", data32);
|
||||
break;
|
||||
case 14:
|
||||
data32 = rtw_sd_iread32(padapter, addr);
|
||||
sprintf(extra, "0x%08X", data32);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
RTW_INFO("%s: usage> read [bytes],[address(hex)]\n", __func__);
|
||||
ret = -EINVAL;
|
||||
|
@ -6801,9 +6786,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
|
||||
RTW_INFO("rx_urb_pending_cn=%d\n", ATOMIC_READ(&(precvpriv->rx_pending_cnt)));
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 0x09: {
|
||||
|
@ -7086,61 +7069,6 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) && defined(CONFIG_SDIO_INDIRECT_ACCESS) && defined(DBG_SDIO_INDIRECT_ACCESS)
|
||||
case 0x1f:
|
||||
{
|
||||
int i, j = 0, test_cnts = 0;
|
||||
static u8 test_code = 0x5A;
|
||||
static u32 data_misatch_cnt = 0, d_acc_err_cnt = 0;
|
||||
|
||||
u32 d_data, i_data;
|
||||
u32 imr;
|
||||
|
||||
test_cnts = extra_arg;
|
||||
for (i = 0; i < test_cnts; i++) {
|
||||
if (RTW_CANNOT_IO(padapter))
|
||||
break;
|
||||
|
||||
rtw_write8(padapter, 0x07, test_code);
|
||||
|
||||
d_data = rtw_read32(padapter, 0x04);
|
||||
imr = rtw_read32(padapter, 0x10250014);
|
||||
rtw_write32(padapter, 0x10250014, 0);
|
||||
rtw_msleep_os(50);
|
||||
|
||||
i_data = rtw_sd_iread32(padapter, 0x04);
|
||||
|
||||
rtw_write32(padapter, 0x10250014, imr);
|
||||
|
||||
if (d_data != i_data) {
|
||||
data_misatch_cnt++;
|
||||
RTW_ERR("d_data :0x%08x, i_data : 0x%08x\n", d_data, i_data);
|
||||
}
|
||||
|
||||
if (test_code != (i_data >> 24)) {
|
||||
d_acc_err_cnt++;
|
||||
rtw_write8(padapter, 0x07, 0xAA);
|
||||
RTW_ERR("test_code :0x%02x, i_data : 0x%08x\n", test_code, i_data);
|
||||
}
|
||||
if ((j++) == 100) {
|
||||
rtw_msleep_os(2000);
|
||||
RTW_INFO(" Indirect access testing..........%d/%d\n", i, test_cnts);
|
||||
j = 0;
|
||||
}
|
||||
|
||||
test_code = ~test_code;
|
||||
rtw_msleep_os(50);
|
||||
}
|
||||
RTW_INFO("========Indirect access test=========\n");
|
||||
RTW_INFO(" test_cnts = %d\n", test_cnts);
|
||||
RTW_INFO(" direct & indirect read32 data missatch cnts = %d\n", data_misatch_cnt);
|
||||
RTW_INFO(" indirect rdata is not equal to wdata cnts = %d\n", d_acc_err_cnt);
|
||||
RTW_INFO("========Indirect access test=========\n\n");
|
||||
data_misatch_cnt = d_acc_err_cnt = 0;
|
||||
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case 0x20:
|
||||
{
|
||||
if (arg == 0xAA) {
|
||||
|
@ -8674,10 +8602,8 @@ static int rtw_wowlan_ctrl(struct net_device *dev,
|
|||
rtw_suspend_common(padapter);
|
||||
|
||||
else if (_rtw_memcmp(extra, "disable", 7)) {
|
||||
#ifdef CONFIG_USB_HCI
|
||||
RTW_ENABLE_FUNC(padapter, DF_RX_BIT);
|
||||
RTW_ENABLE_FUNC(padapter, DF_TX_BIT);
|
||||
#endif
|
||||
rtw_resume_common(padapter);
|
||||
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
|
@ -8808,10 +8734,8 @@ static int rtw_ap_wowlan_ctrl(struct net_device *dev,
|
|||
|
||||
rtw_suspend_common(padapter);
|
||||
} else if (_rtw_memcmp(extra, "disable", 7)) {
|
||||
#ifdef CONFIG_USB_HCI
|
||||
RTW_ENABLE_FUNC(padapter, DF_RX_BIT);
|
||||
RTW_ENABLE_FUNC(padapter, DF_TX_BIT);
|
||||
#endif
|
||||
rtw_resume_common(padapter);
|
||||
} else {
|
||||
RTW_INFO("[%s] Invalid Parameter.\n", __func__);
|
||||
|
@ -9319,12 +9243,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
|
|||
}
|
||||
/* RTW_INFO("}\n"); */
|
||||
} else if (strcmp(tmp[0], "vidpid") == 0) {
|
||||
#ifdef CONFIG_USB_HCI
|
||||
addr = EEPROM_VID_88EU;
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
addr = EEPROM_VID_88EE;
|
||||
#endif
|
||||
cnts = 4;
|
||||
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (PVOID)&max_available_len, _FALSE);
|
||||
|
@ -9912,12 +9831,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
}
|
||||
|
||||
/* pidvid,da0b7881 */
|
||||
#ifdef CONFIG_USB_HCI
|
||||
addr = EEPROM_VID_88EU;
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
addr = EEPROM_VID_88EE;
|
||||
#endif
|
||||
cnts = strlen(tmp[1]);
|
||||
if (cnts % 2) {
|
||||
err = -EINVAL;
|
||||
|
@ -11771,16 +11685,11 @@ 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 || defined(CONFIG_GSPI_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)
|
||||
{
|
||||
PLOOPBACKDATA ploopback;
|
||||
|
||||
|
||||
if (padapter->ploopback == NULL) {
|
||||
ploopback = (PLOOPBACKDATA)rtw_zmalloc(sizeof(LOOPBACKDATA));
|
||||
if (ploopback == NULL)
|
||||
|
@ -11997,17 +11906,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 */
|
||||
|
|
|
@ -242,11 +242,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;
|
||||
|
@ -1323,12 +1319,6 @@ static int rtw_os_ndev_alloc(_adapter *adapter)
|
|||
SET_NETDEV_DEV(ndev, dvobj_to_dev(adapter_to_dvobj(adapter)));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
if (adapter_to_dvobj(adapter)->bdma64)
|
||||
ndev->features |= NETIF_F_HIGHDMA;
|
||||
ndev->irq = adapter_to_dvobj(adapter)->irq;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IOCTL_CFG80211)
|
||||
if (rtw_cfg80211_ndev_res_alloc(adapter) != _SUCCESS) {
|
||||
rtw_warn_on(1);
|
||||
|
@ -1577,14 +1567,9 @@ u32 rtw_start_drv_threads(_adapter *padapter)
|
|||
|
||||
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
#if defined(CONFIG_SDIO_HCI)
|
||||
if (is_primary_adapter(padapter))
|
||||
#endif
|
||||
{
|
||||
padapter->xmitThread = kthread_run(rtw_xmit_thread, padapter, "RTW_XMIT_THREAD");
|
||||
if (IS_ERR(padapter->xmitThread))
|
||||
_status = _FAIL;
|
||||
}
|
||||
#endif /* #ifdef CONFIG_XMIT_THREAD_MODE */
|
||||
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
|
@ -1629,14 +1614,8 @@ void rtw_stop_drv_threads(_adapter *padapter)
|
|||
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
/* Below is to termindate tx_thread... */
|
||||
#if defined(CONFIG_SDIO_HCI)
|
||||
/* Only wake-up primary adapter */
|
||||
if (is_primary_adapter(padapter))
|
||||
#endif /*SDIO_HCI */
|
||||
{
|
||||
_rtw_up_sema(&padapter->xmitpriv.xmit_sema);
|
||||
_rtw_down_sema(&padapter->xmitpriv.terminate_xmitthread_sema);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
|
@ -3637,14 +3616,6 @@ int rtw_suspend_wow(_adapter *padapter)
|
|||
/* rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "WOWLAN"); */
|
||||
/* #endif */
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
/* 2. disable interrupt */
|
||||
rtw_mi_intf_stop(padapter);
|
||||
|
||||
/* 2.1 clean interupt */
|
||||
rtw_hal_clear_interrupt(padapter);
|
||||
#endif /* CONFIG_SDIO_HCI */
|
||||
|
||||
/* 2.2 free irq */
|
||||
/* sdio_free_irq(adapter_to_dvobj(padapter)); */
|
||||
#if !(CONFIG_RTW_SDIO_KEEP_IRQ)
|
||||
|
@ -3761,14 +3732,6 @@ int rtw_suspend_ap_wow(_adapter *padapter)
|
|||
}
|
||||
rtw_clr_drv_stopped(padapter); /*for 32k command*/
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
/* 2. disable interrupt*/
|
||||
rtw_mi_intf_stop(padapter);
|
||||
|
||||
/* 2.1 clean interupt */
|
||||
rtw_hal_clear_interrupt(padapter);
|
||||
#endif /* CONFIG_SDIO_HCI */
|
||||
|
||||
/* 2.2 free irq */
|
||||
if (padapter->intf_free_irq)
|
||||
padapter->intf_free_irq(adapter_to_dvobj(padapter));
|
||||
|
@ -3998,11 +3961,6 @@ int rtw_resume_process_wow(_adapter *padapter)
|
|||
|
||||
pwrpriv->bFwCurrentInPSMode = _FALSE;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
rtw_mi_intf_stop(padapter);
|
||||
rtw_hal_clear_interrupt(padapter);
|
||||
#endif /* CONFIG_SDIO_HCI */
|
||||
|
||||
#if !(CONFIG_RTW_SDIO_KEEP_IRQ)
|
||||
/* if (sdio_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS) { */
|
||||
if ((padapter->intf_alloc_irq) && (padapter->intf_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS)) {
|
||||
|
|
|
@ -203,7 +203,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))
|
||||
|
@ -221,7 +220,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 */
|
||||
|
||||
#if defined(DBG_MEM_ALLOC)
|
||||
|
||||
|
@ -639,7 +637,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;
|
||||
|
@ -672,7 +669,6 @@ inline void dbg_rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *a
|
|||
, size
|
||||
);
|
||||
}
|
||||
#endif /* CONFIG_USB_HCI */
|
||||
|
||||
#endif /* defined(DBG_MEM_ALLOC) */
|
||||
|
||||
|
|
|
@ -207,8 +207,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;
|
||||
|
||||
|
@ -234,8 +232,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;
|
||||
}
|
||||
|
||||
|
@ -244,8 +240,6 @@ 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);
|
||||
|
@ -262,9 +256,6 @@ int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
usb_free_urb(precvbuf->purb);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_USB_HCI */
|
||||
|
||||
|
||||
if (precvbuf->pskb) {
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
if (rtw_free_skb_premem(precvbuf->pskb) != 0)
|
||||
|
@ -828,8 +819,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 */
|
||||
|
@ -839,13 +828,6 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
|
||||
if (precvbuf->irp_pending == _FALSE)
|
||||
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
|
||||
|
||||
}
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext)
|
||||
|
|
|
@ -24,19 +24,10 @@
|
|||
|
||||
#include <platform_ops.h>
|
||||
|
||||
#ifndef CONFIG_USB_HCI
|
||||
#error "CONFIG_USB_HCI shall be on!\n"
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GLOBAL_UI_PID
|
||||
int ui_pid[3] = {0, 0, 0};
|
||||
#endif
|
||||
|
||||
|
||||
static int rtw_suspend(struct usb_interface *intf, pm_message_t message);
|
||||
static int rtw_resume(struct usb_interface *intf);
|
||||
|
||||
|
|
|
@ -129,7 +129,6 @@ int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u3
|
|||
}
|
||||
|
||||
if (flag) {
|
||||
#ifdef CONFIG_USB_HCI
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL);
|
||||
|
@ -138,16 +137,13 @@ int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u3
|
|||
return _FAIL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag)
|
||||
{
|
||||
if (flag) {
|
||||
#ifdef CONFIG_USB_HCI
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
|
@ -156,7 +152,6 @@ void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf, u3
|
|||
usb_free_urb(pxmitbuf->pxmit_urb[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (free_sz > 0) {
|
||||
|
@ -275,17 +270,6 @@ void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe)
|
|||
|
||||
void rtw_os_xmit_schedule(_adapter *padapter)
|
||||
{
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
_adapter *pri_adapter = GET_PRIMARY_ADAPTER(padapter);
|
||||
|
||||
if (!padapter)
|
||||
return;
|
||||
|
||||
if (_rtw_queue_empty(&padapter->xmitpriv.pending_xmitbuf_queue) == _FALSE)
|
||||
_rtw_up_sema(&pri_adapter->xmitpriv.xmit_sema);
|
||||
|
||||
|
||||
#else
|
||||
_irqL irqL;
|
||||
struct xmit_priv *pxmitpriv;
|
||||
|
||||
|
@ -300,14 +284,6 @@ void rtw_os_xmit_schedule(_adapter *padapter)
|
|||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
#if defined(CONFIG_PCI_HCI) && defined(CONFIG_XMIT_THREAD_MODE)
|
||||
if (_rtw_queue_empty(&padapter->xmitpriv.pending_xmitbuf_queue) == _FALSE)
|
||||
_rtw_up_sema(&padapter->xmitpriv.xmit_sema);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
|
||||
|
|
Loading…
Reference in a new issue