소스 검색

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 2 년 전
부모
커밋
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(