qcacld-3.0: Use frequency for channel operation

As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As a part of above requirement, in the existing WMI interface handlers
and related functions, wherever missing, add frequency attributes to
identify unique channel operation.

Change-Id: I3853d6e64e63eb219282afac4f56ccf398b0a04f
CRs-Fixed: 2517897
This commit is contained in:
Rajeev Kumar Sirasanagandla 2019-08-13 14:38:25 +05:30 • committed by nshrivas
commit e796a60fd0
3 changed files with 29 additions and 9 deletions

View file

@ -4528,11 +4528,11 @@ struct sme_obss_ht40_scanind_msg {
* @obss_active_total_per_channel: total active scan time per channel
* @bsswidth_ch_trans_delay: OBSS transition delay time
* @obss_activity_threshold: OBSS activity threshold
* @self_sta_id: self sta identification
* @self_sta_idx: self sta identification
* @bss_id: BSS index
* @fortymhz_intolerent: Ht40mhz intolerance
* @channel_count: channel count
* @channels: channel information
* @chan_freq_list: List of channel frequencies in MHz
* @current_operatingclass: operating class
* @iefield_len: ie's length
* @iefiled: ie's information
@ -4554,7 +4554,7 @@ struct obss_ht40_scanind {
uint8_t bss_id;
uint8_t fortymhz_intolerent;
uint8_t channel_count;
uint8_t channels[SIR_ROAM_MAX_CHANNELS];
uint32_t chan_freq_list[SIR_ROAM_MAX_CHANNELS];
uint8_t current_operatingclass;
uint16_t iefield_len;
uint8_t iefield[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE];

View file

@ -596,7 +596,7 @@ QDF_STATUS lim_send_ht40_obss_scanind(struct mac_context *mac_ctx,
{
QDF_STATUS ret = QDF_STATUS_SUCCESS;
struct obss_ht40_scanind *ht40_obss_scanind;
uint32_t channelnum;
uint32_t channelnum, chan_freq;
struct scheduler_msg msg = {0};
uint8_t chan_list[CFG_VALID_CHANNEL_LIST_LEN];
uint8_t channel24gnum, count;
@ -637,10 +637,11 @@ QDF_STATUS lim_send_ht40_obss_scanind(struct mac_context *mac_ctx,
channel24gnum = 0;
for (count = 0; count < channelnum &&
(channel24gnum < SIR_ROAM_MAX_CHANNELS); count++) {
if ((chan_list[count] > CHAN_ENUM_1) &&
(chan_list[count] < CHAN_ENUM_14)) {
ht40_obss_scanind->channels[channel24gnum] =
chan_list[count];
chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev,
chan_list[count]);
if (wlan_reg_is_24ghz_ch_freq(chan_freq)) {
ht40_obss_scanind->chan_freq_list[channel24gnum] =
chan_freq;
channel24gnum++;
}
}

View file

@ -5570,6 +5570,7 @@ QDF_STATUS wma_send_ht40_obss_scanind(tp_wma_handle wma,
int len = 0;
uint8_t *buf_ptr, i;
uint8_t *channel_list;
uint32_t *chan_freq_list;
len += sizeof(wmi_obss_scan_enable_cmd_fixed_param);
@ -5580,6 +5581,10 @@ QDF_STATUS wma_send_ht40_obss_scanind(tp_wma_handle wma,
len += WMI_TLV_HDR_SIZE;
len += qdf_roundup(sizeof(uint8_t) * 1, sizeof(uint32_t));
/* length calculation for chan_freqs */
len += WMI_TLV_HDR_SIZE;
len += sizeof(uint32_t) * req->channel_count;
WMA_LOGE("cmdlen %d vdev_id %d channel count %d iefield_len %d",
len, req->bss_id, req->channel_count, req->iefield_len);
@ -5629,7 +5634,8 @@ QDF_STATUS wma_send_ht40_obss_scanind(tp_wma_handle wma,
channel_list = (uint8_t *) buf_ptr;
for (i = 0; i < req->channel_count; i++) {
channel_list[i] = req->channels[i];
channel_list[i] =
wlan_reg_freq_to_chan(wma->pdev, req->chan_freq_list[i]);
WMA_LOGD("Ch[%d]: %d ", i, channel_list[i]);
}
@ -5637,8 +5643,21 @@ QDF_STATUS wma_send_ht40_obss_scanind(tp_wma_handle wma,
sizeof(uint32_t));
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
qdf_roundup(1, sizeof(uint32_t)));
buf_ptr += qdf_roundup(sizeof(uint8_t) * 1, sizeof(uint32_t));
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32,
sizeof(uint32_t) * req->channel_count);
buf_ptr += WMI_TLV_HDR_SIZE;
chan_freq_list = (uint32_t *)buf_ptr;
for (i = 0; i < req->channel_count; i++) {
chan_freq_list[i] = req->chan_freq_list[i];
WMA_LOGD("freq[%u]: %u ", i, chan_freq_list[i]);
}
buf_ptr += sizeof(uint32_t) * req->channel_count;
status = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_OBSS_SCAN_ENABLE_CMDID);
if (QDF_IS_STATUS_ERROR(status))