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
This commit is contained in:
Tushnim Bhattacharyya 2017-03-24 14:13:52 -07:00 • committed by Sandeep Puligilla
commit e07402f577

View file

@ -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)) {