mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-03 21:04:05 +00:00
commit
7b756fb1d8
@ -4,6 +4,10 @@
|
||||
## TODO
|
||||
These are the problems that needs attention, any help would be appreciated.
|
||||
```
|
||||
* "Associate", "Disassocate" & "Deauthenticate" support is missing.
|
||||
These should be added in order to get some functions working, like "deauth" attacks.
|
||||
Check issue report @ https://github.com/aircrack-ng/rtl8812au/issues/35
|
||||
|
||||
* txpower control has been added, but some issues remain.
|
||||
Check issue reports for more information.
|
||||
|
||||
|
104
core/rtw_cmd.c
104
core/rtw_cmd.c
@ -35,12 +35,10 @@ sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||
{
|
||||
sint res = _SUCCESS;
|
||||
|
||||
|
||||
_rtw_init_sema(&(pcmdpriv->cmd_queue_sema), 0);
|
||||
/* _rtw_init_sema(&(pcmdpriv->cmd_done_sema), 0); */
|
||||
_rtw_init_sema(&(pcmdpriv->terminate_cmdthread_sema), 0);
|
||||
|
||||
|
||||
_rtw_init_queue(&(pcmdpriv->cmd_queue));
|
||||
|
||||
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
|
||||
@ -70,7 +68,6 @@ sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||
_rtw_mutex_init(&pcmdpriv->sctx_mutex);
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
@ -82,7 +79,6 @@ sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
||||
{
|
||||
sint res = _SUCCESS;
|
||||
|
||||
|
||||
#ifdef CONFIG_H2CLBK
|
||||
_rtw_init_sema(&(pevtpriv->lbkevt_done), 0);
|
||||
pevtpriv->lbkevt_limit = 0;
|
||||
@ -106,7 +102,6 @@ sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
||||
}
|
||||
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);
|
||||
|
||||
@ -140,19 +135,16 @@ exit:
|
||||
pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
|
||||
#endif
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
|
||||
{
|
||||
|
||||
|
||||
#ifdef CONFIG_EVENT_THREAD_MODE
|
||||
_rtw_free_sema(&(pevtpriv->evt_notify));
|
||||
_rtw_free_sema(&(pevtpriv->terminate_evtthread_sema));
|
||||
|
||||
|
||||
if (pevtpriv->evt_allocated_buf)
|
||||
rtw_mfree(pevtpriv->evt_allocated_buf, MAX_EVTSZ + 4);
|
||||
#endif
|
||||
@ -171,8 +163,6 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
|
||||
rtw_cbuf_free(pevtpriv->c2h_queue);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||
@ -211,7 +201,6 @@ sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head)
|
||||
{
|
||||
_irqL irqL;
|
||||
|
||||
|
||||
if (obj == NULL)
|
||||
goto exit;
|
||||
|
||||
@ -264,7 +253,6 @@ sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
@ -273,7 +261,6 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
||||
_irqL irqL;
|
||||
struct cmd_obj *obj;
|
||||
|
||||
|
||||
/* _enter_critical_bh(&(queue->lock), &irqL); */
|
||||
_enter_critical(&queue->lock, &irqL);
|
||||
|
||||
@ -284,7 +271,6 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
||||
}
|
||||
#endif /* DBG_CMD_QUEUE */
|
||||
|
||||
|
||||
if (rtw_is_list_empty(&(queue->queue)))
|
||||
obj = NULL;
|
||||
else {
|
||||
@ -324,7 +310,6 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
||||
/* _exit_critical_bh(&(queue->lock), &irqL); */
|
||||
_exit_critical(&queue->lock, &irqL);
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
@ -401,14 +386,11 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||
{
|
||||
int res = _FAIL;
|
||||
PADAPTER padapter = pcmdpriv->padapter;
|
||||
|
||||
|
||||
if (cmd_obj == NULL)
|
||||
goto exit;
|
||||
|
||||
@ -444,7 +426,6 @@ u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -452,7 +433,6 @@ struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv)
|
||||
{
|
||||
struct cmd_obj *cmd_obj;
|
||||
|
||||
|
||||
cmd_obj = _rtw_dequeue_cmd(&pcmdpriv->cmd_queue);
|
||||
|
||||
return cmd_obj;
|
||||
@ -484,7 +464,6 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void rtw_stop_cmd_thread(_adapter *adapter)
|
||||
{
|
||||
if (adapter->cmdThread &&
|
||||
@ -519,7 +498,6 @@ thread_return rtw_cmd_thread(thread_context context)
|
||||
ATOMIC_SET(&(pcmdpriv->cmdthd_running), _TRUE);
|
||||
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
|
||||
|
||||
|
||||
while (1) {
|
||||
if (_rtw_down_sema(&pcmdpriv->cmd_queue_sema) == _FAIL) {
|
||||
RTW_PRINT(FUNC_ADPT_FMT" _rtw_down_sema(&pcmdpriv->cmd_queue_sema) return _FAIL, break\n", FUNC_ADPT_ARG(padapter));
|
||||
@ -703,7 +681,6 @@ post_process:
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_EVENT_THREAD_MODE
|
||||
u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj)
|
||||
{
|
||||
@ -711,7 +688,6 @@ u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj)
|
||||
int res;
|
||||
_queue *queue = &pevtpriv->evt_queue;
|
||||
|
||||
|
||||
res = _SUCCESS;
|
||||
|
||||
if (obj == NULL) {
|
||||
@ -729,7 +705,6 @@ u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -738,7 +713,6 @@ struct evt_obj *rtw_dequeue_evt(_queue *queue)
|
||||
_irqL irqL;
|
||||
struct evt_obj *pevtobj;
|
||||
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
if (rtw_is_list_empty(&(queue->queue)))
|
||||
@ -750,7 +724,6 @@ struct evt_obj *rtw_dequeue_evt(_queue *queue)
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
|
||||
return pevtobj;
|
||||
}
|
||||
|
||||
@ -771,7 +744,6 @@ void rtw_evt_notify_isr(struct evt_priv *pevtpriv)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
u8 rtw_setstandby_cmd(unsigned char *adapter)
|
||||
*/
|
||||
@ -783,7 +755,6 @@ u8 rtw_setstandby_cmd(_adapter *padapter, uint action)
|
||||
|
||||
u8 ret = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
ret = _FAIL;
|
||||
@ -805,7 +776,6 @@ u8 rtw_setstandby_cmd(_adapter *padapter, uint action)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -826,7 +796,6 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
|
||||
@ -849,7 +818,6 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
||||
|
||||
rtw_free_network_queue(padapter, _FALSE);
|
||||
|
||||
|
||||
init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_SiteSurvey));
|
||||
|
||||
/* psurveyPara->bsslimit = 48; */
|
||||
@ -906,7 +874,6 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
|
||||
} else
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -917,7 +884,6 @@ u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -942,7 +908,6 @@ u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset)
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -953,7 +918,6 @@ u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -974,11 +938,9 @@ u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset)
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
unsigned char rtw_setphy_cmd(unsigned char *adapter)
|
||||
|
||||
@ -995,7 +957,6 @@ u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch)
|
||||
* struct registry_priv* pregistry_priv = &padapter->registrypriv; */
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -1011,7 +972,6 @@ u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch)
|
||||
|
||||
init_h2fwcmd_w_parm_no_rsp(ph2c, psetphypara, _SetPhy_CMD_);
|
||||
|
||||
|
||||
psetphypara->modem = modem;
|
||||
psetphypara->rfchannel = ch;
|
||||
|
||||
@ -1155,7 +1115,6 @@ u8 rtw_getrfreg_cmd(_adapter *padapter, u8 offset, u8 *pval)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -1182,7 +1141,6 @@ u8 rtw_getrfreg_cmd(_adapter *padapter, u8 offset, u8 *pval)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1382,7 +1340,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
||||
|
||||
res = _FAIL;
|
||||
|
||||
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@ -1409,7 +1366,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
||||
|
||||
psecnetwork->IELength = rtw_restruct_sec_ie(padapter, &pnetwork->network.IEs[0], &psecnetwork->IEs[0], pnetwork->network.IELength);
|
||||
|
||||
|
||||
pqospriv->qos_option = 0;
|
||||
|
||||
if (pregistrypriv->wmm_enable) {
|
||||
@ -1500,7 +1456,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1511,8 +1466,6 @@ u8 rtw_disassoc_cmd(_adapter *padapter, u32 deauth_timeout_ms, bool enqueue) /*
|
||||
struct cmd_priv *cmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
|
||||
/* prepare cmd parameter */
|
||||
param = (struct disconnect_parm *)rtw_zmalloc(sizeof(*param));
|
||||
if (param == NULL) {
|
||||
@ -1540,7 +1493,6 @@ u8 rtw_disassoc_cmd(_adapter *padapter, u32 deauth_timeout_ms, bool enqueue) /*
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1576,7 +1528,6 @@ u8 rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE net
|
||||
}
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1591,7 +1542,6 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
psetstakey_para = (struct set_stakey_parm *)rtw_zmalloc(sizeof(struct set_stakey_parm));
|
||||
if (psetstakey_para == NULL) {
|
||||
res = _FAIL;
|
||||
@ -1645,7 +1595,6 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
|
||||
}
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1660,7 +1609,6 @@ u8 rtw_clearstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 enqueue)
|
||||
s16 cam_id = 0;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
if (!enqueue) {
|
||||
while ((cam_id = rtw_camid_search(padapter, sta->hwaddr, -1, -1)) >= 0) {
|
||||
RTW_PRINT("clear key for addr:"MAC_FMT", camid:%d\n", MAC_ARG(sta->hwaddr), cam_id);
|
||||
@ -1703,7 +1651,6 @@ u8 rtw_clearstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 enqueue)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1783,7 +1730,6 @@ u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr)
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -1814,7 +1760,6 @@ u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1826,7 +1771,6 @@ u8 rtw_addbareq_cmd(_adapter *padapter, u8 tid, u8 *addr)
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -1852,7 +1796,6 @@ u8 rtw_addbareq_cmd(_adapter *padapter, u8 tid, u8 *addr)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1863,7 +1806,6 @@ u8 rtw_addbarsp_cmd(_adapter *padapter, u8 *addr, u16 tid, u8 status, u8 size, u
|
||||
struct addBaRsp_parm *paddBaRsp_parm;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -1890,7 +1832,6 @@ u8 rtw_addbarsp_cmd(_adapter *padapter, u8 *addr, u16 tid, u8 status, u8 size, u
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
/* add for CONFIG_IEEE80211W, none 11w can use it */
|
||||
@ -1901,7 +1842,6 @@ u8 rtw_reset_securitypriv_cmd(_adapter *padapter)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -1922,13 +1862,11 @@ u8 rtw_reset_securitypriv_cmd(_adapter *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;
|
||||
|
||||
}
|
||||
@ -1940,7 +1878,6 @@ u8 rtw_free_assoc_resources_cmd(_adapter *padapter)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -1961,13 +1898,11 @@ u8 rtw_free_assoc_resources_cmd(_adapter *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;
|
||||
|
||||
}
|
||||
@ -1979,7 +1914,6 @@ u8 rtw_dynamic_chk_wk_cmd(_adapter *padapter)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
/* only primary padapter does this cmd */
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
@ -2001,13 +1935,11 @@ u8 rtw_dynamic_chk_wk_cmd(_adapter *padapter)
|
||||
pdrvextra_cmd_parm->pbuf = NULL;
|
||||
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;
|
||||
|
||||
}
|
||||
@ -2020,7 +1952,6 @@ u8 rtw_set_ch_cmd(_adapter *padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue)
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
RTW_INFO(FUNC_NDEV_FMT" ch:%u, bw:%u, ch_offset:%u\n",
|
||||
FUNC_NDEV_ARG(padapter->pnetdev), ch, bw, ch_offset);
|
||||
|
||||
@ -2074,7 +2005,6 @@ u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const struct cou
|
||||
struct submit_ctx sctx;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
/* check if allow software config */
|
||||
if (swconfig && rtw_hal_is_disable_sw_channel_plan(adapter) == _TRUE) {
|
||||
res = _FAIL;
|
||||
@ -2134,7 +2064,6 @@ u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const struct cou
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -2174,8 +2103,6 @@ u8 rtw_led_blink_cmd(_adapter *padapter, PVOID pLed)
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
|
||||
pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL) {
|
||||
res = _FAIL;
|
||||
@ -2196,7 +2123,6 @@ u8 rtw_led_blink_cmd(_adapter *padapter, PVOID pLed)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -2209,8 +2135,6 @@ u8 rtw_set_csa_cmd(_adapter *padapter, u8 new_ch_no)
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
|
||||
pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL) {
|
||||
res = _FAIL;
|
||||
@ -2231,7 +2155,6 @@ u8 rtw_set_csa_cmd(_adapter *padapter, u8 new_ch_no)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -2244,10 +2167,8 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
|
||||
|
||||
pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL) {
|
||||
res = _FAIL;
|
||||
@ -2273,8 +2194,6 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -2285,7 +2204,6 @@ u8 rtw_enable_hw_update_tsf_cmd(_adapter *padapter)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -2343,7 +2261,6 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
||||
}
|
||||
BusyThreshold = BusyThresholdHigh;
|
||||
|
||||
|
||||
/* */
|
||||
/* Determine if our traffic is busy now */
|
||||
/* */
|
||||
@ -2527,7 +2444,6 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* for 11n Logo 4.2.31/4.2.32 */
|
||||
static void dynamic_update_bcn_check(_adapter *padapter)
|
||||
{
|
||||
@ -2561,7 +2477,7 @@ static void dynamic_update_bcn_check(_adapter *padapter)
|
||||
|
||||
if (_FALSE != ATOMIC_READ(&pmlmepriv->olbc)
|
||||
&& _FALSE != ATOMIC_READ(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
@ -2647,7 +2563,6 @@ void lps_ctrl_wk_hdl(_adapter *padapter, u8 lps_ctrl_type)
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
u8 mstatus;
|
||||
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)
|
||||
|| (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE))
|
||||
return;
|
||||
@ -2726,7 +2641,6 @@ u8 rtw_lps_ctrl_wk_cmd(_adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
|
||||
/* struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter); */
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
/* if(!pwrctrlpriv->bLeisurePs) */
|
||||
/* return res; */
|
||||
|
||||
@ -2757,7 +2671,6 @@ u8 rtw_lps_ctrl_wk_cmd(_adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
@ -2774,7 +2687,6 @@ u8 rtw_dm_in_lps_wk_cmd(_adapter *padapter)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
@ -2919,7 +2831,6 @@ u8 rtw_rpt_timer_cfg_cmd(_adapter *padapter, u16 minRptTime)
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
@ -2976,7 +2887,6 @@ u8 rtw_antenna_select_cmd(_adapter *padapter, u8 antenna, u8 enqueue)
|
||||
antenna_select_wk_hdl(padapter, antenna);
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
@ -3049,7 +2959,6 @@ u8 p2p_protocol_wk_cmd(_adapter *padapter, int intCmdType)
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
return res;
|
||||
|
||||
@ -3077,7 +2986,6 @@ u8 p2p_protocol_wk_cmd(_adapter *padapter, int intCmdType)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
@ -3119,7 +3027,6 @@ u8 rtw_ps_cmd(_adapter *padapter)
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
@ -3783,7 +3690,6 @@ u8 rtw_run_in_thread_cmd(PADAPTER padapter, void (*func)(void *), void *context)
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
exit:
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -4300,11 +4206,9 @@ exit:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void rtw_getmacreg_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd)
|
||||
{
|
||||
|
||||
|
||||
rtw_free_cmd_obj(pcmd);
|
||||
|
||||
}
|
||||
@ -4313,7 +4217,6 @@ void rtw_joinbss_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
|
||||
if (pcmd->res == H2C_DROPPED) {
|
||||
/* TODO: cancel timer and do timeout handler directly... */
|
||||
/* need to make timeout handlerOS independent */
|
||||
@ -4380,8 +4283,6 @@ exit:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rtw_setstaKey_cmdrsp_callback(_adapter *padapter , struct cmd_obj *pcmd)
|
||||
{
|
||||
|
||||
@ -4389,7 +4290,6 @@ void rtw_setstaKey_cmdrsp_callback(_adapter *padapter , struct cmd_obj *pcmd)
|
||||
struct set_stakey_rsp *psetstakey_rsp = (struct set_stakey_rsp *)(pcmd->rsp);
|
||||
struct sta_info *psta = rtw_get_stainfo(pstapriv, psetstakey_rsp->addr);
|
||||
|
||||
|
||||
if (psta == NULL) {
|
||||
goto exit;
|
||||
}
|
||||
@ -4411,7 +4311,6 @@ void rtw_setassocsta_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd)
|
||||
struct set_assocsta_rsp *passocsta_rsp = (struct set_assocsta_rsp *)(pcmd->rsp);
|
||||
struct sta_info *psta = rtw_get_stainfo(pstapriv, passocsta_parm->addr);
|
||||
|
||||
|
||||
if (psta == NULL) {
|
||||
goto exit;
|
||||
}
|
||||
@ -4441,5 +4340,4 @@ void rtw_getrttbl_cmd_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd)
|
||||
padapter->mppriv.workparam.bcompleted = _TRUE;
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ SwLedBlink(
|
||||
bStopBlinking = _TRUE;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
bStopBlinking = _TRUE;
|
||||
break;
|
||||
@ -142,7 +141,6 @@ SwLedBlink1(
|
||||
SwLedOff(padapter, pLed);
|
||||
}
|
||||
|
||||
|
||||
if (pHalData->CustomerID == RT_CID_DEFAULT) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
if (!pLed1->bSWLedCtrl) {
|
||||
@ -453,7 +451,6 @@ SwLedBlink3(
|
||||
if (pLed->bLedOn)
|
||||
SwLedOff(padapter, pLed);
|
||||
|
||||
|
||||
}
|
||||
pLed->bLedBlinkInProgress = _FALSE;
|
||||
} else {
|
||||
@ -497,14 +494,12 @@ SwLedBlink3(
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SwLedBlink4(
|
||||
PLED_USB pLed
|
||||
@ -688,9 +683,6 @@ SwLedBlink4(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -742,7 +734,6 @@ SwLedBlink5(
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case LED_BLINK_TXRX:
|
||||
pLed->BlinkTimes--;
|
||||
if (pLed->BlinkTimes == 0)
|
||||
@ -778,9 +769,6 @@ SwLedBlink5(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -798,7 +786,6 @@ SwLedBlink6(
|
||||
} else {
|
||||
SwLedOff(padapter, pLed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -886,8 +873,6 @@ SwLedBlink7(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -903,8 +888,6 @@ SwLedBlink8(
|
||||
} else {
|
||||
SwLedOff(Adapter, pLed);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* page added for Belkin AC950. 20120813 */
|
||||
@ -925,7 +908,6 @@ SwLedBlink9(
|
||||
}
|
||||
/* RTW_INFO("%s, pLed->CurrLedState=%d, pLed->BlinkingLedState=%d\n", __FUNCTION__, pLed->CurrLedState, pLed->BlinkingLedState); */
|
||||
|
||||
|
||||
switch (pLed->CurrLedState) {
|
||||
case RTW_LED_ON:
|
||||
SwLedOn(Adapter, pLed);
|
||||
@ -1140,7 +1122,6 @@ SwLedBlink9(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* page added for Netgear A6200V2. 20120827 */
|
||||
@ -1160,7 +1141,6 @@ SwLedBlink10(
|
||||
SwLedOff(Adapter, pLed);
|
||||
}
|
||||
|
||||
|
||||
switch (pLed->CurrLedState) {
|
||||
case RTW_LED_ON:
|
||||
SwLedOn(Adapter, pLed);
|
||||
@ -1341,7 +1321,6 @@ SwLedBlink10(
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -1478,9 +1457,6 @@ SwLedBlink12(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
@ -1540,8 +1516,6 @@ SwLedBlink13(
|
||||
LinkBlinkCnt = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
@ -1598,7 +1572,6 @@ SwLedBlink14(
|
||||
LinkBlinkCnt = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
@ -1726,7 +1699,6 @@ SwLedBlink15(
|
||||
LinkBlinkCnt = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1974,7 +1946,6 @@ SwLedControlMode0(
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* ALPHA, added by chiyoko, 20090106 */
|
||||
@ -2132,7 +2103,6 @@ SwLedControlMode1(
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case LED_CTL_STOP_WPS:
|
||||
if (pLed->bLedNoLinkBlinkInProgress == _TRUE) {
|
||||
_cancel_timer_ex(&(pLed->BlinkTimer));
|
||||
@ -2211,7 +2181,6 @@ SwLedControlMode1(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Arcadyan/Sitecom , added by chiyoko, 20090216 */
|
||||
@ -2350,7 +2319,6 @@ SwLedControlMode2(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* COREGA, added by chiyoko, 20090316 */
|
||||
@ -2504,7 +2472,6 @@ SwLedControlMode3(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -2808,11 +2775,8 @@ SwLedControlMode4(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Sercomm-Belkin, added by chiyoko, 20090415 */
|
||||
static void
|
||||
SwLedControlMode5(
|
||||
@ -2889,7 +2853,6 @@ SwLedControlMode5(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* WNC-Corega, added by chiyoko, 20090902 */
|
||||
@ -2920,7 +2883,6 @@ SwLedControlMode6(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Netgear, added by sinda, 2011/11/11 */
|
||||
@ -3014,7 +2976,6 @@ SwLedControlMode7(
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case LED_CTL_STOP_WPS_FAIL:
|
||||
case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */
|
||||
if (pLed->bLedWPSBlinkInProgress) {
|
||||
@ -3060,7 +3021,6 @@ SwLedControlMode7(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -3095,8 +3055,6 @@ SwLedControlMode8(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* page added for Belkin AC950, 20120813 */
|
||||
@ -3287,7 +3245,6 @@ SwLedControlMode9(
|
||||
if (pLed1->bLedOn)
|
||||
_set_timer(&(pLed1->BlinkTimer), 0);
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case LED_CTL_STOP_WPS_FAIL: /* WPS authentication fail */
|
||||
@ -3374,7 +3331,6 @@ SwLedControlMode9(
|
||||
pLed1->bLedWPSBlinkInProgress = _FALSE;
|
||||
}
|
||||
|
||||
|
||||
pLed1->BlinkingLedState = LED_UNKNOWN;
|
||||
SwLedOff(Adapter, pLed);
|
||||
SwLedOff(Adapter, pLed1);
|
||||
@ -3398,7 +3354,6 @@ SwLedControlMode9(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* page added for Netgear A6200V2, 20120827 */
|
||||
@ -3537,7 +3492,6 @@ SwLedControlMode10(
|
||||
_set_timer(&(pLed1->BlinkTimer), LED_BLINK_NORMAL_INTERVAL + LED_BLINK_LINK_INTERVAL_NETGEAR);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case LED_CTL_STOP_WPS: /* WPS connect success */
|
||||
@ -3591,12 +3545,10 @@ SwLedControlMode10(
|
||||
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Edimax-ASUS, added by Page, 20121221 */
|
||||
@ -3651,7 +3603,6 @@ SwLedControlMode11(
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case LED_CTL_STOP_WPS:
|
||||
case LED_CTL_STOP_WPS_FAIL:
|
||||
if (pLed->bLedBlinkInProgress == _TRUE) {
|
||||
@ -3694,7 +3645,6 @@ SwLedControlMode11(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* page added for NEC */
|
||||
@ -3775,7 +3725,6 @@ SwLedControlMode12(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Maddest add for NETGEAR R6100 */
|
||||
@ -3795,7 +3744,6 @@ SwLedControlMode13(
|
||||
if (pLed->bLedWPSBlinkInProgress)
|
||||
return;
|
||||
|
||||
|
||||
pLed->CurrLedState = RTW_LED_ON;
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
if (pLed->bLedBlinkInProgress) {
|
||||
@ -3850,7 +3798,6 @@ SwLedControlMode13(
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case LED_CTL_STOP_WPS_FAIL:
|
||||
case LED_CTL_STOP_WPS_FAIL_OVERLAP: /* WPS session overlap */
|
||||
if (pLed->bLedWPSBlinkInProgress) {
|
||||
@ -3920,8 +3867,6 @@ SwLedControlMode13(
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Maddest add for DNI Buffalo */
|
||||
@ -4244,7 +4189,6 @@ LedControlUSB(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -4289,7 +4233,6 @@ InitLed(
|
||||
_init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Description:
|
||||
* DeInitialize an LED_871x object.
|
||||
|
@ -33,7 +33,6 @@ int platform_wifi_power_on(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
rtw_wifi_gpio_wlan_ctrl(WLAN_POWER_ON);
|
||||
#endif /* CONFIG_RTL8188E */
|
||||
|
Loading…
Reference in New Issue
Block a user