qcacld-3.0: Use static const initializers for IE array

The qcn and ese arrays are dynamically recreated on every call of the
functions sme_add_qcn_ie and csr_append_assoc_ies.

Change the initializers to static const to avoid dynamic recreation.

Change-Id: Ib3ae9a1b753c4dcfb6d8fd440050977253f3e720
CRs-Fixed: 2522716
This commit is contained in:
Abhishek Singh 2019-09-06 20:37:19 +05:30 • committed by nshrivas
commit a25efe524d
2 changed files with 14 additions and 11 deletions

View file

@ -14848,11 +14848,12 @@ void sme_add_qcn_ie(mac_handle_t mac_handle, uint8_t *ie_data,
uint16_t *ie_len)
{
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
uint8_t qcn_ie[] = {WLAN_ELEMID_VENDOR, 8,
0x8C, 0xFD, 0xF0, 0x1, QCN_IE_VERSION_SUBATTR_ID,
QCN_IE_VERSION_SUBATTR_DATA_LEN,
QCN_IE_VERSION_SUPPORTED,
QCN_IE_SUBVERSION_SUPPORTED};
static const uint8_t qcn_ie[] = {WLAN_ELEMID_VENDOR, 8,
0x8C, 0xFD, 0xF0, 0x1,
QCN_IE_VERSION_SUBATTR_ID,
QCN_IE_VERSION_SUBATTR_DATA_LEN,
QCN_IE_VERSION_SUPPORTED,
QCN_IE_SUBVERSION_SUPPORTED};
if (!mac_ctx->mlme_cfg->sta.qcn_ie_support) {
sme_debug("QCN IE is not supported");

View file

@ -18736,7 +18736,7 @@ csr_roam_send_rso_cmd(struct mac_context *mac_ctx,
static void csr_append_assoc_ies(struct mac_context *mac_ctx,
struct roam_offload_scan_req *req_buf,
uint8_t ie_id, uint8_t ie_len,
uint8_t *ie_data)
const uint8_t *ie_data)
{
tSirAddie *assoc_ie = &req_buf->assoc_ie;
@ -18825,12 +18825,14 @@ static void csr_update_driver_assoc_ies(struct mac_context *mac_ctx,
uint8_t supp_chan_ie[DOT11F_IE_SUPPCHANNELS_MAX_LEN], supp_chan_ie_len;
#ifdef FEATURE_WLAN_ESE
uint8_t ese_ie[] = { 0x0, 0x40, 0x96, 0x3, ESE_VERSION_SUPPORTED};
static const uint8_t ese_ie[] = {0x0, 0x40, 0x96, 0x3,
ESE_VERSION_SUPPORTED};
#endif
uint8_t qcn_ie[] = {0x8C, 0xFD, 0xF0, 0x1, QCN_IE_VERSION_SUBATTR_ID,
QCN_IE_VERSION_SUBATTR_DATA_LEN,
QCN_IE_VERSION_SUPPORTED,
QCN_IE_SUBVERSION_SUPPORTED};
static const uint8_t qcn_ie[] = {0x8C, 0xFD, 0xF0, 0x1,
QCN_IE_VERSION_SUBATTR_ID,
QCN_IE_VERSION_SUBATTR_DATA_LEN,
QCN_IE_VERSION_SUPPORTED,
QCN_IE_SUBVERSION_SUPPORTED};
if (session->pConnectBssDesc)
max_tx_pwr_cap = csr_get_cfg_max_tx_power(mac_ctx,