Path: blob/main/sys/contrib/dev/iwlwifi/mld/coex.c
48285 views
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause1/*2* Copyright (C) 2024-2025 Intel Corporation3*/45#include "fw/api/coex.h"67#include "coex.h"8#include "mld.h"9#include "hcmd.h"10#include "mlo.h"1112int iwl_mld_send_bt_init_conf(struct iwl_mld *mld)13{14struct iwl_bt_coex_cmd cmd = {15.mode = cpu_to_le32(BT_COEX_NW),16.enabled_modules = cpu_to_le32(BT_COEX_MPLUT_ENABLED |17BT_COEX_HIGH_BAND_RET),18};1920return iwl_mld_send_cmd_pdu(mld, BT_CONFIG, &cmd);21}2223void iwl_mld_handle_bt_coex_notif(struct iwl_mld *mld,24struct iwl_rx_packet *pkt)25{26const struct iwl_bt_coex_profile_notif *notif = (void *)pkt->data;27const struct iwl_bt_coex_profile_notif zero_notif = {};28/* zeroed structure means that BT is OFF */29bool bt_is_active = memcmp(notif, &zero_notif, sizeof(*notif));3031if (bt_is_active == mld->bt_is_active)32return;3334IWL_DEBUG_INFO(mld, "BT was turned %s\n", bt_is_active ? "ON" : "OFF");3536mld->bt_is_active = bt_is_active;3738iwl_mld_emlsr_check_bt(mld);39}404142