From 63b0f33c4c83ec6c039937b2b73cf7a2034a13ff Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Sirasanagandla Date: Tue, 13 Aug 2019 14:37:06 +0530 Subject: [PATCH] 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 --- .../dispatcher/inc/wlan_mgmt_txrx_utils_api.h | 2 ++ wmi/src/wmi_unified_sta_tlv.c | 12 ++++++++---- wmi/src/wmi_unified_tlv.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h index 622a263e8fce..cb26ae5a3472 100644 --- a/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h +++ b/umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_utils_api.h @@ -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]; diff --git a/wmi/src/wmi_unified_sta_tlv.c b/wmi/src/wmi_unified_sta_tlv.c index 004accb71fbb..3c0d15281d9a 100644 --- a/wmi/src/wmi_unified_sta_tlv.c +++ b/wmi/src/wmi_unified_sta_tlv.c @@ -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); diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 6e60d4f1e067..487b340eeed8 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -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;