qcacld-3.0: Introduce getband vendor command

Update calls from reg_get_curr_band to reg_get_band since
they provide the same functionality.
Update calls to reg_get_band to expect a bitmap since the API
has been updated.
Update getband driver command to convert the bitmap to the
old values. Also add the new vendor command getband.

Change-Id: I069489ebf4826f8f4bfcb974b74e4d0591d5b33f
CRs-fixed: 2726361
This commit is contained in:
Lincoln Tran
2020-07-02 16:59:28 -07:00
کامیت شده توسط snandini
والد d189dc8105
کامیت d5e1f78aa8
6فایلهای تغییر یافته به همراه124 افزوده شده و 11 حذف شده

مشاهده پرونده

@@ -3004,14 +3004,14 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx)
return 0;
}
if (ucfg_reg_get_curr_band(mac->pdev, &band) != QDF_STATUS_SUCCESS) {
if (ucfg_reg_get_band(mac->pdev, &band) != QDF_STATUS_SUCCESS) {
sap_err("Failed to get current band config");
return 0;
}
sap_band = wlan_reg_freq_to_band(sap_ctx->chan_freq);
sap_debug("SAP/Go current band: %d, pdev band capability: %d",
sap_band, band);
if (sap_band == REG_BAND_5G && band == BAND_2G) {
if (sap_band == REG_BAND_5G && band == BIT(REG_BAND_2G)) {
sap_ctx->chan_freq_before_switch_band = sap_ctx->chan_freq;
sap_ctx->chan_width_before_switch_band =
sap_ctx->ch_params.ch_width;
@@ -3027,8 +3027,7 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx)
sap_debug("set 40M when switch SAP to 2G");
restart_ch_width = CH_WIDTH_40MHZ;
}
} else if (sap_band == REG_BAND_2G &&
(band == BAND_ALL || band == BAND_5G)) {
} else if (sap_band == REG_BAND_2G && (band & BIT(REG_BAND_5G))) {
if (sap_ctx->chan_freq_before_switch_band == 0)
return 0;
restart_freq = sap_ctx->chan_freq_before_switch_band;