staging: rtl8723au: Remove WMM_ defines
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 9 Jun 2014 13:16:05 +0000 (15:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jun 2014 20:51:47 +0000 (13:51 -0700)
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.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/include/wifi.h

index 76e1797c8f2b2c977e0bae75b9d61a2a94260d94..a3174c0d42f95c82926e9d1e218f4600325e3e91 100644 (file)
@@ -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;
                }
index 4ab28e59f8bafff5fe5e9ed238fcb469438a8b28..07ea4c63e71b55fbeaff57fb43e58c31e18981ef 100644 (file)
 #define _STATUS_CODE_          2
 #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
 ------------------------------------------------------------------------------*/