staging: rtl8723au: rsp_buf wasn't used for anything - don't allocate it
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 9 May 2014 13:03:11 +0000 (15:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:11:56 +0000 (13:11 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_cmd.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/include/rtw_cmd.h

index d139a32a405a2602c8cd67559cdc168bd8a47026..ec4533d155d315288397e4152eb760a04a8b5ac5 100644 (file)
@@ -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);
index 8d64cb02ee8e8865df3e589f60ab973639fcdd73..d39f879790bb95faa10aea2da2cee1735649ba6f 100644 (file)
@@ -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);
index 3e06980221844f70698cd2c5a5888d8bcbfb02b0..7c6858436e67b649372acf9d4a2c068a52361679 100644 (file)
@@ -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;