|
@@ -1,5 +1,6 @@
|
|
/*
|
|
/*
|
|
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 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
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -295,3 +296,65 @@ bool mlo_ap_vdev_quiet_is_any_idx_set(struct wlan_objmgr_vdev *vdev)
|
|
mld_ctx->ap_ctx->mlo_vdev_quiet_bmap,
|
|
mld_ctx->ap_ctx->mlo_vdev_quiet_bmap,
|
|
sizeof(mld_ctx->ap_ctx->mlo_vdev_quiet_bmap));
|
|
sizeof(mld_ctx->ap_ctx->mlo_vdev_quiet_bmap));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+#ifdef UMAC_SUPPORT_MLNAWDS
|
|
|
|
+QDF_STATUS
|
|
|
|
+mlo_peer_create_get_frm_buf(
|
|
|
|
+ struct wlan_mlo_peer_context *ml_peer,
|
|
|
|
+ struct peer_create_notif_s *peer_create,
|
|
|
|
+ qdf_nbuf_t frm_buf)
|
|
|
|
+{
|
|
|
|
+ if (ml_peer->is_nawds_ml_peer) {
|
|
|
|
+ peer_create->frm_buf = NULL;
|
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ peer_create->frm_buf = qdf_nbuf_clone(frm_buf);
|
|
|
|
+ if (!peer_create->frm_buf)
|
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
|
+
|
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void mlo_peer_populate_nawds_params(
|
|
|
|
+ struct wlan_mlo_peer_context *ml_peer,
|
|
|
|
+ struct mlo_partner_info *ml_info)
|
|
|
|
+{
|
|
|
|
+ uint8_t i;
|
|
|
|
+ uint8_t null_mac[QDF_MAC_ADDR_SIZE] = {0x00, 0x00, 0x00,
|
|
|
|
+ 0x00, 0x00, 0x00};
|
|
|
|
+ struct mlnawds_config nawds_config;
|
|
|
|
+
|
|
|
|
+ mlo_peer_lock_acquire(ml_peer);
|
|
|
|
+ ml_peer->is_nawds_ml_peer = false;
|
|
|
|
+ for (i = 0; i < ml_info->num_partner_links; i++) {
|
|
|
|
+ nawds_config = ml_info->partner_link_info[i].nawds_config;
|
|
|
|
+ /**
|
|
|
|
+ * if ml_info->partner_link_info[i].nawds_config has valid
|
|
|
|
+ * config(check for non-null mac or non-0 caps), then mark
|
|
|
|
+ * ml_peer's is_nawds_ml_peer true & copy the config
|
|
|
|
+ */
|
|
|
|
+ if ((nawds_config.caps) ||
|
|
|
|
+ (qdf_mem_cmp(null_mac,
|
|
|
|
+ nawds_config.mac,
|
|
|
|
+ sizeof(null_mac)))) {
|
|
|
|
+ ml_peer->is_nawds_ml_peer = true;
|
|
|
|
+ ml_peer->nawds_config[i] = nawds_config;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ mlo_peer_lock_release(ml_peer);
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+QDF_STATUS
|
|
|
|
+mlo_peer_create_get_frm_buf(
|
|
|
|
+ struct wlan_mlo_peer_context *ml_peer,
|
|
|
|
+ struct peer_create_notif_s *peer_create,
|
|
|
|
+ qdf_nbuf_t frm_buf)
|
|
|
|
+{
|
|
|
|
+ peer_create->frm_buf = qdf_nbuf_clone(frm_buf);
|
|
|
|
+ if (!peer_create->frm_buf)
|
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
|
+
|
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
|
+}
|
|
|
|
+#endif
|