From: Jes Sorensen <jes.soren...@redhat.com>

Only one is used, and only describes the size of an array defined in a
local function. Use sizeof() in the local function to deobfuscate it.

Signed-off-by: Jes Sorensen <jes.soren...@redhat.com>
---
 drivers/staging/rtl8723au/core/rtw_mlme.c | 7 ++++---
 drivers/staging/rtl8723au/include/wifi.h  | 7 -------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 76e1797..a3174c0 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -2197,7 +2197,7 @@ unsigned int rtw_restructure_ht_ie23a(struct rtw_adapter 
*padapter, u8 *in_ie,
        unsigned char *pframe;
        const u8 *p;
        struct ieee80211_ht_cap ht_capie;
-       unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
+       u8 WMM_IE[7] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct ht_priv *phtpriv = &pmlmepriv->htpriv;
 
@@ -2210,8 +2210,9 @@ unsigned int rtw_restructure_ht_ie23a(struct rtw_adapter 
*padapter, u8 *in_ie,
                if (pmlmepriv->qos_option == 0) {
                        out_len = *pout_len;
                        pframe = rtw_set_ie23a(out_ie + out_len,
-                                           WLAN_EID_VENDOR_SPECIFIC,
-                                           _WMM_IE_Length_, WMM_IE, pout_len);
+                                              WLAN_EID_VENDOR_SPECIFIC,
+                                              sizeof(WMM_IE), WMM_IE,
+                                              pout_len);
 
                        pmlmepriv->qos_option = 1;
                }
diff --git a/drivers/staging/rtl8723au/include/wifi.h 
b/drivers/staging/rtl8723au/include/wifi.h
index 4ab28e5..07ea4c6 100644
--- a/drivers/staging/rtl8723au/include/wifi.h
+++ b/drivers/staging/rtl8723au/include/wifi.h
@@ -53,13 +53,6 @@
 #define _TIMESTAMP_            8
 
 /*-----------------------------------------------------------------------------
-                               Below is the definition for WMM
-------------------------------------------------------------------------------*/
-#define _WMM_IE_Length_                                7  /*  for WMM STA */
-#define _WMM_Para_Element_Length_              24
-
-
-/*-----------------------------------------------------------------------------
                                Below is the definition for 802.11n
 
------------------------------------------------------------------------------*/
 
-- 
1.9.3

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to