|
@@ -1,6 +1,6 @@
|
|
|
/*
|
|
|
* Copyright (c) 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 above
|
|
@@ -371,8 +371,53 @@ wlan_mlo_peer_deauth_init(struct wlan_mlo_peer_context *ml_peer,
|
|
|
deauth_sent = 1;
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+void wlan_mlo_peer_delete(struct wlan_mlo_peer_context *ml_peer)
|
|
|
+{
|
|
|
+ struct wlan_mlo_dev_context *ml_dev;
|
|
|
+ struct wlan_objmgr_peer *link_peer;
|
|
|
+ struct wlan_objmgr_peer *link_peers[MAX_MLO_LINK_PEERS];
|
|
|
+ struct wlan_mlo_link_peer_entry *peer_entry;
|
|
|
+ uint16_t i;
|
|
|
+
|
|
|
+ if (!ml_peer)
|
|
|
+ return;
|
|
|
|
|
|
- return;
|
|
|
+ mlo_peer_lock_acquire(ml_peer);
|
|
|
+
|
|
|
+ if (ml_peer->mlpeer_state == ML_PEER_DISCONN_INITIATED) {
|
|
|
+ mlo_peer_lock_release(ml_peer);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ ml_dev = ml_peer->ml_dev;
|
|
|
+
|
|
|
+ for (i = 0; i < MAX_MLO_LINK_PEERS; i++) {
|
|
|
+ link_peers[i] = NULL;
|
|
|
+ peer_entry = &ml_peer->peer_list[i];
|
|
|
+ if (!peer_entry->link_peer)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ link_peer = peer_entry->link_peer;
|
|
|
+
|
|
|
+ if (wlan_objmgr_peer_try_get_ref(link_peer, WLAN_MLO_MGR_ID) !=
|
|
|
+ QDF_STATUS_SUCCESS)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ link_peers[i] = link_peer;
|
|
|
+ }
|
|
|
+
|
|
|
+ ml_peer->mlpeer_state = ML_PEER_DISCONN_INITIATED;
|
|
|
+
|
|
|
+ mlo_peer_lock_release(ml_peer);
|
|
|
+
|
|
|
+ for (i = 0; i < MAX_MLO_LINK_PEERS; i++) {
|
|
|
+ if (!link_peers[i])
|
|
|
+ continue;
|
|
|
+
|
|
|
+ mlo_link_peer_disconnect_notify(ml_dev, link_peers[i]);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void
|