mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-29 15:43:38 +00:00
rtl8188eu: Remove CONFIG_DETECT_C2H_BY_POLLING
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e542073502
commit
cd557898d2
7 changed files with 0 additions and 197 deletions
|
@ -1939,45 +1939,6 @@ exit:
|
|||
return res;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
u8 rtw_event_polling_cmd(struct adapter*padapter)
|
||||
{
|
||||
struct cmd_obj* ph2c;
|
||||
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
|
||||
struct cmd_priv *pcmdpriv=&padapter->cmdpriv;
|
||||
u8 res=_SUCCESS;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if(ph2c==NULL){
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if(pdrvextra_cmd_parm==NULL){
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm->ec_id = EVENT_POLLING_CID;
|
||||
pdrvextra_cmd_parm->type_size = 0;
|
||||
pdrvextra_cmd_parm->pbuf = (u8 *)padapter;
|
||||
|
||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||
|
||||
|
||||
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void traffic_status_watchdog(struct adapter *padapter)
|
||||
{
|
||||
u8 bEnterPS;
|
||||
|
@ -2616,51 +2577,6 @@ static void c2h_wk_callback(_workitem *work)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
void event_polling_hdl(struct adapter *padapter, u8 *pbuf, int sz)
|
||||
{
|
||||
c2h_id_filter ccx_id_filter = rtw_hal_c2h_id_filter_ccx(padapter);
|
||||
u8 check_c2hcmd, check_ccx;
|
||||
|
||||
/* check_c2hcmd = rtw_read8(padapter, REG_C2HEVT_CLEAR); */
|
||||
/* check_ccx= rtw_read8(padapter, REG_C2HEVT_MSG_NORMAL); */
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_C2HEVT_CLEAR, (u8 *)(&check_c2hcmd));
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_C2HEVT_MSG_NORMAL, (u8 *)(&check_ccx));
|
||||
|
||||
if (check_c2hcmd != 0)
|
||||
{
|
||||
struct c2h_evt_hdr *c2h_evt;
|
||||
|
||||
if (check_c2hcmd != 0xFF)
|
||||
{
|
||||
c2h_evt_clear(padapter);
|
||||
}
|
||||
else if (ccx_id_filter(check_ccx & 0x0F) == false)
|
||||
{
|
||||
if ((c2h_evt = (struct c2h_evt_hdr *)rtw_zmalloc(16)) != NULL) {
|
||||
if (c2h_evt_read(padapter, (u8 *)c2h_evt) == _SUCCESS) {
|
||||
rtw_hal_c2h_handler(padapter, c2h_evt);
|
||||
}
|
||||
rtw_mfree((u8*)c2h_evt, 16);
|
||||
} else {
|
||||
/* Error handling for malloc fail */
|
||||
if (rtw_cbuf_push(padapter->evtpriv.c2h_queue, (void*)NULL) != _SUCCESS)
|
||||
DBG_871X("%s rtw_cbuf_push fail\n", __func__);
|
||||
_set_workitem(&padapter->evtpriv.c2h_wk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (padapter->xmitpriv.ack_tx == false)
|
||||
{
|
||||
c2h_evt_clear(padapter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
|
||||
{
|
||||
struct drvextra_cmd_parm *pdrvextra_cmd;
|
||||
|
@ -2714,11 +2630,6 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
|
|||
case C2H_WK_CID:
|
||||
c2h_evt_hdl(padapter, (struct c2h_evt_hdr *)pdrvextra_cmd->pbuf, NULL);
|
||||
break;
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
case EVENT_POLLING_CID:
|
||||
event_polling_hdl(padapter, pdrvextra_cmd->pbuf, pdrvextra_cmd->type_size);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2255,13 +2255,6 @@ void rtw_set_scan_deny(struct adapter *adapter, u32 ms)
|
|||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
void rtw_event_polling_timer_hdl(struct adapter *adapter)
|
||||
{
|
||||
rtw_event_polling_cmd(adapter);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(IEEE80211_SCAN_RESULT_EXPIRE)
|
||||
#define RTW_SCAN_RESULT_EXPIRE IEEE80211_SCAN_RESULT_EXPIRE/HZ*1000 -1000 /* 3000 -1000 */
|
||||
#else
|
||||
|
|
|
@ -3412,66 +3412,8 @@ void rtw_sctx_done(struct submit_ctx **sctx)
|
|||
rtw_sctx_done_err(sctx, RTW_SCTX_DONE_SUCCESS);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
s32 c2h_evt_hdl(struct adapter *adapter, struct c2h_evt_hdr *c2h_evt, c2h_id_filter filter);
|
||||
#endif
|
||||
|
||||
int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms)
|
||||
{
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
struct adapter *adapter = container_of(pxmitpriv, struct adapter, xmitpriv);
|
||||
c2h_id_filter ccx_id_filter = rtw_hal_c2h_id_filter_ccx(adapter);
|
||||
struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops;
|
||||
u8 check_c2hcmd;
|
||||
u8 check_ccx;
|
||||
int ret = _FAIL;
|
||||
|
||||
pack_tx_ops->submit_time = rtw_get_current_time();
|
||||
pack_tx_ops->timeout_ms = timeout_ms;
|
||||
pack_tx_ops->status = RTW_SCTX_SUBMITTED;
|
||||
|
||||
do {
|
||||
rtw_msleep_os(10);
|
||||
/* check_c2hcmd = rtw_read8(adapter, 0x1AF); */
|
||||
/* check_ccx = rtw_read8(adapter, 0x1A0); */
|
||||
rtw_hal_get_hwreg(adapter, HW_VAR_C2HEVT_CLEAR, (u8 *)(&check_c2hcmd));
|
||||
rtw_hal_get_hwreg(adapter, HW_VAR_C2HEVT_MSG_NORMAL, (u8 *)(&check_ccx));
|
||||
|
||||
|
||||
if (check_c2hcmd != 0)
|
||||
{
|
||||
if (check_c2hcmd != 0xFF)
|
||||
{
|
||||
c2h_evt_clear(adapter);
|
||||
}
|
||||
else if (ccx_id_filter(check_ccx & 0x0F) == true)
|
||||
{
|
||||
c2h_evt_hdl(adapter, NULL, ccx_id_filter);
|
||||
if (pack_tx_ops->status != RTW_SCTX_SUBMITTED)
|
||||
break;
|
||||
|
||||
if (adapter->bDriverStopped) {
|
||||
pack_tx_ops->status = RTW_SCTX_DONE_DRV_STOP;
|
||||
break;
|
||||
}
|
||||
if (adapter->bSurpriseRemoved) {
|
||||
pack_tx_ops->status = RTW_SCTX_DONE_DEV_REMOVE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (rtw_get_passing_time_ms(pack_tx_ops->submit_time) < timeout_ms);
|
||||
|
||||
if (pack_tx_ops->status == RTW_SCTX_SUBMITTED) {
|
||||
pack_tx_ops->status = RTW_SCTX_DONE_TIMEOUT;
|
||||
DBG_871X("%s timeout\n", __func__);
|
||||
}
|
||||
|
||||
if (pack_tx_ops->status == RTW_SCTX_DONE_SUCCESS)
|
||||
ret = _SUCCESS;
|
||||
|
||||
return ret;
|
||||
#else
|
||||
struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops;
|
||||
|
||||
pack_tx_ops->submit_time = rtw_get_current_time();
|
||||
|
@ -3479,7 +3421,6 @@ int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms)
|
|||
pack_tx_ops->status = RTW_SCTX_SUBMITTED;
|
||||
|
||||
return rtw_sctx_wait(pack_tx_ops);
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status)
|
||||
|
|
|
@ -166,9 +166,6 @@ enum rtw_drvextra_cmd_id
|
|||
RTP_TIMER_CFG_WK_CID,
|
||||
RESET_SECURITYPRIV, // add for CONFIG_IEEE80211W, none 11w also can use
|
||||
FREE_ASSOC_RESOURCES, // add for CONFIG_IEEE80211W, none 11w also can use
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
EVENT_POLLING_CID,
|
||||
#endif
|
||||
MAX_WK_CID
|
||||
};
|
||||
|
||||
|
@ -970,22 +967,14 @@ u8 rtw_set_chplan_cmd(struct adapter*padapter, u8 chplan, u8 enqueue);
|
|||
u8 rtw_led_blink_cmd(struct adapter*padapter, PLED_871x pLed);
|
||||
u8 rtw_set_csa_cmd(struct adapter*padapter, u8 new_ch_no);
|
||||
u8 rtw_tdls_cmd(struct adapter*padapter, u8 *addr, u8 option);
|
||||
|
||||
u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt);
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
u8 rtw_event_polling_cmd(struct adapter*padapter);
|
||||
#endif
|
||||
|
||||
u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf);
|
||||
|
||||
void rtw_survey_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_disassoc_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_joinbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_getbbrfreg_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_readtssi_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd);
|
||||
|
||||
void rtw_setstaKey_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_setassocsta_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_getrttbl_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
|
|
|
@ -418,10 +418,6 @@ struct mlme_priv {
|
|||
_timer set_scan_deny_timer;
|
||||
ATOMIC_T set_scan_deny; //0: allowed, 1: deny
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
_timer event_polling_timer;
|
||||
#endif
|
||||
|
||||
struct qos_priv qospriv;
|
||||
|
||||
/* Number of non-HT AP/stations */
|
||||
|
@ -686,10 +682,6 @@ void rtw_clear_scan_deny(struct adapter *adapter);
|
|||
void rtw_set_scan_deny_timer_hdl(struct adapter *adapter);
|
||||
void rtw_set_scan_deny(struct adapter *adapter, u32 ms);
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
extern void rtw_event_polling_timer_hdl(struct adapter *adapter);
|
||||
#endif
|
||||
|
||||
extern int _rtw_init_mlme_priv(struct adapter *padapter);
|
||||
|
||||
void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
|
||||
|
|
|
@ -54,17 +54,6 @@ static void _rtw_set_scan_deny_timer_hdl(void *FunctionContext)
|
|||
rtw_set_scan_deny_timer_hdl(adapter);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
void _rtw_event_polling_timer_hdl(void *FunctionContext)
|
||||
{
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
|
||||
rtw_event_polling_timer_hdl(adapter);
|
||||
|
||||
_set_timer(&adapter->mlmepriv.event_polling_timer, 200);
|
||||
}
|
||||
#endif
|
||||
|
||||
void rtw_init_mlme_timer(struct adapter *padapter)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -77,10 +66,6 @@ void rtw_init_mlme_timer(struct adapter *padapter)
|
|||
|
||||
_init_timer(&(pmlmepriv->set_scan_deny_timer), padapter->pnetdev, _rtw_set_scan_deny_timer_hdl, padapter);
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
_init_timer(&(pmlmepriv->event_polling_timer), padapter->pnetdev, _rtw_event_polling_timer_hdl, padapter);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST)
|
||||
if (padapter->HalFunc.hal_init_checkbthang_workqueue)
|
||||
padapter->HalFunc.hal_init_checkbthang_workqueue(padapter);
|
||||
|
|
|
@ -965,10 +965,6 @@ void rtw_cancel_all_timer(struct adapter *padapter)
|
|||
|
||||
_cancel_timer_ex(&padapter->recvpriv.signal_stat_timer);
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
_cancel_timer_ex(&padapter->mlmepriv.event_polling_timer);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST)
|
||||
if (padapter->HalFunc.hal_cancel_checkbthang_workqueue)
|
||||
padapter->HalFunc.hal_cancel_checkbthang_workqueue(padapter);
|
||||
|
@ -1222,10 +1218,6 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
|
||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||
|
||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||
_set_timer(&padapter->mlmepriv.event_polling_timer, 200);
|
||||
#endif
|
||||
|
||||
rtw_set_pwr_state_check_timer(pwrctrlpriv);
|
||||
|
||||
/* netif_carrier_on(pnetdev);call this func when rtw_joinbss_event_callback return success */
|
||||
|
|
Loading…
Reference in a new issue