qcacmn: 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: I7c7542aa8488b4c55764c733590b77c64c397029
CRs-Fixed: 2517900
This commit is contained in:
Rajeev Kumar Sirasanagandla 2019-08-13 14:37:06 +05:30 • committed by nshrivas
commit 63b0f33c4c
3 changed files with 11 additions and 5 deletions

View file

@ -683,6 +683,7 @@ enum mgmt_frame_type {
#define WLAN_NOISE_FLOOR_DBM_DEFAULT -96
/**
* struct mgmt_rx_event_params - host mgmt header params
* @chan_freq: channel frequency on which this frame is received
* @channel: channel on which this frame is received
* @snr: snr information used to call rssi
* @rssi_ctl[WLAN_MGMT_TXRX_HOST_MAX_ANTENNA]: RSSI of PRI 20MHz for each chain
@ -699,6 +700,7 @@ enum mgmt_frame_type {
* (win specific, will be removed in phase 4)
*/
struct mgmt_rx_event_params {
uint32_t chan_freq;
uint32_t channel;
uint32_t snr;
uint8_t rssi_ctl[WLAN_MGMT_TXRX_HOST_MAX_ANTENNA];

View file

@ -591,6 +591,7 @@ static QDF_STATUS send_set_tdls_offchan_mode_cmd_tlv(wmi_unified_t wmi_handle,
cmd->offchan_mode =
tdls_get_wmi_offchannel_mode(chan_switch_params->tdls_sw_mode);
cmd->is_peer_responder = chan_switch_params->is_responder;
cmd->offchan_freq = chan_switch_params->tdls_off_chan_freq;
cmd->offchan_num = chan_switch_params->tdls_off_ch;
cmd->offchan_bw_bitmap =
tdls_get_wmi_offchannel_bw(
@ -603,11 +604,12 @@ static QDF_STATUS send_set_tdls_offchan_mode_cmd_tlv(wmi_unified_t wmi_handle,
WMI_LOGD(FL(
"vdev_id: %d, off channel mode: %d, off channel Num: %d, "
"off channel offset: 0x%x, is_peer_responder: %d, operating class: %d"
),
"off channel frequency: %u off channel offset: 0x%x, "
" is_peer_responder: %d, operating class: %d"),
cmd->vdev_id,
cmd->offchan_mode,
cmd->offchan_num,
cmd->offchan_freq,
cmd->offchan_bw_bitmap,
cmd->is_peer_responder,
cmd->offchan_oper_class);
@ -802,6 +804,7 @@ send_update_tdls_peer_state_cmd_tlv(wmi_unified_t wmi_handle,
}
peer_cap->is_peer_responder = in_peer_cap->is_peer_responder;
peer_cap->pref_offchan_freq = in_peer_cap->pref_offchan_freq;
peer_cap->pref_offchan_num = in_peer_cap->pref_off_channum;
peer_cap->pref_offchan_bw = in_peer_cap->pref_off_chan_bandwidth;
@ -809,12 +812,13 @@ send_update_tdls_peer_state_cmd_tlv(wmi_unified_t wmi_handle,
("%s: peer_qos: 0x%x, buff_sta_support: %d, off_chan_support: %d, "
"peer_curr_operclass: %d, self_curr_operclass: %d, peer_chan_len: "
"%d, peer_operclass_len: %d, is_peer_responder: %d, pref_offchan_num:"
" %d, pref_offchan_bw: %d",
" %d, pref_offchan_bw: %d, pref_offchan_freq: %u",
__func__, peer_cap->peer_qos, peer_cap->buff_sta_support,
peer_cap->off_chan_support, peer_cap->peer_curr_operclass,
peer_cap->self_curr_operclass, peer_cap->peer_chan_len,
peer_cap->peer_operclass_len, peer_cap->is_peer_responder,
peer_cap->pref_offchan_num, peer_cap->pref_offchan_bw);
peer_cap->pref_offchan_num, peer_cap->pref_offchan_bw,
peer_cap->pref_offchan_freq);
/* next fill variable size array of peer chan info */
buf_ptr += sizeof(wmi_tdls_peer_capabilities);

View file

@ -8538,7 +8538,7 @@ static QDF_STATUS extract_mgmt_rx_params_tlv(wmi_unified_t wmi_handle,
hdr->pdev_id = wmi_handle->ops->convert_pdev_id_target_to_host(
ev_hdr->pdev_id);
hdr->chan_freq = ev_hdr->chan_freq;
hdr->channel = ev_hdr->channel;
hdr->snr = ev_hdr->snr;
hdr->rate = ev_hdr->rate;