wifi: mwifiex: make region_code_mapping_t const
authorSascha Hauer <s.hauer@pengutronix.de>
Thu, 10 Apr 2025 10:24:28 +0000 (12:24 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 23 Apr 2025 13:34:22 +0000 (15:34 +0200)
region_code_mapping_t is not modified and shouldn't be. Mark it const.

Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Brian Norris <briannorris@chromium.org>
Link: https://patch.msgid.link/20250410-mwifiex-cleanup-1-v6-4-a6bbd4ac4d37@pengutronix.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/marvell/mwifiex/cfg80211.c
drivers/net/wireless/marvell/mwifiex/cfp.c
drivers/net/wireless/marvell/mwifiex/main.h

index a099fda..33bc5cd 100644 (file)
@@ -4703,7 +4703,7 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
        void *wdev_priv;
        struct wiphy *wiphy;
        struct mwifiex_private *priv = adapter->priv[MWIFIEX_BSS_TYPE_STA];
-       u8 *country_code;
+       const u8 *country_code;
        u32 thr, retry;
        struct cfg80211_ops *ops;
 
index d7fd792..686bf12 100644 (file)
@@ -153,7 +153,7 @@ struct region_code_mapping {
        u8 region[IEEE80211_COUNTRY_STRING_LEN] __nonstring;
 };
 
-static struct region_code_mapping region_code_mapping_t[] = {
+static const struct region_code_mapping region_code_mapping_t[] = {
        { 0x10, "US " }, /* US FCC */
        { 0x20, "CA " }, /* IC Canada */
        { 0x30, "FR " }, /* France */
@@ -165,7 +165,7 @@ static struct region_code_mapping region_code_mapping_t[] = {
 };
 
 /* This function converts integer code to region string */
-u8 *mwifiex_11d_code_2_region(u8 code)
+const u8 *mwifiex_11d_code_2_region(u8 code)
 {
        u8 i;
 
index 88bd21f..3efdd53 100644 (file)
@@ -1565,7 +1565,7 @@ int mwifiex_add_wowlan_magic_pkt_filter(struct mwifiex_adapter *adapter);
 int mwifiex_set_mgmt_ies(struct mwifiex_private *priv,
                         struct cfg80211_beacon_data *data);
 int mwifiex_del_mgmt_ies(struct mwifiex_private *priv);
-u8 *mwifiex_11d_code_2_region(u8 code);
+const u8 *mwifiex_11d_code_2_region(u8 code);
 void mwifiex_uap_set_channel(struct mwifiex_private *priv,
                             struct mwifiex_uap_bss_param *bss_cfg,
                             struct cfg80211_chan_def chandef);