Forráskód Böngészése

qcacld-3.0: Add link switch in progress for peer delete cmd

For secondary (partner) VDEV, upon receiving peer delete request
from host, FW will immediately send peer delete response even
before the peer delete handshake with HW is completed.

This approach is brought in for two link association teardown
where starting a peer delete timer on partner link VDEV down may
result in timeout, if the assoc link peer delete is not received
before the timer expires.

To avoid this case, FW will only start peer delete timer during
primary (assoc) VDEV down and sends the peer delete response once
it is actually deleted in the system.

Now with three link support, if there is link switch on partner VDEV,
FW is sending peer delete response immediately (even if the delete is
still ongoing) to host and host is proceeding with MAC address update
and new peer create (with new link id) causing FW to assert as peer
delete on that VDEV is in progress.

Add new flag to indicate whether link switch in progress during
current peer delete WMI cmd. If this flag is set, FW will not send
peer delete response immediately but wait for the delete handshake
to complete with HW.

Change-Id: I81b2e15421fc59f54f6b1a33ef66a0cfdb908430
CRs-Fixed: 3663345
Vinod Kumar Pirla 1 éve
szülő
commit
3133094915
1 módosított fájl, 17 hozzáadás és 8 törlés
  1. 17 8
      core/wma/src/wma_dev_if.c

+ 17 - 8
core/wma/src/wma_dev_if.c

@@ -1668,11 +1668,19 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 	bool peer_unmap_conf_support_enabled;
 	uint8_t peer_vdev_id;
 	struct peer_delete_cmd_params del_param = {0};
+	struct wma_txrx_node *iface;
 
-	if (!wma->interfaces[vdev_id].peer_count) {
+	if (vdev_id >= WLAN_MAX_VDEVS) {
+		wma_err("Invalid vdev_id %d", vdev_id);
+		QDF_BUG(0);
+		return QDF_STATUS_E_INVAL;
+	}
+
+	iface = &wma->interfaces[vdev_id];
+	if (!iface->peer_count) {
 		wma_err("Can't remove peer with peer_addr "QDF_MAC_ADDR_FMT" vdevid %d peer_count %d",
 			QDF_MAC_ADDR_REF(peer_addr), vdev_id,
-			wma->interfaces[vdev_id].peer_count);
+			iface->peer_count);
 		QDF_ASSERT(0);
 		return QDF_STATUS_E_INVAL;
 	}
@@ -1685,14 +1693,14 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 	if (!wma_objmgr_peer_exist(wma, peer_addr, &peer_vdev_id)) {
 		wma_err("peer doesn't exist peer_addr "QDF_MAC_ADDR_FMT" vdevid %d peer_count %d",
 			 QDF_MAC_ADDR_REF(peer_addr), vdev_id,
-			 wma->interfaces[vdev_id].peer_count);
+			 iface->peer_count);
 		return QDF_STATUS_E_INVAL;
 	}
 
 	if (peer_vdev_id != vdev_id) {
 		wma_err("peer "QDF_MAC_ADDR_FMT" is on vdev id %d but delete req on vdevid %d peer_count %d",
 			 QDF_MAC_ADDR_REF(peer_addr), peer_vdev_id, vdev_id,
-			 wma->interfaces[vdev_id].peer_count);
+			 iface->peer_count);
 		return QDF_STATUS_E_INVAL;
 	}
 	peer_unmap_conf_support_enabled =
@@ -1718,6 +1726,8 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 			    0, 0);
 
 	del_param.vdev_id = vdev_id;
+	del_param.is_mlo_link_switch =
+		wlan_vdev_mlme_is_mlo_link_switch_in_progress(iface->vdev);
 	qdf_status = wmi_unified_peer_delete_send(wma->wmi_handle, peer_addr,
 						  &del_param);
 	if (QDF_IS_STATUS_ERROR(qdf_status)) {
@@ -1730,8 +1740,7 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 
 peer_detach:
 	wma_debug("vdevid %d is detaching with peer_addr "QDF_MAC_ADDR_FMT" peer_count %d",
-		vdev_id, QDF_MAC_ADDR_REF(peer_addr),
-		wma->interfaces[vdev_id].peer_count);
+		vdev_id, QDF_MAC_ADDR_REF(peer_addr), iface->peer_count);
 	/* Copy peer mac to find and delete objmgr peer */
 	qdf_mem_copy(peer_mac, peer_addr, QDF_MAC_ADDR_SIZE);
 	if (no_fw_peer_delete &&
@@ -1759,9 +1768,9 @@ peer_detach:
 	}
 
 	wlan_release_peer_key_wakelock(wma->pdev, peer_mac);
-	wma_remove_objmgr_peer(wma, wma->interfaces[vdev_id].vdev, peer_mac);
+	wma_remove_objmgr_peer(wma, iface->vdev, peer_mac);
 
-	wma->interfaces[vdev_id].peer_count--;
+	iface->peer_count--;
 #undef PEER_ALL_TID_BITMASK
 
 	return qdf_status;