wlan-ap-Telecominfraproject/feeds/ipq95xx/mac80211/patches/qca/000-d-Revert-treewide-Replace-0-element-memcpy-destinations-with-flexible-arrays.patch
John Crispin 144c5d00f4 ipq95xx/mac80211: update to ATH12.3-CS
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00

186 lines
5.1 KiB
Diff

From 47c662486cccf03e7062139d069b07ab0126ef59 Mon Sep 17 00:00:00 2001
From: quic_nikhgurr <quic_nikhgurr@quicinc.com>
Date: Fri, 13 Aug 2021 12:19:24 -0700
Subject: Revert: "treewide: Replace 0-element memcpy() destinations with flexible arrays"
This reverts commit: https://git.codelinaro.org/clo/qsdk/kvalo/ath/-/commit/47c662486cccf03e7062139d069b07ab0126ef59
Signed-off-by: quic_nikhgurr <quic_nikhgurr@quicinc.com>
---
drivers/net/wireless/ath/ath10k/bmi.h | 10 +++----
drivers/scsi/qla4xxx/ql4_def.h | 4 +--
drivers/staging/r8188eu/include/ieee80211.h | 6 ++--
drivers/staging/rtl8712/ieee80211.h | 4 +--
drivers/staging/rtl8723bs/include/ieee80211.h | 6 ++--
include/linux/ieee80211.h | 30 +++++++++----------
include/uapi/linux/dlm_device.h | 4 +--
7 files changed, 32 insertions(+), 32 deletions(-)
diff --git b/drivers/net/wireless/ath/ath10k/bmi.h a/drivers/net/wireless/ath/ath10k/bmi.h
index 0685c0d2d4ea..f6fadcbdd86e 100644
--- b/drivers/net/wireless/ath/ath10k/bmi.h
+++ a/drivers/net/wireless/ath/ath10k/bmi.h
@@ -109,7 +109,7 @@ struct bmi_cmd {
struct {
__le32 addr;
__le32 len;
- u8 payload[];
+ u8 payload[0];
} write_mem;
struct {
__le32 addr;
@@ -138,18 +138,18 @@ struct bmi_cmd {
} rompatch_uninstall;
struct {
__le32 count;
- __le32 patch_ids[]; /* length of @count */
+ __le32 patch_ids[0]; /* length of @count */
} rompatch_activate;
struct {
__le32 count;
- __le32 patch_ids[]; /* length of @count */
+ __le32 patch_ids[0]; /* length of @count */
} rompatch_deactivate;
struct {
__le32 addr;
} lz_start;
struct {
__le32 len; /* max BMI_MAX_DATA_SIZE */
- u8 payload[]; /* length of @len */
+ u8 payload[0]; /* length of @len */
} lz_data;
struct {
u8 name[BMI_NVRAM_SEG_NAME_SZ];
@@ -160,7 +160,7 @@ struct bmi_cmd {
union bmi_resp {
struct {
- DECLARE_FLEX_ARRAY(u8, payload);
+ u8 payload[0];
} read_mem;
struct {
__le32 result;
diff --git b/include/linux/ieee80211.h a/include/linux/ieee80211.h
index ada3dd79cd08..694264503119 100644
--- b/include/linux/ieee80211.h
+++ a/include/linux/ieee80211.h
@@ -1143,7 +1143,7 @@ struct ieee80211_mgmt {
__le16 auth_transaction;
__le16 status_code;
/* possibly followed by Challenge text */
- u8 variable[];
+ u8 variable[0];
} __packed auth;
struct {
__le16 reason_code;
@@ -1152,26 +1152,26 @@ struct ieee80211_mgmt {
__le16 capab_info;
__le16 listen_interval;
/* followed by SSID and Supported rates */
- u8 variable[];
+ u8 variable[0];
} __packed assoc_req;
struct {
__le16 capab_info;
__le16 status_code;
__le16 aid;
/* followed by Supported rates */
- u8 variable[];
+ u8 variable[0];
} __packed assoc_resp, reassoc_resp;
struct {
__le16 capab_info;
__le16 status_code;
- u8 variable[];
+ u8 variable[0];
} __packed s1g_assoc_resp, s1g_reassoc_resp;
struct {
__le16 capab_info;
__le16 listen_interval;
u8 current_ap[ETH_ALEN];
/* followed by SSID and Supported rates */
- u8 variable[];
+ u8 variable[0];
} __packed reassoc_req;
struct {
__le16 reason_code;
@@ -1182,11 +1182,11 @@ struct ieee80211_mgmt {
__le16 capab_info;
/* followed by some of SSID, Supported rates,
* FH Params, DS Params, CF Params, IBSS Params, TIM */
- u8 variable[];
+ u8 variable[0];
} __packed beacon;
struct {
/* only variable items: SSID, Supported rates */
- DECLARE_FLEX_ARRAY(u8, variable);
+ u8 variable[0];
} __packed probe_req;
struct {
__le64 timestamp;
@@ -1194,7 +1194,7 @@ struct ieee80211_mgmt {
__le16 capab_info;
/* followed by some of SSID, Supported rates,
* FH Params, DS Params, CF Params, IBSS Params */
- u8 variable[];
+ u8 variable[0];
} __packed probe_resp;
struct {
u8 category;
@@ -1203,16 +1203,16 @@ struct ieee80211_mgmt {
u8 action_code;
u8 dialog_token;
u8 status_code;
- u8 variable[];
+ u8 variable[0];
} __packed wme_action;
struct{
u8 action_code;
- u8 variable[];
+ u8 variable[0];
} __packed chan_switch;
struct{
u8 action_code;
struct ieee80211_ext_chansw_ie data;
- u8 variable[];
+ u8 variable[0];
} __packed ext_chan_switch;
struct{
u8 action_code;
@@ -1228,7 +1228,7 @@ struct ieee80211_mgmt {
__le16 timeout;
__le16 start_seq_num;
/* followed by BA Extension */
- u8 variable[];
+ u8 variable[0];
} __packed addba_req;
struct{
u8 action_code;
@@ -1244,11 +1244,11 @@ struct ieee80211_mgmt {
} __packed delba;
struct {
u8 action_code;
- u8 variable[];
+ u8 variable[0];
} __packed self_prot;
struct{
u8 action_code;
- u8 variable[];
+ u8 variable[0];
} __packed mesh_action;
struct {
u8 action;
@@ -1292,7 +1292,7 @@ struct ieee80211_mgmt {
u8 toa[6];
__le16 tod_error;
__le16 toa_error;
- u8 variable[];
+ u8 variable[0];
} __packed ftm;
struct {
u8 action_code;
--
2.25.1