Path: blob/main/sys/contrib/dev/iwlwifi/mld/phy.h
108469 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2024-2025 Intel Corporation3*/4#ifndef __iwl_mld_phy_h__5#define __iwl_mld_phy_h__67#include "mld.h"89/**10* struct iwl_mld_phy - PHY configuration parameters11*12* @fw_id: fw id of the phy.13* @chandef: the last chandef that mac80211 configured the driver14* with. Used to detect a no-op when the chanctx changes.15* @channel_load_by_us: channel load on this channel caused by16* the NIC itself, as indicated by firmware17* @avg_channel_load_not_by_us: averaged channel load on this channel caused by18* others. This value is invalid when in EMLSR (due to FW limitations)19* @mld: pointer to the MLD context20*/21struct iwl_mld_phy {22/* Add here fields that need clean up on hw restart */23struct_group(zeroed_on_hw_restart,24u8 fw_id;25struct cfg80211_chan_def chandef;26);27/* And here fields that survive a hw restart */28u32 channel_load_by_us;29u32 avg_channel_load_not_by_us;30struct iwl_mld *mld;31};3233static inline struct iwl_mld_phy *34iwl_mld_phy_from_mac80211(struct ieee80211_chanctx_conf *channel)35{36return (void *)channel->drv_priv;37}3839/* Cleanup function for struct iwl_mld_phy, will be called in restart */40static inline void41iwl_mld_cleanup_phy(struct iwl_mld *mld, struct iwl_mld_phy *phy)42{43CLEANUP_STRUCT(phy);44}4546int iwl_mld_allocate_fw_phy_id(struct iwl_mld *mld);47int iwl_mld_phy_fw_action(struct iwl_mld *mld,48struct ieee80211_chanctx_conf *ctx, u32 action);49struct cfg80211_chan_def *50iwl_mld_get_chandef_from_chanctx(struct iwl_mld *mld,51struct ieee80211_chanctx_conf *ctx);52u8 iwl_mld_get_fw_ctrl_pos(const struct cfg80211_chan_def *chandef);5354int iwl_mld_send_phy_cfg_cmd(struct iwl_mld *mld);5556void iwl_mld_update_phy_chandef(struct iwl_mld *mld,57struct ieee80211_chanctx_conf *ctx);5859#endif /* __iwl_mld_phy_h__ */606162