qcacld-3.0: Bring up SAP in VLP if country supports VLP
In STA+SAP concurrency, if the STA is connected in indoor power, and if the country/channel supports VLP, then bringup the SAP in VLP. Move the STA to VLP as well. Restore the power of the STA, when the SAP is disconnected. Add changes to: a) Decide the power type for the concurrency during start bss, stop bss, change channel request calls of the SAP interface. b) Allow the 6 GHz SCC channel in ACS computation if the channel supports VLP power or if the channel is indoor and enabled. Change-Id: I151e2e3e8910a406bb5c1526f4f01715854d173f CRs-Fixed: 3268100
This commit is contained in:

committad av
Madan Koyyalamudi

förälder
1051484cb6
incheckning
538f94a3fa
@@ -3008,6 +3008,57 @@ static void sap_validate_chanmode_and_chwidth(struct mac_context *mac_ctx,
|
||||
orig_phymode, sap_ctx->phyMode);
|
||||
}
|
||||
|
||||
static bool
|
||||
wlansap_is_power_change_required(struct mac_context *mac_ctx,
|
||||
qdf_freq_t sap_freq)
|
||||
{
|
||||
struct wlan_objmgr_vdev *sta_vdev;
|
||||
uint8_t sta_vdev_id;
|
||||
enum hw_mode_bandwidth ch_wd;
|
||||
uint8_t country[CDS_COUNTRY_CODE_LEN + 1];
|
||||
enum channel_state state;
|
||||
uint32_t ap_pwr_type_6g = 0;
|
||||
bool indoor_ch_support = false;
|
||||
|
||||
if (!mac_ctx || !mac_ctx->psoc || !mac_ctx->pdev)
|
||||
return false;
|
||||
|
||||
if (!policy_mgr_is_sta_present_on_freq(mac_ctx->psoc, &sta_vdev_id,
|
||||
sap_freq, &ch_wd)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sta_vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc,
|
||||
sta_vdev_id,
|
||||
WLAN_LEGACY_SAP_ID);
|
||||
if (!sta_vdev)
|
||||
return false;
|
||||
|
||||
ap_pwr_type_6g = wlan_mlme_get_6g_ap_power_type(sta_vdev);
|
||||
|
||||
wlan_objmgr_vdev_release_ref(sta_vdev, WLAN_LEGACY_SAP_ID);
|
||||
|
||||
if (ap_pwr_type_6g == REG_VERY_LOW_POWER_AP)
|
||||
return false;
|
||||
ucfg_mlme_get_indoor_channel_support(mac_ctx->psoc, &indoor_ch_support);
|
||||
|
||||
if (ap_pwr_type_6g == REG_INDOOR_AP && indoor_ch_support) {
|
||||
sap_debug("STA is connected to Indoor AP and indoor concurrency is supported");
|
||||
return false;
|
||||
}
|
||||
|
||||
wlan_reg_read_current_country(mac_ctx->psoc, country);
|
||||
if (!wlan_reg_ctry_support_vlp(country)) {
|
||||
sap_debug("Device country doesn't support VLP");
|
||||
return false;
|
||||
}
|
||||
|
||||
state = wlan_reg_get_channel_state_for_pwrmode(mac_ctx->pdev,
|
||||
sap_freq, REG_AP_VLP);
|
||||
|
||||
return state & CHANNEL_STATE_ENABLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* sap_goto_starting() - Trigger softap start
|
||||
* @sap_ctx: SAP context
|
||||
@@ -3042,6 +3093,9 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
|
||||
} else if (!policy_mgr_get_ap_6ghz_capable(mac_ctx->psoc,
|
||||
sap_ctx->sessionId, NULL)) {
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
} else if (wlansap_is_power_change_required(mac_ctx,
|
||||
sap_ctx->chan_freq)) {
|
||||
wlan_set_tpc_update_required_for_sta(sap_ctx->vdev, true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Referens i nytt ärende
Block a user