浏览代码

qcacmn: Add support for host only MLO node

Add support for host only MLO node

Change-Id: I795d90a05d8bb2ed1a27f477fa991e93b7dc41d6
Himanshu Batra 3 年之前
父节点
当前提交
08de35c5d2

+ 3 - 0
umac/cmn_services/inc/wlan_cmn.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 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
@@ -611,6 +612,7 @@ enum wifi_traffic_ac {
  * @WLAN_PEER_STA_TEMP: STA Peer Temp (its host only node)
  * @WLAN_PEER_IBSS:     IBSS Peer
  * @WLAN_PEER_NDP:      NDP Peer
+ * @WLAN_PEER_MLO_TEMP: MLO Peer Temp (host only node)
  */
 enum wlan_peer_type {
 	WLAN_PEER_SELF     = 1,
@@ -623,6 +625,7 @@ enum wlan_peer_type {
 	WLAN_PEER_STA_TEMP = 8,
 	WLAN_PEER_IBSS     = 9,
 	WLAN_PEER_NDP      = 10,
+	WLAN_PEER_MLO_TEMP = 11,
 };
 
 /**

+ 7 - 3
umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 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
@@ -1994,7 +1995,8 @@ QDF_STATUS wlan_objmgr_psoc_peer_attach(struct wlan_objmgr_psoc *psoc,
 	wlan_psoc_obj_lock(psoc);
 	objmgr = &psoc->soc_objmgr;
 	/* Max temporary peer limit is reached, return failure */
-	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP) {
+	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP ||
+	    peer->peer_mlme.peer_type == WLAN_PEER_MLO_TEMP) {
 		if (objmgr->temp_peer_count >= WLAN_MAX_PSOC_TEMP_PEERS) {
 			wlan_psoc_obj_unlock(psoc);
 			return QDF_STATUS_E_FAILURE;
@@ -2019,7 +2021,8 @@ QDF_STATUS wlan_objmgr_psoc_peer_attach(struct wlan_objmgr_psoc *psoc,
 							peer);
 	qdf_spin_unlock_bh(&peer_list->peer_list_lock);
 	/* Increment peer count */
-	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP)
+	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP ||
+	    peer->peer_mlme.peer_type == WLAN_PEER_MLO_TEMP)
 		objmgr->temp_peer_count++;
 	else
 		objmgr->wlan_peer_count++;
@@ -2060,7 +2063,8 @@ QDF_STATUS wlan_objmgr_psoc_peer_detach(struct wlan_objmgr_psoc *psoc,
 	}
 	qdf_spin_unlock_bh(&peer_list->peer_list_lock);
 	/* Decrement peer count */
-	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP)
+	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP ||
+	    peer->peer_mlme.peer_type == WLAN_PEER_MLO_TEMP)
 		objmgr->temp_peer_count--;
 	else
 		objmgr->wlan_peer_count--;

+ 9 - 4
umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 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 above
@@ -830,7 +831,8 @@ QDF_STATUS wlan_objmgr_vdev_peer_attach(struct wlan_objmgr_vdev *vdev,
 	wlan_vdev_obj_lock(vdev);
 	pdev = wlan_vdev_get_pdev(vdev);
 	/* If Max VDEV peer count exceeds, return failure */
-	if (peer->peer_mlme.peer_type != WLAN_PEER_STA_TEMP) {
+	if (peer->peer_mlme.peer_type != WLAN_PEER_STA_TEMP &&
+	    peer->peer_mlme.peer_type != WLAN_PEER_MLO_TEMP) {
 		if (objmgr->wlan_peer_count >= objmgr->max_peer_count) {
 			wlan_vdev_obj_unlock(vdev);
 			return QDF_STATUS_E_FAILURE;
@@ -840,7 +842,8 @@ QDF_STATUS wlan_objmgr_vdev_peer_attach(struct wlan_objmgr_vdev *vdev,
 
 	/* If Max PDEV peer count exceeds, return failure */
 	wlan_pdev_obj_lock(pdev);
-	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP) {
+	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP ||
+	    peer->peer_mlme.peer_type == WLAN_PEER_MLO_TEMP) {
 		if (wlan_pdev_get_temp_peer_count(pdev) >=
 			WLAN_MAX_PDEV_TEMP_PEERS) {
 			wlan_pdev_obj_unlock(pdev);
@@ -854,7 +857,8 @@ QDF_STATUS wlan_objmgr_vdev_peer_attach(struct wlan_objmgr_vdev *vdev,
 		}
 	}
 
-	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP)
+	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP ||
+	    peer->peer_mlme.peer_type == WLAN_PEER_MLO_TEMP)
 		wlan_pdev_incr_temp_peer_count(wlan_vdev_get_pdev(vdev));
 	else
 		wlan_pdev_incr_peer_count(wlan_vdev_get_pdev(vdev));
@@ -941,7 +945,8 @@ QDF_STATUS wlan_objmgr_vdev_peer_detach(struct wlan_objmgr_vdev *vdev,
 	wlan_vdev_obj_unlock(vdev);
 
 	wlan_pdev_obj_lock(pdev);
-	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP)
+	if (peer->peer_mlme.peer_type == WLAN_PEER_STA_TEMP ||
+	    peer->peer_mlme.peer_type == WLAN_PEER_MLO_TEMP)
 		wlan_pdev_decr_temp_peer_count(pdev);
 	else
 		wlan_pdev_decr_peer_count(pdev);