qcacld-3.0: Set hw mode based on channel_select_logic_conc ini

Set hw mode to DBS or single MAC for STA+STA and STA+P2P
concurrencies based on channel_select_logic_conc ini.

Change-Id: I46ba4d5cd8f5cda71d0c00be2b612bc851eb5ba4
CRs-Fixed: 2185554
This commit is contained in:
Yeshwanth Sriram Guntuka 2018-02-12 13:28:22 +05:30 • committed by snandini
commit 469f957cd3
3 changed files with 30 additions and 0 deletions

View file

@ -1865,6 +1865,13 @@ int hdd_vdev_ready(struct hdd_adapter *adapter);
QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter);
struct hdd_adapter *hdd_get_adapter(struct hdd_context *hdd_ctx,
enum QDF_OPMODE mode);
/*
* hdd_get_device_mode() - Get device mode
* @session_id: Session id
*
* Return: Device mode
*/
enum tQDF_ADAPTER_MODE hdd_get_device_mode(uint32_t session_id);
void hdd_deinit_adapter(struct hdd_context *hdd_ctx,
struct hdd_adapter *adapter,
bool rtnl_held);

View file

@ -8677,6 +8677,8 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx)
user_cfg->sub_20_mhz_enabled = cds_is_sub_20_mhz_enabled();
user_cfg->is_sta_sap_scc_allowed_on_dfs_chan =
hdd_ctx->config->sta_sap_scc_on_dfs_chan;
user_cfg->channel_select_logic_conc =
hdd_ctx->config->channel_select_logic_conc;
status = policy_mgr_set_user_cfg(hdd_ctx->hdd_psoc, user_cfg);
qdf_mem_free(user_cfg);

View file

@ -2438,6 +2438,7 @@ static void hdd_register_policy_manager_callback(
wlan_hdd_get_channel_for_sap_restart;
hdd_cbacks.get_mode_for_non_connected_vdev =
wlan_hdd_get_mode_for_non_connected_vdev;
hdd_cbacks.hdd_get_device_mode = hdd_get_device_mode;
if (QDF_STATUS_SUCCESS !=
policy_mgr_register_hdd_cb(psoc, &hdd_cbacks)) {
@ -5943,6 +5944,26 @@ struct hdd_adapter *hdd_get_adapter(struct hdd_context *hdd_ctx,
return NULL;
}
enum tQDF_ADAPTER_MODE hdd_get_device_mode(uint32_t session_id)
{
struct hdd_context *hdd_ctx;
struct hdd_adapter *adapter;
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (!hdd_ctx) {
hdd_err("Invalid HDD context");
return QDF_MAX_NO_OF_MODE;
}
adapter = hdd_get_adapter_by_sme_session_id(hdd_ctx, session_id);
if (!adapter) {
hdd_err("Invalid HDD adapter");
return QDF_MAX_NO_OF_MODE;
}
return adapter->device_mode;
}
/**
* hdd_get_operating_channel() - return operating channel of the device mode
* @hdd_ctx: Pointer to the HDD context.