diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index bdc38326afb8..d23e0f965db2 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1702,11 +1702,15 @@ struct hdd_cache_channels { /** * struct hdd_context - hdd shared driver and psoc/device context + * @psoc: object manager psoc context * @pdev: object manager pdev context * @g_event_flags: a bitmap of hdd_driver_flags */ struct hdd_context { - struct wlan_objmgr_psoc *hdd_psoc; + union { + struct wlan_objmgr_psoc *psoc; + struct wlan_objmgr_psoc *hdd_psoc; + }; struct wlan_objmgr_pdev *pdev; mac_handle_t mac_handle; struct wiphy *wiphy; diff --git a/core/hdd/src/wlan_hdd_active_tos.c b/core/hdd/src/wlan_hdd_active_tos.c index 7884835d0a23..02f5eb7df00c 100644 --- a/core/hdd/src/wlan_hdd_active_tos.c +++ b/core/hdd/src/wlan_hdd_active_tos.c @@ -111,22 +111,22 @@ hdd_set_limit_off_chan_for_tos(struct hdd_adapter *adapter, if (adapter->active_ac & HDD_AC_VO_BIT) { max_off_chan_time = limit_off_chan_tbl[TOS_VO][HDD_DWELL_TIME_INDX]; - policy_mgr_set_cur_conc_system_pref(hdd_ctx->hdd_psoc, + policy_mgr_set_cur_conc_system_pref(hdd_ctx->psoc, PM_LATENCY); } else if (adapter->active_ac & HDD_AC_VI_BIT) { max_off_chan_time = limit_off_chan_tbl[TOS_VI][HDD_DWELL_TIME_INDX]; - policy_mgr_set_cur_conc_system_pref(hdd_ctx->hdd_psoc, + policy_mgr_set_cur_conc_system_pref(hdd_ctx->psoc, PM_LATENCY); } else { /*ignore this command if only BE/BK is active */ is_tos_active = false; - policy_mgr_set_cur_conc_system_pref(hdd_ctx->hdd_psoc, + policy_mgr_set_cur_conc_system_pref(hdd_ctx->psoc, hdd_ctx->config->conc_system_pref); } } else { /* No active tos */ - policy_mgr_set_cur_conc_system_pref(hdd_ctx->hdd_psoc, + policy_mgr_set_cur_conc_system_pref(hdd_ctx->psoc, hdd_ctx->config->conc_system_pref); } diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index ba811a1e7d2d..dd841baf850f 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1352,7 +1352,7 @@ static void hdd_send_association_event(struct net_device *dev, } if (!hdd_is_roam_sync_in_progress(pCsrRoamInfo)) { - policy_mgr_incr_active_session(hdd_ctx->hdd_psoc, + policy_mgr_incr_active_session(hdd_ctx->psoc, adapter->device_mode, adapter->session_id); hdd_green_ap_start_state_mc(hdd_ctx, adapter->device_mode, true); @@ -1433,7 +1433,7 @@ static void hdd_send_association_event(struct net_device *dev, #endif } else if (eConnectionState_IbssConnected == /* IBss Associated */ sta_ctx->conn_info.connState) { - policy_mgr_update_connection_info(hdd_ctx->hdd_psoc, + policy_mgr_update_connection_info(hdd_ctx->psoc, adapter->session_id); memcpy(wrqu.ap_addr.sa_data, sta_ctx->conn_info.bssId.bytes, ETH_ALEN); @@ -1442,7 +1442,7 @@ static void hdd_send_association_event(struct net_device *dev, } else { /* Not Associated */ hdd_debug("wlan: disconnected"); memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN); - policy_mgr_decr_session_set_pcl(hdd_ctx->hdd_psoc, + policy_mgr_decr_session_set_pcl(hdd_ctx->psoc, adapter->device_mode, adapter->session_id); hdd_green_ap_start_state_mc(hdd_ctx, adapter->device_mode, false); @@ -1870,7 +1870,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, wlan_hdd_clear_link_layer_stats(adapter); hdd_debug("check for SAP restart"); - policy_mgr_check_concurrent_intf_and_restart_sap(hdd_ctx->hdd_psoc); + policy_mgr_check_concurrent_intf_and_restart_sap(hdd_ctx->psoc); adapter->hdd_stats.tx_rx_stats.cont_txtimeout_cnt = 0; /* Unblock anyone waiting for disconnect to complete */ @@ -1884,7 +1884,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, hdd_print_bss_info(sta_ctx); - if (policy_mgr_is_sta_active_connection_exists(hdd_ctx->hdd_psoc)) + if (policy_mgr_is_sta_active_connection_exists(hdd_ctx->psoc)) sme_enable_roaming_on_connected_sta(mac_handle); return status; @@ -2321,7 +2321,7 @@ static void hdd_send_re_assoc_event(struct net_device *dev, * successful reassoc decrement the active session count here. */ if (!hdd_is_roam_sync_in_progress(pCsrRoamInfo)) { - policy_mgr_decr_session_set_pcl(hdd_ctx->hdd_psoc, + policy_mgr_decr_session_set_pcl(hdd_ctx->psoc, adapter->device_mode, adapter->session_id); hdd_green_ap_start_state_mc(hdd_ctx, adapter->device_mode, false); @@ -2811,7 +2811,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, /* Indicate 'connect' status to user space */ hdd_send_association_event(dev, roam_info); - if (policy_mgr_is_mcc_in_24G(hdd_ctx->hdd_psoc)) { + if (policy_mgr_is_mcc_in_24G(hdd_ctx->psoc)) { if (hdd_ctx->miracast_value) wlan_hdd_set_mas(adapter, hdd_ctx->miracast_value); @@ -2879,7 +2879,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, #endif hdd_debug("check if STA chan ok for DNBS"); - if (policy_mgr_is_chan_ok_for_dnbs(hdd_ctx->hdd_psoc, + if (policy_mgr_is_chan_ok_for_dnbs(hdd_ctx->psoc, sta_ctx->conn_info.operationChannel, &ok)) { hdd_err("Unable to check DNBS eligibility for chan:%d", @@ -3045,7 +3045,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, if (!hdd_is_roam_sync_in_progress (roam_info)) { policy_mgr_decr_session_set_pcl( - hdd_ctx->hdd_psoc, + hdd_ctx->psoc, adapter->device_mode, adapter->session_id); hdd_green_ap_start_state_mc( @@ -3286,15 +3286,15 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, #endif hdd_debug("check for SAP restart"); policy_mgr_check_concurrent_intf_and_restart_sap( - hdd_ctx->hdd_psoc); + hdd_ctx->psoc); if (roam_info->pBssDesc) policy_mgr_checkn_update_hw_mode_single_mac_mode - (hdd_ctx->hdd_psoc, + (hdd_ctx->psoc, roam_info->pBssDesc->channelId); } else { bool connect_timeout = false; /* do we need to change the HW mode */ - policy_mgr_check_n_start_opportunistic_timer(hdd_ctx->hdd_psoc); + policy_mgr_check_n_start_opportunistic_timer(hdd_ctx->psoc); if (roam_info && roam_info->is_fils_connection && eCSR_ROAM_RESULT_SCAN_FOR_SSID_FAILURE == roamResult) qdf_copy_macaddr(&roam_info->bssid, @@ -3554,13 +3554,13 @@ static void hdd_roam_ibss_indication_handler(struct hdd_adapter *adapter, bss); } if (eCSR_ROAM_RESULT_IBSS_STARTED == roamResult) { - policy_mgr_incr_active_session(hdd_ctx->hdd_psoc, + policy_mgr_incr_active_session(hdd_ctx->psoc, adapter->device_mode, adapter->session_id); hdd_green_ap_start_state_mc(hdd_ctx, adapter->device_mode, true); } else if (eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS == roamResult || eCSR_ROAM_RESULT_IBSS_COALESCED == roamResult) { - policy_mgr_update_connection_info(hdd_ctx->hdd_psoc, + policy_mgr_update_connection_info(hdd_ctx->psoc, adapter->session_id); } break; @@ -4552,9 +4552,9 @@ static void hdd_roam_channel_switch_handler(struct hdd_adapter *adapter, hdd_err("channel change notification failed"); hdd_debug("check for SAP restart"); - policy_mgr_check_concurrent_intf_and_restart_sap(hdd_ctx->hdd_psoc); + policy_mgr_check_concurrent_intf_and_restart_sap(hdd_ctx->psoc); - status = policy_mgr_set_hw_mode_on_channel_switch(hdd_ctx->hdd_psoc, + status = policy_mgr_set_hw_mode_on_channel_switch(hdd_ctx->psoc, adapter->session_id); if (QDF_IS_STATUS_ERROR(status)) hdd_debug("set hw mode change not done"); @@ -4888,7 +4888,7 @@ hdd_sme_roam_callback(void *pContext, struct csr_roam_info *roam_info, hdd_napi_serialize(1); hdd_set_connection_in_progress(true); hdd_set_roaming_in_progress(true); - policy_mgr_restart_opportunistic_timer(hdd_ctx->hdd_psoc, true); + policy_mgr_restart_opportunistic_timer(hdd_ctx->psoc, true); break; case eCSR_ROAM_ABORT: hdd_debug("Firmware aborted roaming operation, previous connection is still valid"); diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index c1fd4a1c4174..e07b3512e3b6 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -6090,7 +6090,7 @@ static void hdd_set_fine_time_meas_cap(struct hdd_context *hdd_ctx) /* Make sure only supported capabilities are enabled in INI */ capability &= CFG_FINE_TIME_MEAS_CAPABILITY_MAX; - ucfg_wifi_pos_set_ftm_cap(hdd_ctx->hdd_psoc, capability); + ucfg_wifi_pos_set_ftm_cap(hdd_ctx->psoc, capability); hdd_debug("fine time meas capability - INI: %04x Enabled: %04x", config->fine_time_meas_cap, @@ -6648,7 +6648,7 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx) hdd_ctx->config->sta_sap_scc_on_lte_coex_chan; user_cfg->dbs_selection_policy = hdd_ctx->config->dbs_selection_policy; user_cfg->vdev_priority_list = hdd_ctx->config->vdev_priority_list; - status = policy_mgr_set_user_cfg(hdd_ctx->hdd_psoc, user_cfg); + status = policy_mgr_set_user_cfg(hdd_ctx->psoc, user_cfg); qdf_mem_free(user_cfg); return status; @@ -7134,7 +7134,7 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx) hdd_ctx->config->min_delay_btw_roam_scans; smeConfig->csrConfig.roam_trigger_reason_bitmask = hdd_ctx->config->roam_trigger_reason_bitmask; - status = ucfg_mlme_get_ignore_peer_ht_mode(hdd_ctx->hdd_psoc, + status = ucfg_mlme_get_ignore_peer_ht_mode(hdd_ctx->psoc, &ignore_peer_ht_mode); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("Get ignore_peer_ht_mode failed"); @@ -7492,7 +7492,7 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss) hdd_err("Could not pass on WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE to CFG"); } - qdf_status = ucfg_mlme_get_ht_cap_info(hdd_ctx->hdd_psoc, &ht_cap_info); + qdf_status = ucfg_mlme_get_ht_cap_info(hdd_ctx->psoc, &ht_cap_info); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("Failed to get HT Cap info"); status = false; @@ -7506,7 +7506,7 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss) ht_cap_info.tx_stbc = val32; } - qdf_status = ucfg_mlme_set_ht_cap_info(hdd_ctx->hdd_psoc, ht_cap_info); + qdf_status = ucfg_mlme_set_ht_cap_info(hdd_ctx->psoc, ht_cap_info); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { status = false; hdd_err("Could not set the HT_CAP_INFO"); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 694e0403bb04..8e4dd0b93033 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -755,7 +755,7 @@ static int __wlan_hdd_cfg80211_get_tdls_capabilities(struct wiphy *wiphy, goto fail; } - if ((cfg_tdls_get_support_enable(hdd_ctx->hdd_psoc, &tdls_support) == + if ((cfg_tdls_get_support_enable(hdd_ctx->psoc, &tdls_support) == QDF_STATUS_SUCCESS) && tdls_support) { hdd_debug("TDLS feature not Enabled or Not supported in FW"); if (nla_put_u32(skb, PARAM_MAX_TDLS_SESSION, 0) || @@ -764,13 +764,13 @@ static int __wlan_hdd_cfg80211_get_tdls_capabilities(struct wiphy *wiphy, goto fail; } } else { - cfg_tdls_get_external_control(hdd_ctx->hdd_psoc, + cfg_tdls_get_external_control(hdd_ctx->psoc, &tdls_external_control); - cfg_tdls_get_sleep_sta_enable(hdd_ctx->hdd_psoc, + cfg_tdls_get_sleep_sta_enable(hdd_ctx->psoc, &tdls_sleep_sta_enable); - cfg_tdls_get_buffer_sta_enable(hdd_ctx->hdd_psoc, + cfg_tdls_get_buffer_sta_enable(hdd_ctx->psoc, &tdls_buffer_sta); - cfg_tdls_get_off_channel_enable(hdd_ctx->hdd_psoc, + cfg_tdls_get_off_channel_enable(hdd_ctx->psoc, &tdls_off_channel); set = set | WIFI_TDLS_SUPPORT; set = set | (tdls_external_control ? @@ -1576,7 +1576,7 @@ int wlan_hdd_sap_cfg_dfs_override(struct hdd_adapter *adapter) * channel secondary AP should always follow primary APs channel */ if (!policy_mgr_concurrent_beaconing_sessions_running( - hdd_ctx->hdd_psoc)) + hdd_ctx->psoc)) return 0; con_sap_adapter = hdd_get_con_sap_adapter(adapter, true); @@ -1776,7 +1776,7 @@ int wlan_hdd_cfg80211_start_acs(struct hdd_adapter *adapter) * then PCL would include only channels from the other * frequency band on which no connections are active */ - if ((policy_mgr_get_connection_count(hdd_ctx->hdd_psoc) == 2) && + if ((policy_mgr_get_connection_count(hdd_ctx->psoc) == 2) && (sap_config->acs_cfg.band == QCA_ACS_MODE_IEEE80211ANY)) { struct policy_mgr_conc_connection_info *conc_connection_info; uint32_t i; @@ -2140,7 +2140,7 @@ static int wlan_hdd_sap_get_valid_channellist(struct hdd_adapter *adapter, sap_config = &adapter->session.ap.sap_config; status = - policy_mgr_get_valid_chans(hdd_ctx->hdd_psoc, + policy_mgr_get_valid_chans(hdd_ctx->psoc, tmp_chan_list, &chan_count); if (QDF_IS_STATUS_ERROR(status)) { @@ -2203,7 +2203,7 @@ int hdd_cfg80211_update_acs_config(struct hdd_adapter *adapter, * then PCL would include only channels from the other * frequency band on which no connections are active */ - if ((policy_mgr_get_connection_count(hdd_ctx->hdd_psoc) == 2) && + if ((policy_mgr_get_connection_count(hdd_ctx->psoc) == 2) && (sap_config->acs_cfg.band == QCA_ACS_MODE_IEEE80211ANY)) { struct policy_mgr_conc_connection_info *conc_connection_info; @@ -2657,7 +2657,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, hdd_debug("get pcl for DO_ACS vendor command"); /* consult policy manager to get PCL */ - qdf_status = policy_mgr_get_pcl(hdd_ctx->hdd_psoc, PM_SAP_MODE, + qdf_status = policy_mgr_get_pcl(hdd_ctx->psoc, PM_SAP_MODE, sap_config->acs_cfg.pcl_channels, &sap_config->acs_cfg.pcl_ch_count, sap_config->acs_cfg.pcl_channels_weight_list, @@ -2677,7 +2677,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, } if (hw_mode == QCA_ACS_MODE_IEEE80211ANY) - policy_mgr_trim_acs_channel_list(hdd_ctx->hdd_psoc, + policy_mgr_trim_acs_channel_list(hdd_ctx->psoc, sap_config->acs_cfg.ch_list, &sap_config->acs_cfg.ch_list_count); @@ -2737,7 +2737,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, hdd_debug("%d ", sap_config->acs_cfg.ch_list[i]); } - conc_channel = policy_mgr_mode_specific_get_channel(hdd_ctx->hdd_psoc, + conc_channel = policy_mgr_mode_specific_get_channel(hdd_ctx->psoc, PM_STA_MODE); if (hdd_ctx->config->external_acs_policy == HDD_EXTERNAL_ACS_PCL_MANDATORY) { @@ -3046,7 +3046,7 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy, /* HOTSPOT is a supplicant feature, enable it by default */ fset |= WIFI_FEATURE_HOTSPOT; - if (ucfg_extscan_get_enable(hdd_ctx->hdd_psoc) && + if (ucfg_extscan_get_enable(hdd_ctx->psoc) && sme_is_feature_supported_by_fw(EXTENDED_SCAN)) { hdd_debug("EXTScan is supported by firmware"); fset |= WIFI_FEATURE_EXTSCAN | WIFI_FEATURE_HAL_EPNO; @@ -3069,13 +3069,13 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy, #endif fset |= WIFI_FEATURE_ADDITIONAL_STA; #ifdef FEATURE_WLAN_TDLS - cfg_tdls_get_support_enable(hdd_ctx->hdd_psoc, &bvalue); + cfg_tdls_get_support_enable(hdd_ctx->psoc, &bvalue); if ((bvalue) && sme_is_feature_supported_by_fw(TDLS)) { hdd_debug("TDLS is supported by firmware"); fset |= WIFI_FEATURE_TDLS; } - cfg_tdls_get_off_channel_enable(hdd_ctx->hdd_psoc, &bvalue); + cfg_tdls_get_off_channel_enable(hdd_ctx->psoc, &bvalue); if (sme_is_feature_supported_by_fw(TDLS) && bvalue && sme_is_feature_supported_by_fw(TDLS_OFF_CHANNEL)) { hdd_debug("TDLS off-channel is supported by firmware"); @@ -3331,7 +3331,7 @@ __wlan_hdd_cfg80211_get_features(struct wiphy *wiphy, wlan_hdd_cfg80211_set_feature(feature_flags, QCA_WLAN_VENDOR_FEATURE_SUPPORT_HW_MODE_ANY); - if (policy_mgr_is_scan_simultaneous_capable(hdd_ctx->hdd_psoc)) + if (policy_mgr_is_scan_simultaneous_capable(hdd_ctx->psoc)) wlan_hdd_cfg80211_set_feature(feature_flags, QCA_WLAN_VENDOR_FEATURE_OFFCHANNEL_SIMULTANEOUS); @@ -3368,7 +3368,7 @@ __wlan_hdd_cfg80211_get_features(struct wiphy *wiphy, sizeof(feature_flags), feature_flags)) goto nla_put_failure; - ret = policy_mgr_get_dbs_hw_modes(hdd_ctx->hdd_psoc, + ret = policy_mgr_get_dbs_hw_modes(hdd_ctx->psoc, &one_by_one_dbs, &two_by_two_dbs); if (QDF_STATUS_SUCCESS == ret) { if (one_by_one_dbs) @@ -5238,7 +5238,7 @@ static int wlan_hdd_handle_restrict_offchan_config(struct hdd_adapter *adapter, wlan_vdev_mlme_cap_set(adapter->vdev, WLAN_VDEV_C_RESTRICT_OFFCHAN); wlan_vdev_obj_unlock(adapter->vdev); - chan = policy_mgr_get_channel(hdd_ctx->hdd_psoc, pmode, + chan = policy_mgr_get_channel(hdd_ctx->psoc, pmode, &vdev_id); if (!chan || wlan_hdd_send_avoid_freq_for_dnbs(hdd_ctx, chan)) { @@ -5521,7 +5521,7 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy, sme_update_fine_time_measurement_capab(mac_handle, adapter->session_id, hdd_ctx->config->fine_time_meas_cap); - ucfg_wifi_pos_set_ftm_cap(hdd_ctx->hdd_psoc, + ucfg_wifi_pos_set_ftm_cap(hdd_ctx->psoc, hdd_ctx->config->fine_time_meas_cap); hdd_debug("FTM capability: user value: 0x%x, target value: 0x%x, final value: 0x%x", ftm_capab, hdd_ctx->fine_time_meas_cap_target, @@ -7269,7 +7269,7 @@ static int __wlan_hdd_cfg80211_get_preferred_freq_list(struct wiphy *wiphy, hdd_debug("Userspace requested pref freq list"); - status = policy_mgr_get_pcl(hdd_ctx->hdd_psoc, + status = policy_mgr_get_pcl(hdd_ctx->psoc, intf_mode, pcl, &pcl_len, weight_list, QDF_ARRAY_SIZE(weight_list)); if (status != QDF_STATUS_SUCCESS) { @@ -7407,7 +7407,7 @@ static int __wlan_hdd_cfg80211_set_probable_oper_channel(struct wiphy *wiphy, [QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_FREQ])); /* check pcl table */ - if (!policy_mgr_allow_concurrency(hdd_ctx->hdd_psoc, intf_mode, + if (!policy_mgr_allow_concurrency(hdd_ctx->psoc, intf_mode, channel_hint, HW_MODE_20_MHZ)) { hdd_err("Set channel hint failed due to concurrency check"); return -EINVAL; @@ -8227,7 +8227,7 @@ __wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy, } status = policy_mgr_set_sap_mandatory_channels( - hdd_ctx->hdd_psoc, chans, freq_len); + hdd_ctx->psoc, chans, freq_len); if (QDF_IS_STATUS_ERROR(status)) return -EINVAL; } @@ -8456,7 +8456,7 @@ nla_put_failure: #ifdef QCA_SUPPORT_CP_STATS static int wlan_hdd_process_wake_lock_stats(struct hdd_context *hdd_ctx) { - return wlan_cfg80211_mc_cp_stats_get_wakelock_stats(hdd_ctx->hdd_psoc, + return wlan_cfg80211_mc_cp_stats_get_wakelock_stats(hdd_ctx->psoc, hdd_ctx->wiphy); } #else @@ -10711,7 +10711,7 @@ void hdd_bt_activity_cb(hdd_handle_t hdd_handle, uint32_t bt_activity) else return; - ucfg_scan_set_bt_activity(hdd_ctx->hdd_psoc, hdd_ctx->bt_a2dp_active); + ucfg_scan_set_bt_activity(hdd_ctx->psoc, hdd_ctx->bt_a2dp_active); hdd_debug("a2dp_active: %d vo_active: %d", hdd_ctx->bt_a2dp_active, hdd_ctx->bt_vo_active); } @@ -11034,7 +11034,7 @@ int wlan_hdd_send_mode_change_event(void) if (0 != err) return err; - conn_count = policy_mgr_get_connection_info(hdd_ctx->hdd_psoc, info); + conn_count = policy_mgr_get_connection_info(hdd_ctx->psoc, info); if (!conn_count) return -EINVAL; @@ -12313,7 +12313,7 @@ static void wlan_hdd_update_ht_cap(struct hdd_context *hdd_ctx) struct mlme_ht_capabilities_info ht_cap_info = {0}; QDF_STATUS status; - status = ucfg_mlme_get_ht_cap_info(hdd_ctx->hdd_psoc, &ht_cap_info); + status = ucfg_mlme_get_ht_cap_info(hdd_ctx->psoc, &ht_cap_info); if (QDF_STATUS_SUCCESS != status) hdd_err("could not get HT capability info"); @@ -12934,7 +12934,7 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, return -EINVAL; } - if (!policy_mgr_allow_concurrency(hdd_ctx->hdd_psoc, + if (!policy_mgr_allow_concurrency(hdd_ctx->psoc, wlan_hdd_convert_nl_iftype_to_hdd_type(type), 0, HW_MODE_20_MHZ)) { hdd_debug("This concurrency combination is not allowed"); @@ -12945,7 +12945,7 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, wdev = ndev->ieee80211_ptr; /* Reset the current device mode bit mask */ - policy_mgr_clear_concurrency_mode(hdd_ctx->hdd_psoc, + policy_mgr_clear_concurrency_mode(hdd_ctx->psoc, adapter->device_mode); if (!(adapter->device_mode == QDF_P2P_DEVICE_MODE && @@ -13093,7 +13093,7 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, } done: /* Set bitmask based on updated value */ - policy_mgr_set_concurrency_mode(hdd_ctx->hdd_psoc, + policy_mgr_set_concurrency_mode(hdd_ctx->psoc, adapter->device_mode); hdd_lpass_notify_mode_change(adapter); @@ -14538,7 +14538,7 @@ bool wlan_hdd_handle_sap_sta_dfs_conc(struct hdd_adapter *adapter, * find out by looking in to scan cache where sta is going to * connect by passing its roam_profile. */ - status = policy_mgr_get_channel_from_scan_result(hdd_ctx->hdd_psoc, + status = policy_mgr_get_channel_from_scan_result(hdd_ctx->psoc, roam_profile, &channel); /* @@ -14557,9 +14557,9 @@ bool wlan_hdd_handle_sap_sta_dfs_conc(struct hdd_adapter *adapter, * for 3port MCC scenario. */ if (!channel || wlan_reg_is_dfs_ch(hdd_ctx->pdev, channel) || - !policy_mgr_is_safe_channel(hdd_ctx->hdd_psoc, channel)) + !policy_mgr_is_safe_channel(hdd_ctx->psoc, channel)) channel = policy_mgr_get_nondfs_preferred_channel( - hdd_ctx->hdd_psoc, PM_SAP_MODE, true); + hdd_ctx->psoc, PM_SAP_MODE, true); hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter); qdf_event_reset(&hostapd_state->qdf_event); @@ -14696,11 +14696,11 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter, * Else set connect_in_progress as true and proceed. */ policy_mgr_restart_opportunistic_timer( - hdd_ctx->hdd_psoc, false); + hdd_ctx->psoc, false); if (policy_mgr_is_hw_mode_change_in_progress( - hdd_ctx->hdd_psoc)) { + hdd_ctx->psoc)) { qdf_status = policy_mgr_wait_for_connection_update( - hdd_ctx->hdd_psoc); + hdd_ctx->psoc); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("qdf wait for event failed!!"); status = -EINVAL; @@ -14872,7 +14872,7 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter, adapter->scan_info.scan_add_ie.length; } - if ((policy_mgr_is_hw_dbs_capable(hdd_ctx->hdd_psoc) == true) + if ((policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) == true) && (false == wlan_hdd_handle_sap_sta_dfs_conc(adapter, roam_profile))) { hdd_err("sap-sta conc will fail, can't allow sta"); @@ -14962,16 +14962,16 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter, roam_profile->ChannelInfo.numOfChannels = 0; if ((QDF_STA_MODE == adapter->device_mode) - && policy_mgr_is_current_hwmode_dbs(hdd_ctx->hdd_psoc) + && policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc) && !policy_mgr_is_hw_dbs_2x2_capable( - hdd_ctx->hdd_psoc)) { + hdd_ctx->psoc)) { policy_mgr_get_channel_from_scan_result( - hdd_ctx->hdd_psoc, + hdd_ctx->psoc, roam_profile, &channel); hdd_info("Move to single MAC mode(optimization) if applicable"); if (channel) policy_mgr_checkn_update_hw_mode_single_mac_mode( - hdd_ctx->hdd_psoc, channel); + hdd_ctx->psoc, channel); } } else { @@ -16573,7 +16573,7 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy, bool ok = false; if (req->channel->hw_value && policy_mgr_is_chan_ok_for_dnbs( - hdd_ctx->hdd_psoc, + hdd_ctx->psoc, req->channel->hw_value, &ok)) { hdd_warn("Unable to get channel:%d eligibility for DNBS", @@ -16605,7 +16605,7 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy, return -EINVAL; } - if (!policy_mgr_allow_concurrency(hdd_ctx->hdd_psoc, + if (!policy_mgr_allow_concurrency(hdd_ctx->psoc, policy_mgr_convert_device_mode_to_qdf_type( adapter->device_mode), req->channel->hw_value, HW_MODE_20_MHZ)) { @@ -16614,7 +16614,7 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy, goto con_chk_failed; } } else { - if (!policy_mgr_allow_concurrency(hdd_ctx->hdd_psoc, + if (!policy_mgr_allow_concurrency(hdd_ctx->psoc, policy_mgr_convert_device_mode_to_qdf_type( adapter->device_mode), 0, HW_MODE_20_MHZ)) { hdd_warn("This concurrency combination is not allowed"); @@ -17176,17 +17176,17 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy, } } - if (!policy_mgr_allow_concurrency(hdd_ctx->hdd_psoc, + if (!policy_mgr_allow_concurrency(hdd_ctx->psoc, PM_IBSS_MODE, channelNum, HW_MODE_20_MHZ)) { hdd_err("This concurrency combination is not allowed"); return -ECONNREFUSED; } - status = policy_mgr_reset_connection_update(hdd_ctx->hdd_psoc); + status = policy_mgr_reset_connection_update(hdd_ctx->psoc); if (!QDF_IS_STATUS_SUCCESS(status)) hdd_err("qdf_reset_connection_update failed status: %d", status); - status = policy_mgr_current_connections_update(hdd_ctx->hdd_psoc, + status = policy_mgr_current_connections_update(hdd_ctx->psoc, adapter->session_id, channelNum, POLICY_MGR_UPDATE_REASON_JOIN_IBSS); if (QDF_STATUS_E_FAILURE == status) { @@ -17196,7 +17196,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy, if (QDF_STATUS_SUCCESS == status) { status = policy_mgr_wait_for_connection_update( - hdd_ctx->hdd_psoc); + hdd_ctx->psoc); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("qdf wait for event failed!!"); return -EINVAL; @@ -18791,7 +18791,7 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy, qdf_mem_zero(hb_params, sizeof(*hb_params)); qdf_mem_copy(hb_params, buf, buf_len); - status = pmo_ucfg_lphb_config_req(hdd_ctx->hdd_psoc, + status = pmo_ucfg_lphb_config_req(hdd_ctx->psoc, hb_params, (void *)hdd_ctx, wlan_hdd_cfg80211_lphb_ind_handler); if (status != QDF_STATUS_SUCCESS) @@ -19045,11 +19045,11 @@ int wlan_hdd_change_hw_mode_for_given_chnl(struct hdd_adapter *adapter, if (0 != wlan_hdd_validate_context(hdd_ctx)) return -EINVAL; - status = policy_mgr_reset_connection_update(hdd_ctx->hdd_psoc); + status = policy_mgr_reset_connection_update(hdd_ctx->psoc); if (!QDF_IS_STATUS_SUCCESS(status)) hdd_err("clearing event failed"); - status = policy_mgr_current_connections_update(hdd_ctx->hdd_psoc, + status = policy_mgr_current_connections_update(hdd_ctx->psoc, adapter->session_id, channel, reason); switch (status) { case QDF_STATUS_E_FAILURE: @@ -19066,7 +19066,7 @@ int wlan_hdd_change_hw_mode_for_given_chnl(struct hdd_adapter *adapter, * triggered and wait for it to finish. */ status = policy_mgr_wait_for_connection_update( - hdd_ctx->hdd_psoc); + hdd_ctx->psoc); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("ERROR: qdf wait for event failed!!"); return -EINVAL; diff --git a/core/hdd/src/wlan_hdd_conc_ut.c b/core/hdd/src/wlan_hdd_conc_ut.c index becc938aceff..ce3d24340d96 100644 --- a/core/hdd/src/wlan_hdd_conc_ut.c +++ b/core/hdd/src/wlan_hdd_conc_ut.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -211,7 +211,7 @@ void fill_report(struct hdd_context *hdd_ctx, char *title, report[report_idx].status = status; snprintf(report[report_idx].dbs_value, MAX_ALLOWED_CHAR_IN_REPORT, "%s", - policy_mgr_is_hw_dbs_capable(hdd_ctx->hdd_psoc) + policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) ? "enable" : "disable"); snprintf(report[report_idx].system_conf, MAX_ALLOWED_CHAR_IN_REPORT, "%s", @@ -631,7 +631,7 @@ void wlan_hdd_one_connection_scenario(struct hdd_context *hdd_ctx) sme_cbacks.sme_get_valid_channels = sme_get_valid_channels; sme_cbacks.sme_get_nss_for_vdev = sme_get_vdev_type_nss; /* flush the entire table first */ - ret = policy_mgr_psoc_enable(hdd_ctx->hdd_psoc); + ret = policy_mgr_psoc_enable(hdd_ctx->psoc); if (!QDF_IS_STATUS_SUCCESS(ret)) { hdd_err("Policy manager initialization failed"); return; @@ -639,7 +639,7 @@ void wlan_hdd_one_connection_scenario(struct hdd_context *hdd_ctx) for (sub_type = 0; sub_type < PM_MAX_NUM_OF_MODE; sub_type++) { /* validate one connection is created or no */ - if (policy_mgr_get_connection_count(hdd_ctx->hdd_psoc) != 0) { + if (policy_mgr_get_connection_count(hdd_ctx->psoc) != 0) { hdd_err("Test failed - No. of connection is not 0"); return; } @@ -649,7 +649,7 @@ void wlan_hdd_one_connection_scenario(struct hdd_context *hdd_ctx) sub_type, system_pref); /* check PCL value for second connection is correct or no */ - policy_mgr_get_pcl(hdd_ctx->hdd_psoc, sub_type, pcl, &pcl_len, + policy_mgr_get_pcl(hdd_ctx->psoc, sub_type, pcl, &pcl_len, weight_list, QDF_ARRAY_SIZE(weight_list)); status = wlan_hdd_validate_pcl(hdd_ctx, pcl_type, pcl, pcl_len, 0, 0, @@ -691,7 +691,7 @@ void wlan_hdd_two_connections_scenario(struct hdd_context *hdd_ctx, sme_cbacks.sme_get_valid_channels = sme_get_valid_channels; sme_cbacks.sme_get_nss_for_vdev = sme_get_vdev_type_nss; /* flush the entire table first */ - ret = policy_mgr_psoc_enable(hdd_ctx->hdd_psoc); + ret = policy_mgr_psoc_enable(hdd_ctx->psoc); if (!QDF_IS_STATUS_SUCCESS(ret)) { hdd_err("Policy manager initialization failed"); return; @@ -700,12 +700,12 @@ void wlan_hdd_two_connections_scenario(struct hdd_context *hdd_ctx, /* sub_type mapping between HDD and WMA are different */ wlan_hdd_map_subtypes_hdd_wma(&dummy_type, &sub_type); /* add first connection as STA */ - policy_mgr_incr_connection_count_utfw(hdd_ctx->hdd_psoc, + policy_mgr_incr_connection_count_utfw(hdd_ctx->psoc, vdevid, tx_stream, rx_stream, chain_mask, type, dummy_type, channel_id, mac_id); /* validate one connection is created or no */ - if (policy_mgr_get_connection_count(hdd_ctx->hdd_psoc) != 1) { + if (policy_mgr_get_connection_count(hdd_ctx->psoc) != 1) { hdd_err("Test failed - No. of connection is not 1"); return; } @@ -714,7 +714,7 @@ void wlan_hdd_two_connections_scenario(struct hdd_context *hdd_ctx, /* get the PCL value & check the channels accordingly */ second_index = policy_mgr_get_second_connection_pcl_table_index( - hdd_ctx->hdd_psoc); + hdd_ctx->psoc); if (PM_MAX_ONE_CONNECTION_MODE == second_index) { /* not valid combination*/ hdd_err("couldn't find index for 2nd connection pcl table"); @@ -726,9 +726,9 @@ void wlan_hdd_two_connections_scenario(struct hdd_context *hdd_ctx, pcl_type = policy_mgr_get_pcl_from_second_conn_table( second_index, next_sub_type, system_pref, policy_mgr_is_hw_dbs_capable( - hdd_ctx->hdd_psoc)); + hdd_ctx->psoc)); /* check PCL for second connection is correct or no */ - policy_mgr_get_pcl(hdd_ctx->hdd_psoc, + policy_mgr_get_pcl(hdd_ctx->psoc, next_sub_type, pcl, &pcl_len, weight_list, QDF_ARRAY_SIZE(weight_list)); status = wlan_hdd_validate_pcl(hdd_ctx, @@ -797,7 +797,7 @@ void wlan_hdd_three_connections_scenario(struct hdd_context *hdd_ctx, sme_cbacks.sme_get_valid_channels = sme_get_valid_channels; sme_cbacks.sme_get_nss_for_vdev = sme_get_vdev_type_nss; /* flush the entire table first */ - ret = policy_mgr_psoc_enable(hdd_ctx->hdd_psoc); + ret = policy_mgr_psoc_enable(hdd_ctx->psoc); if (!QDF_IS_STATUS_SUCCESS(ret)) { hdd_err("Policy manager initialization failed"); return; @@ -806,11 +806,11 @@ void wlan_hdd_three_connections_scenario(struct hdd_context *hdd_ctx, /* sub_type mapping between HDD and WMA are different */ wlan_hdd_map_subtypes_hdd_wma(&dummy_type_1, &sub_type_1); /* add first connection as STA */ - policy_mgr_incr_connection_count_utfw(hdd_ctx->hdd_psoc, + policy_mgr_incr_connection_count_utfw(hdd_ctx->psoc, vdevid_1, tx_stream_1, rx_stream_1, chain_mask_1, type_1, dummy_type_1, channel_id_1, mac_id_1); /* validate one connection is created or no */ - if (policy_mgr_get_connection_count(hdd_ctx->hdd_psoc) != 1) { + if (policy_mgr_get_connection_count(hdd_ctx->psoc) != 1) { hdd_err("Test fail - No. of connection not 1"); return; } @@ -821,12 +821,12 @@ void wlan_hdd_three_connections_scenario(struct hdd_context *hdd_ctx, /* sub_type mapping between HDD and WMA are different */ wlan_hdd_map_subtypes_hdd_wma(&dummy_type_2, &sub_type_2); - policy_mgr_incr_connection_count_utfw(hdd_ctx->hdd_psoc, + policy_mgr_incr_connection_count_utfw(hdd_ctx->psoc, vdevid_2, tx_stream_2, rx_stream_2, chain_mask_2, type_2, dummy_type_2, channel_id_2, mac_id_2); /* validate two connections are created or no */ - if (policy_mgr_get_connection_count(hdd_ctx->hdd_psoc) + if (policy_mgr_get_connection_count(hdd_ctx->psoc) != 2) { hdd_err("Test fail - No. connection not 2"); return; @@ -835,7 +835,7 @@ void wlan_hdd_three_connections_scenario(struct hdd_context *hdd_ctx, while (next_sub_type < PM_MAX_NUM_OF_MODE) { third_index = policy_mgr_get_third_connection_pcl_table_index( - hdd_ctx->hdd_psoc); + hdd_ctx->psoc); if (PM_MAX_TWO_CONNECTION_MODE == third_index) { /* not valid combination */ @@ -849,8 +849,8 @@ void wlan_hdd_three_connections_scenario(struct hdd_context *hdd_ctx, third_index, next_sub_type, system_pref, policy_mgr_is_hw_dbs_capable( - hdd_ctx->hdd_psoc)); - policy_mgr_get_pcl(hdd_ctx->hdd_psoc, + hdd_ctx->psoc)); + policy_mgr_get_pcl(hdd_ctx->psoc, next_sub_type, pcl, &pcl_len, weight_list, @@ -872,7 +872,7 @@ void wlan_hdd_three_connections_scenario(struct hdd_context *hdd_ctx, next_sub_type++; } /* remove entry to make a room for next iteration */ - policy_mgr_decr_connection_count(hdd_ctx->hdd_psoc, + policy_mgr_decr_connection_count(hdd_ctx->psoc, vdevid_2); } next_sub_type = PM_STA_MODE; diff --git a/core/hdd/src/wlan_hdd_debugfs_offload.c b/core/hdd/src/wlan_hdd_debugfs_offload.c index 3dae3a228603..a2ade38d92b4 100644 --- a/core/hdd/src/wlan_hdd_debugfs_offload.c +++ b/core/hdd/src/wlan_hdd_debugfs_offload.c @@ -69,7 +69,7 @@ wlan_hdd_mc_addr_list_info_debugfs(struct hdd_context *hdd_ctx, return length; } - status = pmo_ucfg_get_mc_addr_list(hdd_ctx->hdd_psoc, + status = pmo_ucfg_get_mc_addr_list(hdd_ctx->psoc, adapter->session_id, &mc_addr_list); if (!QDF_IS_STATUS_SUCCESS(status)) { diff --git a/core/hdd/src/wlan_hdd_disa.c b/core/hdd/src/wlan_hdd_disa.c index b85ccbd8e7cf..374b2e122cff 100644 --- a/core/hdd/src/wlan_hdd_disa.c +++ b/core/hdd/src/wlan_hdd_disa.c @@ -383,7 +383,7 @@ static int hdd_encrypt_decrypt_msg(struct hdd_adapter *adapter, cookie = osif_request_cookie(request); - qdf_status = ucfg_disa_encrypt_decrypt_req(hdd_ctx->hdd_psoc, + qdf_status = ucfg_disa_encrypt_decrypt_req(hdd_ctx->psoc, &context->request, hdd_encrypt_decrypt_msg_cb, cookie);