qcacld-3.0: Check for WMA context before sending TWT command

Check for WMA context before sending the TWT enable
command to the firmware.

Change-Id: I27c131773506c89fc7ba3e95fa58daa1258733fc
CRs-Fixed: 2299786
This commit is contained in:
Varun Reddy Yeturu 2018-08-20 18:40:11 -07:00 committed by nshrivas
parent c7a369d642
commit 692eed125d

View File

@ -33,6 +33,10 @@ void wma_send_twt_enable_cmd(uint32_t pdev_id, uint32_t congestion_timeout)
struct wmi_twt_enable_param twt_enable_params = {0}; struct wmi_twt_enable_param twt_enable_params = {0};
int32_t ret; int32_t ret;
if (!wma) {
WMA_LOGE("Invalid WMA context, enable TWT failed");
return;
}
twt_enable_params.pdev_id = pdev_id; twt_enable_params.pdev_id = pdev_id;
twt_enable_params.sta_cong_timer_ms = congestion_timeout; twt_enable_params.sta_cong_timer_ms = congestion_timeout;
ret = wmi_unified_twt_enable_cmd(wma->wmi_handle, &twt_enable_params); ret = wmi_unified_twt_enable_cmd(wma->wmi_handle, &twt_enable_params);