Lines Matching refs:mvm

9 #include "mvm.h"
78 static void iwl_mvm_phy_ctxt_set_rxchain(struct iwl_mvm *mvm,
97 if (active_cnt == 1 && iwl_mvm_rx_diversity_allowed(mvm, ctxt)) {
102 *rxchain_info = cpu_to_le32(iwl_mvm_get_valid_rx_ant(mvm) <<
108 if (unlikely(mvm->dbgfs_rx_phyinfo))
109 *rxchain_info = cpu_to_le32(mvm->dbgfs_rx_phyinfo);
116 static void iwl_mvm_phy_ctxt_cmd_data_v1(struct iwl_mvm *mvm,
123 iwl_mvm_chan_info_cmd_tail(mvm, &cmd->ci);
126 iwl_mvm_set_chan_info_chandef(mvm, &cmd->ci, chandef);
128 iwl_mvm_phy_ctxt_set_rxchain(mvm, ctxt, &tail->rxchain_info,
131 tail->txchain_info = cpu_to_le32(iwl_mvm_get_valid_tx_ant(mvm));
137 static void iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm *mvm,
143 cmd->lmac_id = cpu_to_le32(iwl_mvm_get_lmac_id(mvm,
147 iwl_mvm_set_chan_info_chandef(mvm, &cmd->ci, chandef);
150 if (iwl_fw_lookup_cmd_ver(mvm->fw, WIDE_ID(DATA_PATH_GROUP, RLC_CONFIG_CMD), 0) < 2)
151 iwl_mvm_phy_ctxt_set_rxchain(mvm, ctxt, &cmd->rxchain_info,
155 int iwl_mvm_phy_send_rlc(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,
165 if (iwl_fw_lookup_cmd_ver(mvm->fw, WIDE_ID(DATA_PATH_GROUP,
181 iwl_mvm_phy_ctxt_set_rxchain(mvm, ctxt, &cmd.rlc.rx_chain_info,
184 IWL_DEBUG_FW(mvm, "Send RLC command: phy=%d, rx_chain_info=0x%x\n",
187 return iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(RLC_CONFIG_CMD,
198 static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm,
206 int ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_CONTEXT_CMD, 1);
218 iwl_mvm_phy_ctxt_cmd_data(mvm, ctxt, &cmd, chandef,
230 ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD,
234 u16 len = sizeof(cmd) - iwl_mvm_chan_info_padding(mvm);
242 iwl_mvm_phy_ctxt_cmd_data_v1(mvm, ctxt, &cmd, chandef,
245 ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD,
248 IWL_ERR(mvm, "PHY ctxt cmd error ver %d not supported\n", ver);
254 IWL_ERR(mvm, "PHY ctxt cmd error. ret=%d\n", ret);
259 return iwl_mvm_phy_send_rlc(mvm, ctxt, chains_static,
268 int iwl_mvm_phy_ctxt_add(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,
275 WARN_ON(!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) &&
277 lockdep_assert_held(&mvm->mutex);
283 ret = iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, ap,
299 void iwl_mvm_phy_ctxt_ref(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt)
301 lockdep_assert_held(&mvm->mutex);
315 int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,
322 lockdep_assert_held(&mvm->mutex);
327 if (iwl_fw_lookup_cmd_ver(mvm->fw, WIDE_ID(DATA_PATH_GROUP,
332 return iwl_mvm_phy_send_rlc(mvm, ctxt, chains_static,
335 if (fw_has_capa(&mvm->fw->ucode_capa,
341 ret = iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, NULL,
355 return iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, ap,
360 void iwl_mvm_phy_ctxt_unref(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt)
363 lockdep_assert_held(&mvm->mutex);
375 iwl_mvm_phy_ctxt_apply(mvm, ctxt, &chandef, NULL, 1, 1,
393 int iwl_mvm_phy_ctx_count(struct iwl_mvm *mvm)
397 ieee80211_iterate_active_interfaces_atomic(mvm->hw,