mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacld-3.0: Use wlan_reg_set_channel_params_for_freq for SAP
Use wlan_reg_set_channel_params_for_freq to update SAP channel parameters. The "freq" version API can handle 6GHz channel properly. Change-Id: I519de47d4ec1fa1351b120f2faa9f23de1064493 CRs-Fixed: 2536568
This commit is contained in:
parent
a22d72328a
commit
8ffc0cc3ec
3 changed files with 17 additions and 20 deletions
|
|
@ -5523,13 +5523,9 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|||
}
|
||||
|
||||
config->ch_params.ch_width = config->ch_width_orig;
|
||||
wlan_reg_set_channel_params(hdd_ctx->pdev,
|
||||
wlan_reg_freq_to_chan(hdd_ctx->pdev,
|
||||
config->chan_freq),
|
||||
wlan_reg_freq_to_chan(hdd_ctx->pdev,
|
||||
config->sec_ch_freq),
|
||||
&config->ch_params);
|
||||
|
||||
wlan_reg_set_channel_params_for_freq(hdd_ctx->pdev, config->chan_freq,
|
||||
config->sec_ch_freq,
|
||||
&config->ch_params);
|
||||
if (0 != wlan_hdd_cfg80211_update_apies(adapter)) {
|
||||
hdd_err("SAP Not able to set AP IEs");
|
||||
ret = -EINVAL;
|
||||
|
|
|
|||
|
|
@ -13493,11 +13493,10 @@ 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->pdev,
|
||||
wlan_reg_freq_to_chan(hdd_ctx->pdev,
|
||||
hdd_ap_ctx->sap_config.chan_freq),
|
||||
0,
|
||||
&hdd_ap_ctx->sap_config.ch_params);
|
||||
wlan_reg_set_channel_params_for_freq(
|
||||
hdd_ctx->pdev,
|
||||
hdd_ap_ctx->sap_config.chan_freq,
|
||||
0, &hdd_ap_ctx->sap_config.ch_params);
|
||||
|
||||
qdf_event_reset(&hostapd_state->qdf_event);
|
||||
if (wlansap_start_bss(hdd_ap_ctx->sap_context, hdd_hostapd_sap_event_cb,
|
||||
|
|
|
|||
|
|
@ -795,8 +795,9 @@ sap_validate_chan(struct sap_context *sap_context,
|
|||
con_ch);
|
||||
sap_context->chan_freq = wlan_reg_chan_to_freq(
|
||||
mac_ctx->pdev, con_ch);
|
||||
wlan_reg_set_channel_params(mac_ctx->pdev,
|
||||
con_ch, 0,
|
||||
wlan_reg_set_channel_params_for_freq(
|
||||
mac_ctx->pdev,
|
||||
sap_context->chan_freq, 0,
|
||||
&sap_context->ch_params);
|
||||
}
|
||||
}
|
||||
|
|
@ -2172,10 +2173,10 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
|
|||
sap_ctx->chan_freq, ch);
|
||||
|
||||
sap_ctx->chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev, ch);
|
||||
wlan_reg_set_channel_params(mac_ctx->pdev, ch,
|
||||
wlan_reg_freq_to_chan(mac_ctx->pdev,
|
||||
sap_ctx->sec_ch_freq),
|
||||
&sap_ctx->ch_params);
|
||||
wlan_reg_set_channel_params_for_freq(mac_ctx->pdev,
|
||||
sap_ctx->chan_freq,
|
||||
sap_ctx->sec_ch_freq,
|
||||
&sap_ctx->ch_params);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2199,8 +2200,9 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
|
|||
WLAN_REG_IS_5GHZ_CH_FREQ(sap_ctx->chan_freq)) &&
|
||||
con_ch && wlan_reg_is_dfs_ch(mac_ctx->pdev, con_ch)) {
|
||||
sap_ctx->chan_freq = con_ch_freq;
|
||||
wlan_reg_set_channel_params(mac_ctx->pdev,
|
||||
con_ch, 0,
|
||||
wlan_reg_set_channel_params_for_freq(
|
||||
mac_ctx->pdev,
|
||||
con_ch_freq, 0,
|
||||
&sap_ctx->ch_params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue