瀏覽代碼

qcacld-3.0: Check if sta vdev is up before issuing power save

As part of the monitor mode start up sequence it disables
the powersave using the sta mode vdev without checking if sta mode
vdev is up or not.

Verify the sta mode status before issuing the disable power command.

Change-Id: I19b64385a864112465d341618601d42e8471eda9
CRs-Fixed: 3541250
Arun Kumar Khandavalli 1 年之前
父節點
當前提交
c397dcd44f
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 1 2
      core/hdd/src/wlan_hdd_main.c
  2. 3 0
      core/hdd/src/wlan_hdd_power.c

+ 1 - 2
core/hdd/src/wlan_hdd_main.c

@@ -2597,8 +2597,7 @@ static void hdd_lpc_enable_powersave(struct hdd_context *hdd_ctx)
 		return;
 	}
 
-	if (sta_adapter->deflink->vdev_id < WLAN_UMAC_VDEV_ID_MAX)
-		wlan_hdd_set_powersave(sta_adapter->deflink, true, 0);
+	wlan_hdd_set_powersave(sta_adapter->deflink, true, 0);
 }
 
 static void hdd_lpc_disable_powersave(struct hdd_context *hdd_ctx)

+ 3 - 0
core/hdd/src/wlan_hdd_power.c

@@ -2192,6 +2192,9 @@ int wlan_hdd_set_powersave(struct wlan_hdd_link_info *link_info,
 		return -EINVAL;
 	}
 
+	if (wlan_hdd_validate_vdev_id(link_info->vdev_id))
+		return -EINVAL;
+
 	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(link_info);
 
 	status = sme_ps_set_powersave(