qcacld-3.0: Add frequency in struct sSirMacChanInfo

As part of 6GHz regulatory update, channel numbers are
getting updated to corresponding frequencies, in this
update add frequency element in struct sSirMacChanInfo.

Change-Id: I1a18111a2b073164677b32fb6febc947df043bf2
CRs-Fixed: 2500361
This commit is contained in:
Ashish Kumar Dhanotiya
2019-07-25 21:16:49 +05:30
committed by nshrivas
parent 74c6ef5913
commit b0f0364ca5
3 changed files with 26 additions and 4 deletions

View File

@@ -981,6 +981,7 @@ typedef struct sSirMacCfParamSetIE {
typedef struct sSirMacChanInfo {
tSirMacChanNum firstChanNum;
uint32_t first_freq;
uint8_t numChannels;
int8_t maxTxPower;
} qdf_packed tSirMacChanInfo;

View File

@@ -2860,6 +2860,10 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
index++) {
pChanInfo->firstChanNum =
ps11dinfo->ChnPower[index].firstChannel;
pChanInfo->first_freq =
wlan_reg_chan_to_freq(
mac->pdev,
pChanInfo->firstChanNum);
pChanInfo->numChannels =
ps11dinfo->ChnPower[index].numChannels;
pChanInfo->maxTxPower =
@@ -2923,6 +2927,10 @@ QDF_STATUS csr_init_channel_power_list(struct mac_context *mac,
index++) {
pChanInfo->firstChanNum =
ps11dinfo->ChnPower[index].firstChannel;
pChanInfo->first_freq =
wlan_reg_chan_to_freq(
mac->pdev,
pChanInfo->firstChanNum);
pChanInfo->numChannels =
ps11dinfo->ChnPower[index].numChannels;
pChanInfo->maxTxPower =

View File

@@ -832,6 +832,9 @@ void csr_save_channel_power_for_band(struct mac_context *mac, bool fill_5f)
chan_info->firstChanNum =
mac->scan.defaultPowerTable[idx].chan_num;
chan_info->first_freq =
wlan_reg_chan_to_freq(mac->pdev,
chan_info->firstChanNum);
chan_info->numChannels = 1;
chan_info->maxTxPower =
QDF_MIN(mac->scan.defaultPowerTable[idx].tx_power,
@@ -1535,9 +1538,14 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
ch_pwr_set->firstChanNum = (tSirMacChanNum)
(ch_set->firstChannel + (idx *
ch_set->interChannelOffset));
ch_pwr_set->first_freq =
wlan_reg_chan_to_freq(
mac->pdev,
ch_pwr_set->firstChanNum);
sme_debug(
"Setting Channel Number %d",
ch_pwr_set->firstChanNum);
"Setting Channel Num %d and freq %d",
ch_pwr_set->firstChanNum,
ch_pwr_set->first_freq);
ch_pwr_set->numChannels = 1;
ch_pwr_set->maxTxPower =
QDF_MIN(ch_set->txPower,
@@ -1560,8 +1568,13 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
break;
}
ch_pwr_set->firstChanNum = ch_set->firstChannel;
sme_debug("Setting Channel Number %d",
ch_pwr_set->firstChanNum);
ch_pwr_set->first_freq =
wlan_reg_chan_to_freq(
mac->pdev,
ch_pwr_set->firstChanNum);
sme_debug("Setting Channel Num %d and Freq %d",
ch_pwr_set->firstChanNum,
ch_pwr_set->first_freq);
ch_pwr_set->numChannels = ch_set->numChannels;
ch_pwr_set->maxTxPower = QDF_MIN(ch_set->txPower,
mac->mlme_cfg->power.max_tx_power);