qcacld-3.0: Remove legacy usage of channels in WMA layer

Remove legacy usage of channels in WMA layer and
use frequencies instead to incorporate 6ghz
frequencies as well.

Change-Id: Iba4a9ea723d5c03a4deeaffc5fbdf628f435eb67
CRs-Fixed: 2563924
This commit is contained in:
gaurank kathpalia
2019-11-12 10:33:52 +05:30
committed by nshrivas
parent 05e835a045
commit cc3e2fd338
3 changed files with 8 additions and 19 deletions

View File

@@ -535,7 +535,6 @@ enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
enum wlan_phymode phymode = WLAN_PHYMODE_AUTO; enum wlan_phymode phymode = WLAN_PHYMODE_AUTO;
uint16_t bw_val = wlan_reg_get_bw_value(chan_width); uint16_t bw_val = wlan_reg_get_bw_value(chan_width);
t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA); t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
uint16_t chan;
if (!wma) { if (!wma) {
WMA_LOGE("%s : wma_handle is NULL", __func__); WMA_LOGE("%s : wma_handle is NULL", __func__);
@@ -547,7 +546,6 @@ enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
return WLAN_PHYMODE_AUTO; return WLAN_PHYMODE_AUTO;
} }
chan = wlan_reg_freq_to_chan(wma->pdev, freq);
if (wlan_reg_is_24ghz_ch_freq(freq)) { if (wlan_reg_is_24ghz_ch_freq(freq)) {
if (((CH_WIDTH_5MHZ == chan_width) || if (((CH_WIDTH_5MHZ == chan_width) ||
(CH_WIDTH_10MHZ == chan_width)) && (CH_WIDTH_10MHZ == chan_width)) &&
@@ -598,7 +596,7 @@ enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
break; break;
} }
} }
} else if (wlan_reg_is_dsrc_chan(wma->pdev, chan)) } else if (wlan_reg_is_dsrc_freq(freq))
phymode = WLAN_PHYMODE_11A; phymode = WLAN_PHYMODE_11A;
else { else {
if (((CH_WIDTH_5MHZ == chan_width) || if (((CH_WIDTH_5MHZ == chan_width) ||

View File

@@ -4505,17 +4505,9 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data,
* is not there as BAND_6G works only on frequencies and channel * is not there as BAND_6G works only on frequencies and channel
* numbers can be treated as unique. * numbers can be treated as unique.
*/ */
if (mgmt_rx_params->channel >= WLAN_REG_MIN_24GHZ_CH_NUM && mgmt_rx_params->chan_freq = wlan_reg_legacy_chan_to_freq(
mgmt_rx_params->channel <= WLAN_REG_MAX_24GHZ_CH_NUM) wma_handle->pdev,
mgmt_rx_params->chan_freq = mgmt_rx_params->channel);
wlan_reg_chan_to_freq(
wma_handle->pdev,
mgmt_rx_params->channel);
else
mgmt_rx_params->chan_freq =
wlan_reg_chan_to_freq(
wma_handle->pdev,
mgmt_rx_params->channel);
} }
mgmt_rx_params->pdev_id = 0; mgmt_rx_params->pdev_id = 0;

View File

@@ -131,7 +131,6 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
int i, len; int i, len;
struct scan_chan_list_params *scan_ch_param; struct scan_chan_list_params *scan_ch_param;
struct channel_param *chan_p; struct channel_param *chan_p;
uint16_t channel;
struct ch_params ch_params; struct ch_params ch_params;
len = sizeof(struct channel_param) * chan_list->numChan + len = sizeof(struct channel_param) * chan_list->numChan +
@@ -153,8 +152,6 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
chan_p->mhz = chan_list->chanParam[i].freq; chan_p->mhz = chan_list->chanParam[i].freq;
chan_p->cfreq1 = chan_p->mhz; chan_p->cfreq1 = chan_p->mhz;
chan_p->cfreq2 = 0; chan_p->cfreq2 = 0;
channel = wlan_reg_freq_to_chan(wma_handle->pdev,
chan_list->chanParam[i].freq);
wma_handle->saved_chan.ch_freq_list[i] = wma_handle->saved_chan.ch_freq_list[i] =
chan_list->chanParam[i].freq; chan_list->chanParam[i].freq;
@@ -199,8 +196,10 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
chan_p->maxregpower = chan_list->chanParam[i].pwr; chan_p->maxregpower = chan_list->chanParam[i].pwr;
ch_params.ch_width = CH_WIDTH_160MHZ; ch_params.ch_width = CH_WIDTH_160MHZ;
wlan_reg_set_channel_params(wma_handle->pdev, channel, 0, wlan_reg_set_channel_params_for_freq(wma_handle->pdev,
&ch_params); chan_p->mhz, 0,
&ch_params);
chan_p->max_bw_supported = chan_p->max_bw_supported =
wma_map_phy_ch_bw_to_wmi_channel_width(ch_params.ch_width); wma_map_phy_ch_bw_to_wmi_channel_width(ch_params.ch_width);
chan_p++; chan_p++;