staging: wfx: make hif_ie_table_entry const
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Mon, 6 Apr 2020 11:17:55 +0000 (13:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 12:32:39 +0000 (14:32 +0200)
In wfx_update_filtering(), filter_ies is never modified. So, make it
constant.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200406111756.154086-11-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/hif_tx_mib.c
drivers/staging/wfx/hif_tx_mib.h
drivers/staging/wfx/sta.c

index 5bca1e06995f1522853e74cdb1cb81d88886bcb4..ac534406144cf8c895204b5bf5237a7206712815 100644 (file)
@@ -102,8 +102,8 @@ int hif_set_rx_filter(struct wfx_vif *wvif,
                             &val, sizeof(val));
 }
 
-int hif_set_beacon_filter_table(struct wfx_vif *wvif,
-                               int tbl_len, struct hif_ie_table_entry *tbl)
+int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len,
+                               const struct hif_ie_table_entry *tbl)
 {
        int ret;
        struct hif_mib_bcn_filter_table *val;
index 77dedda0465ed25fa52fe743fa7d7b829a85292a..0f8b3bd9f14e88288f75dc7e1e4f150577f7796d 100644 (file)
@@ -25,8 +25,8 @@ int hif_get_counters_table(struct wfx_dev *wdev,
 int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac);
 int hif_set_rx_filter(struct wfx_vif *wvif,
                      bool filter_bssid, bool fwd_probe_req);
-int hif_set_beacon_filter_table(struct wfx_vif *wvif,
-                               int tbl_len, struct hif_ie_table_entry *tbl);
+int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len,
+                               const struct hif_ie_table_entry *tbl);
 int hif_beacon_filter_control(struct wfx_vif *wvif,
                              int enable, int beacon_count);
 int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode);
index c250b117a1382fd0c1226c8f92019d09c56749b3..4d5dbfc24f52f8d610cd6bf16514ac4502789b9b 100644 (file)
@@ -148,7 +148,7 @@ void wfx_update_filtering(struct wfx_vif *wvif)
        int bf_enable;
        int bf_count;
        int n_filter_ies;
-       struct hif_ie_table_entry filter_ies[] = {
+       const struct hif_ie_table_entry filter_ies[] = {
                {
                        .ie_id        = WLAN_EID_VENDOR_SPECIFIC,
                        .has_changed  = 1,