Commit fac7563a authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: rsp_buf wasn't used for anything - don't allocate it

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c347dc62
......@@ -175,27 +175,14 @@ int rtw_init_cmd_priv23a(struct cmd_priv *pcmdpriv)
{
int res = _SUCCESS;
pcmdpriv->rsp_allocated_buf = kzalloc(MAX_RSPSZ + 4, GFP_KERNEL);
if (!pcmdpriv->rsp_allocated_buf) {
res = _FAIL;
goto exit;
}
pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
((unsigned long)(pcmdpriv->rsp_allocated_buf) & 3);
pcmdpriv->cmd_issued_cnt = 0;
pcmdpriv->cmd_done_cnt = 0;
pcmdpriv->rsp_cnt = 0;
pcmdpriv->wq = alloc_workqueue("rtl8723au", 0, 1);
if (!pcmdpriv->wq)
res = _FAIL;
exit:
return res;
}
......@@ -205,7 +192,6 @@ static void c2h_wk_callback(struct work_struct *work);
u32 rtw_init_evt_priv23a(struct evt_priv *pevtpriv)
{
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
atomic_set(&pevtpriv->event_seq, 0);
pevtpriv->evt_done_cnt = 0;
......@@ -235,9 +221,6 @@ void rtw_free_cmd_priv23a(struct cmd_priv *pcmdpriv)
{
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_,
("rtw_free_cmd_priv23a\n"));
if (pcmdpriv)
kfree(pcmdpriv->rsp_allocated_buf);
}
static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
......@@ -361,8 +344,6 @@ static void rtw_cmd_work(struct work_struct *work)
pcmd_callback, pcmd->cmdcode));
rtw_free_cmd_obj23a(pcmd);
} else {
/* todo: !!! fill rsp_buf to pcmd->rsp
if (pcmd->rsp!= NULL) */
/* need conider that free cmd_obj in
rtw_cmd_callback */
pcmd_callback(pcmd->padapter, pcmd);
......
......@@ -64,8 +64,6 @@ int rtw_init_mlme_priv23a(struct rtw_adapter *padapter)
memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct cfg80211_ssid));
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
rtw_clear_scan_deny(padapter);
rtw_init_mlme_timer(padapter);
......
......@@ -44,8 +44,6 @@ struct cmd_obj {
struct cmd_priv {
struct workqueue_struct *wq;
u8 *rsp_buf; /* shall be non-paged, and 4 bytes aligned */
u8 *rsp_allocated_buf;
u32 cmd_issued_cnt;
u32 cmd_done_cnt;
u32 rsp_cnt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment