From 221790b07e235fc319a9ccfd436c820f27af67a3 Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Sat, 7 Sep 2019 11:52:27 +0530 Subject: [PATCH] qcacld-3.0: Do not send UAPSD command after TDLS connection Currently as part of tdls enable link, If the peer is buff capable or tdls uapsd is enabled in INI. UAPSD is enabled in FW. Avoid sending this command to FW as it effects the behavior with AP. Change-Id: Idc023cb9de3ab63e7643815d473fe0efa98069b9 CRs-Fixed: 2528208 --- .../target_if/tdls/inc/target_if_tdls.h | 19 +----- .../target_if/tdls/src/target_if_tdls.c | 32 +--------- .../tdls/core/src/wlan_tdls_cmds_process.c | 63 ------------------- .../tdls/dispatcher/inc/wlan_tdls_tgt_api.h | 12 +--- .../tdls/dispatcher/src/wlan_tdls_tgt_api.c | 14 +---- 5 files changed, 4 insertions(+), 136 deletions(-) diff --git a/components/target_if/tdls/inc/target_if_tdls.h b/components/target_if/tdls/inc/target_if_tdls.h index 7fe21cdf0c4e..be52c1ebb53e 100644 --- a/components/target_if/tdls/inc/target_if_tdls.h +++ b/components/target_if/tdls/inc/target_if_tdls.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 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 @@ -63,23 +63,6 @@ QDF_STATUS target_if_tdls_set_offchan_mode(struct wlan_objmgr_psoc *psoc, struct tdls_channel_switch_params *params); -/** - * target_if_tdls_set_uapsd() - lmac handler to set uapsd auto trigger cmd - * @psoc: psoc object - * @params: upasd parameters - * - * This function sets the trigger - * uapsd params such as service interval, delay interval - * and suspend interval which will be used by the firmware - * to send trigger frames periodically when there is no - * traffic on the transmit side. - * - * Return: QDF_STATUS - */ -QDF_STATUS -target_if_tdls_set_uapsd(struct wlan_objmgr_psoc *psoc, - struct sta_uapsd_trig_params *params); - /** * target_if_tdls_register_event_handler() - lmac handler to register tdls event * handler diff --git a/components/target_if/tdls/src/target_if_tdls.c b/components/target_if/tdls/src/target_if_tdls.c index d701eba90865..9ecbdc563276 100644 --- a/components/target_if/tdls/src/target_if_tdls.c +++ b/components/target_if/tdls/src/target_if_tdls.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 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 @@ -135,35 +135,6 @@ target_if_tdls_set_offchan_mode(struct wlan_objmgr_psoc *psoc, return status; } -QDF_STATUS -target_if_tdls_set_uapsd(struct wlan_objmgr_psoc *psoc, - struct sta_uapsd_trig_params *params) -{ - QDF_STATUS ret; - struct wmi_unified *wmi_handle; - - wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); - if (!wmi_handle) { - target_if_err("Invalid WMI handle"); - return QDF_STATUS_E_FAILURE; - } - if (!wmi_service_enabled(wmi_handle, - wmi_sta_uapsd_basic_auto_trig) || - !wmi_service_enabled(wmi_handle, - wmi_sta_uapsd_var_auto_trig)) { - target_if_debug("Trigger uapsd is not supported vdev id %d", - params->vdevid); - return QDF_STATUS_SUCCESS; - } - ret = wmi_unified_set_sta_uapsd_auto_trig_cmd(wmi_handle, - params); - - if (QDF_IS_STATUS_ERROR(ret)) - target_if_err("Failed to send set uapsd param ret = %d", ret); - - return ret; -} - QDF_STATUS target_if_tdls_register_event_handler(struct wlan_objmgr_psoc *psoc, void *arg) @@ -208,7 +179,6 @@ target_if_tdls_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) tdls_txops->tdls_reg_ev_handler = target_if_tdls_register_event_handler; tdls_txops->tdls_unreg_ev_handler = target_if_tdls_unregister_event_handler; - tdls_txops->tdls_set_uapsd = target_if_tdls_set_uapsd; return QDF_STATUS_SUCCESS; } diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.c b/components/tdls/core/src/wlan_tdls_cmds_process.c index edba6dbf86a1..a4e4fafa54d4 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.c +++ b/components/tdls/core/src/wlan_tdls_cmds_process.c @@ -1577,64 +1577,6 @@ tdls_wma_update_peer_state(struct tdls_soc_priv_obj *soc_obj, return status; } -static QDF_STATUS -tdls_update_uapsd(struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_vdev *vdev, - uint8_t sta_id, uint32_t srvc_int, uint32_t sus_int, - uint8_t dir, uint8_t psb, uint32_t delay_interval) -{ - uint8_t i; - static const uint8_t ac[AC_PRIORITY_NUM] = {UAPSD_AC_VO, UAPSD_AC_VI, - UAPSD_AC_BK, UAPSD_AC_BE}; - static const uint8_t tid[AC_PRIORITY_NUM] = {7, 5, 2, 3}; - uint32_t vdev_id; - - struct sta_uapsd_params tdls_uapsd_params; - struct sta_uapsd_trig_params tdls_trig_params; - struct wlan_objmgr_peer *bsspeer; - uint8_t macaddr[QDF_MAC_ADDR_SIZE]; - QDF_STATUS status; - - if (!psb) { - tdls_debug("No need to configure auto trigger:psb is 0"); - return QDF_STATUS_SUCCESS; - } - vdev_id = wlan_vdev_get_id(vdev); - bsspeer = wlan_objmgr_vdev_try_get_bsspeer(vdev, WLAN_TDLS_SB_ID); - if (!bsspeer) { - tdls_err("bss peer is NULL"); - return QDF_STATUS_E_FAILURE; - } - wlan_vdev_obj_lock(vdev); - qdf_mem_copy(macaddr, - wlan_peer_get_macaddr(bsspeer), QDF_MAC_ADDR_SIZE); - wlan_vdev_obj_unlock(vdev); - wlan_objmgr_peer_release_ref(bsspeer, WLAN_TDLS_SB_ID); - - tdls_debug("TDLS uapsd id %d, srvc %d, sus %d, dir %d psb %d delay %d", - sta_id, srvc_int, sus_int, dir, psb, delay_interval); - for (i = 0; i < AC_PRIORITY_NUM; i++) { - tdls_uapsd_params.wmm_ac = ac[i]; - tdls_uapsd_params.user_priority = tid[i]; - tdls_uapsd_params.service_interval = srvc_int; - tdls_uapsd_params.delay_interval = delay_interval; - tdls_uapsd_params.suspend_interval = sus_int; - - tdls_trig_params.vdevid = vdev_id; - tdls_trig_params.num_ac = 1; - tdls_trig_params.auto_triggerparam = &tdls_uapsd_params; - - qdf_mem_copy(tdls_trig_params.peer_addr, - macaddr, QDF_MAC_ADDR_SIZE); - status = tgt_tdls_set_uapsd(psoc, &tdls_trig_params); - if (QDF_IS_STATUS_ERROR(status)) { - tdls_err("Failed to set uapsd for vdev %d, status %d", - vdev_id, status); - } - } - - return QDF_STATUS_SUCCESS; -} - QDF_STATUS tdls_process_enable_link(struct tdls_oper_request *req) { struct tdls_peer *peer; @@ -1727,11 +1669,6 @@ QDF_STATUS tdls_process_enable_link(struct tdls_oper_request *req) TDLS_IS_BUFFER_STA_ENABLED(feature), soc_obj->tdls_configs.tdls_uapsd_mask); - if (TDLS_IS_BUFFER_STA_ENABLED(feature) || - soc_obj->tdls_configs.tdls_uapsd_mask) - tdls_update_uapsd(soc_obj->soc, - vdev, peer->sta_id, 0, 0, BI_DIR, 1, - soc_obj->tdls_configs.delayed_trig_framint); error: wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID); qdf_mem_free(req); diff --git a/components/tdls/dispatcher/inc/wlan_tdls_tgt_api.h b/components/tdls/dispatcher/inc/wlan_tdls_tgt_api.h index 14a19006b997..6e07e3164a94 100644 --- a/components/tdls/dispatcher/inc/wlan_tdls_tgt_api.h +++ b/components/tdls/dispatcher/inc/wlan_tdls_tgt_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2019 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 @@ -57,16 +57,6 @@ QDF_STATUS tgt_tdls_set_peer_state(struct wlan_objmgr_psoc *psoc, QDF_STATUS tgt_tdls_set_offchan_mode(struct wlan_objmgr_psoc *psoc, struct tdls_channel_switch_params *param); -/** - * tgt_tdls_set_uapsd()- invoke lamc tdls set uapsd function - * @psoc: soc object - * @params: uapsd parameters - * - * Return: QDF_STATUS - */ -QDF_STATUS tgt_tdls_set_uapsd(struct wlan_objmgr_psoc *psoc, - struct sta_uapsd_trig_params *params); - /** * tgt_tdls_send_mgmt_rsp() - process tdls mgmt response * @pmsg: sheduler msg diff --git a/components/tdls/dispatcher/src/wlan_tdls_tgt_api.c b/components/tdls/dispatcher/src/wlan_tdls_tgt_api.c index 36741925ce36..a2927b7b91ae 100644 --- a/components/tdls/dispatcher/src/wlan_tdls_tgt_api.c +++ b/components/tdls/dispatcher/src/wlan_tdls_tgt_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 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 @@ -76,18 +76,6 @@ QDF_STATUS tgt_tdls_set_offchan_mode(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } -QDF_STATUS tgt_tdls_set_uapsd(struct wlan_objmgr_psoc *psoc, - struct sta_uapsd_trig_params *params) -{ - struct wlan_lmac_if_tdls_tx_ops *tdls_ops = NULL; - - tdls_ops = wlan_psoc_get_tdls_txops(psoc); - if (tdls_ops && tdls_ops->tdls_set_uapsd) - return tdls_ops->tdls_set_uapsd(psoc, params); - else - return QDF_STATUS_SUCCESS; -} - QDF_STATUS tgt_tdls_send_mgmt_tx_completion(struct scheduler_msg *pmsg) { QDF_STATUS status = QDF_STATUS_SUCCESS;