1 /* 2 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 #include "wlan_mlo_mgr_main.h" 18 #include "qdf_types.h" 19 #include "wlan_cmn.h" 20 #include "wlan_mlo_mgr_peer.h" 21 #include <wlan_mlo_mgr_ap.h> 22 23 void mlo_peer_assign_primary_umac( 24 struct wlan_mlo_peer_context *ml_peer, 25 struct wlan_mlo_link_peer_entry *peer_entry) 26 { 27 if (wlan_peer_get_psoc_id(peer_entry->link_peer) == 28 ml_peer->primary_umac_psoc_id) 29 peer_entry->is_primary = true; 30 else 31 peer_entry->is_primary = false; 32 } 33 34 QDF_STATUS mlo_peer_allocate_primary_umac( 35 struct wlan_mlo_dev_context *ml_dev, 36 struct wlan_mlo_peer_context *ml_peer, 37 struct wlan_objmgr_vdev *link_vdevs[]) 38 { 39 struct wlan_objmgr_vdev *vdev; 40 uint16_t link_load[WLAN_UMAC_MLO_MAX_VDEVS]; 41 uint8_t i; 42 43 for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) { 44 vdev = ml_dev->wlan_vdev_list[i]; 45 if (!vdev) { 46 link_load[i] = 0; 47 continue; 48 } 49 50 link_load[i] = 1/* TODO mlo_get_umac_load(vdev)*/; 51 } 52 ml_peer->primary_umac_psoc_id = 0; 53 54 return QDF_STATUS_SUCCESS; 55 } 56 57 QDF_STATUS mlo_peer_free_primary_umac( 58 struct wlan_mlo_dev_context *ml_dev, 59 struct wlan_mlo_peer_context *ml_peer) 60 { 61 return QDF_STATUS_SUCCESS; 62 } 63