qcacmn: Validate mac_id for txrx_stats
Add a sanity check to avoid sending a htt txrx_stats request with an invalid mac_id parameter to firmware. Change-Id: Iae980bbffdcf6759b6d467849c5ebc65628f17ba Crs-Fixed: 2438693
This commit is contained in:

committed by
nshrivas

parent
8a0228a1f3
commit
8d583a8695
@@ -8891,6 +8891,11 @@ QDF_STATUS dp_txrx_stats_request(struct cdp_vdev *vdev,
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (req->mac_id >= WLAN_CFG_MAC_PER_TARGET) {
|
||||
dp_err("Invalid mac id request");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
stats = req->stats;
|
||||
if (stats >= CDP_TXRX_MAX_STATS)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
@@ -58,6 +58,7 @@
|
||||
#define WLAN_CFG_PER_PDEV_RX_RING 0
|
||||
#define WLAN_CFG_PER_PDEV_LMAC_RING 0
|
||||
#define WLAN_LRO_ENABLE 0
|
||||
#define WLAN_CFG_MAC_PER_TARGET 2
|
||||
#ifdef IPA_OFFLOAD
|
||||
/* Size of TCL TX Ring */
|
||||
#define WLAN_CFG_TX_RING_SIZE 1024
|
||||
@@ -98,7 +99,7 @@
|
||||
#define WLAN_CFG_PER_PDEV_RX_RING 0
|
||||
#define WLAN_CFG_PER_PDEV_LMAC_RING 1
|
||||
#define WLAN_LRO_ENABLE 0
|
||||
|
||||
#define WLAN_CFG_MAC_PER_TARGET 3
|
||||
/* Tx Descriptor and Tx Extension Descriptor pool sizes */
|
||||
#ifndef QCA_WIFI_QCA8074_VP
|
||||
#define WLAN_CFG_NUM_TX_DESC 0x320000
|
||||
|
Reference in New Issue
Block a user