Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f50d693b authored by Sara Sharon's avatar Sara Sharon Committed by Luca Coelho
Browse files

iwlwifi: mvm: add some debug data to TX path



This helps debugging when things go wrong.

Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 714afd35
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -941,8 +941,14 @@ void iwl_mvm_mac_itxq_xmit(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
			       IWL_PLAT_PM_MODE_DISABLED))) {
			       IWL_PLAT_PM_MODE_DISABLED))) {
			skb = ieee80211_tx_dequeue(hw, txq);
			skb = ieee80211_tx_dequeue(hw, txq);


			if (!skb)
			if (!skb) {
				if (txq->sta)
					IWL_DEBUG_TX(mvm,
						     "TXQ of sta %pM tid %d is now empty\n",
						     txq->sta->addr,
						     txq->tid);
				break;
				break;
			}


			if (!txq->sta)
			if (!txq->sta)
				iwl_mvm_tx_skb_non_sta(mvm, skb);
				iwl_mvm_tx_skb_non_sta(mvm, skb);
+7 −4
Original line number Original line Diff line number Diff line
@@ -1115,12 +1115,14 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
	 */
	 */
	if (ieee80211_is_data_qos(fc) && !ieee80211_is_qos_nullfunc(fc)) {
	if (ieee80211_is_data_qos(fc) && !ieee80211_is_qos_nullfunc(fc)) {
		tid = ieee80211_get_tid(hdr);
		tid = ieee80211_get_tid(hdr);
		if (WARN_ON_ONCE(tid >= IWL_MAX_TID_COUNT))
		if (WARN_ONCE(tid >= IWL_MAX_TID_COUNT, "Invalid TID %d", tid))
			goto drop_unlock_sta;
			goto drop_unlock_sta;


		is_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU;
		is_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU;
		if (WARN_ON_ONCE(is_ampdu &&
		if (WARN_ONCE(is_ampdu &&
				 mvmsta->tid_data[tid].state != IWL_AGG_ON))
			      mvmsta->tid_data[tid].state != IWL_AGG_ON,
			      "Invalid internal agg state %d for TID %d",
			       mvmsta->tid_data[tid].state, tid))
			goto drop_unlock_sta;
			goto drop_unlock_sta;


		seq_number = mvmsta->tid_data[tid].seq_number;
		seq_number = mvmsta->tid_data[tid].seq_number;
@@ -1142,7 +1144,7 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,


	WARN_ON_ONCE(info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM);
	WARN_ON_ONCE(info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM);


	if (WARN_ON_ONCE(txq_id == IWL_MVM_INVALID_QUEUE)) {
	if (WARN_ONCE(txq_id == IWL_MVM_INVALID_QUEUE, "Invalid TXQ id")) {
		iwl_trans_free_tx_cmd(mvm->trans, dev_cmd);
		iwl_trans_free_tx_cmd(mvm->trans, dev_cmd);
		spin_unlock(&mvmsta->lock);
		spin_unlock(&mvmsta->lock);
		return 0;
		return 0;
@@ -1192,6 +1194,7 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
	iwl_trans_free_tx_cmd(mvm->trans, dev_cmd);
	iwl_trans_free_tx_cmd(mvm->trans, dev_cmd);
	spin_unlock(&mvmsta->lock);
	spin_unlock(&mvmsta->lock);
drop:
drop:
	IWL_DEBUG_TX(mvm, "TX to [%d|%d] dropped\n", mvmsta->sta_id, tid);
	return -1;
	return -1;
}
}