diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 93571339cb84..309c92d45ea5 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1704,11 +1704,12 @@ struct hdd_cache_channels { /** * struct hdd_context - hdd shared driver and psoc/device context + * @pdev: object manager pdev context * @g_event_flags: a bitmap of hdd_driver_flags */ struct hdd_context { struct wlan_objmgr_psoc *hdd_psoc; - struct wlan_objmgr_pdev *hdd_pdev; + struct wlan_objmgr_pdev *pdev; mac_handle_t mac_handle; struct wiphy *wiphy; qdf_spinlock_t hdd_adapter_lock; diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index b7e0c5b4b822..25a43b69047e 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1709,7 +1709,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, if (ucfg_ipa_is_enabled() && (sta_ctx->conn_info.staId[0] != HDD_WLAN_INVALID_STA_ID)) - ucfg_ipa_wlan_evt(hdd_ctx->hdd_pdev, adapter->dev, + ucfg_ipa_wlan_evt(hdd_ctx->pdev, adapter->dev, adapter->device_mode, sta_ctx->conn_info.staId[0], adapter->session_id, @@ -2868,7 +2868,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, hdd_err("Wrong Staid: %d", roam_info->staId); if (ucfg_ipa_is_enabled()) - ucfg_ipa_wlan_evt(hdd_ctx->hdd_pdev, adapter->dev, + ucfg_ipa_wlan_evt(hdd_ctx->pdev, adapter->dev, adapter->device_mode, roam_info->staId, adapter->session_id, diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 36fb58f894d3..628cb801546b 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1581,7 +1581,7 @@ int wlan_hdd_sap_cfg_dfs_override(struct hdd_adapter *adapter) con_sap_config = &con_sap_adapter->session.ap.sap_config; con_ch = con_sap_adapter->session.ap.operating_channel; - if (!wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, con_ch)) + if (!wlan_reg_is_dfs_ch(hdd_ctx->pdev, con_ch)) return 0; hdd_debug("Only SCC AP-AP DFS Permitted (ch=%d, con_ch=%d)", @@ -1892,10 +1892,10 @@ static int hdd_update_reg_chan_info(struct hdd_adapter *adapter, bw_offset = 1 << BW_40_OFFSET_BIT; else if (sap_config->acs_cfg.ch_width == CH_WIDTH_20MHZ) bw_offset = 1 << BW_20_OFFSET_BIT; - icv->freq = wlan_reg_get_channel_freq(hdd_ctx->hdd_pdev, chan); + icv->freq = wlan_reg_get_channel_freq(hdd_ctx->pdev, chan); icv->ieee_chan_number = chan; icv->max_reg_power = wlan_reg_get_channel_reg_power( - hdd_ctx->hdd_pdev, chan); + hdd_ctx->pdev, chan); /* filling demo values */ icv->max_radio_power = HDD_MAX_TX_POWER; @@ -1908,14 +1908,14 @@ static int hdd_update_reg_chan_info(struct hdd_adapter *adapter, if (WLAN_REG_IS_5GHZ_CH(chan)) { ch_params.ch_width = sap_config->acs_cfg.ch_width; - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, chan, - 0, &ch_params); + wlan_reg_set_channel_params(hdd_ctx->pdev, chan, + 0, &ch_params); icv->vht_center_freq_seg0 = ch_params.center_freq_seg0; icv->vht_center_freq_seg1 = ch_params.center_freq_seg1; } icv->flags = 0; - icv->flags = cds_get_vendor_reg_flags(hdd_ctx->hdd_pdev, chan, + icv->flags = cds_get_vendor_reg_flags(hdd_ctx->pdev, chan, sap_config->acs_cfg.ch_width, sap_config->acs_cfg.is_ht_enabled, sap_config->acs_cfg.is_vht_enabled, @@ -2128,7 +2128,7 @@ static int wlan_hdd_sap_get_valid_channellist(struct hdd_adapter *adapter, uint32_t chan_count; uint8_t i; QDF_STATUS status; - struct wlan_objmgr_pdev *pdev = hdd_ctx->hdd_pdev; + struct wlan_objmgr_pdev *pdev = hdd_ctx->pdev; uint8_t tmp_chan; sap_config = &adapter->session.ap.sap_config; @@ -2634,11 +2634,11 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, skip_etsi13_srd_chan = !hdd_ctx->config->etsi13_srd_chan_in_master_mode && - wlan_reg_is_etsi13_regdmn(hdd_ctx->hdd_pdev); + wlan_reg_is_etsi13_regdmn(hdd_ctx->pdev); if (skip_etsi13_srd_chan) { for (i = 0; i < sap_config->acs_cfg.ch_list_count; i++) { - if (wlan_reg_is_etsi13_srd_chan(hdd_ctx->hdd_pdev, + if (wlan_reg_is_etsi13_srd_chan(hdd_ctx->pdev, sap_config->acs_cfg. ch_list[i])) sap_config->acs_cfg.ch_list[i] = 0; @@ -4073,7 +4073,7 @@ static bool wlan_hdd_check_dfs_channel_for_adapter(struct hdd_context *hdd_ctx, * radios !! */ if (CHANNEL_STATE_DFS == wlan_reg_get_channel_state( - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, ap_ctx->operating_channel)) { hdd_err("SAP running on DFS channel"); return true; @@ -4091,7 +4091,7 @@ static bool wlan_hdd_check_dfs_channel_for_adapter(struct hdd_context *hdd_ctx, */ if (hdd_conn_is_connected(sta_ctx) && (CHANNEL_STATE_DFS == - wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, + wlan_reg_get_channel_state(hdd_ctx->pdev, sta_ctx->conn_info.operationChannel))) { hdd_err("client connected on DFS channel"); return true; @@ -4152,8 +4152,8 @@ int wlan_hdd_enable_dfs_chan_scan(struct hdd_context *hdd_ctx, hdd_abort_mac_scan_all_adapters(hdd_ctx); /* pass dfs channel status to regulatory component */ - status = ucfg_reg_enable_dfs_channels(hdd_ctx->hdd_pdev, - enable_dfs_channels); + status = ucfg_reg_enable_dfs_channels(hdd_ctx->pdev, + enable_dfs_channels); if (QDF_IS_STATUS_ERROR(status)) hdd_err("Failed to %s DFS channels", @@ -8169,10 +8169,10 @@ __wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy, ap_ctx->sap_config.ch_width_orig; ap_ctx->bss_stop_reason = BSS_STOP_DUE_TO_VENDOR_CONFIG_CHAN; - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, - ap_ctx->sap_config.channel, - ap_ctx->sap_config.sec_ch, - &ap_ctx->sap_config.ch_params); + wlan_reg_set_channel_params(hdd_ctx->pdev, + ap_ctx->sap_config.channel, + ap_ctx->sap_config.sec_ch, + &ap_ctx->sap_config.ch_params); hdd_restart_sap(hostapd_adapter); } @@ -11814,7 +11814,7 @@ int wlan_hdd_cfg80211_update_band(struct hdd_context *hdd_ctx, struct wiphy *wip struct ieee80211_supported_band *band = wiphy->bands[i]; channelEnabledState = wlan_reg_get_channel_state( - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, band->channels[j].hw_value); if (HDD_NL80211_BAND_2GHZ == i && @@ -12773,7 +12773,7 @@ static int __wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy, if (!QDF_IS_STATUS_SUCCESS(qdf_ret_status)) ret = -EINVAL; - ucfg_ipa_set_ap_ibss_fwd(hdd_ctx->hdd_pdev, + ucfg_ipa_set_ap_ibss_fwd(hdd_ctx->pdev, adapter->session.ap. disable_intrabss_fwd); } @@ -13203,7 +13203,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, (adapter->device_mode == QDF_P2P_CLIENT_MODE)) { if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) { #if defined(FEATURE_WLAN_TDLS) - ret = wlan_cfg80211_tdls_update_peer(hdd_ctx->hdd_pdev, + ret = wlan_cfg80211_tdls_update_peer(hdd_ctx->pdev, dev, mac, params); #endif } @@ -14435,8 +14435,8 @@ void hdd_select_cbmode(struct hdd_adapter *adapter, uint8_t operationChannel, } /* This call decides required channel bonding mode */ - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, operationChannel, - sec_ch, ch_params); + wlan_reg_set_channel_params(hdd_ctx->pdev, operationChannel, + sec_ch, ch_params); if (adapter->device_mode == QDF_STA_MODE && hdd_ctx->config->enable_change_channel_bandwidth) { @@ -14506,7 +14506,7 @@ bool wlan_hdd_handle_sap_sta_dfs_conc(struct hdd_adapter *adapter, } /* sap is on non-dfs channel, nothing to handle */ - if (!wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, + if (!wlan_reg_is_dfs_ch(hdd_ctx->pdev, hdd_ap_ctx->operating_channel)) { hdd_info("sap is on non-dfs channel, sta is allowed"); return true; @@ -14533,8 +14533,8 @@ bool wlan_hdd_handle_sap_sta_dfs_conc(struct hdd_adapter *adapter, * better move SAP to STA's channel to make scc, so we have room * for 3port MCC scenario. */ - if ((0 == channel) || wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, channel) || - !policy_mgr_is_safe_channel(hdd_ctx->hdd_psoc, channel)) + if (!channel || wlan_reg_is_dfs_ch(hdd_ctx->pdev, channel) || + !policy_mgr_is_safe_channel(hdd_ctx->hdd_psoc, channel)) channel = policy_mgr_get_nondfs_preferred_channel( hdd_ctx->hdd_psoc, PM_SAP_MODE, true); @@ -16827,8 +16827,9 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy, if (ucfg_scan_get_vdev_status(adapter->vdev) != SCAN_NOT_IN_PROGRESS) { hdd_debug("Disconnect is in progress, Aborting Scan"); - wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID, - adapter->session_id, INVALID_SCAN_ID, false); + wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID, + adapter->session_id, INVALID_SCAN_ID, + false); } wlan_hdd_cleanup_remain_on_channel_ctx(adapter); /* First clean up the tdls peers if any */ @@ -17753,7 +17754,7 @@ static int __wlan_hdd_cfg80211_add_station(struct wiphy *wiphy, if (mask & BIT(NL80211_STA_FLAG_TDLS_PEER)) { if (set & BIT(NL80211_STA_FLAG_TDLS_PEER)) - status = wlan_cfg80211_tdls_add_peer(hdd_ctx->hdd_pdev, + status = wlan_cfg80211_tdls_add_peer(hdd_ctx->pdev, dev, mac); } #endif @@ -18685,7 +18686,7 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy, return -EINVAL; } - err = wlan_cfg80211_ftm_testmode_cmd(hdd_ctx->hdd_pdev, + err = wlan_cfg80211_ftm_testmode_cmd(hdd_ctx->pdev, data, len); break; } @@ -19027,8 +19028,8 @@ static int __wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy, else if (chan_num >= 6 && chan_num <= 13) sec_ch = chan_num - 4; } - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, chan_num, - sec_ch, &ch_params); + wlan_reg_set_channel_params(hdd_ctx->pdev, chan_num, + sec_ch, &ch_params); if (wlan_hdd_change_hw_mode_for_given_chnl(adapter, chan_num, POLICY_MGR_UPDATE_REASON_SET_OPER_CHAN)) { hdd_err("Failed to change hw mode"); @@ -19408,7 +19409,7 @@ void wlan_hdd_init_chan_info(struct hdd_context *hdd_ctx) num_5g = QDF_ARRAY_SIZE(hdd_channels_5_ghz); for (; (index - num_2g) < num_5g; index++) { - if (wlan_reg_is_dsrc_chan(hdd_ctx->hdd_pdev, + if (wlan_reg_is_dsrc_chan(hdd_ctx->pdev, hdd_channels_5_ghz[index - num_2g].hw_value)) continue; hdd_ctx->chan_info[index].freq = diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 94f4071d2163..7e54f75e6a80 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1171,7 +1171,7 @@ static int __wlan_hdd_runtime_suspend(struct device *dev) return 0; } - if (ucfg_scan_get_pdev_status(hdd_ctx->hdd_pdev) != + if (ucfg_scan_get_pdev_status(hdd_ctx->pdev) != SCAN_NOT_IN_PROGRESS) { hdd_debug("Scan in progress, ignore runtime suspend"); return -EBUSY; @@ -1552,7 +1552,7 @@ static void wlan_hdd_handle_the_pld_uevent(struct pld_uevent_data *uevent) case PLD_FW_DOWN: qdf_complete_wait_events(); cds_set_target_ready(false); - wlan_cfg80211_cleanup_scan_queue(hdd_ctx->hdd_pdev, NULL); + wlan_cfg80211_cleanup_scan_queue(hdd_ctx->pdev, NULL); break; default: break; diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c index d5595b3319aa..5eca34df5732 100644 --- a/core/hdd/src/wlan_hdd_ext_scan.c +++ b/core/hdd/src/wlan_hdd_ext_scan.c @@ -2336,9 +2336,9 @@ static void hdd_remove_dsrc_channels(struct hdd_context *hdd_ctx, int i; for (i = 0; i < *num_channels; i++) { - if (!wlan_reg_is_dsrc_chan(hdd_ctx->hdd_pdev, + if (!wlan_reg_is_dsrc_chan(hdd_ctx->pdev, wlan_reg_freq_to_chan( - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, chan_list[i]))) { chan_list[num_chan_temp] = chan_list[i]; num_chan_temp++; @@ -2796,7 +2796,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec( req_msg->buckets[bkt_index].channels[j]. chnlClass = 0; if ((wlan_reg_get_channel_state( - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, cds_freq_to_chan(chan_list[j]))) != CHANNEL_STATE_ENABLE) { req_msg->buckets[bkt_index].channels[j]. @@ -2936,7 +2936,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec( req_msg->buckets[bkt_index].channels[j].dwellTimeMs); if ((wlan_reg_get_channel_state( - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, cds_freq_to_chan( req_msg->buckets[bkt_index]. channels[j].channel))) @@ -2952,7 +2952,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec( hdd_debug("New Dwell time %u ms", req_msg->buckets[bkt_index].channels[j].dwellTimeMs); - if ((wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, + if ((wlan_reg_get_channel_state(hdd_ctx->pdev, cds_freq_to_chan( req_msg->buckets[bkt_index]. channels[j].channel))) @@ -2992,7 +2992,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec( hdd_debug("Chnl spec passive %u", req_msg->buckets[bkt_index].channels[j].passive); /* Override scan type if required */ - if ((wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, + if ((wlan_reg_get_channel_state(hdd_ctx->pdev, cds_freq_to_chan( req_msg->buckets[bkt_index]. channels[j].channel))) diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c index d4fb250d4fd2..f7272ebac94b 100644 --- a/core/hdd/src/wlan_hdd_ftm.c +++ b/core/hdd/src/wlan_hdd_ftm.c @@ -104,7 +104,7 @@ static int wlan_hdd_qcmbr_command(struct hdd_adapter *adapter, if (ret) return ret; - ret = wlan_ioctl_ftm_testmode_cmd(hdd_ctx->hdd_pdev, + ret = wlan_ioctl_ftm_testmode_cmd(hdd_ctx->pdev, pqcmbr_data->cmd, pqcmbr_data->buf, pqcmbr_data->length); diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c index eca39e66fe8f..4389c7d76ea6 100644 --- a/core/hdd/src/wlan_hdd_green_ap.c +++ b/core/hdd/src/wlan_hdd_green_ap.c @@ -66,19 +66,19 @@ static int hdd_green_ap_check_enable(struct hdd_context *hdd_ctx, void hdd_green_ap_add_sta(struct hdd_context *hdd_ctx) { - wlan_green_ap_add_sta(hdd_ctx->hdd_pdev); + wlan_green_ap_add_sta(hdd_ctx->pdev); } void hdd_green_ap_del_sta(struct hdd_context *hdd_ctx) { - wlan_green_ap_del_sta(hdd_ctx->hdd_pdev); + wlan_green_ap_del_sta(hdd_ctx->pdev); } int hdd_green_ap_enable_egap(struct hdd_context *hdd_ctx) { QDF_STATUS status; - status = ucfg_green_ap_enable_egap(hdd_ctx->hdd_pdev); + status = ucfg_green_ap_enable_egap(hdd_ctx->pdev); if (QDF_IS_STATUS_ERROR(status)) { hdd_debug("enhance green ap is not enabled, status %d", status); @@ -99,7 +99,7 @@ int hdd_green_ap_update_config(struct hdd_context *hdd_ctx) green_ap_cfg.egap_wait_time = cfg->egap_wait_time; green_ap_cfg.egap_feature_flags = cfg->egap_feature_flag; - status = ucfg_green_ap_update_user_config(hdd_ctx->hdd_pdev, + status = ucfg_green_ap_update_user_config(hdd_ctx->pdev, &green_ap_cfg); if (status != QDF_STATUS_SUCCESS) { hdd_err("failed to update green ap user configuration"); @@ -144,9 +144,9 @@ int hdd_green_ap_start_state_mc(struct hdd_context *hdd_ctx, if (is_session_start) { hdd_debug("Disabling Green AP"); - ucfg_green_ap_set_ps_config(hdd_ctx->hdd_pdev, + ucfg_green_ap_set_ps_config(hdd_ctx->pdev, false); - wlan_green_ap_stop(hdd_ctx->hdd_pdev); + wlan_green_ap_stop(hdd_ctx->pdev); } else { ret = hdd_green_ap_check_enable(hdd_ctx, &enable_green_ap); @@ -154,8 +154,8 @@ int hdd_green_ap_start_state_mc(struct hdd_context *hdd_ctx, if (enable_green_ap) { hdd_debug("Enabling Green AP"); ucfg_green_ap_set_ps_config( - hdd_ctx->hdd_pdev, true); - wlan_green_ap_start(hdd_ctx->hdd_pdev); + hdd_ctx->pdev, true); + wlan_green_ap_start(hdd_ctx->pdev); } } else { hdd_err("Failed to check Green AP enable status"); @@ -171,8 +171,8 @@ int hdd_green_ap_start_state_mc(struct hdd_context *hdd_ctx, if (enable_green_ap) { hdd_debug("Enabling Green AP"); ucfg_green_ap_set_ps_config( - hdd_ctx->hdd_pdev, true); - wlan_green_ap_start(hdd_ctx->hdd_pdev); + hdd_ctx->pdev, true); + wlan_green_ap_start(hdd_ctx->pdev); } } else { hdd_err("Failed to check Green AP enable status"); @@ -180,9 +180,9 @@ int hdd_green_ap_start_state_mc(struct hdd_context *hdd_ctx, } else { if (!num_sap_sessions && !num_p2p_go_sessions) { hdd_debug("Disabling Green AP"); - ucfg_green_ap_set_ps_config(hdd_ctx->hdd_pdev, + ucfg_green_ap_set_ps_config(hdd_ctx->pdev, false); - wlan_green_ap_stop(hdd_ctx->hdd_pdev); + wlan_green_ap_stop(hdd_ctx->pdev); } } break; diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index bff2579d97e1..a270a794a4e8 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -306,8 +306,8 @@ static void hdd_hostapd_channel_allow_suspend(struct hdd_adapter *adapter, if (hostapd_state->bss_state == BSS_STOP) return; - if (CHANNEL_STATE_DFS != wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, - channel)) + if (wlan_reg_get_channel_state(hdd_ctx->pdev, channel) != + CHANNEL_STATE_DFS) return; /* Release wakelock when no more DFS channels are used */ @@ -345,8 +345,8 @@ static void hdd_hostapd_channel_prevent_suspend(struct hdd_adapter *adapter, (atomic_read(&hdd_ctx->sap_dfs_ref_cnt) >= 1)) return; - if (CHANNEL_STATE_DFS != wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, - channel)) + if (wlan_reg_get_channel_state(hdd_ctx->pdev, channel) != + CHANNEL_STATE_DFS) return; /* Acquire wakelock if we have at least one DFS channel in use */ @@ -1659,7 +1659,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, sap_config->ch_params.ch_width = pSapEvent->sapevt.sapStartBssCompleteEvent.ch_width; - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, + wlan_reg_set_channel_params(hdd_ctx->pdev, sap_config->channel, 0, &sap_config->ch_params); @@ -1677,16 +1677,16 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, wlansap_get_dfs_ignore_cac(mac_handle, &ignoreCAC); /* DFS requirement: DO NOT transmit during CAC. */ - if ((CHANNEL_STATE_DFS != - wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, - ap_ctx->operating_channel)) + if (CHANNEL_STATE_DFS != + wlan_reg_get_channel_state(hdd_ctx->pdev, + ap_ctx->operating_channel) || ignoreCAC || hdd_ctx->dev_dfs_cac_status == DFS_CAC_ALREADY_DONE) ap_ctx->dfs_cac_block_tx = false; else ap_ctx->dfs_cac_block_tx = true; - ucfg_ipa_set_dfs_cac_tx(hdd_ctx->hdd_pdev, + ucfg_ipa_set_dfs_cac_tx(hdd_ctx->pdev, ap_ctx->dfs_cac_block_tx); hdd_debug("The value of dfs_cac_block_tx[%d] for ApCtx[%pK]:%d", @@ -1732,12 +1732,13 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, } if (ucfg_ipa_is_enabled()) { - status = ucfg_ipa_wlan_evt(hdd_ctx->hdd_pdev, - adapter->dev, adapter->device_mode, - ap_ctx->broadcast_sta_id, - adapter->session_id, - WLAN_IPA_AP_CONNECT, - adapter->dev->dev_addr); + status = ucfg_ipa_wlan_evt(hdd_ctx->pdev, + adapter->dev, + adapter->device_mode, + ap_ctx->broadcast_sta_id, + adapter->session_id, + WLAN_IPA_AP_CONNECT, + adapter->dev->dev_addr); if (status) hdd_err("WLAN_AP_CONNECT event failed"); } @@ -1902,7 +1903,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, &dfs_info, sizeof(struct wlan_dfs_info)); ap_ctx->dfs_cac_block_tx = false; - ucfg_ipa_set_dfs_cac_tx(hdd_ctx->hdd_pdev, + ucfg_ipa_set_dfs_cac_tx(hdd_ctx->pdev, ap_ctx->dfs_cac_block_tx); hdd_ctx->dev_dfs_cac_status = DFS_CAC_ALREADY_DONE; if (QDF_STATUS_SUCCESS != @@ -1957,7 +1958,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, hdd_send_conditional_chan_switch_status(hdd_ctx, &adapter->wdev, true); ap_ctx->dfs_cac_block_tx = false; - ucfg_ipa_set_dfs_cac_tx(hdd_ctx->hdd_pdev, + ucfg_ipa_set_dfs_cac_tx(hdd_ctx->pdev, ap_ctx->dfs_cac_block_tx); hdd_ctx->dev_dfs_cac_status = DFS_CAC_ALREADY_DONE; @@ -2085,7 +2086,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, adapter->sta_info[staId].ecsa_capable = event->ecsa_capable; if (ucfg_ipa_is_enabled()) { - status = ucfg_ipa_wlan_evt(hdd_ctx->hdd_pdev, + status = ucfg_ipa_wlan_evt(hdd_ctx->pdev, adapter->dev, adapter->device_mode, event->staId, @@ -2162,8 +2163,9 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, /* Lets abort scan to ensure smooth authentication for client */ if (ucfg_scan_get_vdev_status(adapter->vdev) != SCAN_NOT_IN_PROGRESS) { - wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID, - adapter->session_id, INVALID_SCAN_ID, false); + wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID, + adapter->session_id, INVALID_SCAN_ID, + false); } if (adapter->device_mode == QDF_P2P_GO_MODE) { /* send peer status indication to oem app */ @@ -2403,7 +2405,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pSapEvent->sapevt.sap_ch_selected.vht_seg0_center_ch; sap_ch_param.center_freq_seg1 = pSapEvent->sapevt.sap_ch_selected.vht_seg1_center_ch; - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, + wlan_reg_set_channel_params(hdd_ctx->pdev, pSapEvent->sapevt.sap_ch_selected.pri_ch, pSapEvent->sapevt.sap_ch_selected.ht_sec_ch, &sap_ch_param); @@ -2529,9 +2531,9 @@ stopbss: hdd_warn("hdd_softap_stop_bss failed %d", qdf_status); if (ucfg_ipa_is_enabled()) { - ucfg_ipa_uc_disconnect_ap(hdd_ctx->hdd_pdev, + ucfg_ipa_uc_disconnect_ap(hdd_ctx->pdev, adapter->dev); - ucfg_ipa_cleanup_dev_iface(hdd_ctx->hdd_pdev, + ucfg_ipa_cleanup_dev_iface(hdd_ctx->pdev, adapter->dev); } } @@ -2932,10 +2934,10 @@ sap_restart: hdd_ap_ctx->sap_config.ch_params.ch_width = CH_WIDTH_MAX; hdd_ap_ctx->bss_stop_reason = BSS_STOP_DUE_TO_MCC_SCC_SWITCH; - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, - hdd_ap_ctx->sap_config.channel, - hdd_ap_ctx->sap_config.sec_ch, - &hdd_ap_ctx->sap_config.ch_params); + wlan_reg_set_channel_params(hdd_ctx->pdev, + hdd_ap_ctx->sap_config.channel, + hdd_ap_ctx->sap_config.sec_ch, + &hdd_ap_ctx->sap_config.ch_params); *channel = hdd_ap_ctx->sap_config.channel; *sec_ch = hdd_ap_ctx->sap_config.sec_ch; @@ -4348,7 +4350,7 @@ int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx, for (i = 0; i < cache_chann->num_channels; i++) { freq = reg_chan_to_freq( - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, cache_chann->channel_info[i].channel_num); if (!freq) continue; @@ -4368,9 +4370,9 @@ int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx, qdf_mutex_release(&hdd_ctx->cache_channel_lock); if (notify_sap_event) - ucfg_reg_notify_sap_event(hdd_ctx->hdd_pdev, false); + ucfg_reg_notify_sap_event(hdd_ctx->pdev, false); else - ucfg_reg_restore_cached_channels(hdd_ctx->hdd_pdev); + ucfg_reg_restore_cached_channels(hdd_ctx->pdev); status = sme_update_channel_list(hdd_ctx->mac_handle); if (status) hdd_err("Can't Restore channel list"); @@ -4419,7 +4421,7 @@ static int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx) } for (i = 0; i < cache_chann->num_channels; i++) { - freq = reg_chan_to_freq(hdd_ctx->hdd_pdev, + freq = reg_chan_to_freq(hdd_ctx->pdev, cache_chann-> channel_info[i].channel_num); if (!freq) @@ -4434,7 +4436,7 @@ static int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx) */ cache_chann->channel_info[i].reg_status = reg_get_channel_state( - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, rf_channel); cache_chann->channel_info[i].wiphy_status = wiphy_channel->flags; @@ -4447,7 +4449,7 @@ static int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx) } qdf_mutex_release(&hdd_ctx->cache_channel_lock); - status = ucfg_reg_notify_sap_event(hdd_ctx->hdd_pdev, true); + status = ucfg_reg_notify_sap_event(hdd_ctx->pdev, true); status = sme_update_channel_list(hdd_ctx->mac_handle); hdd_exit(); @@ -4667,8 +4669,8 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, pConfig->ieee80211d = 1; qdf_mem_copy(pConfig->countryCode, &pIe[2], 3); - status = ucfg_reg_set_country(hdd_ctx->hdd_pdev, - pConfig->countryCode); + status = ucfg_reg_set_country(hdd_ctx->pdev, + pConfig->countryCode); if (QDF_IS_STATUS_ERROR(status)) { hdd_err("Failed to set country"); pConfig->ieee80211d = 0; @@ -4680,16 +4682,11 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, } ret = wlan_hdd_sap_cfg_dfs_override(adapter); - if (ret < 0) { + if (ret < 0) goto error; - } else { - if (ret == 0) { - if (wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, - pConfig->channel)) - hdd_ctx->dev_dfs_cac_status = - DFS_CAC_NEVER_DONE; - } - } + + if (!ret && wlan_reg_is_dfs_ch(hdd_ctx->pdev, pConfig->channel)) + hdd_ctx->dev_dfs_cac_status = DFS_CAC_NEVER_DONE; if (QDF_STATUS_SUCCESS != wlan_hdd_validate_operation_channel(adapter, @@ -4702,7 +4699,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, /* reject SAP if DFS channel scan is not allowed */ if (!(hdd_ctx->config->enableDFSChnlScan) && (CHANNEL_STATE_DFS == - wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, + wlan_reg_get_channel_state(hdd_ctx->pdev, pConfig->channel))) { hdd_err("No SAP start on DFS channel"); ret = -EOPNOTSUPP; @@ -5005,7 +5002,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, } pConfig->ch_params.ch_width = pConfig->ch_width_orig; - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, pConfig->channel, + wlan_reg_set_channel_params(hdd_ctx->pdev, pConfig->channel, pConfig->sec_ch, &pConfig->ch_params); /* ht_capab is not what the name conveys, @@ -5621,13 +5618,13 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, /* if sta_sap_scc_on_dfs_chan ini is set, DFS master capability is * assumed disabled in the driver. */ - if ((reg_get_channel_state(hdd_ctx->hdd_pdev, channel) == + if ((reg_get_channel_state(hdd_ctx->pdev, channel) == CHANNEL_STATE_DFS) && sta_sap_scc_on_dfs_chan && !sta_cnt) { hdd_err("SAP not allowed on DFS channel!!"); return -EINVAL; } - if (!reg_is_etsi13_srd_chan_allowed_master_mode(hdd_ctx->hdd_pdev) && - reg_is_etsi13_srd_chan(hdd_ctx->hdd_pdev, channel)) { + if (!reg_is_etsi13_srd_chan_allowed_master_mode(hdd_ctx->pdev) && + reg_is_etsi13_srd_chan(hdd_ctx->pdev, channel)) { hdd_err("SAP not allowed on SRD channel."); return -EINVAL; } @@ -5637,7 +5634,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, tsap_config_t *sap_cfg = &adapter->session.ap.sap_config; if (CHANNEL_STATE_DFS == wlan_reg_get_channel_state( - hdd_ctx->hdd_pdev, channel)) { + hdd_ctx->pdev, channel)) { hdd_err("Can't start SAP-DFS (channel=%d)with sub 20 MHz ch wd", channel); return -EINVAL; @@ -5652,11 +5649,11 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, sub_20_ch_width = CH_WIDTH_10MHZ; if (WLAN_REG_IS_5GHZ_CH(channel)) ch_state = wlan_reg_get_5g_bonded_channel_state( - hdd_ctx->hdd_pdev, channel, + hdd_ctx->pdev, channel, sub_20_ch_width); else ch_state = wlan_reg_get_2g_bonded_channel_state( - hdd_ctx->hdd_pdev, channel, + hdd_ctx->pdev, channel, sub_20_ch_width, 0); if (CHANNEL_STATE_DISABLE == ch_state) { hdd_err("Given ch width not supported by reg domain"); diff --git a/core/hdd/src/wlan_hdd_hostapd_wext.c b/core/hdd/src/wlan_hdd_hostapd_wext.c index ec5ef36976e8..0d04a1441ed5 100644 --- a/core/hdd/src/wlan_hdd_hostapd_wext.c +++ b/core/hdd/src/wlan_hdd_hostapd_wext.c @@ -956,7 +956,7 @@ static __iw_softap_setparam(struct net_device *dev, hdd_debug("Set QCASAP_SET_RADAR_CMD val %d", set_value); - pdev = hdd_ctx->hdd_pdev; + pdev = hdd_ctx->pdev; if (!pdev) { hdd_err("null pdev"); return -EINVAL; @@ -1004,16 +1004,16 @@ static __iw_softap_setparam(struct net_device *dev, /* If input value is non-zero get stats */ switch (set_value) { case 1: - ucfg_ipa_uc_stat(hdd_ctx->hdd_pdev); + ucfg_ipa_uc_stat(hdd_ctx->pdev); break; case 2: - ucfg_ipa_uc_info(hdd_ctx->hdd_pdev); + ucfg_ipa_uc_info(hdd_ctx->pdev); break; case 3: - ucfg_ipa_uc_rt_debug_host_dump(hdd_ctx->hdd_pdev); + ucfg_ipa_uc_rt_debug_host_dump(hdd_ctx->pdev); break; case 4: - ucfg_ipa_dump_info(hdd_ctx->hdd_pdev); + ucfg_ipa_dump_info(hdd_ctx->pdev); break; default: /* place holder for stats clean up @@ -1332,7 +1332,7 @@ static __iw_softap_getparam(struct net_device *dev, struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); struct wlan_objmgr_pdev *pdev; - pdev = hdd_ctx->hdd_pdev; + pdev = hdd_ctx->pdev; if (!pdev) { hdd_err("null pdev"); return -EINVAL; @@ -2014,10 +2014,10 @@ static int __iw_get_channel_list(struct net_device *dev, for (i = band_start_channel; i <= band_end_channel; i++) { if ((CHANNEL_STATE_ENABLE == - wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, + wlan_reg_get_channel_state(hdd_ctx->pdev, WLAN_REG_CH_NUM(i))) || (is_dfs_mode_enabled && CHANNEL_STATE_DFS == - wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, + wlan_reg_get_channel_state(hdd_ctx->pdev, WLAN_REG_CH_NUM(i)))) { channel_list->channels[num_channels] = WLAN_REG_CH_NUM(i); diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 1854ef789749..b3a4519a6a5e 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -6147,7 +6147,7 @@ static int drv_cmd_tdls_off_channel(struct hdd_adapter *adapter, if (ret != 1) return -EINVAL; - if (wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, set_value)) { + if (wlan_reg_is_dfs_ch(hdd_ctx->pdev, set_value)) { hdd_err("DFS channel %d is passed for hdd_set_tdls_offchannel", set_value); return -EINVAL; @@ -6822,8 +6822,7 @@ static int drv_cmd_set_fcc_channel(struct hdd_adapter *adapter, return err; } - status = ucfg_reg_set_fcc_constraint(hdd_ctx->hdd_pdev, - fcc_constraint); + status = ucfg_reg_set_fcc_constraint(hdd_ctx->pdev, fcc_constraint); if (QDF_IS_STATUS_ERROR(status)) hdd_err("Failed to %s tx power for channels 12/13", @@ -7158,7 +7157,7 @@ static int hdd_parse_disable_chan_cmd(struct hdd_adapter *adapter, uint8_t *ptr) parsed_channels[j]; /* Cache the channel list in regulatory also */ - ucfg_reg_cache_channel_state(hdd_ctx->hdd_pdev, parsed_channels, + ucfg_reg_cache_channel_state(hdd_ctx->pdev, parsed_channels, num_channels); } else { for (i = 0; i < num_channels; i++) { diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 21e10f1d8fd4..b6e99af13936 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -458,5 +458,5 @@ void hdd_ipa_set_mcc_mode(bool mcc_mode) return; } - ucfg_ipa_set_mcc_mode(hdd_ctx->hdd_pdev, mcc_mode); + ucfg_ipa_set_mcc_mode(hdd_ctx->pdev, mcc_mode); } diff --git a/core/hdd/src/wlan_hdd_lpass.c b/core/hdd/src/wlan_hdd_lpass.c index c2aaca743aff..6c3b2ed8abc0 100644 --- a/core/hdd/src/wlan_hdd_lpass.c +++ b/core/hdd/src/wlan_hdd_lpass.c @@ -56,7 +56,7 @@ static void wlan_hdd_get_channel_info(struct hdd_context *hdd_ctx, chan_info->band_center_freq2 = 0; chan_info->info = 0; if (CHANNEL_STATE_DFS == - wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, + wlan_reg_get_channel_state(hdd_ctx->pdev, chan_id)) WMI_SET_CHANNEL_FLAG(chan_info, WMI_CHAN_FLAG_DFS); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d047065c3644..a2ae6cdf67ed 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -440,10 +440,10 @@ static int hdd_get_valid_chan(struct hdd_context *hdd_ctx, struct regulatory_channel *cur_chan_list; struct wlan_objmgr_pdev *pdev; - if (!hdd_ctx || !hdd_ctx->hdd_pdev || !chan_list || !chan_num) + if (!hdd_ctx || !hdd_ctx->pdev || !chan_list || !chan_num) return -EINVAL; - pdev = hdd_ctx->hdd_pdev; + pdev = hdd_ctx->pdev; cur_chan_list = qdf_mem_malloc(NUM_CHANNELS * sizeof(struct regulatory_channel)); if (!cur_chan_list) @@ -663,8 +663,9 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb, case NETDEV_GOING_DOWN: if (ucfg_scan_get_vdev_status(adapter->vdev) != SCAN_NOT_IN_PROGRESS) { - wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID, - adapter->session_id, INVALID_SCAN_ID, true); + wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID, + adapter->session_id, INVALID_SCAN_ID, + true); } cds_flush_work(&adapter->scan_block_work); /* Need to clean up blocked scan request */ @@ -676,7 +677,7 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb, * flag after which driver does not send the cfg80211_scan_done. * Ensure to cleanup the scan queue in NETDEV_GOING_DOWN */ - wlan_cfg80211_cleanup_scan_queue(hdd_ctx->hdd_pdev, dev); + wlan_cfg80211_cleanup_scan_queue(hdd_ctx->pdev, dev); break; default: @@ -1074,7 +1075,7 @@ static void hdd_runtime_suspend_context_init(struct hdd_context *hdd_ctx) qdf_runtime_lock_init(&ctx->dfs); qdf_runtime_lock_init(&ctx->connect); - wlan_scan_runtime_pm_init(hdd_ctx->hdd_pdev); + wlan_scan_runtime_pm_init(hdd_ctx->pdev); } /** @@ -1090,7 +1091,7 @@ static void hdd_runtime_suspend_context_deinit(struct hdd_context *hdd_ctx) qdf_runtime_lock_deinit(&ctx->dfs); qdf_runtime_lock_deinit(&ctx->connect); - wlan_scan_runtime_pm_deinit(hdd_ctx->hdd_pdev); + wlan_scan_runtime_pm_deinit(hdd_ctx->pdev); } #else /* FEATURE_RUNTIME_PM */ @@ -1905,9 +1906,9 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg) } hdd_debug("New pdev has been created with pdev_id = %u", - hdd_ctx->hdd_pdev->pdev_objmgr.wlan_pdev_id); + hdd_ctx->pdev->pdev_objmgr.wlan_pdev_id); - status = dispatcher_pdev_open(hdd_ctx->hdd_pdev); + status = dispatcher_pdev_open(hdd_ctx->pdev); if (QDF_IS_STATUS_ERROR(status)) { QDF_DEBUG_PANIC("dispatcher pdev open failed; status:%d", status); @@ -1916,9 +1917,9 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg) cdp_pdev_set_ctrl_pdev(cds_get_context(QDF_MODULE_ID_SOC), cds_get_context(QDF_MODULE_ID_TXRX), - (struct cdp_ctrl_objmgr_pdev *)hdd_ctx->hdd_pdev); + (struct cdp_ctrl_objmgr_pdev *)hdd_ctx->pdev); - wlan_pdev_set_dp_handle(hdd_ctx->hdd_pdev, + wlan_pdev_set_dp_handle(hdd_ctx->pdev, cds_get_context(QDF_MODULE_ID_TXRX)); hdd_objmgr_update_tgt_max_vdev_psoc(hdd_ctx, cfg->max_intf_count); @@ -1929,9 +1930,9 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg) cds_get_context(QDF_MODULE_ID_SOC)); ucfg_ipa_set_txrx_handle(hdd_ctx->hdd_psoc, cds_get_context(QDF_MODULE_ID_TXRX)); - ucfg_ipa_reg_sap_xmit_cb(hdd_ctx->hdd_pdev, + ucfg_ipa_reg_sap_xmit_cb(hdd_ctx->pdev, hdd_softap_hard_start_xmit); - ucfg_ipa_reg_send_to_nw_cb(hdd_ctx->hdd_pdev, + ucfg_ipa_reg_send_to_nw_cb(hdd_ctx->pdev, hdd_ipa_send_skb_to_network); if (cds_cfg) { @@ -2121,7 +2122,7 @@ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx) if ((QDF_SAP_MODE == adapter->device_mode || QDF_P2P_GO_MODE == adapter->device_mode) && - (wlan_reg_is_passive_or_disable_ch(hdd_ctx->hdd_pdev, + (wlan_reg_is_passive_or_disable_ch(hdd_ctx->pdev, ap_ctx->operating_channel))) { WLAN_HDD_GET_AP_CTX_PTR(adapter)->dfs_cac_block_tx = true; @@ -3002,7 +3003,7 @@ cds_txrx_free: if (tgt_hdl && target_psoc_get_wmi_ready(tgt_hdl)) { hdd_runtime_suspend_context_deinit(hdd_ctx); - dispatcher_pdev_close(hdd_ctx->hdd_pdev); + dispatcher_pdev_close(hdd_ctx->pdev); hdd_objmgr_release_and_destroy_pdev(hdd_ctx); } @@ -4061,7 +4062,7 @@ int hdd_vdev_create(struct hdd_adapter *adapter, /* do vdev create via objmgr */ hdd_ctx = WLAN_HDD_GET_CTX(adapter); - errno = hdd_objmgr_create_and_store_vdev(hdd_ctx->hdd_pdev, adapter); + errno = hdd_objmgr_create_and_store_vdev(hdd_ctx->pdev, adapter); if (errno) { hdd_err("failed to create objmgr vdev: %d", errno); return errno; @@ -5237,7 +5238,7 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx, #endif if (adapter->device_mode == QDF_STA_MODE) - wlan_cfg80211_sched_scan_stop(hdd_ctx->hdd_pdev, + wlan_cfg80211_sched_scan_stop(hdd_ctx->pdev, adapter->dev); if (wlan_hdd_try_disconnect(adapter)) { @@ -5265,7 +5266,7 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx, if (sap_config) wlansap_reset_sap_config_add_ie(sap_config, eUPDATE_IE_ALL); - ucfg_ipa_flush(hdd_ctx->hdd_pdev); + ucfg_ipa_flush(hdd_ctx->pdev); if (!(flag & HDD_IN_CAC_WORK_TH_CONTEXT)) cds_flush_work(&hdd_ctx->sap_pre_cac_work); /* fallthrough */ @@ -5431,8 +5432,8 @@ static void hdd_reset_scan_operation(struct hdd_context *hdd_ctx, wlan_hdd_scan_abort(adapter); wlan_hdd_cleanup_remain_on_channel_ctx(adapter); if (adapter->device_mode == QDF_STA_MODE) - wlan_cfg80211_sched_scan_stop(hdd_ctx->hdd_pdev, - adapter->dev); + wlan_cfg80211_sched_scan_stop(hdd_ctx->pdev, + adapter->dev); break; case QDF_P2P_GO_MODE: wlan_hdd_cleanup_remain_on_channel_ctx(adapter); @@ -6145,7 +6146,7 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan, QDF_MAC_ADDR_SIZE); ch_params.ch_width = bandwidth; - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, chan, 0, &ch_params); + wlan_reg_set_channel_params(hdd_ctx->pdev, chan, 0, &ch_params); if (ch_params.ch_width == CH_WIDTH_INVALID) { hdd_err("Invalid capture channel or bandwidth for a country"); return -EINVAL; @@ -6622,7 +6623,7 @@ QDF_STATUS hdd_abort_mac_scan_all_adapters(struct hdd_context *hdd_ctx) adapter->device_mode == QDF_P2P_DEVICE_MODE || adapter->device_mode == QDF_SAP_MODE || adapter->device_mode == QDF_P2P_GO_MODE) { - wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID, + wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID, adapter->session_id, INVALID_SCAN_ID, true); } @@ -7019,7 +7020,7 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx) */ hdd_set_idle_ps_config(hdd_ctx, false); /* clear the scan queue in all the scenarios */ - wlan_cfg80211_cleanup_scan_queue(hdd_ctx->hdd_pdev, NULL); + wlan_cfg80211_cleanup_scan_queue(hdd_ctx->pdev, NULL); if (driver_status != DRIVER_MODULES_CLOSED) { hdd_unregister_wext_all_adapters(hdd_ctx); @@ -7691,9 +7692,9 @@ static void __hdd_bus_bw_work_handler(struct work_struct *work) tx_packets += fwd_tx_packets_diff; rx_packets += fwd_rx_packets_diff; - if (ucfg_ipa_is_fw_wdi_activated(hdd_ctx->hdd_pdev)) { - ucfg_ipa_uc_stat_query(hdd_ctx->hdd_pdev, &ipa_tx_packets, - &ipa_rx_packets); + if (ucfg_ipa_is_fw_wdi_activated(hdd_ctx->pdev)) { + ucfg_ipa_uc_stat_query(hdd_ctx->pdev, &ipa_tx_packets, + &ipa_rx_packets); tx_packets += (uint64_t)ipa_tx_packets; rx_packets += (uint64_t)ipa_rx_packets; @@ -7702,8 +7703,8 @@ static void __hdd_bus_bw_work_handler(struct work_struct *work) con_sap_adapter->stats.rx_packets += ipa_rx_packets; } - ucfg_ipa_set_perf_level(hdd_ctx->hdd_pdev, tx_packets, rx_packets); - ucfg_ipa_uc_stat_request(hdd_ctx->hdd_pdev, 2); + ucfg_ipa_set_perf_level(hdd_ctx->pdev, tx_packets, rx_packets); + ucfg_ipa_uc_stat_request(hdd_ctx->pdev, 2); } hdd_pld_request_bus_bandwidth(hdd_ctx, tx_packets, rx_packets); @@ -8204,10 +8205,10 @@ static void hdd_set_thermal_level_cb(hdd_handle_t hdd_handle, u_int8_t level) /* Change IPA to SW path when throttle level greater than 0 */ if (level > THROTTLE_LEVEL_0) - ucfg_ipa_send_mcc_scc_msg(hdd_ctx->hdd_pdev, true); + ucfg_ipa_send_mcc_scc_msg(hdd_ctx->pdev, true); else /* restore original concurrency mode */ - ucfg_ipa_send_mcc_scc_msg(hdd_ctx->hdd_pdev, hdd_ctx->mcc_mode); + ucfg_ipa_send_mcc_scc_msg(hdd_ctx->pdev, hdd_ctx->mcc_mode); } /** @@ -8410,10 +8411,10 @@ void hdd_switch_sap_channel(struct hdd_adapter *adapter, uint8_t channel, hdd_debug("chan:%d width:%d", channel, hdd_ap_ctx->sap_config.ch_width_orig); - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, - hdd_ap_ctx->sap_config.channel, - hdd_ap_ctx->sap_config.sec_ch, - &hdd_ap_ctx->sap_config.ch_params); + wlan_reg_set_channel_params(hdd_ctx->pdev, + hdd_ap_ctx->sap_config.channel, + hdd_ap_ctx->sap_config.sec_ch, + &hdd_ap_ctx->sap_config.ch_params); policy_mgr_change_sap_channel_with_csa(hdd_ctx->hdd_psoc, adapter->session_id, channel, @@ -10805,8 +10806,8 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx) * IPA module before configuring them to FW. Sequence required as crash * observed otherwise. */ - if (ucfg_ipa_uc_ol_init(hdd_ctx->hdd_pdev, - cds_get_context(QDF_MODULE_ID_QDF_DEVICE))) { + if (ucfg_ipa_uc_ol_init(hdd_ctx->pdev, + cds_get_context(QDF_MODULE_ID_QDF_DEVICE))) { hdd_err("Failed to setup pipes"); goto out; } @@ -10914,7 +10915,7 @@ static int hdd_deconfigure_cds(struct hdd_context *hdd_ctx) ret = -EINVAL; } - if (ucfg_ipa_uc_ol_deinit(hdd_ctx->hdd_pdev) != QDF_STATUS_SUCCESS) { + if (ucfg_ipa_uc_ol_deinit(hdd_ctx->pdev) != QDF_STATUS_SUCCESS) { hdd_err("Failed to disconnect pipes"); ret = -EINVAL; } @@ -11064,7 +11065,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) } hdd_component_psoc_close(hdd_ctx->hdd_psoc); - dispatcher_pdev_close(hdd_ctx->hdd_pdev); + dispatcher_pdev_close(hdd_ctx->pdev); ret = hdd_objmgr_release_and_destroy_pdev(hdd_ctx); if (ret) { hdd_err("Failed to destroy pdev; errno:%d", ret); @@ -12080,7 +12081,7 @@ void hdd_bus_bw_compute_timer_try_start(struct hdd_context *hdd_ctx) static void __hdd_bus_bw_compute_timer_stop(struct hdd_context *hdd_ctx) { - ucfg_ipa_set_perf_level(hdd_ctx->hdd_pdev, 0, 0); + ucfg_ipa_set_perf_level(hdd_ctx->pdev, 0, 0); qdf_spinlock_acquire(&hdd_ctx->bus_bw_timer_lock); hdd_ctx->bus_bw_timer_running = false; @@ -12277,7 +12278,7 @@ void wlan_hdd_start_sap(struct hdd_adapter *ap_adapter, bool reinit) hdd_err("SAP Not able to set AP IEs"); goto end; } - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, + wlan_reg_set_channel_params(hdd_ctx->pdev, hdd_ap_ctx->sap_config.channel, 0, &hdd_ap_ctx->sap_config.ch_params); @@ -13035,7 +13036,7 @@ static void hdd_stop_present_mode(struct hdd_context *hdd_ctx, case QDF_GLOBAL_MISSION_MODE: case QDF_GLOBAL_FTM_MODE: hdd_abort_mac_scan_all_adapters(hdd_ctx); - wlan_cfg80211_cleanup_scan_queue(hdd_ctx->hdd_pdev, NULL); + wlan_cfg80211_cleanup_scan_queue(hdd_ctx->pdev, NULL); hdd_stop_all_adapters(hdd_ctx); break; @@ -14174,17 +14175,17 @@ void hdd_check_and_restart_sap_with_non_dfs_acs(void) } ap_adapter = hdd_get_adapter(hdd_ctx, QDF_SAP_MODE); - if (ap_adapter != NULL && test_bit(SOFTAP_BSS_STARTED, - &ap_adapter->event_flags) && - wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, - ap_adapter->session.ap.operating_channel)) { + if (ap_adapter && + test_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags) && + wlan_reg_is_dfs_ch(hdd_ctx->pdev, + ap_adapter->session.ap.operating_channel)) { hdd_warn("STA-AP Mode DFS not supported, Switch SAP channel to Non DFS"); restart_chan = hdd_get_safe_channel_from_pcl_and_acs_range(ap_adapter); if (!restart_chan || - wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, restart_chan)) + wlan_reg_is_dfs_ch(hdd_ctx->pdev, restart_chan)) restart_chan = SAP_DEFAULT_5GHZ_CHANNEL; hdd_switch_sap_channel(ap_adapter, restart_chan, true); @@ -14411,7 +14412,7 @@ void hdd_pld_ipa_uc_shutdown_pipes(void) if (!hdd_ctx) return; - ucfg_ipa_uc_force_pipe_shutdown(hdd_ctx->hdd_pdev); + ucfg_ipa_uc_force_pipe_shutdown(hdd_ctx->pdev); } /** diff --git a/core/hdd/src/wlan_hdd_object_manager.c b/core/hdd/src/wlan_hdd_object_manager.c index 6190c70f923a..e554b58e84c8 100644 --- a/core/hdd/src/wlan_hdd_object_manager.c +++ b/core/hdd/src/wlan_hdd_object_manager.c @@ -38,8 +38,8 @@ static void hdd_init_pdev_os_priv(struct hdd_context *hdd_ctx, /* Initialize the OS private structure*/ os_priv->wiphy = hdd_ctx->wiphy; os_priv->legacy_osif_priv = hdd_ctx; - wlan_cfg80211_scan_priv_init(hdd_ctx->hdd_pdev); - os_if_spectral_netlink_init(hdd_ctx->hdd_pdev); + wlan_cfg80211_scan_priv_init(hdd_ctx->pdev); + os_if_spectral_netlink_init(hdd_ctx->pdev); } static void hdd_deinit_pdev_os_priv(struct wlan_objmgr_pdev *pdev) @@ -197,8 +197,8 @@ int hdd_objmgr_create_and_store_pdev(struct hdd_context *hdd_ctx) goto pdev_destroy; } - hdd_ctx->hdd_pdev = pdev; - sme_store_pdev(hdd_ctx->mac_handle, hdd_ctx->hdd_pdev); + hdd_ctx->pdev = pdev; + sme_store_pdev(hdd_ctx->mac_handle, hdd_ctx->pdev); hdd_init_pdev_os_priv(hdd_ctx, priv); return 0; @@ -213,10 +213,10 @@ free_priv: int hdd_objmgr_release_and_destroy_pdev(struct hdd_context *hdd_ctx) { QDF_STATUS status; - struct wlan_objmgr_pdev *pdev = hdd_ctx->hdd_pdev; + struct wlan_objmgr_pdev *pdev = hdd_ctx->pdev; struct pdev_osif_priv *osif_priv; - hdd_ctx->hdd_pdev = NULL; + hdd_ctx->pdev = NULL; QDF_BUG(pdev); if (!pdev) diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c index 71568679980e..f105f3e26c98 100644 --- a/core/hdd/src/wlan_hdd_ocb.c +++ b/core/hdd/src/wlan_hdd_ocb.c @@ -2036,7 +2036,7 @@ void wlan_hdd_dcc_register_for_dcc_stats_event(struct hdd_context *hdd_ctx) { int rc; - rc = ucfg_ocb_register_for_dcc_stats_event(hdd_ctx->hdd_pdev, hdd_ctx, + rc = ucfg_ocb_register_for_dcc_stats_event(hdd_ctx->pdev, hdd_ctx, wlan_hdd_dcc_stats_event_callback); if (rc) hdd_err("Register DCC stats callback failed: %d", rc); diff --git a/core/hdd/src/wlan_hdd_oemdata.c b/core/hdd/src/wlan_hdd_oemdata.c index 97587e69f7f5..40f32e20f382 100644 --- a/core/hdd/src/wlan_hdd_oemdata.c +++ b/core/hdd/src/wlan_hdd_oemdata.c @@ -396,8 +396,7 @@ void hdd_update_channel_bw_info(struct hdd_context *hdd_ctx, /* Passing CH_WIDTH_MAX will give the max bandwidth supported */ ch_params.ch_width = CH_WIDTH_MAX; - wlan_reg_set_channel_params(hdd_ctx->hdd_pdev, chan, - sec_ch_2g, &ch_params); + wlan_reg_set_channel_params(hdd_ctx->pdev, chan, sec_ch_2g, &ch_params); if (ch_params.center_freq_seg0) hdd_chan_info->band_center_freq1 = cds_chan_to_freq(ch_params.center_freq_seg0); @@ -494,8 +493,7 @@ static int oem_process_channel_info_req_msg(int numOfChannels, char *chanList) hddChanInfo.info = 0; if (CHANNEL_STATE_DFS == - wlan_reg_get_channel_state(p_hdd_ctx->hdd_pdev, - chanId)) + wlan_reg_get_channel_state(p_hdd_ctx->pdev, chanId)) WMI_SET_CHANNEL_FLAG(&hddChanInfo, WMI_CHAN_FLAG_DFS); diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 65f377a4cb41..6b35d250d06d 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -658,8 +658,9 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy, if (adapter && !wlan_hdd_validate_session_id(adapter->session_id)) { if (ucfg_scan_get_vdev_status(adapter->vdev) != SCAN_NOT_IN_PROGRESS) { - wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID, - adapter->session_id, INVALID_SCAN_ID, false); + wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID, + adapter->session_id, INVALID_SCAN_ID, + false); hdd_debug("Abort Scan while adding virtual interface"); } } diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 393fbfd804fa..ca4e8fa7c145 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1150,7 +1150,7 @@ static int hdd_resume_wlan(void) status = hdd_disable_default_pkt_filters(adapter); } - ucfg_ipa_resume(hdd_ctx->hdd_pdev); + ucfg_ipa_resume(hdd_ctx->pdev); status = pmo_ucfg_psoc_user_space_resume_req(hdd_ctx->hdd_psoc, QDF_SYSTEM_SUSPEND); if (QDF_IS_STATUS_ERROR(status)) @@ -1695,7 +1695,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, return -EAGAIN; } - wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID, + wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID, adapter->session_id, INVALID_SCAN_ID, false); } @@ -1711,7 +1711,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, * Suspend IPA early before proceeding to suspend other entities like * firmware to avoid any race conditions. */ - if (ucfg_ipa_suspend(hdd_ctx->hdd_pdev)) { + if (ucfg_ipa_suspend(hdd_ctx->pdev)) { hdd_err("IPA not ready to suspend!"); wlan_hdd_inc_suspend_stats(hdd_ctx, SUSPEND_FAIL_IPA); return -EAGAIN; diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index 041928ea5870..6c377c7c95e2 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -388,7 +388,7 @@ static void hdd_modify_wiphy(struct wiphy *wiphy, static void hdd_set_dfs_region(struct hdd_context *hdd_ctx, enum dfs_reg dfs_reg) { - wlan_reg_set_dfs_region(hdd_ctx->hdd_pdev, dfs_reg); + wlan_reg_set_dfs_region(hdd_ctx->pdev, dfs_reg); } #endif @@ -544,7 +544,7 @@ static int hdd_regulatory_init_no_offload(struct hdd_context *hdd_ctx, cds_fill_and_send_ctl_to_fw(reg_info); - wlan_reg_get_dfs_region(hdd_ctx->hdd_pdev, &dfs_reg); + wlan_reg_get_dfs_region(hdd_ctx->pdev, &dfs_reg); reg_program_config_vars(hdd_ctx, &config_vars); ucfg_reg_set_config_vars(hdd_ctx->hdd_psoc, config_vars); @@ -650,8 +650,8 @@ void hdd_update_indoor_channel(struct hdd_context *hdd_ctx, } /* Notify the regulatory domain to update the channel list */ - if (QDF_IS_STATUS_ERROR(ucfg_reg_notify_sap_event(hdd_ctx->hdd_pdev, - disable))) { + if (QDF_IS_STATUS_ERROR(ucfg_reg_notify_sap_event(hdd_ctx->pdev, + disable))) { hdd_err("Failed to notify sap event"); } hdd_exit(); @@ -692,7 +692,7 @@ int hdd_reg_set_country(struct hdd_context *hdd_ctx, char *country_code) return -EINVAL; } - status = ucfg_reg_set_country(hdd_ctx->hdd_pdev, country_code); + status = ucfg_reg_set_country(hdd_ctx->pdev, country_code); if (QDF_IS_STATUS_ERROR(status)) hdd_err("Failed to set country"); @@ -743,8 +743,8 @@ int hdd_reg_set_band(struct net_device *dev, u8 ui_band) band = hdd_ctx->config->nBandCapability; } - if (QDF_STATUS_SUCCESS != ucfg_reg_get_curr_band(hdd_ctx->hdd_pdev, - &currBand)) { + if (ucfg_reg_get_curr_band(hdd_ctx->pdev, &currBand) != + QDF_STATUS_SUCCESS) { hdd_debug("Failed to get current band config"); return -EIO; } @@ -763,7 +763,7 @@ int hdd_reg_set_band(struct net_device *dev, u8 ui_band) mac_handle = hdd_ctx->mac_handle; hdd_for_each_adapter(hdd_ctx, adapter) { - wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID, + wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID, adapter->session_id, INVALID_SCAN_ID, false); connectedBand = hdd_conn_get_connected_band( WLAN_HDD_GET_STATION_CTX_PTR(adapter)); @@ -812,7 +812,7 @@ int hdd_reg_set_band(struct net_device *dev, u8 ui_band) sme_scan_flush_result(mac_handle); } - if (QDF_IS_STATUS_ERROR(ucfg_reg_set_band(hdd_ctx->hdd_pdev, band))) { + if (QDF_IS_STATUS_ERROR(ucfg_reg_set_band(hdd_ctx->pdev, band))) { hdd_err("Failed to set the band value to %u", band); return -EINVAL; } @@ -909,7 +909,7 @@ void hdd_reg_notifier(struct wiphy *wiphy, case NL80211_REGDOM_SET_BY_USER: qdf_mem_copy(country, request->alpha2, QDF_MIN( sizeof(request->alpha2), sizeof(country))); - status = ucfg_reg_set_country(hdd_ctx->hdd_pdev, country); + status = ucfg_reg_set_country(hdd_ctx->pdev, country); break; case NL80211_REGDOM_SET_BY_CORE: case NL80211_REGDOM_SET_BY_COUNTRY_IE: @@ -1023,7 +1023,7 @@ void hdd_reg_notifier(struct wiphy *wiphy, cds_fill_and_send_ctl_to_fw(&hdd_ctx->reg); hdd_set_dfs_region(hdd_ctx, request->dfs_region); - wlan_reg_get_dfs_region(hdd_ctx->hdd_pdev, &dfs_reg); + wlan_reg_get_dfs_region(hdd_ctx->pdev, &dfs_reg); reg_program_config_vars(hdd_ctx, &config_vars); ucfg_reg_set_config_vars(hdd_ctx->hdd_psoc, config_vars); @@ -1239,7 +1239,7 @@ void hdd_send_wiphy_regd_sync_event(struct hdd_context *hdd_ctx) hdd_err("hdd_ctx is NULL"); return; } - reg_rules = ucfg_reg_get_regd_rules(hdd_ctx->hdd_pdev); + reg_rules = ucfg_reg_get_regd_rules(hdd_ctx->pdev); if (!reg_rules) { hdd_err("reg_rules is NULL"); return; @@ -1366,7 +1366,7 @@ int hdd_regulatory_init(struct hdd_context *hdd_ctx, struct wiphy *wiphy) hdd_debug("regulatory offload_enabled %d", offload_enabled); if (offload_enabled) { hdd_ctx->reg_offload = true; - ucfg_reg_get_current_chan_list(hdd_ctx->hdd_pdev, + ucfg_reg_get_current_chan_list(hdd_ctx->pdev, cur_chan_list); fill_wiphy_band_channels(wiphy, cur_chan_list, NL80211_BAND_2GHZ); @@ -1378,7 +1378,7 @@ int hdd_regulatory_init(struct hdd_context *hdd_ctx, struct wiphy *wiphy) sme_set_cc_src(hdd_ctx->mac_handle, cc_src); } else { hdd_ctx->reg_offload = false; - ucfg_reg_program_default_cc(hdd_ctx->hdd_pdev, + ucfg_reg_program_default_cc(hdd_ctx->pdev, hdd_ctx->reg.reg_domain); } diff --git a/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c b/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c index 60274d27c8d8..e2003693f881 100644 --- a/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c +++ b/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c @@ -123,7 +123,7 @@ static int wlan_hdd_validate_and_get_pre_cac_ch(struct hdd_context *hdd_ctx, pcl_weights, weight_len); for (i = 0; i < len; i++) { - if (wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, + if (wlan_reg_is_dfs_ch(hdd_ctx->pdev, channel_list[i])) { *pre_cac_chan = channel_list[i]; break; @@ -140,7 +140,7 @@ static int wlan_hdd_validate_and_get_pre_cac_ch(struct hdd_context *hdd_ctx, */ mac_handle = hdd_ctx->mac_handle; if (!sme_is_channel_valid(mac_handle, channel) || - !wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, channel)) { + !wlan_reg_is_dfs_ch(hdd_ctx->pdev, channel)) { hdd_err("Invalid channel for pre cac:%d", channel); return -EINVAL; } @@ -204,7 +204,7 @@ int wlan_hdd_request_pre_cac(uint8_t channel) return -EINVAL; } - if (wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, + if (wlan_reg_is_dfs_ch(hdd_ctx->pdev, hdd_ap_ctx->operating_channel)) { hdd_err("SAP is already on DFS channel:%d", hdd_ap_ctx->operating_channel); diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 77733d4ef535..eead8ba54c6f 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -524,7 +524,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, con_sap_adapter->session.ap.operating_channel; if (!policy_mgr_is_hw_dbs_capable(hdd_ctx->hdd_psoc) && - wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, con_dfs_ch) && + wlan_reg_is_dfs_ch(hdd_ctx->pdev, con_dfs_ch) && !policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan( hdd_ctx->hdd_psoc)) { /* Provide empty scan result during DFS operation since @@ -658,7 +658,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, !qdf_mem_cmp(&request->ssids[0], "DIRECT-", 7)) ucfg_p2p_status_scan(adapter->vdev); - status = wlan_cfg80211_scan(hdd_ctx->hdd_pdev, request, ¶ms); + status = wlan_cfg80211_scan(hdd_ctx->pdev, request, ¶ms); if (params.default_ie.ptr) qdf_mem_free(params.default_ie.ptr); hdd_exit(); @@ -1189,7 +1189,7 @@ static int __wlan_hdd_vendor_abort_scan( if (0 != ret) return ret; - wlan_vendor_abort_scan(hdd_ctx->hdd_pdev, data, data_len); + wlan_vendor_abort_scan(hdd_ctx->pdev, data, data_len); return ret; } @@ -1231,7 +1231,7 @@ int wlan_hdd_scan_abort(struct hdd_adapter *adapter) { struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID, + wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID, adapter->session_id, INVALID_SCAN_ID, true); return 0; @@ -1289,7 +1289,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, return -EBUSY; } - return wlan_cfg80211_sched_scan_start(hdd_ctx->hdd_pdev, dev, request, + return wlan_cfg80211_sched_scan_start(hdd_ctx->pdev, dev, request, hdd_ctx->config->scan_backoff_multiplier); } @@ -1340,7 +1340,7 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev) return -EINVAL; } - return wlan_cfg80211_sched_scan_stop(hdd_ctx->hdd_pdev, dev); + return wlan_cfg80211_sched_scan_stop(hdd_ctx->pdev, dev); } /** @@ -1464,7 +1464,7 @@ static void __wlan_hdd_cfg80211_abort_scan(struct wiphy *wiphy, if (ret) return; - wlan_cfg80211_abort_scan(hdd_ctx->hdd_pdev); + wlan_cfg80211_abort_scan(hdd_ctx->pdev); hdd_exit(); } diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 2a36b90d8abc..6fe917fc459b 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -979,7 +979,7 @@ QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter, if (adapter->sta_info[sta_id].in_use) { if (ucfg_ipa_is_enabled()) { - if (ucfg_ipa_wlan_evt(hdd_ctx->hdd_pdev, adapter->dev, + if (ucfg_ipa_wlan_evt(hdd_ctx->pdev, adapter->dev, adapter->device_mode, adapter->sta_info[sta_id].sta_id, adapter->session_id, @@ -1184,12 +1184,14 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter) } if (ucfg_ipa_is_enabled()) { - if (ucfg_ipa_wlan_evt(hdd_ctx->hdd_pdev, - adapter->dev, adapter->device_mode, - ap_ctx->broadcast_sta_id, - adapter->session_id, - WLAN_IPA_AP_DISCONNECT, - adapter->dev->dev_addr) != QDF_STATUS_SUCCESS) + if (ucfg_ipa_wlan_evt(hdd_ctx->pdev, + adapter->dev, + adapter->device_mode, + ap_ctx->broadcast_sta_id, + adapter->session_id, + WLAN_IPA_AP_DISCONNECT, + adapter->dev->dev_addr) != + QDF_STATUS_SUCCESS) hdd_err("WLAN_AP_DISCONNECT event failed"); } diff --git a/core/hdd/src/wlan_hdd_spectralscan.c b/core/hdd/src/wlan_hdd_spectralscan.c index fd20bdbf2434..b5198f4d33fb 100644 --- a/core/hdd/src/wlan_hdd_spectralscan.c +++ b/core/hdd/src/wlan_hdd_spectralscan.c @@ -73,7 +73,7 @@ static int __wlan_hdd_cfg80211_spectral_scan_start(struct wiphy *wiphy, return -EINVAL; ret = wlan_cfg80211_spectral_scan_config_and_start(wiphy, - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, data, data_len); hdd_exit(); @@ -110,8 +110,8 @@ static int __wlan_hdd_cfg80211_spectral_scan_stop(struct wiphy *wiphy, return -EPERM; } - ret = wlan_cfg80211_spectral_scan_stop(wiphy, hdd_ctx->hdd_pdev, - data, data_len); + ret = wlan_cfg80211_spectral_scan_stop(wiphy, hdd_ctx->pdev, + data, data_len); hdd_exit(); return ret; @@ -148,8 +148,8 @@ static int __wlan_hdd_cfg80211_spectral_scan_get_config( return -EPERM; } - ret = wlan_cfg80211_spectral_scan_get_config(wiphy, hdd_ctx->hdd_pdev, - data, data_len); + ret = wlan_cfg80211_spectral_scan_get_config(wiphy, hdd_ctx->pdev, + data, data_len); hdd_exit(); return ret; @@ -187,7 +187,7 @@ static int __wlan_hdd_cfg80211_spectral_scan_get_diag_stats( } ret = wlan_cfg80211_spectral_scan_get_diag_stats(wiphy, - hdd_ctx->hdd_pdev, + hdd_ctx->pdev, data, data_len); hdd_exit(); @@ -225,8 +225,8 @@ static int __wlan_hdd_cfg80211_spectral_scan_get_cap_info( return -EPERM; } - ret = wlan_cfg80211_spectral_scan_get_cap(wiphy, hdd_ctx->hdd_pdev, - data, data_len); + ret = wlan_cfg80211_spectral_scan_get_cap(wiphy, hdd_ctx->pdev, + data, data_len); hdd_exit(); return ret; @@ -264,8 +264,8 @@ static int __wlan_hdd_cfg80211_spectral_scan_get_status( return -EPERM; } - ret = wlan_cfg80211_spectral_scan_get_status(wiphy, hdd_ctx->hdd_pdev, - data, data_len); + ret = wlan_cfg80211_spectral_scan_get_status(wiphy, hdd_ctx->pdev, + data, data_len); hdd_exit(); return ret; @@ -452,8 +452,8 @@ static void __spectral_scan_msg_handler(const void *data, int data_len, hdd_debug("spectral scan application registered, pid=%d", hdd_ctx->sscan_pid); send_spectral_scan_reg_rsp_msg(hdd_ctx); - ucfg_spectral_scan_set_ppid(hdd_ctx->hdd_pdev, - hdd_ctx->sscan_pid); + ucfg_spectral_scan_set_ppid(hdd_ctx->pdev, + hdd_ctx->sscan_pid); break; default: hdd_warn("invalid message type %d", ss_msg->msg_type); diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index c527224aa2d5..e8ff8bd81b69 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -4649,7 +4649,7 @@ static bool wlan_hdd_update_survey_info(struct wiphy *wiphy, hdd_ctx = WLAN_HDD_GET_CTX(adapter); sme_get_operation_channel(hdd_ctx->mac_handle, &channel, adapter->session_id); - opfreq = wlan_reg_chan_to_freq(hdd_ctx->hdd_pdev, channel); + opfreq = wlan_reg_chan_to_freq(hdd_ctx->pdev, channel); mutex_lock(&hdd_ctx->chan_info_lock); diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 03cb99bc167b..c871013a9231 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -474,7 +474,7 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, } if (hdd_ctx->tdls_umac_comp_active) - return wlan_cfg80211_tdls_mgmt(hdd_ctx->hdd_pdev, dev, + return wlan_cfg80211_tdls_mgmt(hdd_ctx->pdev, dev, peer, action_code, dialog_token, status_code, peer_capability, @@ -662,7 +662,7 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy, return status; if (hdd_ctx->tdls_umac_comp_active) { - status = wlan_cfg80211_tdls_oper(hdd_ctx->hdd_pdev, + status = wlan_cfg80211_tdls_oper(hdd_ctx->pdev, dev, peer, oper); hdd_exit(); return status; diff --git a/core/hdd/src/wlan_hdd_twt.c b/core/hdd/src/wlan_hdd_twt.c index daa1e383800a..2f4ac715f65f 100644 --- a/core/hdd/src/wlan_hdd_twt.c +++ b/core/hdd/src/wlan_hdd_twt.c @@ -56,7 +56,7 @@ void hdd_update_tgt_twt_cap(struct hdd_context *hdd_ctx, void hdd_send_twt_enable_cmd(struct hdd_context *hdd_ctx) { - uint8_t pdev_id = hdd_ctx->hdd_pdev->pdev_objmgr.wlan_pdev_id; + uint8_t pdev_id = hdd_ctx->pdev->pdev_objmgr.wlan_pdev_id; uint32_t req_val = 0, resp_val = 0, bcast_val = 0; uint32_t congestion_timeout = hdd_ctx->config->twt_congestion_timeout; diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index a4899d304e05..37910336f7ec 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -8588,8 +8588,9 @@ static int __iw_set_pno(struct net_device *dev, if (0 != ret) return ret; - vdev = wlan_objmgr_get_vdev_by_macaddr_from_pdev(hdd_ctx->hdd_pdev, - dev->dev_addr, WLAN_LEGACY_MAC_ID); + vdev = wlan_objmgr_get_vdev_by_macaddr_from_pdev(hdd_ctx->pdev, + dev->dev_addr, + WLAN_LEGACY_MAC_ID); if (!vdev) { hdd_err("vdev object is NULL"); return -EIO; @@ -8785,9 +8786,9 @@ static int __iw_set_pno(struct net_device *dev, ptr += offset; req.fast_scan_max_cycles = value; - wlan_pdev_obj_lock(hdd_ctx->hdd_pdev); - psoc = wlan_pdev_get_psoc(hdd_ctx->hdd_pdev); - wlan_pdev_obj_unlock(hdd_ctx->hdd_pdev); + wlan_pdev_obj_lock(hdd_ctx->pdev); + psoc = wlan_pdev_get_psoc(hdd_ctx->pdev); + wlan_pdev_obj_unlock(hdd_ctx->pdev); ucfg_scan_register_pno_cb(psoc, found_pref_network_cb, NULL);