Commit 0d65ce90 authored by Mordechay Goodstein's avatar Mordechay Goodstein Committed by Luca Coelho

iwlwifi: mvm: add tx fail time point

This helps collect on any tx failure fw data to better understand what
went wrong.
Signed-off-by: default avatarMordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210131201908.719de818c09a.I2788e6a4c411aa414eaa67e6b7b21d90ccd9d0c1@changeidSigned-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 1db5c347
...@@ -1324,12 +1324,24 @@ static void iwl_mvm_hwrate_to_tx_status(u32 rate_n_flags, ...@@ -1324,12 +1324,24 @@ static void iwl_mvm_hwrate_to_tx_status(u32 rate_n_flags,
} }
static void iwl_mvm_tx_status_check_trigger(struct iwl_mvm *mvm, static void iwl_mvm_tx_status_check_trigger(struct iwl_mvm *mvm,
u32 status) u32 status, __le16 frame_control)
{ {
struct iwl_fw_dbg_trigger_tlv *trig; struct iwl_fw_dbg_trigger_tlv *trig;
struct iwl_fw_dbg_trigger_tx_status *status_trig; struct iwl_fw_dbg_trigger_tx_status *status_trig;
int i; int i;
if ((status & TX_STATUS_MSK) != TX_STATUS_SUCCESS) {
enum iwl_fw_ini_time_point tp =
IWL_FW_INI_TIME_POINT_TX_FAILED;
if (ieee80211_is_action(frame_control))
tp = IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED;
iwl_dbg_tlv_time_point(&mvm->fwrt,
tp, NULL);
return;
}
trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, NULL, trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, NULL,
FW_DBG_TRIGGER_TX_STATUS); FW_DBG_TRIGGER_TX_STATUS);
if (!trig) if (!trig)
...@@ -1447,7 +1459,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, ...@@ -1447,7 +1459,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
if (skb_freed > 1) if (skb_freed > 1)
info->flags |= IEEE80211_TX_STAT_ACK; info->flags |= IEEE80211_TX_STAT_ACK;
iwl_mvm_tx_status_check_trigger(mvm, status); iwl_mvm_tx_status_check_trigger(mvm, status, hdr->frame_control);
info->status.rates[0].count = tx_resp->failure_frame + 1; info->status.rates[0].count = tx_resp->failure_frame + 1;
iwl_mvm_hwrate_to_tx_status(le32_to_cpu(tx_resp->initial_rate), iwl_mvm_hwrate_to_tx_status(le32_to_cpu(tx_resp->initial_rate),
...@@ -1631,10 +1643,13 @@ static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm, ...@@ -1631,10 +1643,13 @@ static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm,
struct agg_tx_status *frame_status = struct agg_tx_status *frame_status =
iwl_mvm_get_agg_status(mvm, tx_resp); iwl_mvm_get_agg_status(mvm, tx_resp);
int i; int i;
bool tirgger_timepoint = false;
for (i = 0; i < tx_resp->frame_count; i++) { for (i = 0; i < tx_resp->frame_count; i++) {
u16 fstatus = le16_to_cpu(frame_status[i].status); u16 fstatus = le16_to_cpu(frame_status[i].status);
/* In case one frame wasn't transmitted trigger time point */
tirgger_timepoint |= ((fstatus & AGG_TX_STATE_STATUS_MSK) !=
AGG_TX_STATE_TRANSMITTED);
IWL_DEBUG_TX_REPLY(mvm, IWL_DEBUG_TX_REPLY(mvm,
"status %s (0x%04x), try-count (%d) seq (0x%x)\n", "status %s (0x%04x), try-count (%d) seq (0x%x)\n",
iwl_get_agg_tx_status(fstatus), iwl_get_agg_tx_status(fstatus),
...@@ -1643,6 +1658,11 @@ static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm, ...@@ -1643,6 +1658,11 @@ static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm,
AGG_TX_STATE_TRY_CNT_POS, AGG_TX_STATE_TRY_CNT_POS,
le16_to_cpu(frame_status[i].sequence)); le16_to_cpu(frame_status[i].sequence));
} }
if (tirgger_timepoint)
iwl_dbg_tlv_time_point(&mvm->fwrt,
IWL_FW_INI_TIME_POINT_TX_FAILED, NULL);
} }
#else #else
static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm, static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment