diff options
Diffstat (limited to 'sys/contrib/dev/iwlwifi/mvm/mvm.h')
| -rw-r--r-- | sys/contrib/dev/iwlwifi/mvm/mvm.h | 225 | 
1 files changed, 111 insertions, 114 deletions
| diff --git a/sys/contrib/dev/iwlwifi/mvm/mvm.h b/sys/contrib/dev/iwlwifi/mvm/mvm.h index 6278c8be3950..41125adf4fd1 100644 --- a/sys/contrib/dev/iwlwifi/mvm/mvm.h +++ b/sys/contrib/dev/iwlwifi/mvm/mvm.h @@ -1,6 +1,6 @@  /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */  /* - * Copyright (C) 2012-2014, 2018-2024 Intel Corporation + * Copyright (C) 2012-2014, 2018-2025 Intel Corporation   * Copyright (C) 2013-2015 Intel Mobile Communications GmbH   * Copyright (C) 2016-2017 Intel Deutschland GmbH   */ @@ -108,6 +108,7 @@ struct iwl_mvm_phy_ctxt {  	u32 center_freq1;  	bool rlc_disabled;  	u32 channel_load_by_us; +	u32 channel_load_not_by_us;  };  struct iwl_mvm_time_event_data { @@ -130,7 +131,7 @@ struct iwl_mvm_time_event_data {   /* Power management */  /** - * enum iwl_power_scheme + * enum iwl_power_scheme - iwl power schemes   * @IWL_POWER_SCHEME_CAM: Continuously Active Mode   * @IWL_POWER_SCHEME_BPS: Balanced Power Save (default)   * @IWL_POWER_SCHEME_LP: Low Power @@ -304,9 +305,12 @@ struct iwl_probe_resp_data {   * @active: indicates the link is active in FW (for sanity checking)   * @cab_queue: content-after-beacon (multicast) queue   * @listen_lmac: indicates this link is allocated to the listen LMAC + * @csa_block_tx: we got CSA with mode=1   * @mcast_sta: multicast station   * @phy_ctxt: phy context allocated to this link, if any   * @bf_data: beacon filtering data + * @average_beacon_energy: average beacon energy for beacons received during + *	client connections   */  struct iwl_mvm_vif_link_info {  	u8 bssid[ETH_ALEN]; @@ -329,6 +333,7 @@ struct iwl_mvm_vif_link_info {  	bool he_ru_2mhz_block;  	bool active;  	bool listen_lmac; +	bool csa_block_tx;  	u16 cab_queue;  	/* Assigned while mac80211 has the link in a channel context, @@ -344,6 +349,7 @@ struct iwl_mvm_vif_link_info {  	u16 mgmt_queue;  	struct iwl_mvm_link_bf_data bf_data; +	u32 average_beacon_energy;  };  /** @@ -364,6 +370,9 @@ struct iwl_mvm_vif_link_info {   * @IWL_MVM_ESR_BLOCKED_NON_BSS: An active non-BSS interface's link is   *	preventing EMLSR   * @IWL_MVM_ESR_BLOCKED_ROC: remain-on-channel is preventing EMLSR + * @IWL_MVM_ESR_BLOCKED_TMP_NON_BSS: An expected active non-BSS interface's link + *      is preventing EMLSR. This is a temporary blocking that is set when there + *      is an indication that a non-BSS interface is to be added.   * @IWL_MVM_ESR_EXIT_MISSED_BEACON: exited EMLSR due to missed beacons   * @IWL_MVM_ESR_EXIT_LOW_RSSI: link is deactivated/not allowed for EMLSR   *	due to low RSSI. @@ -381,6 +390,7 @@ enum iwl_mvm_esr_state {  	IWL_MVM_ESR_BLOCKED_FW		= 0x8,  	IWL_MVM_ESR_BLOCKED_NON_BSS	= 0x10,  	IWL_MVM_ESR_BLOCKED_ROC		= 0x20, +	IWL_MVM_ESR_BLOCKED_TMP_NON_BSS	= 0x40,  	IWL_MVM_ESR_EXIT_MISSED_BEACON	= 0x10000,  	IWL_MVM_ESR_EXIT_LOW_RSSI	= 0x20000,  	IWL_MVM_ESR_EXIT_COEX		= 0x40000, @@ -453,6 +463,8 @@ struct iwl_mvm_esr_exit {   * @prevent_esr_done_wk: work that should be done when esr prevention ends.   * @mlo_int_scan_wk: work for the internal MLO scan.   * @unblock_esr_tpt_wk: work for unblocking EMLSR when tpt is high enough. + * @unblock_esr_tmp_non_bss_wk: work for removing the + *      IWL_MVM_ESR_BLOCKED_TMP_NON_BSS blocking for EMLSR.   * @roc_activity: currently running ROC activity for this vif (or   *	ROC_NUM_ACTIVITIES if no activity is running).   * @session_prot_connection_loss: the connection was lost due to session @@ -513,7 +525,7 @@ struct iwl_mvm_vif {  	bool bf_enabled;  	bool ba_enabled; -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP  	/* WoWLAN GTK rekey data */  	struct {  		u8 kck[NL80211_KCK_EXT_LEN]; @@ -589,6 +601,7 @@ struct iwl_mvm_vif {  	struct wiphy_delayed_work prevent_esr_done_wk;  	struct wiphy_delayed_work mlo_int_scan_wk;  	struct wiphy_work unblock_esr_tpt_wk; +	struct wiphy_delayed_work unblock_esr_tmp_non_bss_wk;  	struct iwl_mvm_vif_link_info deflink;  	struct iwl_mvm_vif_link_info *link[IEEE80211_MLD_MAX_NUM_LINKS]; @@ -657,6 +670,8 @@ enum iwl_mvm_sched_scan_pass_all_states {   * @min_backoff: The minimal tx backoff due to power restrictions   * @params: Parameters to configure the thermal throttling algorithm.   * @throttle: Is thermal throttling is active? + * @power_budget_mw: maximum cTDP power budget as defined for this system and + *	device   */  struct iwl_mvm_tt_mgmt {  	struct delayed_work ct_kill_exit; @@ -665,6 +680,8 @@ struct iwl_mvm_tt_mgmt {  	u32 min_backoff;  	struct iwl_tt_params params;  	bool throttle; + +	u32 power_budget_mw;  };  #ifdef CONFIG_THERMAL @@ -774,8 +791,6 @@ struct iwl_mvm_tcm {   * @head_sn: reorder window head sn   * @num_stored: number of mpdus stored in the buffer   * @queue: queue of this reorder buffer - * @last_amsdu: track last ASMDU SN for duplication detection - * @last_sub_index: track ASMDU sub frame index for duplication detection   * @valid: reordering is valid for this queue   * @lock: protect reorder buffer internal state   */ @@ -783,8 +798,6 @@ struct iwl_mvm_reorder_buffer {  	u16 head_sn;  	u16 num_stored;  	int queue; -	u16 last_amsdu; -	u8 last_sub_index;  	bool valid;  	spinlock_t lock;  } ____cacheline_aligned_in_smp; @@ -996,7 +1009,7 @@ struct iwl_mvm {  	struct iwl_trans *trans;  	const struct iwl_fw *fw; -	const struct iwl_cfg *cfg; +	const struct iwl_rf_cfg *cfg;  	struct iwl_phy_db *phy_db;  	struct ieee80211_hw *hw; @@ -1030,6 +1043,8 @@ struct iwl_mvm {  	u8 cca_40mhz_workaround; +	u8 fw_rates_ver; +  	u32 ampdu_ref;  	bool ampdu_toggle; @@ -1079,8 +1094,9 @@ struct iwl_mvm {  	/* data related to data path */  	struct iwl_rx_phy_info last_phy_info; -	struct ieee80211_sta __rcu *fw_id_to_mac_id[IWL_MVM_STATION_COUNT_MAX]; -	struct ieee80211_link_sta __rcu *fw_id_to_link_sta[IWL_MVM_STATION_COUNT_MAX]; +	struct ieee80211_sta __rcu *fw_id_to_mac_id[IWL_STATION_COUNT_MAX]; +	/* note: fw_id_to_link_sta must be protected by wiphy and mvm mutexes */ +	struct ieee80211_link_sta __rcu *fw_id_to_link_sta[IWL_STATION_COUNT_MAX];  	u8 rx_ba_sessions;  	/* configured by mac80211 */ @@ -1169,10 +1185,6 @@ struct iwl_mvm {  	struct ieee80211_vif __rcu *vif_id_to_mac[NUM_MAC_INDEX_DRIVER]; -	struct ieee80211_bss_conf __rcu *link_id_to_link_conf[IWL_MVM_FW_MAX_LINK_ID + 1]; - -	/* -1 for always, 0 for never, >0 for that many times */ -	s8 fw_restart;  	u8 *error_recovery_buf;  #ifdef CONFIG_IWLWIFI_LEDS @@ -1181,7 +1193,7 @@ struct iwl_mvm {  	struct ieee80211_vif *p2p_device_vif; -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP  	struct wiphy_wowlan_support wowlan;  	int gtk_ivlen, gtk_icvlen, ptk_ivlen, ptk_icvlen; @@ -1205,8 +1217,11 @@ struct iwl_mvm {  	wait_queue_head_t rx_sync_waitq; -	/* BT-Coex */ -	struct iwl_bt_coex_profile_notif last_bt_notif; +	/* BT-Coex - only one of those will be used */ +	union { +		struct iwl_bt_coex_prof_old_notif last_bt_notif; +		struct iwl_bt_coex_profile_notif last_bt_wifi_loss; +	};  	struct iwl_bt_coex_ci_cmd last_bt_ci_cmd;  	u8 bt_tx_prio; @@ -1241,11 +1256,6 @@ struct iwl_mvm {  	struct iwl_time_quota_cmd last_quota_cmd; -#ifdef CONFIG_NL80211_TESTMODE -	u32 noa_duration; -	struct ieee80211_vif *noa_vif; -#endif -  	/* Tx queues */  	u16 aux_queue;  	u16 snif_queue; @@ -1305,7 +1315,7 @@ struct iwl_mvm {  		struct cfg80211_pmsr_request *req;  		struct wireless_dev *req_wdev;  		struct list_head loc_list; -		int responses[IWL_MVM_TOF_MAX_APS]; +		int responses[IWL_TOF_MAX_APS];  		struct {  			struct list_head resp;  		} smooth; @@ -1320,7 +1330,6 @@ struct iwl_mvm {  		u8 range_resp;  	} cmd_ver; -	struct ieee80211_vif *nan_vif;  	struct iwl_mvm_baid_data __rcu *baid_map[IWL_MAX_BAID];  	/* @@ -1343,10 +1352,6 @@ struct iwl_mvm {  	__le16 cur_aid;  	u8 cur_bssid[ETH_ALEN]; -#ifdef CONFIG_ACPI -	struct iwl_phy_specific_cfg phy_filters; -#endif -  	/* report rx timestamp in ptp clock time */  	bool rx_ts_ptp; @@ -1394,8 +1399,6 @@ DEFINE_GUARD(mvm, struct iwl_mvm *, mutex_lock(&_T->mutex), mutex_unlock(&_T->mu   * @IWL_MVM_STATUS_IN_D3: in D3 (or at least about to go into it)   * @IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE: suppress one error log   *	if this is set, when intentionally triggered - * @IWL_MVM_STATUS_STARTING: starting mac, - *	used to disable restart flow while in STARTING state   */  enum iwl_mvm_status {  	IWL_MVM_STATUS_HW_RFKILL, @@ -1407,7 +1410,6 @@ enum iwl_mvm_status {  	IWL_MVM_STATUS_FIRMWARE_RUNNING,  	IWL_MVM_STATUS_IN_D3,  	IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE, -	IWL_MVM_STATUS_STARTING,  };  struct iwl_mvm_csme_conn_info { @@ -1488,20 +1490,6 @@ iwl_mvm_rcu_dereference_vif_id(struct iwl_mvm *mvm, u8 vif_id, bool rcu)  					 lockdep_is_held(&mvm->mutex));  } -static inline struct ieee80211_bss_conf * -iwl_mvm_rcu_fw_link_id_to_link_conf(struct iwl_mvm *mvm, u8 link_id, bool rcu) -{ -	if (IWL_FW_CHECK(mvm, link_id >= ARRAY_SIZE(mvm->link_id_to_link_conf), -			 "erroneous FW link ID: %d\n", link_id)) -		return NULL; - -	if (rcu) -		return rcu_dereference(mvm->link_id_to_link_conf[link_id]); - -	return rcu_dereference_protected(mvm->link_id_to_link_conf[link_id], -					 lockdep_is_held(&mvm->mutex)); -} -  static inline bool iwl_mvm_is_adaptive_dwell_supported(struct iwl_mvm *mvm)  {  	return fw_has_api(&mvm->fw->ucode_capa, @@ -1559,7 +1547,7 @@ static inline bool iwl_mvm_is_lar_supported(struct iwl_mvm *mvm)  	 * Enable LAR only if it is supported by the FW (TLV) &&  	 * enabled in the NVM  	 */ -	if (mvm->cfg->nvm_type == IWL_NVM_EXT) +	if (mvm->trans->cfg->nvm_type == IWL_NVM_EXT)  		return nvm_lar && tlv_lar;  	else  		return tlv_lar; @@ -1583,8 +1571,7 @@ static inline bool iwl_mvm_bt_is_rrc_supported(struct iwl_mvm *mvm)  static inline bool iwl_mvm_is_csum_supported(struct iwl_mvm *mvm)  {  	return fw_has_capa(&mvm->fw->ucode_capa, -			   IWL_UCODE_TLV_CAPA_CSUM_SUPPORT) && -		!IWL_MVM_HW_CSUM_DISABLE; +			   IWL_UCODE_TLV_CAPA_CSUM_SUPPORT);  }  static inline bool iwl_mvm_is_mplut_supported(struct iwl_mvm *mvm) @@ -1624,13 +1611,13 @@ static inline bool iwl_mvm_has_new_station_api(const struct iwl_fw *fw)  static inline bool iwl_mvm_has_new_tx_api(struct iwl_mvm *mvm)  {  	/* TODO - replace with TLV once defined */ -	return mvm->trans->trans_cfg->gen2; +	return mvm->trans->mac_cfg->gen2;  }  static inline bool iwl_mvm_has_unified_ucode(struct iwl_mvm *mvm)  {  	/* TODO - better define this */ -	return mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000; +	return mvm->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_22000;  }  static inline bool iwl_mvm_is_cdb_supported(struct iwl_mvm *mvm) @@ -1655,7 +1642,7 @@ static inline bool iwl_mvm_cdb_scan_api(struct iwl_mvm *mvm)  	 * but then there's a little bit of code in scan that won't make  	 * any sense...  	 */ -	return mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000; +	return mvm->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_22000;  }  static inline bool iwl_mvm_is_scan_ext_chan_supported(struct iwl_mvm *mvm) @@ -1705,9 +1692,9 @@ static inline struct agg_tx_status *  iwl_mvm_get_agg_status(struct iwl_mvm *mvm, void *tx_resp)  {  	if (iwl_mvm_has_new_tx_api(mvm)) -		return &((struct iwl_mvm_tx_resp *)tx_resp)->status; +		return &((struct iwl_tx_resp *)tx_resp)->status;  	else -		return ((struct iwl_mvm_tx_resp_v3 *)tx_resp)->status; +		return ((struct iwl_tx_resp_v3 *)tx_resp)->status;  }  static inline bool iwl_mvm_is_tt_in_fw(struct iwl_mvm *mvm) @@ -1730,12 +1717,19 @@ static inline bool iwl_mvm_is_ctdp_supported(struct iwl_mvm *mvm)  static inline bool iwl_mvm_is_esr_supported(struct iwl_trans *trans)  { -	if ((CSR_HW_RFID_TYPE(trans->hw_rf_id) == IWL_CFG_RF_TYPE_FM) && -	    !CSR_HW_RFID_IS_CDB(trans->hw_rf_id)) -		/* Step A doesn't support eSR */ -		return CSR_HW_RFID_STEP(trans->hw_rf_id); +	if (CSR_HW_RFID_IS_CDB(trans->info.hw_rf_id)) +		return false; -	return false; +	switch (CSR_HW_RFID_TYPE(trans->info.hw_rf_id)) { +	case IWL_CFG_RF_TYPE_FM: +		/* Step A doesn't support eSR */ +		return CSR_HW_RFID_STEP(trans->info.hw_rf_id); +	case IWL_CFG_RF_TYPE_WH: +	case IWL_CFG_RF_TYPE_PE: +		return true; +	default: +		return false; +	}  }  static inline int iwl_mvm_max_active_links(struct iwl_mvm *mvm, @@ -1748,9 +1742,9 @@ static inline int iwl_mvm_max_active_links(struct iwl_mvm *mvm,  	/* Check if HW supports eSR or STR */  	if (iwl_mvm_is_esr_supported(trans) || -	    (CSR_HW_RFID_TYPE(trans->hw_rf_id) == IWL_CFG_RF_TYPE_FM && -	     CSR_HW_RFID_IS_CDB(trans->hw_rf_id))) -		return IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM; +	    (CSR_HW_RFID_TYPE(trans->info.hw_rf_id) == IWL_CFG_RF_TYPE_FM && +	     CSR_HW_RFID_IS_CDB(trans->info.hw_rf_id))) +		return IWL_FW_MAX_ACTIVE_LINKS_NUM;  	return 1;  } @@ -1762,13 +1756,20 @@ extern const u8 iwl_mvm_ac_to_bz_tx_fifo[];  static inline u8 iwl_mvm_mac_ac_to_tx_fifo(struct iwl_mvm *mvm,  					   enum ieee80211_ac_numbers ac)  { -	if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) +	if (mvm->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_BZ)  		return iwl_mvm_ac_to_bz_tx_fifo[ac];  	if (iwl_mvm_has_new_tx_api(mvm))  		return iwl_mvm_ac_to_gen2_tx_fifo[ac];  	return iwl_mvm_ac_to_tx_fifo[ac];  } +static inline bool iwl_mvm_has_rlc_offload(struct iwl_mvm *mvm) +{ +	return iwl_fw_lookup_cmd_ver(mvm->fw, +				     WIDE_ID(DATA_PATH_GROUP, RLC_CONFIG_CMD), +				     0) >= 3; +} +  struct iwl_rate_info {  	u8 plcp;	/* uCode API:  IWL_RATE_6M_PLCP, etc. */  	u8 plcp_siso;	/* uCode API:  IWL_RATE_SISO_6M_PLCP, etc. */ @@ -1794,9 +1795,6 @@ int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,  void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags,  			       enum nl80211_band band,  			       struct ieee80211_tx_rate *r); -void iwl_mvm_hwrate_to_tx_rate_v1(u32 rate_n_flags, -				  enum nl80211_band band, -				  struct ieee80211_tx_rate *r);  u8 iwl_mvm_mac80211_idx_to_hwrate(const struct iwl_fw *fw, int rate_idx);  u8 iwl_mvm_mac80211_ac_to_ucode_ac(enum ieee80211_ac_numbers ac);  bool iwl_mvm_is_nic_ack_enabled(struct iwl_mvm *mvm, struct ieee80211_vif *vif); @@ -1811,7 +1809,6 @@ u8 iwl_mvm_next_antenna(struct iwl_mvm *mvm, u8 valid, u8 last_idx);  void iwl_mvm_get_sync_time(struct iwl_mvm *mvm, int clock_type, u32 *gp2,  			   u64 *boottime, ktime_t *realtime);  u32 iwl_mvm_get_systime(struct iwl_mvm *mvm); -u32 iwl_mvm_find_ie_offset(u8 *beacon, u8 eid, u32 frame_size);  /* Tx / Host Commands */  int __must_check iwl_mvm_send_cmd(struct iwl_mvm *mvm, @@ -1828,11 +1825,12 @@ int iwl_mvm_tx_skb_sta(struct iwl_mvm *mvm, struct sk_buff *skb,  		       struct ieee80211_sta *sta);  int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb);  void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, -			struct iwl_tx_cmd *tx_cmd, +			struct iwl_tx_cmd_v6_params *tx_cmd_params,  			struct ieee80211_tx_info *info, u8 sta_id); -void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd, -			    struct ieee80211_tx_info *info, -			    struct ieee80211_sta *sta, __le16 fc); +void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, +			     struct iwl_tx_cmd_v6_params *tx_cmd_params, +			     struct ieee80211_tx_info *info, +			     struct ieee80211_sta *sta, __le16 fc);  void iwl_mvm_mac_itxq_xmit(struct ieee80211_hw *hw, struct ieee80211_txq *txq);  unsigned int iwl_mvm_max_amsdu_size(struct iwl_mvm *mvm,  				    struct ieee80211_sta *sta, @@ -1861,12 +1859,12 @@ int iwl_mvm_set_sta_pkt_ext(struct iwl_mvm *mvm,  void iwl_mvm_async_handlers_purge(struct iwl_mvm *mvm);  static inline void iwl_mvm_set_tx_cmd_ccmp(struct ieee80211_tx_info *info, -					   struct iwl_tx_cmd *tx_cmd) +					   struct iwl_tx_cmd_v6_params *tx_cmd_params)  {  	struct ieee80211_key_conf *keyconf = info->control.hw_key; -	tx_cmd->sec_ctl = TX_CMD_SEC_CCM; -	memcpy(tx_cmd->key, keyconf->key, keyconf->keylen); +	tx_cmd_params->sec_ctl = TX_CMD_SEC_CCM; +	memcpy(tx_cmd_params->key, keyconf->key, keyconf->keylen);  }  static inline void iwl_mvm_wait_for_async_handlers(struct iwl_mvm *mvm) @@ -2008,7 +2006,7 @@ int iwl_mvm_phy_send_rlc(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,  void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm,  				 struct ieee80211_vif *vif);  void iwl_mvm_set_fw_basic_rates(struct iwl_mvm *mvm, struct ieee80211_vif *vif, -				struct ieee80211_bss_conf *link_conf, +				struct iwl_mvm_vif_link_info *link_info,  				__le32 *cck_rates, __le32 *ofdm_rates);  void iwl_mvm_set_fw_protection_flags(struct iwl_mvm *mvm,  				     struct ieee80211_vif *vif, @@ -2067,6 +2065,8 @@ void iwl_mvm_rx_beacon_notif(struct iwl_mvm *mvm,  			     struct iwl_rx_cmd_buffer *rxb);  void iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm,  				     struct iwl_rx_cmd_buffer *rxb); +void iwl_mvm_rx_missed_beacons_notif_legacy(struct iwl_mvm *mvm, +					    struct iwl_rx_cmd_buffer *rxb);  void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm,  				    struct iwl_rx_cmd_buffer *rxb);  void iwl_mvm_mu_mimo_grp_notif(struct iwl_mvm *mvm, @@ -2078,27 +2078,27 @@ void iwl_mvm_mac_ctxt_recalc_tsf_id(struct iwl_mvm *mvm,  				    struct ieee80211_vif *vif);  void iwl_mvm_probe_resp_data_notif(struct iwl_mvm *mvm,  				   struct iwl_rx_cmd_buffer *rxb); -void iwl_mvm_rx_missed_vap_notif(struct iwl_mvm *mvm, -				 struct iwl_rx_cmd_buffer *rxb);  void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,  					struct iwl_rx_cmd_buffer *rxb);  void iwl_mvm_channel_switch_error_notif(struct iwl_mvm *mvm,  					struct iwl_rx_cmd_buffer *rxb); +void iwl_mvm_rx_beacon_filter_notif(struct iwl_mvm *mvm, +				    struct iwl_rx_cmd_buffer *rxb); +  /* Bindings */  int iwl_mvm_binding_add_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);  int iwl_mvm_binding_remove_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);  u32 iwl_mvm_get_lmac_id(struct iwl_mvm *mvm, enum nl80211_band band);  /* Links */ -int iwl_mvm_set_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif, -			     struct ieee80211_bss_conf *link_conf); +void iwl_mvm_init_link(struct iwl_mvm_vif_link_info *link); +void iwl_mvm_set_link_fw_id(struct iwl_mvm *mvm, struct ieee80211_vif *vif, +			    struct ieee80211_bss_conf *link_conf);  int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,  		     struct ieee80211_bss_conf *link_conf);  int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,  			 struct ieee80211_bss_conf *link_conf,  			 u32 changes, bool active); -int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif, -			       struct ieee80211_bss_conf *link_conf);  int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,  			struct ieee80211_bss_conf *link_conf);  int iwl_mvm_disable_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif, @@ -2122,6 +2122,9 @@ bool iwl_mvm_mld_valid_link_pair(struct ieee80211_vif *vif,  				 const struct iwl_mvm_link_sel_data *b);  s8 iwl_mvm_average_dbm_values(const struct iwl_umac_scan_channel_survey_notif *notif); + +extern const struct iwl_hcmd_arr iwl_mvm_groups[]; +extern const unsigned int iwl_mvm_groups_size;  #endif  /* AP and IBSS */ @@ -2296,7 +2299,7 @@ void iwl_mvm_ipv6_addr_change(struct ieee80211_hw *hw,  void iwl_mvm_set_default_unicast_key(struct ieee80211_hw *hw,  				     struct ieee80211_vif *vif, int idx);  extern const struct file_operations iwl_dbgfs_d3_test_ops; -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP  void iwl_mvm_set_last_nonqos_seq(struct iwl_mvm *mvm,  				 struct ieee80211_vif *vif);  void iwl_mvm_fast_suspend(struct iwl_mvm *mvm); @@ -2317,7 +2320,7 @@ static inline int iwl_mvm_fast_resume(struct iwl_mvm *mvm)  }  #endif  void iwl_mvm_set_wowlan_qos_seq(struct iwl_mvm_sta *mvm_ap_sta, -				struct iwl_wowlan_config_cmd *cmd); +				struct iwl_wowlan_config_cmd_v6 *cmd);  int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm,  			       struct ieee80211_vif *vif,  			       bool disable_offloading, @@ -2327,6 +2330,8 @@ int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm,  /* BT Coex */  int iwl_mvm_send_bt_init_conf(struct iwl_mvm *mvm); +void iwl_mvm_rx_bt_coex_old_notif(struct iwl_mvm *mvm, +				  struct iwl_rx_cmd_buffer *rxb);  void iwl_mvm_rx_bt_coex_notif(struct iwl_mvm *mvm,  			      struct iwl_rx_cmd_buffer *rxb);  void iwl_mvm_bt_rssi_event(struct iwl_mvm *mvm, struct ieee80211_vif *vif, @@ -2441,7 +2446,7 @@ void iwl_mvm_vif_set_low_latency(struct iwl_mvm_vif *mvmvif, bool set,   */  static inline u32 iwl_mvm_flushable_queues(struct iwl_mvm *mvm)  { -	return ((BIT(mvm->trans->trans_cfg->base_params->num_of_queues) - 1) & +	return ((BIT(mvm->trans->mac_cfg->base->num_of_queues) - 1) &  		~BIT(IWL_MVM_DQA_CMD_QUEUE));  } @@ -2500,14 +2505,6 @@ void iwl_mvm_ftm_restart_responder(struct iwl_mvm *mvm,  				   struct ieee80211_bss_conf *bss_conf);  void iwl_mvm_ftm_responder_stats(struct iwl_mvm *mvm,  				 struct iwl_rx_cmd_buffer *rxb); -#if defined(__linux__) -int iwl_mvm_ftm_resp_remove_pasn_sta(struct iwl_mvm *mvm, -				     struct ieee80211_vif *vif, u8 *addr); -int iwl_mvm_ftm_respoder_add_pasn_sta(struct iwl_mvm *mvm, -				      struct ieee80211_vif *vif, -				      u8 *addr, u32 cipher, u8 *tk, u32 tk_len, -				      u8 *hltk, u32 hltk_len); -#endif  void iwl_mvm_ftm_responder_clear(struct iwl_mvm *mvm,  				 struct ieee80211_vif *vif); @@ -2522,10 +2519,6 @@ int iwl_mvm_ftm_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,  void iwl_mvm_ftm_abort(struct iwl_mvm *mvm, struct cfg80211_pmsr_request *req);  void iwl_mvm_ftm_initiator_smooth_config(struct iwl_mvm *mvm);  void iwl_mvm_ftm_initiator_smooth_stop(struct iwl_mvm *mvm); -int iwl_mvm_ftm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, -			     u8 *addr, u32 cipher, u8 *tk, u32 tk_len, -			     u8 *hltk, u32 hltk_len); -void iwl_mvm_ftm_remove_pasn_sta(struct iwl_mvm *mvm, u8 *addr);  /* TDLS */ @@ -2575,10 +2568,8 @@ void iwl_mvm_tcm_add_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);  void iwl_mvm_tcm_rm_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);  u8 iwl_mvm_tcm_load_percentage(u32 airtime, u32 elapsed); -void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error);  unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm, -				    struct ieee80211_vif *vif, -				    bool tdls, bool cmd_q); +				    struct ieee80211_vif *vif);  void iwl_mvm_connection_loss(struct iwl_mvm *mvm, struct ieee80211_vif *vif,  			     const char *errmsg);  void iwl_mvm_event_frame_timeout_callback(struct iwl_mvm *mvm, @@ -2864,13 +2855,16 @@ void iwl_mvm_mac_wake_tx_queue(struct ieee80211_hw *hw,  int iwl_mvm_mac_ampdu_action(struct ieee80211_hw *hw,  			     struct ieee80211_vif *vif,  			     struct ieee80211_ampdu_params *params); -int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); -int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); +int iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant, +			   u32 *rx_ant); +int iwl_mvm_op_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, +			   u32 rx_ant);  int iwl_mvm_mac_start(struct ieee80211_hw *hw);  void iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw,  				   enum ieee80211_reconfig_type reconfig_type);  void iwl_mvm_mac_stop(struct ieee80211_hw *hw, bool suspend); -static inline int iwl_mvm_mac_config(struct ieee80211_hw *hw, u32 changed) +static inline int iwl_mvm_mac_config(struct ieee80211_hw *hw, int radio_idx, +				     u32 changed)  {  	return 0;  } @@ -2903,9 +2897,10 @@ iwl_mvm_mac_release_buffered_frames(struct ieee80211_hw *hw,  				    int num_frames,  				    enum ieee80211_frame_release_type reason,  				    bool more_data); -int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, u32 value); +int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, +				  u32 value);  void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -			   struct ieee80211_sta *sta, u32 changed); +			   struct ieee80211_link_sta *link_sta, u32 changed);  void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw *hw,  				struct ieee80211_vif *vif,  				struct ieee80211_prep_tx_info *info); @@ -2973,25 +2968,19 @@ void iwl_mvm_abort_pmsr(struct ieee80211_hw *hw, struct ieee80211_vif *vif,  bool iwl_mvm_have_links_same_channel(struct iwl_mvm_vif *vif1,  				     struct iwl_mvm_vif *vif2);  bool iwl_mvm_vif_is_active(struct iwl_mvm_vif *mvmvif); -int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, +int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, +			 struct ieee80211_bss_conf *bss_conf,  			 s16 tx_power);  int iwl_mvm_set_hw_timestamp(struct ieee80211_hw *hw,  			     struct ieee80211_vif *vif,  			     struct cfg80211_set_hw_timestamp *hwts);  int iwl_mvm_update_mu_groups(struct iwl_mvm *mvm, struct ieee80211_vif *vif);  bool iwl_mvm_enable_fils(struct iwl_mvm *mvm, +			 struct ieee80211_vif *vif,  			 struct ieee80211_chanctx_conf *ctx); -bool iwl_mvm_is_ftm_responder_chanctx(struct iwl_mvm *mvm, -				      struct ieee80211_chanctx_conf *ctx); - -static inline struct cfg80211_chan_def * -iwl_mvm_chanctx_def(struct iwl_mvm *mvm, struct ieee80211_chanctx_conf *ctx) -{ -	bool use_def = iwl_mvm_is_ftm_responder_chanctx(mvm, ctx) || -		iwl_mvm_enable_fils(mvm, ctx); -	return use_def ? &ctx->def : &ctx->min_def; -} +struct cfg80211_chan_def * +iwl_mvm_chanctx_def(struct iwl_mvm *mvm, struct ieee80211_chanctx_conf *ctx);  void iwl_mvm_roc_duration_and_delay(struct ieee80211_vif *vif,  				    u32 duration_ms, @@ -3033,4 +3022,12 @@ iwl_mvm_send_ap_tx_power_constraint_cmd(struct iwl_mvm *mvm,  					struct ieee80211_vif *vif,  					struct ieee80211_bss_conf *bss_conf,  					bool is_ap); + +void iwl_mvm_smps_workaround(struct iwl_mvm *mvm, struct ieee80211_vif *vif, +			     bool update); + +/* rate_n_flags conversion */ +u32 iwl_mvm_v3_rate_from_fw(__le32 rate, u8 rate_ver); +__le32 iwl_mvm_v3_rate_to_fw(u32 rate, u8 rate_ver); +  #endif /* __IWL_MVM_H__ */ | 
