summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2023-02-03 04:32:00 +0300
committerKalle Valo <kvalo@kernel.org>2023-02-13 19:52:56 +0300
commit7fcae8f7f8158d22e667ed55a40e6a1829cc55b0 (patch)
tree8fbeccd0ec1e6887cbcd1e26314e34b8f8e7a194 /drivers/net/wireless/marvell
parent552ac55ee9bc8a30edc87c284a4562ce703f972b (diff)
downloadlinux-7fcae8f7f8158d22e667ed55a40e6a1829cc55b0.tar.xz
wifi: mwifiex: Replace one-element arrays with flexible-array members
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element arrays with flexible-array members in multiple structures. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. This results in no differences in binary output. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/256 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/Y9xkECG3uTZ6T1dN@work
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/fw.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h
index c32478dfe357..0c167a1d9b0b 100644
--- a/drivers/net/wireless/marvell/mwifiex/fw.h
+++ b/drivers/net/wireless/marvell/mwifiex/fw.h
@@ -41,7 +41,7 @@ struct mwifiex_fw_header {
struct mwifiex_fw_data {
struct mwifiex_fw_header header;
__le32 seq_num;
- u8 data[1];
+ u8 data[];
} __packed;
struct mwifiex_fw_dump_header {
@@ -641,7 +641,7 @@ struct mwifiex_ie_types_header {
struct mwifiex_ie_types_data {
struct mwifiex_ie_types_header header;
- u8 data[1];
+ u8 data[];
} __packed;
#define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
@@ -799,7 +799,7 @@ struct mwifiex_ie_types_rates_param_set {
struct mwifiex_ie_types_ssid_param_set {
struct mwifiex_ie_types_header header;
- u8 ssid[1];
+ u8 ssid[];
} __packed;
struct mwifiex_ie_types_num_probes {
@@ -907,7 +907,7 @@ struct mwifiex_ie_types_tdls_idle_timeout {
struct mwifiex_ie_types_rsn_param_set {
struct mwifiex_ie_types_header header;
- u8 rsn_ie[1];
+ u8 rsn_ie[];
} __packed;
#define KEYPARAMSET_FIXED_LEN 6
@@ -1434,7 +1434,7 @@ struct mwifiex_tdls_stop_cs_params {
struct host_cmd_ds_tdls_config {
__le16 tdls_action;
- u8 tdls_data[1];
+ u8 tdls_data[];
} __packed;
struct mwifiex_chan_desc {
@@ -1575,13 +1575,13 @@ struct ie_body {
struct host_cmd_ds_802_11_scan {
u8 bss_mode;
u8 bssid[ETH_ALEN];
- u8 tlv_buffer[1];
+ u8 tlv_buffer[];
} __packed;
struct host_cmd_ds_802_11_scan_rsp {
__le16 bss_descript_size;
u8 number_of_sets;
- u8 bss_desc_and_tlv_buffer[1];
+ u8 bss_desc_and_tlv_buffer[];
} __packed;
struct host_cmd_ds_802_11_scan_ext {
@@ -1597,7 +1597,7 @@ struct mwifiex_ie_types_bss_mode {
struct mwifiex_ie_types_bss_scan_rsp {
struct mwifiex_ie_types_header header;
u8 bssid[ETH_ALEN];
- u8 frame_body[1];
+ u8 frame_body[];
} __packed;
struct mwifiex_ie_types_bss_scan_info {
@@ -1734,7 +1734,7 @@ struct mwifiex_ie_types_local_pwr_constraint {
struct mwifiex_ie_types_wmm_param_set {
struct mwifiex_ie_types_header header;
- u8 wmm_ie[1];
+ u8 wmm_ie[];
} __packed;
struct mwifiex_ie_types_mgmt_frame {
@@ -1960,7 +1960,7 @@ struct host_cmd_tlv_wep_key {
struct mwifiex_ie_types_header header;
u8 key_index;
u8 is_default;
- u8 key[1];
+ u8 key[];
};
struct host_cmd_tlv_auth_type {