Path: blob/main/sys/contrib/dev/iwlwifi/mei/iwl-mei.h
48372 views
/*-1* Copyright (c) 2022-2024 The FreeBSD Foundation2*3* This software was developed by Björn Zeeb under sponsorship from4* the FreeBSD Foundation.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND16* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE18* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE19* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL20* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS21* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)22* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT23* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*27* $FreeBSD$28*/2930#ifndef _IWL_MEI_IWL_MEI_H31#define _IWL_MEI_IWL_MEI_H3233#include <linux/types.h>34#include <linux/kernel.h>35#include <linux/netdevice.h>36#include <linux/skbuff.h>3738enum mei_nvm_caps {39MEI_NVM_CAPS_11AX_SUPPORT = BIT(0),40MEI_NVM_CAPS_LARI_SUPPORT = BIT(1),41};4243struct iwl_mei_nvm {44uint8_t n_hw_addrs;45enum mei_nvm_caps caps;46uint32_t nvm_version;47uint32_t radio_cfg;48uint32_t channels[110 /* IWL_NVM_NUM_CHANNELS_UHB */];49};5051struct iwl_mei_conn_info {52uint8_t lp_state;53uint8_t band;54uint8_t channel;55uint8_t ssid_len;56uint8_t bssid[ETH_ALEN];57uint8_t ssid[IEEE80211_MAX_SSID_LEN];58};5960struct iwl_mei_ops {61void (*me_conn_status)(void *, const struct iwl_mei_conn_info *);62void (*nic_stolen)(void *);63void (*rfkill)(void *, bool);64void (*roaming_forbidden)(void *, bool);65void (*sap_connected)(void *);66};6768#if IS_ENABLED(CONFIG_IWLMEI)69#error No MEI support in FreeBSD currently70#else7172static __inline void73iwl_mei_device_down(void)74{75}7677static __inline struct iwl_mei_nvm *78iwl_mei_get_nvm(void)79{80return (NULL);81}8283static __inline int84iwl_mei_get_ownership(void)85{86return (0);87}8889static __inline void90iwl_mei_host_disassociated(void)91{92}9394static __inline bool95iwl_mei_is_connected(void)96{97return (false);98}99100static __inline void101iwl_mei_set_country_code(uint16_t mcc __unused)102{103}104105static __inline void106iwl_mei_set_netdev(struct net_device *netdevice __unused)107{108}109110static __inline void111iwl_mei_set_nic_info(const uint8_t *addr __unused, const uint8_t *hw_addr __unused)112{113}114115static __inline void116iwl_mei_set_rfkill_state(bool rf_killed __unused, bool sw_rfkill __unused)117{118}119120static __inline void121iwl_mei_tx_copy_to_csme(struct sk_buff *skb __unused, unsigned int ivlen __unused)122{123}124125static __inline int126iwl_mei_register(void *mvm __unused, const struct iwl_mei_ops *ops __unused)127{128return (0);129}130131static __inline void132iwl_mei_start_unregister(void)133{134}135136static __inline void137iwl_mei_unregister_complete(void)138{139}140141static __inline void142iwl_mei_device_state(bool up __unused)143{144}145146static __inline void147iwl_mei_alive_notif(bool x __unused)148{149}150151static __inline bool152iwl_mei_pldr_req(void)153{154return (false);155}156157static __inline void158iwl_mei_set_power_limit(__le16 *x __unused)159{160}161#endif162163#endif /* _IWL_MEI_IWL_MEI_H */164165166