staging: rtl8188eu: constify some arrays
authorMichael Straube <straube.linux@gmail.com>
Tue, 18 Dec 2018 18:34:45 +0000 (19:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Dec 2018 07:32:33 +0000 (08:32 +0100)
The values of these arrays in rtw_mlme_ext.c and rtw_wlan_util.c
are never changed, so make them const.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/core/rtw_wlan_util.c
drivers/staging/rtl8188eu/include/rtw_mlme.h
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h

index dd1280e..ade4045 100644 (file)
@@ -22,15 +22,15 @@ static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
 /**************************************************
 OUI definitions for the vendor specific IE
 ***************************************************/
-u8 RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01};
-u8 WMM_OUI[] = {0x00, 0x50, 0xf2, 0x02};
-u8 WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04};
-u8 P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09};
+const u8 RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01};
+const u8 WMM_OUI[] = {0x00, 0x50, 0xf2, 0x02};
+const u8 WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04};
+const u8 P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09};
 
-u8 WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
+const u8 WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
 
-u8 WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02};
-u8 RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02};
+const u8 WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02};
+const u8 RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02};
 
 /********************************************************
 MCS rate definitions
index 484bb41..d18ce3a 100644 (file)
 #include <drv_types.h>
 #include <wifi.h>
 
-static u8 ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
-static u8 ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
+static const u8 ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
+static const u8 ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
 
-static u8 BROADCOM_OUI1[] = {0x00, 0x10, 0x18};
-static u8 BROADCOM_OUI2[] = {0x00, 0x0a, 0xf7};
+static const u8 BROADCOM_OUI1[] = {0x00, 0x10, 0x18};
+static const u8 BROADCOM_OUI2[] = {0x00, 0x0a, 0xf7};
 
-static u8 CISCO_OUI[] = {0x00, 0x40, 0x96};
-static u8 MARVELL_OUI[] = {0x00, 0x50, 0x43};
-static u8 RALINK_OUI[] = {0x00, 0x0c, 0x43};
-static u8 REALTEK_OUI[] = {0x00, 0xe0, 0x4c};
-static u8 AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
-static u8 EPIGRAM_OUI[] = {0x00, 0x90, 0x4c};
+static const u8 CISCO_OUI[] = {0x00, 0x40, 0x96};
+static const u8 MARVELL_OUI[] = {0x00, 0x50, 0x43};
+static const u8 RALINK_OUI[] = {0x00, 0x0c, 0x43};
+static const u8 REALTEK_OUI[] = {0x00, 0xe0, 0x4c};
+static const u8 AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
+static const u8 EPIGRAM_OUI[] = {0x00, 0x90, 0x4c};
 
 u8 REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
 
@@ -33,20 +33,20 @@ u8 REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
 #define WAIT_FOR_BCN_TO_MIN    (6000)
 #define WAIT_FOR_BCN_TO_MAX    (20000)
 
-static u8 rtw_basic_rate_cck[4] = {
+static const u8 rtw_basic_rate_cck[4] = {
        IEEE80211_CCK_RATE_1MB | IEEE80211_BASIC_RATE_MASK,
        IEEE80211_CCK_RATE_2MB | IEEE80211_BASIC_RATE_MASK,
        IEEE80211_CCK_RATE_5MB | IEEE80211_BASIC_RATE_MASK,
        IEEE80211_CCK_RATE_11MB | IEEE80211_BASIC_RATE_MASK
 };
 
-static u8 rtw_basic_rate_ofdm[3] = {
+static const u8 rtw_basic_rate_ofdm[3] = {
        IEEE80211_OFDM_RATE_6MB | IEEE80211_BASIC_RATE_MASK,
        IEEE80211_OFDM_RATE_12MB | IEEE80211_BASIC_RATE_MASK,
        IEEE80211_OFDM_RATE_24MB | IEEE80211_BASIC_RATE_MASK
 };
 
-static u8 rtw_basic_rate_mix[7] = {
+static const u8 rtw_basic_rate_mix[7] = {
        IEEE80211_CCK_RATE_1MB | IEEE80211_BASIC_RATE_MASK,
        IEEE80211_CCK_RATE_2MB | IEEE80211_BASIC_RATE_MASK,
        IEEE80211_CCK_RATE_5MB | IEEE80211_BASIC_RATE_MASK,
index 090191f..bfef665 100644 (file)
@@ -211,8 +211,8 @@ int hostapd_mode_init(struct adapter *padapter);
 void hostapd_mode_unload(struct adapter *padapter);
 #endif
 
-extern u8 WPA_TKIP_CIPHER[4];
-extern u8 RSN_TKIP_CIPHER[4];
+extern const u8 WPA_TKIP_CIPHER[4];
+extern const u8 RSN_TKIP_CIPHER[4];
 extern u8 REALTEK_96B_IE[];
 extern const u8 MCS_rate_1R[16];
 
index a2d9d53..08151a1 100644 (file)
 #define                _54M_RATE_      11
 
 
-extern u8 RTW_WPA_OUI[];
-extern u8 WMM_OUI[];
-extern u8 WPS_OUI[];
-extern u8 P2P_OUI[];
+extern const u8 RTW_WPA_OUI[];
+extern const u8 WMM_OUI[];
+extern const u8 WPS_OUI[];
+extern const u8 P2P_OUI[];
 
-extern u8 WMM_PARA_OUI[];
+extern const u8 WMM_PARA_OUI[];
 
 /*  Channel Plan Type. */
 /*  Note: */