mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
iwlagn: log aggregation tx command status
For aggregated frames with block ack, different status flag will be used as part of tx command response. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
This commit is contained in:
parent
54a9aa65f7
commit
e1b3fa0c22
2 changed files with 35 additions and 0 deletions
|
@ -147,6 +147,33 @@ static void iwlagn_set_tx_status(struct iwl_priv *priv,
|
||||||
tx_resp->failure_frame);
|
tx_resp->failure_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||||
|
#define AGG_TX_STATE_FAIL(x) case AGG_TX_STATE_ ## x: return #x
|
||||||
|
|
||||||
|
const char *iwl_get_agg_tx_fail_reason(u16 status)
|
||||||
|
{
|
||||||
|
status &= AGG_TX_STATUS_MSK;
|
||||||
|
switch (status) {
|
||||||
|
case AGG_TX_STATE_TRANSMITTED:
|
||||||
|
return "SUCCESS";
|
||||||
|
AGG_TX_STATE_FAIL(UNDERRUN_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(BT_PRIO_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(FEW_BYTES_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(ABORT_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(LAST_SENT_TTL_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(LAST_SENT_TRY_CNT_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(LAST_SENT_BT_KILL_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(SCD_QUERY_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(TEST_BAD_CRC32_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(RESPONSE_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(DUMP_TX_MSK);
|
||||||
|
AGG_TX_STATE_FAIL(DELAY_TX_MSK);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "UNKNOWN";
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_IWLWIFI_DEBUG */
|
||||||
|
|
||||||
static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv,
|
static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv,
|
||||||
struct iwl_ht_agg *agg,
|
struct iwl_ht_agg *agg,
|
||||||
struct iwl5000_tx_resp *tx_resp,
|
struct iwl5000_tx_resp *tx_resp,
|
||||||
|
@ -203,6 +230,11 @@ static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv,
|
||||||
|
|
||||||
IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, txq_id=%d idx=%d\n",
|
IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, txq_id=%d idx=%d\n",
|
||||||
agg->frame_count, txq_id, idx);
|
agg->frame_count, txq_id, idx);
|
||||||
|
IWL_DEBUG_TX_REPLY(priv, "status %s (0x%08x), "
|
||||||
|
"try-count (0x%08x)\n",
|
||||||
|
iwl_get_agg_tx_fail_reason(status),
|
||||||
|
status & AGG_TX_STATUS_MSK,
|
||||||
|
status & AGG_TX_TRY_MSK);
|
||||||
|
|
||||||
hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx);
|
hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx);
|
||||||
if (!hdr) {
|
if (!hdr) {
|
||||||
|
|
|
@ -1868,6 +1868,9 @@ enum {
|
||||||
AGG_TX_STATE_DELAY_TX_MSK = 0x400
|
AGG_TX_STATE_DELAY_TX_MSK = 0x400
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define AGG_TX_STATUS_MSK 0x00000fff /* bits 0:11 */
|
||||||
|
#define AGG_TX_TRY_MSK 0x0000f000 /* bits 12:15 */
|
||||||
|
|
||||||
#define AGG_TX_STATE_LAST_SENT_MSK (AGG_TX_STATE_LAST_SENT_TTL_MSK | \
|
#define AGG_TX_STATE_LAST_SENT_MSK (AGG_TX_STATE_LAST_SENT_TTL_MSK | \
|
||||||
AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK | \
|
AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK | \
|
||||||
AGG_TX_STATE_LAST_SENT_BT_KILL_MSK)
|
AGG_TX_STATE_LAST_SENT_BT_KILL_MSK)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue