Commit 6587ef6e authored by Mordechay Goodstein's avatar Mordechay Goodstein Committed by Kalle Valo
Browse files

iwlwifi: mvm: print rate_n_flags in a pretty format



Use the rs_pretty_print_rate() function to print the rate_n_flags in
more human-readable format.

Signed-off-by: default avatarMordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 19ff9b2c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -341,9 +341,11 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
	lq_sta = &mvmsta->lq_sta.rs_fw;

	if (flags & IWL_TLC_NOTIF_FLAG_RATE) {
		char pretty_rate[100];
		lq_sta->last_rate_n_flags = le32_to_cpu(notif->rate);
		IWL_DEBUG_RATE(mvm, "new rate_n_flags: 0x%X\n",
		rs_pretty_print_rate(pretty_rate, sizeof(pretty_rate),
				     lq_sta->last_rate_n_flags);
		IWL_DEBUG_RATE(mvm, "new rate: %s\n", pretty_rate);
	}

	if (flags & IWL_TLC_NOTIF_FLAG_AMSDU && !mvmsta->orig_amsdu_len) {
+3 −3
Original line number Diff line number Diff line
@@ -3685,7 +3685,6 @@ static void rs_free_sta(void *mvm_r, struct ieee80211_sta *sta, void *mvm_sta)
	IWL_DEBUG_RATE(mvm, "leave\n");
}

#ifdef CONFIG_MAC80211_DEBUGFS
int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
{

@@ -3741,14 +3740,15 @@ int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
	}

	return scnprintf(buf, bufsz,
			 "%s | ANT: %s BW: %s MCS: %d NSS: %d %s%s%s%s\n",
			 type, rs_pretty_ant(ant), bw, mcs, nss,
			 "0x%x: %s | ANT: %s BW: %s MCS: %d NSS: %d %s%s%s%s\n",
			 rate, type, rs_pretty_ant(ant), bw, mcs, nss,
			 (rate & RATE_MCS_SGI_MSK) ? "SGI " : "NGI ",
			 (rate & RATE_MCS_STBC_MSK) ? "STBC " : "",
			 (rate & RATE_MCS_LDPC_MSK) ? "LDPC " : "",
			 (rate & RATE_MCS_BF_MSK) ? "BF " : "");
}

#ifdef CONFIG_MAC80211_DEBUGFS
/**
 * Program the device to use fixed rate for frame transmit
 * This is for debugging/testing only