diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index e43e1e0fe31d..2f7c0d6cee14 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -1197,8 +1197,13 @@ typedef struct sSirSmeJoinReq { tAniBool spectrumMgtIndicator; tSirMacPowerCapInfo powerCap; tSirSupChnl supportedChannels; - tSirBssDescription bssDescription; bool enable_bcast_probe_rsp; + tSirBssDescription bssDescription; + /* + * WARNING: Pls make bssDescription as last variable in struct + * tSirSmeJoinReq as it has ieFields followed after this bss + * description. Adding a variable after this corrupts the ieFields + */ } tSirSmeJoinReq, *tpSirSmeJoinReq; /* / Definition for reponse message to previously issued join request */ diff --git a/core/mac/src/pe/include/lim_global.h b/core/mac/src/pe/include/lim_global.h index 6672d6eb6a65..014ee6ae9856 100644 --- a/core/mac/src/pe/include/lim_global.h +++ b/core/mac/src/pe/include/lim_global.h @@ -237,6 +237,11 @@ typedef struct sLimMlmJoinReq { tSirMacRateSet operationalRateSet; uint8_t sessionId; tSirBssDescription bssDescription; + /* + * WARNING: Pls make bssDescription as last variable in struct + * tLimMlmJoinReq as it has ieFields followed after this bss + * description. Adding a variable after this corrupts the ieFields + */ } tLimMlmJoinReq, *tpLimMlmJoinReq; typedef struct sLimMlmScanReq { diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h index 2435b71d33bc..9c50a84d4a9f 100644 --- a/core/mac/src/pe/lim/lim_types.h +++ b/core/mac/src/pe/lim/lim_types.h @@ -210,8 +210,13 @@ typedef struct sLimMlmStartCnf { typedef struct sLimMlmScanCnf { tSirResultCodes resultCode; uint16_t scanResultLength; - tSirBssDescription bssDescription[1]; uint8_t sessionId; + tSirBssDescription bssDescription[1]; + /* + * WARNING: Pls make bssDescription as last variable in struct + * tLimMlmScanCnf as it has ieFields followed after this bss + * description. Adding a variable after this corrupts the ieFields + */ } tLimMlmScanCnf, *tpLimMlmScanCnf; typedef struct sLimScanResult { diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h index 7bb95b12cd6b..e2c23282c836 100644 --- a/core/sme/src/csr/csr_inside_api.h +++ b/core/sme/src/csr/csr_inside_api.h @@ -154,14 +154,17 @@ typedef struct tagCsrScanResult { int32_t AgingCount; /* This BSS is removed when it reaches 0 or less */ uint32_t preferValue; /* The bigger the number, the better the BSS. This value override capValue */ uint32_t capValue; /* The biggger the better. This value is in use only if we have equal preferValue */ - /* This member must be the last in the structure because the end of tSirBssDescription (inside) is an */ - /* array with nonknown size at this time */ - eCsrEncryptionType ucEncryptionType; /* Preferred Encryption type that matched with profile. */ eCsrEncryptionType mcEncryptionType; eCsrAuthType authType; /* Preferred auth type that matched with the profile. */ tCsrScanResultInfo Result; + /* + * WARNING - Do not add any element here + * This member Result must be the last in the structure because the end + * of tSirBssDescription (inside) is an array with nonknown size at + * this time. + */ } tCsrScanResult; typedef struct {