Lines Matching refs:mvm
74 iwl_mvm_bar_check_trigger(struct iwl_mvm *mvm, const u8 *addr, in iwl_mvm_bar_check_trigger() argument
80 if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_BA)) in iwl_mvm_bar_check_trigger()
83 trig = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_BA); in iwl_mvm_bar_check_trigger()
86 if (!iwl_fw_dbg_trigger_check_stop(mvm, NULL, trig)) in iwl_mvm_bar_check_trigger()
92 iwl_mvm_fw_dbg_collect_trig(mvm, trig, in iwl_mvm_bar_check_trigger()
100 void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, in iwl_mvm_set_tx_cmd() argument
135 iwl_mvm_bar_check_trigger(mvm, bar->ra, tx_cmd->tid_tspec, in iwl_mvm_set_tx_cmd()
151 tx_flags |= iwl_mvm_bt_coex_tx_prio(mvm, hdr, info, ac) << in iwl_mvm_set_tx_cmd()
172 if (ieee80211_is_data(fc) && len > mvm->rts_threshold && in iwl_mvm_set_tx_cmd()
176 if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_set_tx_cmd()
192 void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd, in iwl_mvm_set_tx_cmd_rate() argument
239 &mvm->nvm_data->bands[info->band], sta); in iwl_mvm_set_tx_cmd_rate()
251 mvm->mgmt_last_antenna_idx = in iwl_mvm_set_tx_cmd_rate()
252 iwl_mvm_next_antenna(mvm, iwl_mvm_get_valid_tx_ant(mvm), in iwl_mvm_set_tx_cmd_rate()
253 mvm->mgmt_last_antenna_idx); in iwl_mvm_set_tx_cmd_rate()
256 !iwl_mvm_bt_coex_is_shared_ant_avail(mvm)) in iwl_mvm_set_tx_cmd_rate()
257 rate_flags = mvm->cfg->non_shared_ant << RATE_MCS_ANT_POS; in iwl_mvm_set_tx_cmd_rate()
260 BIT(mvm->mgmt_last_antenna_idx) << RATE_MCS_ANT_POS; in iwl_mvm_set_tx_cmd_rate()
273 static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm, in iwl_mvm_set_tx_cmd_crypto() argument
322 iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, in iwl_mvm_set_tx_params() argument
330 dev_cmd = iwl_trans_alloc_tx_cmd(mvm->trans); in iwl_mvm_set_tx_params()
340 iwl_mvm_set_tx_cmd_crypto(mvm, info, tx_cmd, skb, hdrlen); in iwl_mvm_set_tx_params()
342 iwl_mvm_set_tx_cmd(mvm, skb, tx_cmd, info, sta_id); in iwl_mvm_set_tx_params()
344 iwl_mvm_set_tx_cmd_rate(mvm, tx_cmd, info, sta, hdr->frame_control); in iwl_mvm_set_tx_params()
354 int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) in iwl_mvm_tx_skb_non_sta() argument
379 IEEE80211_SKB_CB(skb)->hw_queue = mvm->aux_queue; in iwl_mvm_tx_skb_non_sta()
390 sta_id = mvm->aux_sta.sta_id; in iwl_mvm_tx_skb_non_sta()
407 IWL_DEBUG_TX(mvm, "station Id %d, queue=%d\n", sta_id, info->hw_queue); in iwl_mvm_tx_skb_non_sta()
409 dev_cmd = iwl_mvm_set_tx_params(mvm, skb, hdrlen, NULL, sta_id); in iwl_mvm_tx_skb_non_sta()
419 if (iwl_trans_tx(mvm->trans, skb, dev_cmd, info->hw_queue)) { in iwl_mvm_tx_skb_non_sta()
420 iwl_trans_free_tx_cmd(mvm->trans, dev_cmd); in iwl_mvm_tx_skb_non_sta()
431 atomic_inc(&mvm->pending_frames[sta_id]); in iwl_mvm_tx_skb_non_sta()
439 int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb, in iwl_mvm_tx_skb() argument
464 dev_cmd = iwl_mvm_set_tx_params(mvm, skb, hdrlen, sta, mvmsta->sta_id); in iwl_mvm_tx_skb()
513 IWL_DEBUG_TX(mvm, "TX to [%d|%d] Q:%d - seq: 0x%x\n", mvmsta->sta_id, in iwl_mvm_tx_skb()
516 if (iwl_trans_tx(mvm->trans, skb, dev_cmd, txq_id)) in iwl_mvm_tx_skb()
524 if (txq_id < mvm->first_agg_queue) in iwl_mvm_tx_skb()
525 atomic_inc(&mvm->pending_frames[mvmsta->sta_id]); in iwl_mvm_tx_skb()
530 iwl_trans_free_tx_cmd(mvm->trans, dev_cmd); in iwl_mvm_tx_skb()
536 static void iwl_mvm_check_ratid_empty(struct iwl_mvm *mvm, in iwl_mvm_check_ratid_empty() argument
561 IWL_DEBUG_TX_QUEUES(mvm, in iwl_mvm_check_ratid_empty()
569 IWL_DEBUG_TX_QUEUES(mvm, in iwl_mvm_check_ratid_empty()
572 iwl_mvm_disable_txq(mvm, tid_data->txq_id, in iwl_mvm_check_ratid_empty()
673 static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, in iwl_mvm_rx_tx_cmd_single() argument
694 iwl_trans_reclaim(mvm->trans, txq_id, ssn, &skbs); in iwl_mvm_rx_tx_cmd_single()
702 iwl_trans_free_tx_cmd(mvm->trans, info->driver_data[1]); in iwl_mvm_rx_tx_cmd_single()
728 if (txq_id >= mvm->first_agg_queue && in iwl_mvm_rx_tx_cmd_single()
749 ieee80211_tx_status(mvm->hw, skb); in iwl_mvm_rx_tx_cmd_single()
752 if (txq_id >= mvm->first_agg_queue) { in iwl_mvm_rx_tx_cmd_single()
773 IWL_DEBUG_TX_REPLY(mvm, in iwl_mvm_rx_tx_cmd_single()
777 IWL_DEBUG_TX_REPLY(mvm, in iwl_mvm_rx_tx_cmd_single()
785 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_tx_cmd_single()
802 IWL_DEBUG_TX_REPLY(mvm, "Next reclaimed packet:%d\n", in iwl_mvm_rx_tx_cmd_single()
804 iwl_mvm_check_ratid_empty(mvm, sta, tid); in iwl_mvm_rx_tx_cmd_single()
820 if (txq_id >= mvm->first_agg_queue) in iwl_mvm_rx_tx_cmd_single()
827 if (!atomic_sub_and_test(skb_freed, &mvm->pending_frames[sta_id])) in iwl_mvm_rx_tx_cmd_single()
843 ieee80211_sta_block_awake(mvm->hw, sta, false); in iwl_mvm_rx_tx_cmd_single()
855 set_bit(sta_id, mvm->sta_drained); in iwl_mvm_rx_tx_cmd_single()
856 schedule_work(&mvm->sta_drained_wk); in iwl_mvm_rx_tx_cmd_single()
886 static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm, in iwl_mvm_rx_tx_cmd_agg_dbg() argument
896 IWL_DEBUG_TX_REPLY(mvm, in iwl_mvm_rx_tx_cmd_agg_dbg()
906 static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm, in iwl_mvm_rx_tx_cmd_agg_dbg() argument
911 static void iwl_mvm_rx_tx_cmd_agg(struct iwl_mvm *mvm, in iwl_mvm_rx_tx_cmd_agg() argument
920 if (WARN_ON_ONCE(SEQ_TO_QUEUE(sequence) < mvm->first_agg_queue)) in iwl_mvm_rx_tx_cmd_agg()
926 iwl_mvm_rx_tx_cmd_agg_dbg(mvm, pkt); in iwl_mvm_rx_tx_cmd_agg()
930 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_tx_cmd_agg()
944 void iwl_mvm_rx_tx_cmd(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) in iwl_mvm_rx_tx_cmd() argument
950 iwl_mvm_rx_tx_cmd_single(mvm, pkt); in iwl_mvm_rx_tx_cmd()
952 iwl_mvm_rx_tx_cmd_agg(mvm, pkt); in iwl_mvm_rx_tx_cmd()
972 void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) in iwl_mvm_rx_ba_notif() argument
998 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_ba_notif()
1010 IWL_ERR(mvm, in iwl_mvm_rx_ba_notif()
1026 iwl_trans_reclaim(mvm->trans, scd_flow, ba_resp_scd_ssn, in iwl_mvm_rx_ba_notif()
1029 IWL_DEBUG_TX_REPLY(mvm, in iwl_mvm_rx_ba_notif()
1033 IWL_DEBUG_TX_REPLY(mvm, in iwl_mvm_rx_ba_notif()
1042 iwl_mvm_check_ratid_empty(mvm, sta, tid); in iwl_mvm_rx_ba_notif()
1055 iwl_trans_free_tx_cmd(mvm->trans, info->driver_data[1]); in iwl_mvm_rx_ba_notif()
1090 IWL_DEBUG_TX_REPLY(mvm, "No reclaim. Update rs directly\n"); in iwl_mvm_rx_ba_notif()
1091 iwl_mvm_rs_tx_status(mvm, sta, tid, &ba_info); in iwl_mvm_rx_ba_notif()
1099 ieee80211_tx_status(mvm->hw, skb); in iwl_mvm_rx_ba_notif()
1111 int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, u32 flags) in iwl_mvm_flush_tx_path() argument
1119 ret = iwl_mvm_send_cmd_pdu(mvm, TXPATH_FLUSH, flags, in iwl_mvm_flush_tx_path()
1122 IWL_ERR(mvm, "Failed to send flush command (%d)\n", ret); in iwl_mvm_flush_tx_path()