From 6933f411c178ea246fd8bcdcc23d5e9bc1e30d22 Mon Sep 17 00:00:00 2001 From: Vignesh U Date: Thu, 12 Mar 2020 11:25:06 +0530 Subject: [PATCH] qcacmn: Add support to configure 165MHz Agile channel The FW has updated the wmi command wmi_vdev_adfs_ch_cfg_cmd_fixed_param to configure the Agile channel to enable the 165MHz channel as an Agile channel by enabling 2 center frequencies. For a 160MHz and 80MHz channel, the parameter center_freq1 will be the center of the respective channels. For the 165MHz channel(restricted 80p80) the parameter center_freq1 will be the center of the left 80MHz channel (5690MHz) and the parameter center_freq2 will be the center of the right 80MHz channel (5775MHz).. Update the ADFS parameters across UMAC, TARGET_IF and WMI layes to update the Agile channel configuration command. Change-Id: Ie480af9a6bb8dad87dd783ab06e17b449605b1c9 CRs-Fixed: 2642555 --- .../dfs/src/target_if_dfs_full_offload.c | 5 +++-- .../dispatcher/inc/wlan_dfs_public_struct.h | 20 ++++++++++++------- wmi/inc/wmi_unified_param.h | 9 +++++++-- wmi/src/wmi_unified_tlv.c | 3 ++- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/target_if/dfs/src/target_if_dfs_full_offload.c b/target_if/dfs/src/target_if_dfs_full_offload.c index 8da1f95a99a2..b6340e39cdfb 100644 --- a/target_if/dfs/src/target_if_dfs_full_offload.c +++ b/target_if/dfs/src/target_if_dfs_full_offload.c @@ -375,9 +375,10 @@ QDF_STATUS target_send_agile_ch_cfg_cmd(struct wlan_objmgr_pdev *pdev, param.ocac_mode = QUICK_OCAC_MODE; param.min_duration_ms = adfs_param->min_precac_timeout; param.max_duration_ms = adfs_param->max_precac_timeout; - param.chan_freq = adfs_param->precac_chan; + param.chan_freq = adfs_param->precac_center_freq_1; param.chan_width = adfs_param->precac_chwidth; - param.center_freq = adfs_param->precac_chan; + param.center_freq1 = adfs_param->precac_center_freq_1; + param.center_freq2 = adfs_param->precac_center_freq_2; status = wmi_unified_send_vdev_adfs_ch_cfg_cmd(wmi_handle, ¶m); if (QDF_IS_STATUS_ERROR(status)) diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h b/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h index dfa407daeff1..6f6a88d2037a 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -127,15 +127,21 @@ struct dfs_radar_found_params { /** * struct dfs_agile_cac_params - Agile DFS-CAC parameters. - * @precac_chan: Agile preCAC channel. - * @precac_chan_freq: Agile preCAC channel frequency in MHZ. - * @precac_chwidth: Agile preCAC channel width. - * @min_precac_timeout: Minimum agile preCAC timeout. - * @max_precac_timeout: Maximum agile preCAC timeout. + * @precac_chan: Agile preCAC channel. + * @precac_center_freq_1: Agile preCAC channel frequency in MHz for 20/40/80/ + * 160 and left center frequency(5690MHz) for restricted + * 80p80. + * @precac_center_freq_2: Second segment Agile frequency if applicable. 0 for + * 20/40/80/160 and right center frequency(5775MHz) for + * restricted 80p80. + * @precac_chwidth: Agile preCAC channel width. + * @min_precac_timeout: Minimum agile preCAC timeout. + * @max_precac_timeout: Maximum agile preCAC timeout. */ struct dfs_agile_cac_params { uint8_t precac_chan; - uint16_t precac_chan_freq; + uint16_t precac_center_freq_1; + uint16_t precac_center_freq_2; enum phy_ch_width precac_chwidth; uint32_t min_precac_timeout; uint32_t max_precac_timeout; diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index d84ad92556fa..c218746f6ec6 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1125,7 +1125,11 @@ struct scan_chan_list_params { * @max_duration_ms: Maximum Off channel CAC duration * @chan_freq: channel number of precac channel * @chan_width: Precac Channel width - * @center_freq: Center frequency of precac channel + * @center_freq1: Agile preCAC channel frequency in MHz for 20/40/80/160 + * and left center frequency(5690MHz) for restricted 80p80. + * @center_freq2: Second segment Agile frequency if applicable. 0 for + * 20/40/80/160 and right center frequency(5775MHz) for + * restricted 80p80. */ struct vdev_adfs_ch_cfg_params { uint32_t vdev_id; @@ -1134,7 +1138,8 @@ struct vdev_adfs_ch_cfg_params { uint32_t max_duration_ms; uint32_t chan_freq; uint32_t chan_width; - uint32_t center_freq; /* in MHz */ + uint32_t center_freq1; /* in MHz */ + uint32_t center_freq2; /* in MHz */ }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 972d7f8a0dc9..36eb3da663a7 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -8067,7 +8067,8 @@ QDF_STATUS send_adfs_ch_cfg_cmd_tlv(wmi_unified_t wmi_handle, cmd->vdev_id = param->vdev_id; cmd->ocac_mode = param->ocac_mode; - cmd->center_freq = param->center_freq; + cmd->center_freq1 = param->center_freq1; + cmd->center_freq2 = param->center_freq2; cmd->chan_freq = param->chan_freq; cmd->chan_width = param->chan_width; cmd->min_duration_ms = param->min_duration_ms;