qcacld-3.0: Remove and Replace WMA_BCN_BUF_MAX_SIZE with LIM macro

Max beacon size in WMA layer is pointed by "WMA_BCN_BUF_MAX_SIZE"
which is currently set to 2500 bytes and Max beacon size in
PE layer is pointed by "SIR_MAX_BEACON_SIZE" which is currently
set to 512 bytes.

when wma_store_bcn_tmpl() gets called, this API tries to copy
beacon template from LIM to WMA which can't exceed 512 bytes.

To fix the issue, use SIR_MAX_BEACON_SIZE instead of
WMA_BCN_BUF_MAX_SIZE

CRs-Fixed: 2299791
Change-Id: I97b4c19611ec74c0702901c380bd32e866d26c8b
Cette révision appartient à :
Krunal Soni
2018-08-21 14:54:11 -07:00
révisé par nshrivas
Parent 9e54d98689
révision eb692e3557
3 fichiers modifiés avec 4 ajouts et 4 suppressions

Voir le fichier

@@ -195,7 +195,7 @@ enum ds_mode {
#define WMA_CHAN_START_RESP 0
#define WMA_CHAN_END_RESP 1
#define WMA_BCN_BUF_MAX_SIZE 2500
#define WMA_BCN_BUF_MAX_SIZE 512
#define WMA_NOA_IE_SIZE(num_desc) (2 + (13 * (num_desc)))
#define WMA_MAX_NOA_DESCRIPTORS 4

Voir le fichier

@@ -906,7 +906,7 @@ static void wma_vdev_start_rsp(tp_wma_handle wma,
add_bss->status = QDF_STATUS_E_NOMEM;
goto send_fail_resp;
}
bcn->buf = qdf_nbuf_alloc(NULL, WMA_BCN_BUF_MAX_SIZE, 0,
bcn->buf = qdf_nbuf_alloc(NULL, SIR_MAX_BEACON_SIZE, 0,
sizeof(uint32_t), 0);
if (!bcn->buf) {
WMA_LOGE("%s: No memory allocated for beacon buffer",

Voir le fichier

@@ -2708,9 +2708,9 @@ static QDF_STATUS wma_store_bcn_tmpl(tp_wma_handle wma, uint8_t vdev_id,
}
len = *(u32 *) &bcn_info->beacon[0];
if (len > WMA_BCN_BUF_MAX_SIZE) {
if (len > SIR_MAX_BEACON_SIZE) {
WMA_LOGE("%s: Received beacon len %d exceeding max limit %d",
__func__, len, WMA_BCN_BUF_MAX_SIZE);
__func__, len, SIR_MAX_BEACON_SIZE);
return QDF_STATUS_E_INVAL;
}
WMA_LOGD("%s: Storing received beacon template buf to local buffer",