qcacld-3.0: Add support for size 1 flexible length arrays

Convert size 1 variable length arrays to flexible
length arrays.

Change-Id: I348d479c94a27f4cecc02c8fc9fa98cfb9572baa
CRs-Fixed: 3690224
Cette révision appartient à :
Aditya Kodukula
2023-12-14 01:41:23 -08:00
révisé par Ravindra Konda
Parent a445b05367
révision 949885e505
7 fichiers modifiés avec 18 ajouts et 18 suppressions

Voir le fichier

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2017-2019, 2021 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, 2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -118,7 +118,7 @@ struct p2p_rx_mgmt_frame {
uint32_t vdev_id; uint32_t vdev_id;
uint32_t frm_type; uint32_t frm_type;
uint32_t rx_rssi; uint32_t rx_rssi;
uint8_t buf[1]; QDF_FLEX_ARRAY(uint8_t, buf);
}; };
/** /**

Voir le fichier

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -599,7 +599,7 @@ struct tdls_rx_mgmt_frame {
uint32_t vdev_id; uint32_t vdev_id;
uint32_t frm_type; uint32_t frm_type;
uint32_t rx_rssi; uint32_t rx_rssi;
uint8_t buf[1]; QDF_FLEX_ARRAY(uint8_t, buf);
}; };
/** /**
@@ -1407,7 +1407,7 @@ struct tdls_send_mgmt_request {
struct qdf_mac_addr peer_mac; struct qdf_mac_addr peer_mac;
enum wifi_traffic_ac ac; enum wifi_traffic_ac ac;
/* Variable length. Dont add any field after this. */ /* Variable length. Dont add any field after this. */
uint8_t add_ie[1]; QDF_FLEX_ARRAY(uint8_t, add_ie);
}; };
/** /**

Voir le fichier

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -588,7 +588,7 @@ struct mgmt_frm_reg_info {
uint16_t frameType; uint16_t frameType;
uint16_t matchLen; uint16_t matchLen;
uint16_t sessionId; uint16_t sessionId;
uint8_t matchData[1]; QDF_FLEX_ARRAY(uint8_t, matchData);
}; };
typedef struct sRrmContext { typedef struct sRrmContext {

Voir le fichier

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -585,7 +585,7 @@ struct register_mgmt_frame {
bool registerFrame; bool registerFrame;
uint16_t frameType; uint16_t frameType;
uint16_t matchLen; uint16_t matchLen;
uint8_t matchData[1]; QDF_FLEX_ARRAY(uint8_t, matchData);
}; };
/* / Generic type for sending a response message */ /* / Generic type for sending a response message */
@@ -840,7 +840,7 @@ struct bss_description {
uint32_t is_single_pmk; uint32_t is_single_pmk;
#endif #endif
/* Please keep the structure 4 bytes aligned above the ieFields */ /* Please keep the structure 4 bytes aligned above the ieFields */
uint32_t ieFields[1]; QDF_FLEX_ARRAY(uint32_t, ieFields);
}; };
/* / Definition for response message to previously */ /* / Definition for response message to previously */
@@ -1804,7 +1804,7 @@ typedef struct sSirSmeMgmtFrameInd {
uint8_t frameType; uint8_t frameType;
int8_t rxRssi; int8_t rxRssi;
enum rxmgmt_flags rx_flags; enum rxmgmt_flags rx_flags;
uint8_t frameBuf[1]; /* variable */ QDF_FLEX_ARRAY(uint8_t, frameBuf);
} tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd; } tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd;
typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind); typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind);
@@ -1826,7 +1826,7 @@ typedef struct sSirSmeUnprotMgmtFrameInd {
uint8_t sessionId; uint8_t sessionId;
uint8_t frameType; uint8_t frameType;
uint8_t frameLen; uint8_t frameLen;
uint8_t frameBuf[1]; /* variable */ QDF_FLEX_ARRAY(uint8_t, frameBuf);
} tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd; } tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd;
#ifdef WLAN_FEATURE_EXTWOW_SUPPORT #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
@@ -2146,7 +2146,7 @@ typedef struct sSirUpdateChan {
uint8_t vht_24_en; uint8_t vht_24_en;
bool he_en; bool he_en;
bool eht_en; bool eht_en;
tSirUpdateChanParam chanParam[1]; QDF_FLEX_ARRAY(tSirUpdateChanParam, chanParam);
} tSirUpdateChanList, *tpSirUpdateChanList; } tSirUpdateChanList, *tpSirUpdateChanList;
typedef enum eSirAddonPsReq { typedef enum eSirAddonPsReq {

Voir le fichier

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -150,7 +150,7 @@ typedef struct sSirMbMsg {
* NOTE: data[1] is not a place holder to store data * NOTE: data[1] is not a place holder to store data
* instead to dereference the message body. * instead to dereference the message body.
*/ */
uint32_t data[1]; QDF_FLEX_ARRAY(uint32_t, data);
} tSirMbMsg, *tpSirMbMsg; } tSirMbMsg, *tpSirMbMsg;
/** /**

Voir le fichier

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2011-2012, 2014-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2011-2012, 2014-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -249,7 +249,7 @@ typedef struct sSirNeighborReportInd {
uint8_t measurement_idx; uint8_t measurement_idx;
uint16_t numNeighborReports; uint16_t numNeighborReports;
tSirMacAddr bssId; /* For the session. */ tSirMacAddr bssId; /* For the session. */
tSirNeighborBssDescription sNeighborBssDescription[1]; QDF_FLEX_ARRAY(tSirNeighborBssDescription, sNeighborBssDescription);
} tSirNeighborReportInd, *tpSirNeighborReportInd; } tSirNeighborReportInd, *tpSirNeighborReportInd;
typedef struct eid_ext_info { typedef struct eid_ext_info {

Voir le fichier

@@ -478,7 +478,7 @@ struct beacon_tim_ie {
uint8_t dtim_count; uint8_t dtim_count;
uint8_t dtim_period; uint8_t dtim_period;
uint8_t tim_bitctl; uint8_t tim_bitctl;
uint8_t tim_bitmap[1]; QDF_FLEX_ARRAY(uint8_t, tim_bitmap);
} __ATTRIB_PACK; } __ATTRIB_PACK;
/** /**