Browse Source

qcacld-3.0: Add ML reconfig starting notify for link removal

Handle mlme_vdev_reconfig_notify callback to get notification
after receive the first ML reconfig link removal IE.
Override the delete timer tbtt to 0 to fire the timer early
if timer is less than 1s. This is to avoid host delay of sending
to link inactive command to FW and FW receive deauth before host
inactive link command.

Change-Id: I7865b7942813fd7facf4daa8624c976166814311
CRs-Fixed: 3380147
Liangwei Dong 2 years ago
parent
commit
7abfa2d80e

+ 6 - 0
components/mlme/core/inc/wlan_mlme_main.h

@@ -38,6 +38,12 @@
 #define JOIN_PROBE_REQ_TIMER_MS              200
 #define MAX_JOIN_PROBE_REQ                   5
 
+/* If AP reported link delete timer less than such value,
+ * host will do link removel directly without wait for the
+ * timer timeout.
+ */
+#define LINK_REMOVAL_MIN_TIMEOUT_MS 1000
+
 /*
  * Following time is used to program WOW_TIMER_PATTERN to FW so that FW will
  * wake host up to do graceful disconnect in case PEER remains un-authorized

+ 22 - 0
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -1815,6 +1815,26 @@ static QDF_STATUS vdevmgr_reconfig_req_flush_cb(struct scheduler_msg *msg)
 	return QDF_STATUS_SUCCESS;
 }
 
+static QDF_STATUS
+vdevmgr_vdev_reconfig_notify(struct vdev_mlme_obj *vdev_mlme,
+			     uint16_t *tbtt_count, uint16_t bcn_int)
+{
+	struct wlan_objmgr_vdev *vdev = vdev_mlme->vdev;
+
+	if (!vdev) {
+		mlme_err("invalid vdev");
+		return QDF_STATUS_E_INVAL;
+	}
+	mlme_debug("vdev %d link removal notify tbtt %d bcn_int %d",
+		   wlan_vdev_get_id(vdev), *tbtt_count, bcn_int);
+	if (*tbtt_count * bcn_int <= LINK_REMOVAL_MIN_TIMEOUT_MS)
+		*tbtt_count = 0;
+	else if (bcn_int)
+		*tbtt_count -= LINK_REMOVAL_MIN_TIMEOUT_MS / bcn_int;
+
+	return QDF_STATUS_SUCCESS;
+}
+
 static void
 vdevmgr_vdev_reconfig_timer_complete(struct vdev_mlme_obj *vdev_mlme)
 {
@@ -1996,6 +2016,8 @@ static struct vdev_mlme_ops sta_mlme_ops = {
 	.mlme_vdev_ext_peer_delete_all_rsp =
 			vdevmgr_vdev_peer_delete_all_rsp_handle,
 #ifdef WLAN_FEATURE_11BE_MLO
+	.mlme_vdev_reconfig_notify =
+			vdevmgr_vdev_reconfig_notify,
 	.mlme_vdev_reconfig_timer_complete =
 			vdevmgr_vdev_reconfig_timer_complete,
 #endif