Browse Source

qcacld-3.0: Send TDLS notify sta disconnect on roam

Currently, TDLS STA disconnect notification is not sent during
roam, so WMI_TDLS_SET_STATE_CMDID with disable command is not sent
to firmware. This leads to unexpected behavior in firmware when STA
have migrated to different mac based on new band (2 GHz to 5/6 GHz or
vice-versa) due to roaming, but TDLS STA remain on previous mac.
Firmware expects host to send WMI_TDLS_SET_STATE_CMDID on roam also
so that it can destroy and create new TDLS STA instance and map TDLS
STA to new mac.

To fix above issue, send WMI_TDLS_SET_STATE_CMDID with disable TDLS
state to firmware after driver receives roam sync indication which
leads to destruction of TDLS STA instance in firmware.
Host driver would later send WMI_TDLS_SET_STATE_CMDID with enable TDLS
state(not part of this commit) after successful STA roaming so that
firmware maps TDLS STA with new mac.

This change also removes unused ucfg_tdls_notify_sta_connect() and
ucfg_tdls_notify_sta_disconnect() APIs.

Change-Id: Id680d0f6193740b24e78115ac7dc7be26e28acff
CRs-Fixed: 3388507
Surabhi Vishnoi 2 years ago
parent
commit
b8adb54ef5

+ 1 - 46
components/tdls/dispatcher/inc/wlan_tdls_ucfg_api.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -264,37 +264,6 @@ void ucfg_tdls_teardown_links_sync(struct wlan_objmgr_psoc *psoc);
  */
 QDF_STATUS ucfg_tdls_notify_reset_adapter(struct wlan_objmgr_vdev *vdev);
 
-/**
- * ucfg_tdls_notify_sta_connect() - notify sta connect to TDLS
- * @vdev_id: pointer to soc object
- * @tdls_chan_swit_prohibited: indicates channel switch capability
- * @tdls_prohibited: indicates tdls allowed or not
- * @vdev: vdev object manager
- *
- * Notify sta connect event to TDLS component
- *
- * Return: None
- */
-void ucfg_tdls_notify_sta_connect(uint8_t vdev_id,
-				  bool tdls_chan_swit_prohibited,
-				  bool tdls_prohibited,
-				  struct wlan_objmgr_vdev *vdev);
-
-/**
- * ucfg_tdls_notify_sta_disconnect() - notify sta disconnect
- * @vdev_id: pointer to soc object
- * @lfr_roam: indicate, whether disconnect due to lfr roam
- * @user_disconnect: disconnect from user space
- * @vdev: vdev object manager
- *
- * Notify sta disconnect event to TDLS component
- *
- * Return: None
- */
-void ucfg_tdls_notify_sta_disconnect(uint8_t vdev_id,
-				     bool lfr_roam, bool user_disconnect,
-				     struct wlan_objmgr_vdev *vdev);
-
 /**
  * ucfg_tdls_set_operating_mode() - set operating mode
  * @set_mode_params: set mode params
@@ -486,20 +455,6 @@ void ucfg_tdls_notify_connect_failure(struct wlan_objmgr_psoc *psoc)
 {
 }
 
-static inline
-void ucfg_tdls_notify_sta_connect(uint8_t vdev_id,
-				  bool tdls_chan_swit_prohibited,
-				  bool tdls_prohibited,
-				  struct wlan_objmgr_vdev *vdev)
-{
-}
-
-static inline
-void ucfg_tdls_notify_sta_disconnect(uint8_t vdev_id,
-				     bool lfr_roam, bool user_disconnect,
-				     struct wlan_objmgr_vdev *vdev)
-{}
-
 static inline
 struct wlan_objmgr_vdev *ucfg_get_tdls_vdev(struct wlan_objmgr_psoc *psoc,
 					    wlan_objmgr_ref_dbgid dbg_id)

+ 1 - 18
components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -954,23 +954,6 @@ QDF_STATUS ucfg_tdls_notify_reset_adapter(struct wlan_objmgr_vdev *vdev)
 	return status;
 }
 
-void ucfg_tdls_notify_sta_connect(uint8_t vdev_id,
-				  bool tdls_chan_swit_prohibited,
-				  bool tdls_prohibited,
-				  struct wlan_objmgr_vdev *vdev)
-{
-	wlan_tdls_notify_sta_connect(vdev_id, tdls_chan_swit_prohibited,
-				     tdls_prohibited, vdev);
-}
-
-void ucfg_tdls_notify_sta_disconnect(uint8_t vdev_id,
-				     bool lfr_roam, bool user_disconnect,
-				     struct wlan_objmgr_vdev *vdev)
-{
-	wlan_tdls_notify_sta_disconnect(vdev_id, lfr_roam, user_disconnect,
-					vdev);
-}
-
 QDF_STATUS ucfg_tdls_set_operating_mode(
 			struct tdls_set_mode_params *set_mode_params)
 {

+ 4 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -173,6 +173,10 @@ cm_fw_roam_sync_start_ind(struct wlan_objmgr_vdev *vdev,
 	wlan_dlm_update_bssid_connect_params(pdev,
 					     connected_bssid,
 					     DLM_AP_DISCONNECTED);
+
+	/* Notify TDLS STA about disconnection due to roaming */
+	wlan_tdls_notify_sta_disconnect(vdev_id, true, false, vdev);
+
 	if (IS_ROAM_REASON_STA_KICKOUT(sync_ind->roam_reason)) {
 		struct reject_ap_info ap_info;