qcacld-3.0: Validate SMPS params before sending it to FW
An invalid VDEV ID is sent to FW during adapter start after SSR leading to assertion failure. Validate return value of start adapter and skip to next adapter incase of any failure. Validate the VDEV ID sent in the SMPS params before sending to FW. Change-Id: I7038fb2c7ecaa5892f5058b5b719767314ec62bf CRs-Fixed: 3271202
This commit is contained in:

committed by
Madan Koyyalamudi

parent
01ced8b22b
commit
9a0dcc9ffe
@@ -8667,13 +8667,23 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
|
||||
case QDF_P2P_DEVICE_MODE:
|
||||
case QDF_NAN_DISC_MODE:
|
||||
|
||||
hdd_start_station_adapter(adapter);
|
||||
|
||||
ret = hdd_start_station_adapter(adapter);
|
||||
if (ret) {
|
||||
hdd_err("[SSR] Failed to start station adapter: %d",
|
||||
ret);
|
||||
hdd_adapter_dev_put_debug(adapter, dbgid);
|
||||
continue;
|
||||
}
|
||||
if (adapter->device_mode == QDF_STA_MODE) {
|
||||
ret = hdd_start_link_adapter(adapter);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
hdd_err("[SSR] Failed to start link adapter: %d",
|
||||
ret);
|
||||
hdd_stop_adapter(hdd_ctx, adapter);
|
||||
hdd_adapter_dev_put_debug(adapter,
|
||||
dbgid);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Open the gates for HDD to receive Wext commands */
|
||||
|
@@ -1490,6 +1490,11 @@ QDF_STATUS wma_set_smps_params(tp_wma_handle wma, uint8_t vdev_id,
|
||||
{
|
||||
QDF_STATUS ret;
|
||||
|
||||
if (!wma_is_vdev_valid(vdev_id)) {
|
||||
wma_err("Invalid VDEV ID: %d", vdev_id);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
ret = wmi_unified_set_smps_params(wma->wmi_handle, vdev_id,
|
||||
value);
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
|
Reference in New Issue
Block a user