From 284dab39650fb1bebf88186f893794e0655db401 Mon Sep 17 00:00:00 2001 From: Bapiraju Alla Date: Wed, 5 Aug 2020 17:03:02 +0530 Subject: [PATCH 1/2] qcacmn: Add service bit support for tx and rx time in channel stats Add service bit support for channel tx and rx time in channel stats. This service bit helps in not interpreting the default values for tx_time and rx_time when new driver version is used with old firmware where this tx_time and rx_time support is not present. Change-Id: Icc7668f5842677ac6ef48176568301753e217ea7 CRs-Fixed: 2751500 --- wmi/inc/wmi_unified_param.h | 1 + wmi/src/wmi_unified_tlv.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index f8fc5443663d..3a8468ed0855 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5220,6 +5220,7 @@ typedef enum { wmi_service_5dot9_ghz_support, wmi_service_cfr_ta_ra_as_fp_support, wmi_service_cfr_capture_count_support, + wmi_service_ll_stats_per_chan_rx_tx_time, wmi_services_max, } wmi_conv_service_ids; #define WMI_SERVICE_UNAVAILABLE 0xFFFF diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 0f6fbdb25e74..a5b7e69caf20 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -14754,6 +14754,8 @@ static void populate_tlv_service(uint32_t *wmi_service) WMI_SERVICE_CFR_TA_RA_AS_FP_SUPPORT; wmi_service[wmi_service_cfr_capture_count_support] = WMI_SERVICE_CFR_CAPTURE_COUNT_SUPPORT; + wmi_service[wmi_service_ll_stats_per_chan_rx_tx_time] = + WMI_SERVICE_LL_STATS_PER_CHAN_RX_TX_TIME_SUPPORT; } /** From f9c5c541c1ca4c6ce908fe4a5108e512e01499af Mon Sep 17 00:00:00 2001 From: Amruta Kulkarni Date: Thu, 13 Aug 2020 11:28:04 -0700 Subject: [PATCH 2/2] qcacmn: Update the dfs api To get the channel state for 5g bonded channel using the freq use wlan_reg_get_5g_bonded_channel_state_for_freq. Change-Id: I0b42e9c547ba70259e88137a5a26c238cd66da8d CRs-Fixed: 2756463 --- .../mlme/psoc/inc/target_if_psoc_wake_lock.h | 7 +++---- .../mlme/psoc/src/target_if_psoc_wake_lock.c | 15 ++++++++++----- .../mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c | 3 +-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/target_if/mlme/psoc/inc/target_if_psoc_wake_lock.h b/target_if/mlme/psoc/inc/target_if_psoc_wake_lock.h index e360d2b8015d..a2a497e2c013 100644 --- a/target_if/mlme/psoc/inc/target_if_psoc_wake_lock.h +++ b/target_if/mlme/psoc/inc/target_if_psoc_wake_lock.h @@ -106,13 +106,12 @@ QDF_STATUS target_if_wake_lock_timeout_release(struct wlan_objmgr_psoc *psoc, * target_if_vdev_start_link_handler() - check for SAP mode and DFS freq to handle link up/down * @vdev: pointer to vdev - * @cfreq1 : center freq1 - * @cfreq2 : center freq2 + * @is_dfs : is dfs freq * * Return: None */ void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev, - uint32_t cfreq1, uint32_t cfreq2); + uint32_t is_dfs); /** * target_if_vdev_stop_link_handler() - check for SAP mode to handle link @@ -147,7 +146,7 @@ static inline QDF_STATUS target_if_wake_lock_timeout_release( static inline void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev, - uint32_t cfreq1, uint32_t cfreq2) + uint32_t is_dfs) { } diff --git a/target_if/mlme/psoc/src/target_if_psoc_wake_lock.c b/target_if/mlme/psoc/src/target_if_psoc_wake_lock.c index 352666663fff..10174d7ba6cd 100644 --- a/target_if/mlme/psoc/src/target_if_psoc_wake_lock.c +++ b/target_if/mlme/psoc/src/target_if_psoc_wake_lock.c @@ -192,15 +192,21 @@ target_if_vote_for_link_up(struct wlan_objmgr_psoc *psoc, } void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev, - uint32_t cfreq1, uint32_t cfreq2) + uint32_t is_dfs) { struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_pdev *pdev; struct psoc_mlme_wakelock *psoc_wakelock; struct wlan_lmac_if_mlme_rx_ops *rx_ops; + struct wlan_channel *des_channel; + uint32_t ch_freq; + enum phy_ch_width ch_width; psoc = wlan_vdev_get_psoc(vdev); pdev = wlan_vdev_get_pdev(vdev); + des_channel = wlan_vdev_mlme_get_des_chan(vdev); + ch_freq = des_channel->ch_freq; + ch_width = des_channel->ch_width; if (!pdev) { mlme_err("pdev is NULL"); @@ -216,10 +222,9 @@ void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev, psoc_wakelock = rx_ops->psoc_get_wakelock_info(psoc); if (wlan_vdev_mlme_get_opmode(vdev) == QDF_SAP_MODE) { - if ((wlan_reg_chan_has_dfs_attribute_for_freq(pdev, - cfreq1)) || - (wlan_reg_chan_has_dfs_attribute_for_freq(pdev, - cfreq2))) + if (is_dfs || + (wlan_reg_get_5g_bonded_channel_state_for_freq(pdev, + ch_freq, ch_width) == CHANNEL_STATE_DFS)) target_if_vote_for_link_up(psoc, psoc_wakelock); else target_if_vote_for_link_down(psoc, psoc_wakelock); diff --git a/target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c b/target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c index 535dfbc4e995..5c42b5db48f5 100644 --- a/target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c +++ b/target_if/mlme/vdev_mgr/src/target_if_vdev_mgr_tx_ops.c @@ -481,8 +481,7 @@ static QDF_STATUS target_if_vdev_mgr_start_send( START_RESPONSE_BIT); } else { target_if_vdev_start_link_handler(vdev, - param->channel.cfreq1, - param->channel.cfreq2); + param->channel.dfs_set); } return status; }