Minor code cleanup

pull/978/head
kimocoder 2022-06-06 03:01:42 +02:00
parent 56419c2d98
commit 91d47c6982
1 changed files with 0 additions and 39 deletions

View File

@ -164,21 +164,10 @@ sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
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:
#endif /* end of CONFIG_EVENT_THREAD_MODE */
#ifdef CONFIG_C2H_WK
@ -186,15 +175,12 @@ exit:
pevtpriv->c2h_wk_alive = _FALSE;
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));
@ -215,9 +201,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)
@ -309,7 +292,6 @@ sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head)
exit:
return _SUCCESS;
}
@ -318,7 +300,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);
@ -329,7 +310,6 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
}
#endif /* DBG_CMD_QUEUE */
if (rtw_is_list_empty(&(queue->queue)))
obj = NULL;
else {
@ -1523,25 +1503,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
pcmd->cmdsz = sizeof(WLAN_BSSID_EX);
#ifdef CONFIG_RTL8712
/* wlan_network endian conversion */
psecnetwork->Length = cpu_to_le32(psecnetwork->Length);
psecnetwork->Ssid.SsidLength = cpu_to_le32(psecnetwork->Ssid.SsidLength);
psecnetwork->Privacy = cpu_to_le32(psecnetwork->Privacy);
psecnetwork->Rssi = cpu_to_le32(psecnetwork->Rssi);
psecnetwork->NetworkTypeInUse = cpu_to_le32(psecnetwork->NetworkTypeInUse);
psecnetwork->Configuration.ATIMWindow = cpu_to_le32(psecnetwork->Configuration.ATIMWindow);
psecnetwork->Configuration.BeaconPeriod = cpu_to_le32(psecnetwork->Configuration.BeaconPeriod);
psecnetwork->Configuration.DSConfig = cpu_to_le32(psecnetwork->Configuration.DSConfig);
psecnetwork->Configuration.FHConfig.DwellTime = cpu_to_le32(psecnetwork->Configuration.FHConfig.DwellTime);
psecnetwork->Configuration.FHConfig.HopPattern = cpu_to_le32(psecnetwork->Configuration.FHConfig.HopPattern);
psecnetwork->Configuration.FHConfig.HopSet = cpu_to_le32(psecnetwork->Configuration.FHConfig.HopSet);
psecnetwork->Configuration.FHConfig.Length = cpu_to_le32(psecnetwork->Configuration.FHConfig.Length);
psecnetwork->Configuration.Length = cpu_to_le32(psecnetwork->Configuration.Length);
psecnetwork->InfrastructureMode = cpu_to_le32(psecnetwork->InfrastructureMode);
psecnetwork->IELength = cpu_to_le32(psecnetwork->IELength);
#endif
_rtw_init_listhead(&pcmd->list);
pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */
pcmd->parmbuf = (unsigned char *)psecnetwork;