rtlwifi: rtl8192ce: Fix editing error that causes silent memory corruption
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 28 Nov 2014 16:41:14 +0000 (10:41 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 1 Dec 2014 20:22:02 +0000 (15:22 -0500)
In the major update of the rtlwifi-family of drivers, there was an editing
mistake. Unfortunately, this particular error leads to memory corruption that
silently leads to failure of the system. This patch is one of three needed to
fix the kernel regression reported at https://bugzilla.kernel.org/show_bug.cgi?id=88951.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Catalin Iacob <iacobcatalin@gmail.com>
Tested-by: Catalin Iacob <iacobcatalin@gmail.com>
Cc: Catalin Iacob <iacobcatalin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c

index dc3d20b17a265479906fa9d6777cc6e29e533f34..0916275c736240943556c043ea5fb66839157c7d 100644 (file)
@@ -720,16 +720,15 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name)
                        break;
                }
        } else {
-               struct rx_desc_92c *pdesc = (struct rx_desc_92c *)p_desc;
                switch (desc_name) {
                case HW_DESC_OWN:
-                       ret = GET_RX_DESC_OWN(pdesc);
+                       ret = GET_RX_DESC_OWN(p_desc);
                        break;
                case HW_DESC_RXPKT_LEN:
-                       ret = GET_RX_DESC_PKT_LEN(pdesc);
+                       ret = GET_RX_DESC_PKT_LEN(p_desc);
                        break;
                case HW_DESC_RXBUFF_ADDR:
-                       ret = GET_RX_STATUS_DESC_BUFF_ADDR(pdesc);
+                       ret = GET_RX_DESC_BUFF_ADDR(p_desc);
                        break;
                default:
                        RT_ASSERT(false, "ERR rxdesc :%d not process\n",