소스 검색

qcacmn: Add MLO specific function definitions

Define the following functions for MLO operation:
Peer create and delete
STA/SAP up and down
VDEV create and delete
Is MLD AP or STA

Change-Id: I5c9b3276b8dbb4b2a3f055480cab4a865b8af946
CRs-fixed: 2935769
Lincoln Tran 4 년 전
부모
커밋
0722a9b4cb

+ 1 - 0
umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_public_struct.h

@@ -214,6 +214,7 @@ struct wlan_cm_connect_req {
 #ifdef WLAN_FEATURE_FILS_SK
 	struct wlan_fils_con_info fils_info;
 #endif
+	bool is_secondary_link_connect;
 };
 
 /**

+ 34 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_ap.h

@@ -20,4 +20,38 @@
 #ifndef _WLAN_MLO_MGR_AP_H_
 #define _WLAN_MLO_MGR_AP_H_
 
+/**
+ * mlo_ap_link_start_rsp_notify - Notifies that the link is completed
+ *
+ * @vdev: pointer to vdev
+ *
+ * Return: none
+ */
+void mlo_ap_link_start_rsp_notify(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * mlo_is_ap_vdev_up_allowed - Checks if the AP can be started
+ *
+ * Return: true if vdev is allowed to come up, false otherwise
+ */
+bool mlo_is_ap_vdev_up_allowed(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * mlo_ap_link_down_notify - Currently does nothing
+ *
+ * @vdev: pointer to vdev
+ *
+ * Return: none
+ */
+void mlo_ap_link_down_notify(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * mlo_is_mld_ap - Check if MLD associated with the vdev is an AP
+ *
+ * @vdev: pointer to vdev
+ *
+ * Return: true if MLD is an AP, false otherwise
+ */
+bool mlo_is_mld_ap(struct wlan_objmgr_vdev *vdev);
+
 #endif

+ 82 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_peer.h

@@ -20,4 +20,86 @@
 #ifndef _WLAN_MLO_MGR_PEER_H_
 #define _WLAN_MLO_MGR_PEER_H_
 
+/**
+ * mlo_peer_create - Initiatiate peer create on second link by posting
+ * message to LIM
+ *
+ * @vdev: pointer to vdev
+ * @peer: pointer to peer context
+ * @mlo_ie: MLO information element
+ * @aid: association ID
+ *
+ * Initiate the peer on the second link
+ *
+ * Return: none
+ */
+void mlo_peer_create(struct wlan_objmgr_vdev *vdev,
+		     struct wlan_objmgr_peer *peer, uint8_t *mlo_ie,
+		     uint8_t aid);
+
+/**
+ * mlo_peer_attach - Update the MLO peer context with the new link information
+ *
+ * @vdev: pointer to vdev
+ * @peer: pointer to peer context
+ *
+ * Return: none
+ */
+void mlo_peer_attach(struct wlan_objmgr_vdev *vdev,
+		     struct wlan_objmgr_peer *peer);
+
+/**
+ * mlo_peer_setup_failed_notify - Notify MLO manageer to delete partner peers
+ *
+ * @vdev: pointer to vdev
+ *
+ * This API is called in scenarios where peer create or peer assoc fails
+ *
+ * Return: none
+ */
+void mlo_peer_setup_failed_notify(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * mlo_peer_disconnect_notify - Delete partner peers
+ *
+ * @vdev: pointer to vdev
+ *
+ * Return: none
+ */
+void mlo_peer_disconnect_notify(struct wlan_objmgr_peer *peer);
+
+/**
+ * wlan_peer_delete_complete - Unlink the peer object
+ *
+ * @peer: pointer to peer context
+ *
+ * Return: none
+ */
+void wlan_peer_delete_complete(struct wlan_objmgr_peer *peer);
+
+/**
+ * mlo_peer_delete - Delete the peer object
+ *
+ * @peer: pointer to peer context
+ *
+ * Return: none
+ */
+void mlo_peer_delete(struct wlan_objmgr_peer *peer);
+
+/**
+ * is_mlo_all_peer_links_deleted - Check if all the peer links are deleted
+ *
+ * Return: true if all the peer links are deleted, false otherwise
+ */
+bool is_mlo_all_peer_links_deleted(void);
+
+/**
+ * mlo_get_aid - Get the association ID
+ *
+ * @vdev: pointer to vdev
+ *
+ * Return: AID value
+ */
+uint8_t mlo_get_aid(struct wlan_objmgr_vdev *vdev);
+
 #endif

+ 58 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h

@@ -20,4 +20,62 @@
 #ifndef _WLAN_MLO_MGR_STA_H_
 #define _WLAN_MLO_MGR_STA_H_
 
+/**
+ * mlo_connect - Start the connection process
+ *
+ * @vdev: pointer to vdev
+ * @req: connection request
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlo_connect(struct wlan_objmgr_vdev *vdev,
+		       struct wlan_cm_connect_req *req);
+
+/**
+ * mlo_sta_link_up_notify - Called by connection manager to notify the
+ * STA link up is complete
+ *
+ * @vdev: pointer to vdev
+ * @mlo_ie: MLO information element
+ *
+ * Connection manager will notify the MLO manager when the link has started
+ * and MLO manager will start the subsequent connections, if necessary
+ *
+ * Return: none
+ */
+void mlo_sta_link_up_notify(struct wlan_objmgr_vdev *vdev, uint8_t *mlo_ie);
+
+/**
+ * mlo_disconnect - Start the disconnection process
+ *
+ * @vdev: pointer to vdev
+ * @source: source of the request (can be connect or disconnect request)
+ * @reason: reason for disconnect
+ * @bssid: BSSID
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlo_disconnect(struct wlan_objmgr_vdev *vdev,
+			  enum wlan_cm_source source,
+			  enum wlan_reason_code reason_code,
+			  struct qdf_mac_addr *bssid);
+
+/**
+ * mlo_sta_link_down_notify - Notifies that STA link has gone down
+ *
+ * @vdev: pointer to vdev
+ *
+ * Return: none
+ */
+void mlo_sta_link_down_notify(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * mlo_is_mld_sta - Check if MLD associated with the vdev is a station
+ *
+ * @vdev: pointer to vdev
+ *
+ * Return: true if MLD is a station, false otherwise
+ */
+bool mlo_is_mld_sta(struct wlan_objmgr_vdev *vdev);
+
 #endif

+ 33 - 0
umac/mlo_mgr/src/wlan_mlo_mgr_ap.c

@@ -17,4 +17,37 @@
 /*
  * DOC: contains MLO manager ap related functionality
  */
+#include "wlan_objmgr_vdev_obj.h"
+#include "wlan_mlo_mgr_ap.h"
 
+void mlo_ap_link_start_rsp_notify(struct wlan_objmgr_vdev *vdev)
+{
+	/* This is to notify the link is completed start*/
+	// mlo_is_ap_vdev_up_allowed()
+}
+
+/* Need to take care of DFS CAC WAIT state*/
+bool mlo_is_ap_vdev_up_allowed(struct wlan_objmgr_vdev *vdev)
+{
+// max_links = get the number of links(internal ml dev ctx);
+
+/* if ( max_links == vdev_list_count)
+ *	while ( iterate over vdev object)
+ *		check the vdev object status;
+ * If ( All sub states are vdev UP WAIT)
+ *	Call VDEV MLME to send the VDEV_UP command by sending
+ *	WLAN_VDEV_SM_SYNC_COMPLETE on the vdev's which are in UP_WAIT_STATE.
+ */
+
+	return true;
+}
+
+void mlo_ap_link_down_notify(struct wlan_objmgr_vdev *vdev)
+{
+/* No op */
+}
+
+bool mlo_is_mld_ap(struct wlan_objmgr_vdev *vdev)
+{
+	return true;
+}

+ 37 - 0
umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

@@ -18,3 +18,40 @@
  * DOC: contains MLO manager STA related api's
  */
 
+#include <wlan_cmn.h>
+#include "wlan_cm_public_struct.h"
+
+QDF_STATUS mlo_connect(struct wlan_objmgr_vdev *vdev,
+		       struct wlan_cm_connect_req *req)
+{
+/* WIN Specific API*/
+/* Command differ logic will be added here */
+	return QDF_STATUS_SUCCESS;
+}
+
+void mlo_sta_link_up_notify(struct wlan_objmgr_vdev *vdev, uint8_t *mlo_ie)
+{
+/* Create the secondary interface.
+ * call mlo_peer_create();
+ * Check if we need to, then issue the connection on second link
+ * Send keys if the last link
+ */
+}
+
+/* STA disconnect */
+QDF_STATUS mlo_disconnect(struct wlan_objmgr_vdev *vdev,
+			  enum wlan_cm_source source,
+			  enum wlan_reason_code reason_code,
+			  struct qdf_mac_addr *bssid)
+{
+/* This API will be pass through if MLO manager/11be is disabled */
+	return QDF_STATUS_SUCCESS;
+}
+
+void mlo_sta_link_down_notify(struct wlan_objmgr_vdev *vdev)
+{
+}
+
+bool mlo_is_mld_sta(struct wlan_objmgr_vdev *vdev)
+{
+}