mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-02-08 07:42:49 +00:00
rtl8188eu: Remove CONFIG_XMIT_THREAD_MODE
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
3bc76eea48
commit
bc08957f00
7 changed files with 0 additions and 232 deletions
128
core/rtw_xmit.c
128
core/rtw_xmit.c
|
@ -3223,134 +3223,6 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
void enqueue_pending_xmitbuf(
|
|
||||||
struct xmit_priv *pxmitpriv,
|
|
||||||
struct xmit_buf *pxmitbuf)
|
|
||||||
{
|
|
||||||
_queue *pqueue;
|
|
||||||
struct adapter *pri_adapter = pxmitpriv->adapter;
|
|
||||||
|
|
||||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
|
||||||
|
|
||||||
spin_lock_bh(&pqueue->lock, &irql);
|
|
||||||
rtw_list_delete(&pxmitbuf->list);
|
|
||||||
rtw_list_insert_tail(&pxmitbuf->list, get_list_head(pqueue));
|
|
||||||
spin_unlock_bh(&pqueue->lock, &irql);
|
|
||||||
|
|
||||||
_rtw_up_sema(&(pri_adapter->xmitpriv.xmit_sema));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct xmit_buf* dequeue_pending_xmitbuf(
|
|
||||||
struct xmit_priv *pxmitpriv)
|
|
||||||
{
|
|
||||||
struct xmit_buf *pxmitbuf;
|
|
||||||
_queue *pqueue;
|
|
||||||
|
|
||||||
|
|
||||||
pxmitbuf = NULL;
|
|
||||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
|
||||||
|
|
||||||
spin_lock_bh(&pqueue->lock, &irql);
|
|
||||||
|
|
||||||
if (_rtw_queue_empty(pqueue) == false)
|
|
||||||
{
|
|
||||||
_list *plist, *phead;
|
|
||||||
|
|
||||||
phead = get_list_head(pqueue);
|
|
||||||
plist = get_next(phead);
|
|
||||||
pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
|
|
||||||
rtw_list_delete(&pxmitbuf->list);
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_bh(&pqueue->lock, &irql);
|
|
||||||
|
|
||||||
return pxmitbuf;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct xmit_buf* dequeue_pending_xmitbuf_under_survey(
|
|
||||||
struct xmit_priv *pxmitpriv)
|
|
||||||
{
|
|
||||||
struct xmit_buf *pxmitbuf;
|
|
||||||
struct xmit_frame *pxmitframe;
|
|
||||||
_queue *pqueue;
|
|
||||||
|
|
||||||
|
|
||||||
pxmitbuf = NULL;
|
|
||||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
|
||||||
|
|
||||||
spin_lock_bh(&pqueue->lock, &irql);
|
|
||||||
|
|
||||||
if (_rtw_queue_empty(pqueue) == false)
|
|
||||||
{
|
|
||||||
_list *plist, *phead;
|
|
||||||
u8 type;
|
|
||||||
|
|
||||||
phead = get_list_head(pqueue);
|
|
||||||
plist = phead;
|
|
||||||
do {
|
|
||||||
plist = get_next(plist);
|
|
||||||
if (plist == phead) break;
|
|
||||||
|
|
||||||
pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
|
|
||||||
|
|
||||||
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__);
|
|
||||||
|
|
||||||
if ((type == WIFI_PROBEREQ) ||
|
|
||||||
(type == WIFI_DATA_NULL) ||
|
|
||||||
(type == WIFI_QOS_DATA_NULL))
|
|
||||||
{
|
|
||||||
rtw_list_delete(&pxmitbuf->list);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
pxmitbuf = NULL;
|
|
||||||
} while (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_bh(&pqueue->lock, &irql);
|
|
||||||
|
|
||||||
return pxmitbuf;
|
|
||||||
}
|
|
||||||
|
|
||||||
sint check_pending_xmitbuf(
|
|
||||||
struct xmit_priv *pxmitpriv)
|
|
||||||
{
|
|
||||||
_queue *pqueue;
|
|
||||||
|
|
||||||
pqueue = &pxmitpriv->pending_xmitbuf_queue;
|
|
||||||
|
|
||||||
if(_rtw_queue_empty(pqueue) == false)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
thread_return rtw_xmit_thread(thread_context context)
|
|
||||||
{
|
|
||||||
s32 err;
|
|
||||||
struct adapter *padapter;
|
|
||||||
|
|
||||||
|
|
||||||
err = _SUCCESS;
|
|
||||||
padapter = (PADAPTER)context;
|
|
||||||
|
|
||||||
thread_enter("RTW_XMIT_THREAD");
|
|
||||||
|
|
||||||
do {
|
|
||||||
err = rtw_hal_xmit_thread_handler(padapter);
|
|
||||||
flush_signals_thread();
|
|
||||||
} while (_SUCCESS == err);
|
|
||||||
|
|
||||||
_rtw_up_sema(&padapter->xmitpriv.terminate_xmitthread_sema);
|
|
||||||
|
|
||||||
thread_exit();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms)
|
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms)
|
||||||
{
|
{
|
||||||
sctx->timeout_ms = timeout_ms;
|
sctx->timeout_ms = timeout_ms;
|
||||||
|
|
|
@ -507,15 +507,6 @@ int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame, u32
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
s32 rtw_hal_xmit_thread_handler(struct adapter *padapter)
|
|
||||||
{
|
|
||||||
if(padapter->HalFunc.xmit_thread_handler)
|
|
||||||
return padapter->HalFunc.xmit_thread_handler(padapter);
|
|
||||||
return _FAIL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void rtw_hal_notch_filter(struct adapter *adapter, bool enable)
|
void rtw_hal_notch_filter(struct adapter *adapter, bool enable)
|
||||||
{
|
{
|
||||||
if(adapter->HalFunc.hal_notch_filter)
|
if(adapter->HalFunc.hal_notch_filter)
|
||||||
|
|
|
@ -2680,10 +2680,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
|
||||||
pHalFunc->GetHalODMVarHandler = &rtl8188e_GetHalODMVar;
|
pHalFunc->GetHalODMVarHandler = &rtl8188e_GetHalODMVar;
|
||||||
pHalFunc->SetHalODMVarHandler = &rtl8188e_SetHalODMVar;
|
pHalFunc->SetHalODMVarHandler = &rtl8188e_SetHalODMVar;
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
pHalFunc->xmit_thread_handler = &hal_xmit_handler;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
|
pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
|
||||||
|
|
||||||
pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
|
pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
|
||||||
|
|
|
@ -465,56 +465,6 @@ if (padapter->registrypriv.mp_mode == 0)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
/*
|
|
||||||
* Description
|
|
||||||
* Transmit xmitbuf to hardware tx fifo
|
|
||||||
*
|
|
||||||
* Return
|
|
||||||
* _SUCCESS ok
|
|
||||||
* _FAIL something error
|
|
||||||
*/
|
|
||||||
s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter)
|
|
||||||
{
|
|
||||||
/* PHAL_DATA_TYPE phal; */
|
|
||||||
struct xmit_priv *pxmitpriv;
|
|
||||||
struct xmit_buf *pxmitbuf;
|
|
||||||
s32 ret;
|
|
||||||
|
|
||||||
|
|
||||||
/* phal = GET_HAL_DATA(padapter); */
|
|
||||||
pxmitpriv = &padapter->xmitpriv;
|
|
||||||
|
|
||||||
ret = _rtw_down_sema(&pxmitpriv->xmit_sema);
|
|
||||||
if (_FAIL == ret) {
|
|
||||||
RT_TRACE(_module_hal_xmit_c_, _drv_emerg_,
|
|
||||||
("%s: down SdioXmitBufSema fail!\n", __FUNCTION__));
|
|
||||||
return _FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = (padapter->bDriverStopped == true) || (padapter->bSurpriseRemoved == true);
|
|
||||||
if (ret) {
|
|
||||||
RT_TRACE(_module_hal_xmit_c_, _drv_notice_,
|
|
||||||
("%s: bDriverStopped(%d) bSurpriseRemoved(%d)!\n",
|
|
||||||
__FUNCTION__, padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
|
||||||
return _FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(check_pending_xmitbuf(pxmitpriv) == false)
|
|
||||||
return _SUCCESS;
|
|
||||||
|
|
||||||
do {
|
|
||||||
pxmitbuf = dequeue_pending_xmitbuf(pxmitpriv);
|
|
||||||
if (pxmitbuf == NULL) break;
|
|
||||||
|
|
||||||
rtw_write_port(padapter, pxmitbuf->ff_hwaddr, pxmitbuf->len, (unsigned char*)pxmitbuf);
|
|
||||||
|
|
||||||
} while (1);
|
|
||||||
return _SUCCESS;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* for non-agg data frame or management frame */
|
/* for non-agg data frame or management frame */
|
||||||
static s32 rtw_dump_xframe(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
static s32 rtw_dump_xframe(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
||||||
{
|
{
|
||||||
|
@ -570,13 +520,7 @@ static s32 rtw_dump_xframe(struct adapter *padapter, struct xmit_frame *pxmitfra
|
||||||
}
|
}
|
||||||
ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe);
|
ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe);
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
pxmitbuf->len = w_sz;
|
|
||||||
pxmitbuf->ff_hwaddr = ff_hwaddr;
|
|
||||||
enqueue_pending_xmitbuf(pxmitpriv, pxmitbuf);
|
|
||||||
#else
|
|
||||||
inner_ret = rtw_write_port(padapter, ff_hwaddr, w_sz, (unsigned char*)pxmitbuf);
|
inner_ret = rtw_write_port(padapter, ff_hwaddr, w_sz, (unsigned char*)pxmitbuf);
|
||||||
#endif
|
|
||||||
|
|
||||||
rtw_count_tx_stats(padapter, pxmitframe, sz);
|
rtw_count_tx_stats(padapter, pxmitframe, sz);
|
||||||
|
|
||||||
|
@ -586,7 +530,6 @@ static s32 rtw_dump_xframe(struct adapter *padapter, struct xmit_frame *pxmitfra
|
||||||
mem_addr += w_sz;
|
mem_addr += w_sz;
|
||||||
|
|
||||||
mem_addr = (u8 *)RND4(((SIZE_PTR)(mem_addr)));
|
mem_addr = (u8 *)RND4(((SIZE_PTR)(mem_addr)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||||
|
|
|
@ -245,10 +245,6 @@ struct hal_ops {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int (*IOL_exec_cmds_sync)(struct adapter *padapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);
|
int (*IOL_exec_cmds_sync)(struct adapter *padapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
s32 (*xmit_thread_handler)(struct adapter *padapter);
|
|
||||||
#endif
|
|
||||||
void (*hal_notch_filter)(struct adapter * adapter, bool enable);
|
void (*hal_notch_filter)(struct adapter * adapter, bool enable);
|
||||||
void (*hal_reset_security_engine)(struct adapter * adapter);
|
void (*hal_reset_security_engine)(struct adapter * adapter);
|
||||||
s32 (*c2h_handler)(struct adapter *padapter, struct c2h_evt_hdr *c2h_evt);
|
s32 (*c2h_handler)(struct adapter *padapter, struct c2h_evt_hdr *c2h_evt);
|
||||||
|
@ -419,11 +415,6 @@ bool rtw_hal_sreset_inprogress(struct adapter *padapter);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);
|
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
s32 rtw_hal_xmit_thread_handler(struct adapter *padapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void rtw_hal_notch_filter(struct adapter * adapter, bool enable);
|
void rtw_hal_notch_filter(struct adapter * adapter, bool enable);
|
||||||
void rtw_hal_reset_security_engine(struct adapter * adapter);
|
void rtw_hal_reset_security_engine(struct adapter * adapter);
|
||||||
|
|
||||||
|
|
|
@ -466,21 +466,10 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u8 qos_acm(u8 acm_mask, u8 priority);
|
u8 qos_acm(u8 acm_mask, u8 priority);
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
void enqueue_pending_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
|
||||||
struct xmit_buf* dequeue_pending_xmitbuf(struct xmit_priv *pxmitpriv);
|
|
||||||
struct xmit_buf* dequeue_pending_xmitbuf_under_survey(struct xmit_priv *pxmitpriv);
|
|
||||||
sint check_pending_xmitbuf(struct xmit_priv *pxmitpriv);
|
|
||||||
thread_return rtw_xmit_thread(thread_context context);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe);
|
u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe);
|
||||||
|
|
||||||
int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms);
|
int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms);
|
||||||
void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status);
|
void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status);
|
||||||
|
|
||||||
|
|
||||||
//include after declaring struct xmit_buf, in order to avoid warning
|
//include after declaring struct xmit_buf, in order to avoid warning
|
||||||
#include <xmit_osdep.h>
|
#include <xmit_osdep.h>
|
||||||
|
|
||||||
|
|
|
@ -632,11 +632,6 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
|
||||||
u32 _status = _SUCCESS;
|
u32 _status = _SUCCESS;
|
||||||
|
|
||||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_start_drv_threads\n"));
|
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_start_drv_threads\n"));
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
padapter->xmitThread = kthread_run(rtw_xmit_thread, padapter, "RTW_XMIT_THREAD");
|
|
||||||
if(IS_ERR(padapter->xmitThread))
|
|
||||||
_status = _FAIL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RECV_THREAD_MODE
|
#ifdef CONFIG_RECV_THREAD_MODE
|
||||||
padapter->recvThread = kthread_run(rtw_recv_thread, padapter, "RTW_RECV_THREAD");
|
padapter->recvThread = kthread_run(rtw_recv_thread, padapter, "RTW_RECV_THREAD");
|
||||||
|
@ -702,15 +697,6 @@ void rtw_stop_drv_threads (struct adapter *padapter)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
|
||||||
/* Below is to termindate tx_thread... */
|
|
||||||
{
|
|
||||||
_rtw_up_sema(&padapter->xmitpriv.xmit_sema);
|
|
||||||
_rtw_down_sema(&padapter->xmitpriv.terminate_xmitthread_sema);
|
|
||||||
}
|
|
||||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("\n drv_halt: rtw_xmit_thread can be terminated ! \n"));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_RECV_THREAD_MODE
|
#ifdef CONFIG_RECV_THREAD_MODE
|
||||||
/* Below is to termindate rx_thread... */
|
/* Below is to termindate rx_thread... */
|
||||||
_rtw_up_sema(&padapter->recvpriv.recv_sema);
|
_rtw_up_sema(&padapter->recvpriv.recv_sema);
|
||||||
|
|
Loading…
Reference in a new issue