From: Jes Sorensen Date: Fri, 9 May 2014 13:03:11 +0000 (+0200) Subject: staging: rtl8723au: rsp_buf wasn't used for anything - don't allocate it X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fac7563a32d123a8386a8e921226af113898fb5e;p=linux-beck.git staging: rtl8723au: rsp_buf wasn't used for anything - don't allocate it Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index d139a32a405a..ec4533d155d3 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -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 @@ post_process: 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); diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c index 8d64cb02ee8e..d39f879790bb 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c @@ -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); diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h b/drivers/staging/rtl8723au/include/rtw_cmd.h index 3e0698022184..7c6858436e67 100644 --- a/drivers/staging/rtl8723au/include/rtw_cmd.h +++ b/drivers/staging/rtl8723au/include/rtw_cmd.h @@ -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;