diff --git a/components/p2p/dispatcher/inc/wlan_p2p_public_struct.h b/components/p2p/dispatcher/inc/wlan_p2p_public_struct.h index e3a12160e7..e7b10b7b51 100644 --- a/components/p2p/dispatcher/inc/wlan_p2p_public_struct.h +++ b/components/p2p/dispatcher/inc/wlan_p2p_public_struct.h @@ -1,6 +1,6 @@ /* * 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 * 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 frm_type; uint32_t rx_rssi; - uint8_t buf[1]; + QDF_FLEX_ARRAY(uint8_t, buf); }; /** diff --git a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h index 6f3fcad204..e6534ffd66 100644 --- a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h +++ b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h @@ -1,6 +1,6 @@ /* * 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 * 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 frm_type; 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; enum wifi_traffic_ac ac; /* Variable length. Dont add any field after this. */ - uint8_t add_ie[1]; + QDF_FLEX_ARRAY(uint8_t, add_ie); }; /** diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index 7d65921c46..cf9855fc9b 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -1,6 +1,6 @@ /* * 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 * 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 matchLen; uint16_t sessionId; - uint8_t matchData[1]; + QDF_FLEX_ARRAY(uint8_t, matchData); }; typedef struct sRrmContext { diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 75ea4a8dca..7ded607e1e 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -1,6 +1,6 @@ /* * 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 * any purpose with or without fee is hereby granted, provided that the @@ -585,7 +585,7 @@ struct register_mgmt_frame { bool registerFrame; uint16_t frameType; uint16_t matchLen; - uint8_t matchData[1]; + QDF_FLEX_ARRAY(uint8_t, matchData); }; /* / Generic type for sending a response message */ @@ -840,7 +840,7 @@ struct bss_description { uint32_t is_single_pmk; #endif /* 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 */ @@ -1804,7 +1804,7 @@ typedef struct sSirSmeMgmtFrameInd { uint8_t frameType; int8_t rxRssi; enum rxmgmt_flags rx_flags; - uint8_t frameBuf[1]; /* variable */ + QDF_FLEX_ARRAY(uint8_t, frameBuf); } tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd; typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind); @@ -1826,7 +1826,7 @@ typedef struct sSirSmeUnprotMgmtFrameInd { uint8_t sessionId; uint8_t frameType; uint8_t frameLen; - uint8_t frameBuf[1]; /* variable */ + QDF_FLEX_ARRAY(uint8_t, frameBuf); } tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd; #ifdef WLAN_FEATURE_EXTWOW_SUPPORT @@ -2146,7 +2146,7 @@ typedef struct sSirUpdateChan { uint8_t vht_24_en; bool he_en; bool eht_en; - tSirUpdateChanParam chanParam[1]; + QDF_FLEX_ARRAY(tSirUpdateChanParam, chanParam); } tSirUpdateChanList, *tpSirUpdateChanList; typedef enum eSirAddonPsReq { diff --git a/core/mac/src/include/sir_params.h b/core/mac/src/include/sir_params.h index 68633528f4..edc63845f5 100644 --- a/core/mac/src/include/sir_params.h +++ b/core/mac/src/include/sir_params.h @@ -1,6 +1,6 @@ /* * 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 * 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 * instead to dereference the message body. */ - uint32_t data[1]; + QDF_FLEX_ARRAY(uint32_t, data); } tSirMbMsg, *tpSirMbMsg; /** diff --git a/core/mac/src/pe/include/rrm_global.h b/core/mac/src/pe/include/rrm_global.h index efec9f8911..61f4cd5639 100644 --- a/core/mac/src/pe/include/rrm_global.h +++ b/core/mac/src/pe/include/rrm_global.h @@ -1,6 +1,6 @@ /* * 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 * any purpose with or without fee is hereby granted, provided that the @@ -249,7 +249,7 @@ typedef struct sSirNeighborReportInd { uint8_t measurement_idx; uint16_t numNeighborReports; tSirMacAddr bssId; /* For the session. */ - tSirNeighborBssDescription sNeighborBssDescription[1]; + QDF_FLEX_ARRAY(tSirNeighborBssDescription, sNeighborBssDescription); } tSirNeighborReportInd, *tpSirNeighborReportInd; typedef struct eid_ext_info { diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 0de6218c73..5ea5e4e45b 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -478,7 +478,7 @@ struct beacon_tim_ie { uint8_t dtim_count; uint8_t dtim_period; uint8_t tim_bitctl; - uint8_t tim_bitmap[1]; + QDF_FLEX_ARRAY(uint8_t, tim_bitmap); } __ATTRIB_PACK; /**