diff --git a/umac/tdls/core/src/wlan_tdls_ct.c b/umac/tdls/core/src/wlan_tdls_ct.c index 4e0b4cdbb531..6d4c1fb21037 100644 --- a/umac/tdls/core/src/wlan_tdls_ct.c +++ b/umac/tdls/core/src/wlan_tdls_ct.c @@ -1180,6 +1180,7 @@ void tdls_disable_offchan_and_teardown_links( struct tdls_vdev_priv_obj *tdls_vdev; struct tdls_soc_priv_obj *tdls_soc; QDF_STATUS status; + uint8_t vdev_id; status = tdls_get_vdev_objects(vdev, &tdls_vdev, &tdls_soc); if (QDF_STATUS_SUCCESS != status) { @@ -1197,6 +1198,12 @@ void tdls_disable_offchan_and_teardown_links( if (!connected_tdls_peers) { tdls_notice("No TDLS connected peers to delete"); + vdev_id = vdev->vdev_objmgr.vdev_id; + if (tdls_soc->set_state_info.set_state_cnt > 0) { + tdls_debug("Disable the tdls in FW as second interface is coming up"); + tdls_send_update_to_fw(tdls_vdev, tdls_soc, true, + true, false, vdev_id); + } return; } diff --git a/umac/tdls/core/src/wlan_tdls_main.c b/umac/tdls/core/src/wlan_tdls_main.c index 66ebc7edb56e..55a810ba1f0c 100644 --- a/umac/tdls/core/src/wlan_tdls_main.c +++ b/umac/tdls/core/src/wlan_tdls_main.c @@ -717,31 +717,12 @@ void tdls_notify_decrement_session(struct wlan_objmgr_psoc *psoc) tdls_process_session_update(psoc, TDLS_CMD_SESSION_DECREMENT); } -/** - * tdls_send_update_to_fw - update tdls status info - * @tdls_vdev_obj: tdls vdev private object. - * @tdls_prohibited: indicates whether tdls is prohibited. - * @tdls_chan_swit_prohibited: indicates whether tdls channel switch - * is prohibited. - * @sta_connect_event: indicate sta connect or disconnect event - * @session_id: session id - * - * Normally an AP does not influence TDLS connection between STAs - * associated to it. But AP may set bits for TDLS Prohibited or - * TDLS Channel Switch Prohibited in Extended Capability IE in - * Assoc/Re-assoc response to STA. So after STA is connected to - * an AP, call this function to update TDLS status as per those - * bits set in Ext Cap IE in received Assoc/Re-assoc response - * from AP. - * - * Return: None. - */ -static void tdls_send_update_to_fw(struct tdls_vdev_priv_obj *tdls_vdev_obj, - struct tdls_soc_priv_obj *tdls_soc_obj, - bool tdls_prohibited, - bool tdls_chan_swit_prohibited, - bool sta_connect_event, - uint8_t session_id) +void tdls_send_update_to_fw(struct tdls_vdev_priv_obj *tdls_vdev_obj, + struct tdls_soc_priv_obj *tdls_soc_obj, + bool tdls_prohibited, + bool tdls_chan_swit_prohibited, + bool sta_connect_event, + uint8_t session_id) { struct tdls_info *tdls_info_to_fw; struct tdls_config_params *threshold_params; diff --git a/umac/tdls/core/src/wlan_tdls_main.h b/umac/tdls/core/src/wlan_tdls_main.h index 753866ed07cb..da149aec5992 100644 --- a/umac/tdls/core/src/wlan_tdls_main.h +++ b/umac/tdls/core/src/wlan_tdls_main.h @@ -616,6 +616,32 @@ QDF_STATUS tdls_peers_deleted_notification( */ void tdls_notify_decrement_session(struct wlan_objmgr_psoc *psoc); +/** + * tdls_send_update_to_fw - update tdls status info + * @tdls_vdev_obj: tdls vdev private object. + * @tdls_prohibited: indicates whether tdls is prohibited. + * @tdls_chan_swit_prohibited: indicates whether tdls channel switch + * is prohibited. + * @sta_connect_event: indicate sta connect or disconnect event + * @session_id: session id + * + * Normally an AP does not influence TDLS connection between STAs + * associated to it. But AP may set bits for TDLS Prohibited or + * TDLS Channel Switch Prohibited in Extended Capability IE in + * Assoc/Re-assoc response to STA. So after STA is connected to + * an AP, call this function to update TDLS status as per those + * bits set in Ext Cap IE in received Assoc/Re-assoc response + * from AP. + * + * Return: None. + */ +void tdls_send_update_to_fw(struct tdls_vdev_priv_obj *tdls_vdev_obj, + struct tdls_soc_priv_obj *tdls_soc_obj, + bool tdls_prohibited, + bool tdls_chan_swit_prohibited, + bool sta_connect_event, + uint8_t session_id); + /** * tdls_notify_increment_session() - Notify the session increment * @psoc: psoc object manager