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
|
@ -195,12 +195,8 @@ static void update_BCNTIM(struct adapter *padapter)
|
|||
}
|
||||
|
||||
#ifndef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
set_tx_beacon_cmd(padapter);
|
||||
#endif
|
||||
#endif //!CONFIG_INTERRUPT_BASED_TXBCN
|
||||
|
||||
|
||||
}
|
||||
|
||||
void rtw_add_bcn_ie(struct adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len)
|
||||
|
@ -1355,13 +1351,9 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
|
||||
#ifndef CONFIG_INTERRUPT_BASED_TXBCN //other case will tx beacon when bcn interrupt coming in.
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
//issue beacon frame
|
||||
if(send_beacon(padapter)==_FAIL)
|
||||
{
|
||||
DBG_871X("issue_beacon, fail!\n");
|
||||
}
|
||||
#endif
|
||||
#endif //!CONFIG_INTERRUPT_BASED_TXBCN
|
||||
|
||||
}
|
||||
|
@ -2146,17 +2138,10 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
|||
_exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||
|
||||
#ifndef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
if(tx)
|
||||
{
|
||||
if(tx) {
|
||||
//send_beacon(padapter);//send_beacon must execute on TSR level
|
||||
set_tx_beacon_cmd(padapter);
|
||||
}
|
||||
#else
|
||||
{
|
||||
//PCI will issue beacon when BCN interrupt occurs.
|
||||
}
|
||||
#endif
|
||||
#endif //!CONFIG_INTERRUPT_BASED_TXBCN
|
||||
|
||||
}
|
||||
|
|
|
@ -116,28 +116,6 @@ _func_enter_;
|
|||
}
|
||||
pevtpriv->evt_buf = pevtpriv->evt_allocated_buf + 4 - ((unsigned int)(pevtpriv->evt_allocated_buf) & 3);
|
||||
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pevtpriv->allocated_c2h_mem = rtw_zmalloc(C2H_MEM_SZ +4);
|
||||
|
||||
if (pevtpriv->allocated_c2h_mem == NULL){
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pevtpriv->c2h_mem = pevtpriv->allocated_c2h_mem + 4\
|
||||
- ( (u32)(pevtpriv->allocated_c2h_mem) & 3);
|
||||
#ifdef PLATFORM_OS_XP
|
||||
pevtpriv->pc2h_mdl= IoAllocateMdl((u8 *)pevtpriv->c2h_mem, C2H_MEM_SZ , FALSE, FALSE, NULL);
|
||||
|
||||
if(pevtpriv->pc2h_mdl == NULL){
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
MmBuildMdlForNonPagedPool(pevtpriv->pc2h_mdl);
|
||||
#endif
|
||||
#endif //end of CONFIG_SDIO_HCI
|
||||
|
||||
_rtw_init_queue(&(pevtpriv->evt_queue));
|
||||
|
||||
exit:
|
||||
|
|
|
@ -406,10 +406,7 @@ int proc_get_trx_info(char *page, char **start,
|
|||
len += snprintf(page + len, count - len, "%d, hwq.accnt=%d\n", i, phwxmit->accnt);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
len += snprintf(page + len, count - len, "rx_urb_pending_cn=%d\n", precvpriv->rx_pending_cnt);
|
||||
#endif
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
||||
|
|
|
@ -30,17 +30,8 @@ c. provides the software interface between caller and the hardware interface
|
|||
|
||||
Compiler Flag Option:
|
||||
|
||||
1. CONFIG_SDIO_HCI:
|
||||
a. USE_SYNC_IRP: Only sync operations are provided.
|
||||
b. USE_ASYNC_IRP:Both sync/async operations are provided.
|
||||
|
||||
2. CONFIG_USB_HCI:
|
||||
a. USE_ASYNC_IRP: Both sync/async operations are provided.
|
||||
|
||||
3. CONFIG_CFIO_HCI:
|
||||
b. USE_SYNC_IRP: Only sync operations are provided.
|
||||
|
||||
|
||||
Only sync read/rtw_write_mem operations are provided.
|
||||
|
||||
jackson@realtek.com.tw
|
||||
|
@ -53,34 +44,12 @@ jackson@realtek.com.tw
|
|||
#include <drv_types.h>
|
||||
#include <rtw_io.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#include <sdio_ops.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#include <gspi_ops.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_ops.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#include <pci_ops.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#define rtw_le16_to_cpu(val) val
|
||||
#define rtw_le32_to_cpu(val) val
|
||||
#define rtw_cpu_to_le16(val) val
|
||||
#define rtw_cpu_to_le32(val) val
|
||||
#else
|
||||
#define rtw_le16_to_cpu(val) le16_to_cpu(val)
|
||||
#define rtw_le32_to_cpu(val) le32_to_cpu(val)
|
||||
#define rtw_cpu_to_le16(val) cpu_to_le16(val)
|
||||
#define rtw_cpu_to_le32(val) cpu_to_le32(val)
|
||||
#endif
|
||||
|
||||
|
||||
u8 _rtw_read8(struct adapter *adapter, u32 addr)
|
||||
|
|
|
@ -25,20 +25,10 @@
|
|||
#include <drv_types.h>
|
||||
#include <rtw_ioctl_set.h>
|
||||
#include <hal_intf.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_osintf.h>
|
||||
#include <usb_ops.h>
|
||||
#endif
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#include <sdio_osintf.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#include <gspi_osintf.h>
|
||||
#endif
|
||||
|
||||
extern void indicate_wx_scan_complete_event(struct adapter *padapter);
|
||||
void indicate_wx_scan_complete_event(struct adapter *padapter);
|
||||
|
||||
#define IS_MAC_ADDRESS_BROADCAST(addr) \
|
||||
( \
|
||||
|
|
|
@ -101,27 +101,10 @@ bool rtw_IOL_applied(struct adapter *adapter)
|
|||
if(1 == adapter->registrypriv.fw_iol)
|
||||
return _TRUE;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
if((2 == adapter->registrypriv.fw_iol) && (!adapter_to_dvobj(adapter)->ishighspeed))
|
||||
return _TRUE;
|
||||
#endif
|
||||
|
||||
return _FALSE;
|
||||
}
|
||||
/*
|
||||
bool rtw_IOL_applied(struct adapter *adapter)
|
||||
{
|
||||
if(adapter->registrypriv.fw_iol)
|
||||
return _TRUE;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
if(!adapter_to_dvobj(adapter)->ishighspeed)
|
||||
return _TRUE;
|
||||
#endif
|
||||
|
||||
return _FALSE;
|
||||
}
|
||||
*/
|
||||
|
||||
int rtw_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt)
|
||||
{
|
||||
|
|
|
@ -38,19 +38,13 @@ void BlinkTimerCallback(void *data)
|
|||
return;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI)
|
||||
#ifdef CONFIG_LED_HANDLED_BY_CMD_THREAD
|
||||
rtw_led_blink_cmd(padapter, pLed);
|
||||
#else
|
||||
_set_workitem(&(pLed->BlinkWorkItem));
|
||||
#endif
|
||||
#elif defined(CONFIG_PCI_HCI)
|
||||
BlinkHandler(pLed);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI)
|
||||
//
|
||||
// Description:
|
||||
// Callback function of LED BlinkWorkItem.
|
||||
|
@ -61,7 +55,6 @@ void BlinkWorkItemCallback(struct work_struct *work)
|
|||
PLED_871x pLed = container_of(work, LED_871x, BlinkWorkItem);
|
||||
BlinkHandler(pLed);
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Description:
|
||||
|
@ -78,12 +71,10 @@ void ResetLedStatus(PLED_871x pLed) {
|
|||
pLed->BlinkTimes = 0; // Number of times to toggle led state for blinking.
|
||||
pLed->BlinkingLedState = LED_UNKNOWN; // Next state for blinking, either RTW_LED_ON or RTW_LED_OFF are.
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI)
|
||||
pLed->bLedNoLinkBlinkInProgress = _FALSE;
|
||||
pLed->bLedLinkBlinkInProgress = _FALSE;
|
||||
pLed->bLedStartToLinkBlinkInProgress = _FALSE;
|
||||
pLed->bLedScanBlinkInProgress = _FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -104,9 +95,7 @@ InitLed871x(
|
|||
|
||||
_init_timer(&(pLed->BlinkTimer), padapter->pnetdev, BlinkTimerCallback, pLed);
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI)
|
||||
_init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,9 +108,7 @@ DeInitLed871x(
|
|||
PLED_871x pLed
|
||||
)
|
||||
{
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
_cancel_workitem_sync(&(pLed->BlinkWorkItem));
|
||||
#endif
|
||||
_cancel_timer_ex(&(pLed->BlinkTimer));
|
||||
ResetLedStatus(pLed);
|
||||
}
|
||||
|
@ -132,7 +119,6 @@ DeInitLed871x(
|
|||
// Implementation of LED blinking behavior.
|
||||
// It toggle off LED and schedule corresponding timer if necessary.
|
||||
//
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
|
||||
void SwLedOn(struct adapter *padapter, PLED_871x pLed);
|
||||
void SwLedOff(struct adapter *padapter, PLED_871x pLed);
|
||||
|
@ -2417,5 +2403,3 @@ LedControl871x(
|
|||
|
||||
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("LedStrategy:%d, LedAction %d\n", ledpriv->LedStrategy,LedAction));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3317,7 +3317,6 @@ void rtw_joinbss_reset(struct adapter *padapter)
|
|||
|
||||
phtpriv->ampdu_enable = _FALSE;//reset to disabled
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
// TH=1 => means that invalidate usb rx aggregation
|
||||
// TH=0 => means that validate usb rx aggregation, use init value.
|
||||
if(phtpriv->ht_option)
|
||||
|
@ -3334,9 +3333,6 @@ void rtw_joinbss_reset(struct adapter *padapter)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_RXDMA_AGG_PG_TH, (u8 *)(&threshold));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8748,24 +8748,6 @@ unsigned int send_beacon(struct adapter *padapter)
|
|||
u8 bxmitok = _FALSE;
|
||||
int issue=0;
|
||||
int poll = 0;
|
||||
//#ifdef CONFIG_CONCURRENT_MODE
|
||||
//struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
//struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
//struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
//struct mlme_priv *pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv);
|
||||
//#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
|
||||
//DBG_871X("%s\n", __FUNCTION__);
|
||||
|
||||
issue_beacon(padapter, 0);
|
||||
|
||||
return _SUCCESS;
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
u32 start = rtw_get_current_time();
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL);
|
||||
|
@ -8802,9 +8784,6 @@ unsigned int send_beacon(struct adapter *padapter)
|
|||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -11958,10 +11937,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
|
|||
|
||||
if((pstapriv->tim_bitmap&BIT(0)) && (psta_bmc->sleepq_len>0))
|
||||
{
|
||||
#ifndef CONFIG_PCI_HCI
|
||||
rtw_msleep_os(10);// 10ms, ATIM(HIQ) Windows
|
||||
#endif
|
||||
//_enter_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
|
@ -11985,29 +11961,11 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
|
|||
|
||||
pxmitframe->attrib.qsel = 0x11;//HIQ
|
||||
|
||||
#if 0
|
||||
_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
_enter_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
|
||||
#endif
|
||||
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
||||
|
||||
//pstapriv->tim_bitmap &= ~BIT(0);
|
||||
|
||||
}
|
||||
|
||||
//_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
//#if defined(CONFIG_PCI_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
rtw_chk_hi_queue_cmd(padapter);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
1433
core/rtw_mp_ioctl.c
1433
core/rtw_mp_ioctl.c
File diff suppressed because it is too large
Load diff
|
@ -910,9 +910,7 @@ _func_enter_;
|
|||
|
||||
if ((padapter->bSurpriseRemoved == _TRUE)
|
||||
|| (padapter->hw_init_completed == _FALSE)
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|| (padapter->bDriverStopped== _TRUE)
|
||||
#endif
|
||||
|| (pwrpriv->pwr_mode == PS_MODE_ACTIVE)
|
||||
)
|
||||
{
|
||||
|
@ -1522,9 +1520,7 @@ _func_exit_;
|
|||
}
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
extern int rtw_resume_process(struct adapter *padapter);
|
||||
#endif
|
||||
static void resume_workitem_callback(struct work_struct *work)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = container_of(work, struct pwrctrl_priv, resume_work);
|
||||
|
@ -1533,10 +1529,7 @@ static void resume_workitem_callback(struct work_struct *work)
|
|||
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
rtw_resume_process(adapter);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv)
|
||||
|
@ -1570,9 +1563,7 @@ inline void rtw_set_do_late_resume(struct pwrctrl_priv *pwrpriv, bool enable)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_HAS_EARLYSUSPEND
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
extern int rtw_resume_process(struct adapter *padapter);
|
||||
#endif
|
||||
static void rtw_early_suspend(struct early_suspend *h)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
|
||||
|
@ -1589,10 +1580,8 @@ static void rtw_late_resume(struct early_suspend *h)
|
|||
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
if(pwrpriv->do_late_resume) {
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
rtw_set_do_late_resume(pwrpriv, _FALSE);
|
||||
rtw_resume_process(adapter);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1622,9 +1611,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
#endif //CONFIG_HAS_EARLYSUSPEND
|
||||
|
||||
#ifdef CONFIG_ANDROID_POWER
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
extern int rtw_resume_process(struct adapter *padapter);
|
||||
#endif
|
||||
static void rtw_early_suspend(android_early_suspend_t *h)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
|
||||
|
@ -1641,10 +1628,8 @@ static void rtw_late_resume(android_early_suspend_t *h)
|
|||
|
||||
DBG_871X("%s\n",__FUNCTION__);
|
||||
if(pwrpriv->do_late_resume) {
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
rtw_set_do_late_resume(pwrpriv, _FALSE);
|
||||
rtw_resume_process(adapter);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1792,7 +1777,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
|
||||
if(rf_off == pwrpriv->rf_pwrstate )
|
||||
{
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if(pwrpriv->brfoffbyhw==_TRUE)
|
||||
{
|
||||
|
@ -1811,7 +1795,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_IPS
|
||||
|
|
|
@ -26,10 +26,7 @@
|
|||
#include <ip.h>
|
||||
#include <if_ether.h>
|
||||
#include <ethernet.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_ops.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
#include <rtl8723a_hal.h>
|
||||
|
@ -116,15 +113,9 @@ _func_enter_;
|
|||
precvframe++;
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
precvpriv->rx_pending_cnt=1;
|
||||
|
||||
_rtw_init_sema(&precvpriv->allrxreturnevt, 0);
|
||||
|
||||
#endif
|
||||
|
||||
res = rtw_hal_init_recv_priv(padapter);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
@ -413,20 +404,12 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue)
|
|||
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue)
|
||||
{
|
||||
_irqL irqL;
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
|
||||
rtw_list_insert_tail(&precvbuf->list, get_list_head(queue));
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
return _SUCCESS;
|
||||
|
||||
}
|
||||
|
@ -437,11 +420,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
|||
struct recv_buf *precvbuf;
|
||||
_list *plist, *phead;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
if(_rtw_queue_empty(queue) == _TRUE)
|
||||
{
|
||||
|
@ -459,11 +438,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
|||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
return precvbuf;
|
||||
|
||||
|
@ -2539,59 +2514,7 @@ _func_exit_;
|
|||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
static void recvframe_expand_pkt(
|
||||
struct adapter *padapter,
|
||||
union recv_frame *prframe)
|
||||
{
|
||||
struct recv_frame_hdr *pfhdr;
|
||||
_pkt *ppkt;
|
||||
u8 shift_sz;
|
||||
u32 alloc_sz;
|
||||
|
||||
|
||||
pfhdr = &prframe->u.hdr;
|
||||
|
||||
// 6 is for IP header 8 bytes alignment in QoS packet case.
|
||||
if (pfhdr->attrib.qos)
|
||||
shift_sz = 6;
|
||||
else
|
||||
shift_sz = 0;
|
||||
|
||||
// for first fragment packet, need to allocate
|
||||
// (1536 + RXDESC_SIZE + drvinfo_sz) to reassemble packet
|
||||
// 8 is for skb->data 8 bytes alignment.
|
||||
// alloc_sz = _RND(1536 + RXDESC_SIZE + pfhdr->attrib.drvinfosize + shift_sz + 8, 128);
|
||||
alloc_sz = 1664; // round (1536 + 24 + 32 + shift_sz + 8) to 128 bytes alignment
|
||||
|
||||
//3 1. alloc new skb
|
||||
// prepare extra space for 4 bytes alignment
|
||||
ppkt = rtw_skb_alloc(alloc_sz);
|
||||
|
||||
if (!ppkt) return; // no way to expand
|
||||
|
||||
//3 2. Prepare new skb to replace & release old skb
|
||||
// force ppkt->data at 8-byte alignment address
|
||||
skb_reserve(ppkt, 8 - ((SIZE_PTR)ppkt->data & 7));
|
||||
// force ip_hdr at 8-byte alignment address according to shift_sz
|
||||
skb_reserve(ppkt, shift_sz);
|
||||
|
||||
// copy data to new pkt
|
||||
_rtw_memcpy(skb_put(ppkt, pfhdr->len), pfhdr->rx_data, pfhdr->len);
|
||||
|
||||
rtw_skb_free(pfhdr->pkt);
|
||||
|
||||
// attach new pkt to recvframe
|
||||
pfhdr->pkt = ppkt;
|
||||
pfhdr->rx_head = ppkt->head;
|
||||
pfhdr->rx_data = ppkt->data;
|
||||
pfhdr->rx_tail = skb_tail_pointer(ppkt);
|
||||
pfhdr->rx_end = skb_end_pointer(ppkt);
|
||||
}
|
||||
#endif
|
||||
|
||||
//perform defrag
|
||||
union recv_frame * recvframe_defrag(struct adapter *adapter,_queue *defrag_q);
|
||||
union recv_frame * recvframe_defrag(struct adapter *adapter,_queue *defrag_q)
|
||||
{
|
||||
_list *plist, *phead;
|
||||
|
@ -2622,12 +2545,6 @@ _func_enter_;
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
#ifndef CONFIG_SDIO_RX_COPY
|
||||
recvframe_expand_pkt(adapter, prframe);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
curfragnum++;
|
||||
|
||||
plist= get_list_head(defrag_q);
|
||||
|
|
|
@ -197,7 +197,6 @@ void sreset_restore_network_station(struct adapter *padapter)
|
|||
|
||||
{
|
||||
u8 threshold;
|
||||
#ifdef CONFIG_USB_HCI
|
||||
// TH=1 => means that invalidate usb rx aggregation
|
||||
// TH=0 => means that validate usb rx aggregation, use init value.
|
||||
if(mlmepriv->htpriv.ht_option) {
|
||||
|
@ -210,7 +209,6 @@ void sreset_restore_network_station(struct adapter *padapter)
|
|||
threshold = 1;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_RXDMA_AGG_PG_TH, (u8 *)(&threshold));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||
|
@ -270,9 +268,7 @@ void sreset_stop_adapter(struct adapter *padapter)
|
|||
rtw_cancel_all_timer(padapter);
|
||||
|
||||
/* TODO: OS and HCI independent */
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
tasklet_kill(&pxmitpriv->xmit_tasklet);
|
||||
#endif
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
|
||||
rtw_scan_abort(padapter);
|
||||
|
@ -300,9 +296,7 @@ void sreset_start_adapter(struct adapter *padapter)
|
|||
}
|
||||
|
||||
/* TODO: OS and HCI independent */
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||
#endif
|
||||
|
||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||
|
||||
|
|
|
@ -27,11 +27,7 @@
|
|||
#include <osdep_intf.h>
|
||||
#include <circ_buf.h>
|
||||
#include <ip.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_ops.h>
|
||||
#endif
|
||||
|
||||
|
||||
static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
|
||||
static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
|
||||
|
@ -196,13 +192,6 @@ _func_enter_;
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxmitbuf->phead = pxmitbuf->pbuf;
|
||||
pxmitbuf->pend = pxmitbuf->pbuf + MAX_XMITBUF_SZ;
|
||||
pxmitbuf->len = 0;
|
||||
pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
|
||||
#endif
|
||||
|
||||
pxmitbuf->flags = XMIT_VO_QUEUE;
|
||||
|
||||
rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmitbuf_queue.queue));
|
||||
|
@ -288,13 +277,6 @@ _func_enter_;
|
|||
goto exit;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxmitbuf->phead = pxmitbuf->pbuf;
|
||||
pxmitbuf->pend = pxmitbuf->pbuf + max_xmit_extbuf_size;
|
||||
pxmitbuf->len = 0;
|
||||
pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
|
||||
#endif
|
||||
|
||||
rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue));
|
||||
#ifdef DBG_XMIT_BUF_EXT
|
||||
pxmitbuf->no=i;
|
||||
|
@ -313,7 +295,6 @@ _func_enter_;
|
|||
pxmitpriv->wmm_para_seq[i] = i;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
pxmitpriv->txirp_cnt=1;
|
||||
|
||||
_rtw_init_sema(&(pxmitpriv->tx_retevt), 0);
|
||||
|
@ -323,8 +304,6 @@ _func_enter_;
|
|||
pxmitpriv->bkq_cnt = 0;
|
||||
pxmitpriv->viq_cnt = 0;
|
||||
pxmitpriv->voq_cnt = 0;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
pxmitpriv->ack_tx = _FALSE;
|
||||
|
@ -2270,7 +2249,7 @@ void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe,
|
|||
if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
|
||||
{
|
||||
pxmitpriv->tx_bytes += sz;
|
||||
#if defined(CONFIG_USB_TX_AGGREGATION) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
#if defined(CONFIG_USB_TX_AGGREGATION)
|
||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod += pxmitframe->agg_num;
|
||||
#else
|
||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod++;
|
||||
|
@ -2280,7 +2259,7 @@ void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe,
|
|||
if (psta)
|
||||
{
|
||||
pstats = &psta->sta_stats;
|
||||
#if defined(CONFIG_USB_TX_AGGREGATION) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
#if defined(CONFIG_USB_TX_AGGREGATION)
|
||||
pstats->tx_pkts += pxmitframe->agg_num;
|
||||
#else
|
||||
pstats->tx_pkts++;
|
||||
|
@ -2325,14 +2304,6 @@ _func_enter_;
|
|||
pxmitbuf->priv_data = NULL;
|
||||
//pxmitbuf->ext_tag = _TRUE;
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxmitbuf->len = 0;
|
||||
pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
pxmitbuf->len = 0;
|
||||
#endif
|
||||
|
||||
if (pxmitbuf->sctx) {
|
||||
DBG_871X("%s pxmitbuf->sctx is not NULL\n", __func__);
|
||||
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC);
|
||||
|
@ -2412,16 +2383,6 @@ _func_enter_;
|
|||
|
||||
pxmitbuf->priv_data = NULL;
|
||||
//pxmitbuf->ext_tag = _FALSE;
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxmitbuf->len = 0;
|
||||
pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
|
||||
pxmitbuf->agg_num = 0;
|
||||
pxmitbuf->pg_num = 0;
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
pxmitbuf->len = 0;
|
||||
#endif
|
||||
|
||||
if (pxmitbuf->sctx) {
|
||||
DBG_871X("%s pxmitbuf->sctx is not NULL\n", __func__);
|
||||
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC);
|
||||
|
@ -2497,7 +2458,6 @@ void rtw_init_xmitframe(struct xmit_frame *pxframe)
|
|||
|
||||
pxframe->frame_tag = DATA_FRAMETAG;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
pxframe->pkt = NULL;
|
||||
pxframe->pkt_offset = 1;//default use pkt_offset to fill tx desc
|
||||
|
||||
|
@ -2505,13 +2465,6 @@ void rtw_init_xmitframe(struct xmit_frame *pxframe)
|
|||
pxframe->agg_num = 1;
|
||||
#endif
|
||||
|
||||
#endif //#ifdef CONFIG_USB_HCI
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxframe->pg_num = 1;
|
||||
pxframe->agg_num = 1;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
pxframe->ack_report = 0;
|
||||
#endif
|
||||
|
@ -2788,9 +2741,6 @@ struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
struct adapter *padapter = pxmitpriv->adapter;
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
int i, inx[4];
|
||||
#ifdef CONFIG_USB_HCI
|
||||
// int j, tmp, acirp_cnt[4];
|
||||
#endif
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -2799,19 +2749,8 @@ _func_enter_;
|
|||
if(pregpriv->wifi_spec==1)
|
||||
{
|
||||
int j, tmp, acirp_cnt[4];
|
||||
#if 0
|
||||
if(flags<XMIT_QUEUE_ENTRY)
|
||||
{
|
||||
//priority exchange according to the completed xmitbuf flags.
|
||||
inx[flags] = 0;
|
||||
inx[0] = flags;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI)
|
||||
for(j=0; j<4; j++)
|
||||
inx[j] = pxmitpriv->wmm_para_seq[j];
|
||||
#endif
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
|
@ -4041,14 +3980,7 @@ void enqueue_pending_xmitbuf(
|
|||
rtw_list_insert_tail(&pxmitbuf->list, get_list_head(pqueue));
|
||||
_exit_critical_bh(&pqueue->lock, &irql);
|
||||
|
||||
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) && defined(CONFIG_CONCURRENT_MODE)
|
||||
if (pri_adapter->adapter_type > PRIMARY_ADAPTER)
|
||||
pri_adapter = pri_adapter->pbuddy_adapter;
|
||||
#endif //SDIO_HCI + CONCURRENT
|
||||
_rtw_up_sema(&(pri_adapter->xmitpriv.xmit_sema));
|
||||
|
||||
}
|
||||
|
||||
struct xmit_buf* dequeue_pending_xmitbuf(
|
||||
|
@ -4084,9 +4016,7 @@ struct xmit_buf* dequeue_pending_xmitbuf_under_survey(
|
|||
{
|
||||
_irqL irql;
|
||||
struct xmit_buf *pxmitbuf;
|
||||
#ifdef CONFIG_USB_HCI
|
||||
struct xmit_frame *pxmitframe;
|
||||
#endif
|
||||
_queue *pqueue;
|
||||
|
||||
|
||||
|
@ -4108,19 +4038,11 @@ struct xmit_buf* dequeue_pending_xmitbuf_under_survey(
|
|||
|
||||
pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
pxmitframe = (struct xmit_frame*)pxmitbuf->priv_data;
|
||||
if(pxmitframe)
|
||||
{
|
||||
type = GetFrameSubType(pxmitbuf->pbuf + TXDESC_SIZE + pxmitframe->pkt_offset * PACKET_OFFSET_SZ);
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG_871X("%s, !!!ERROR!!! For USB, TODO ITEM \n", __FUNCTION__);
|
||||
}
|
||||
#else
|
||||
type = GetFrameSubType(pxmitbuf->pbuf + TXDESC_OFFSET);
|
||||
#endif
|
||||
|
||||
if ((type == WIFI_PROBEREQ) ||
|
||||
(type == WIFI_DATA_NULL) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue