Browse Source

qcacmn: Add a legacy callback to get the type of non connected vdev

Add a legacy callback to get the type of a non connected vdev
needed by policy manager.

Change-Id: Id3622d5c808c8e0f3b24b257b5899f925dc36b1f
CRs-Fixed: 2009818
Tushnim Bhattacharyya 8 years ago
parent
commit
e07402f577
1 changed files with 14 additions and 3 deletions
  1. 14 3
      umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

+ 14 - 3
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -1722,13 +1722,24 @@ uint8_t policy_mgr_search_and_check_for_session_conc(
 	QDF_STATUS status;
 	enum policy_mgr_con_mode mode;
 	bool ret;
+	struct policy_mgr_psoc_priv_obj *pm_ctx;
 
-	mode = policy_mgr_get_mode_by_vdev_id(psoc, session_id);
-	if (PM_MAX_NUM_OF_MODE == mode) {
-		policy_mgr_err("Invalid mode");
+	pm_ctx = policy_mgr_get_context(psoc);
+	if (!pm_ctx) {
+		policy_mgr_err("Invalid Context");
 		return channel;
 	}
 
+	if (pm_ctx->hdd_cbacks.get_mode_for_non_connected_vdev) {
+		mode = pm_ctx->hdd_cbacks.get_mode_for_non_connected_vdev(
+			psoc, session_id);
+		if (PM_MAX_NUM_OF_MODE == mode) {
+			policy_mgr_err("Invalid mode");
+			return channel;
+		}
+	} else
+		return channel;
+
 	status = policy_mgr_get_channel_from_scan_result(psoc,
 			roam_profile, &channel);
 	if ((QDF_STATUS_SUCCESS != status) || (channel == 0)) {