diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-02-14 04:33:54 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-18 14:19:25 -0500 |
commit | cfe418287c61f4c4a3ccb94e8a286434d64e0236 (patch) | |
tree | 7b291c8a465f37b659f9804e2f0836a187eeaaa9 /drivers | |
parent | 3104ba151eb9df1bc14878cfd2e4356bf537d18c (diff) |
iwlwifi: dvm: improve (again) the prints in reclaim path
I removed a bit too much info last time.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/commands.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/tx.c | 51 |
2 files changed, 37 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/commands.h b/drivers/net/wireless/iwlwifi/dvm/commands.h index 02c9ebb3b340..84e2c0fcfef6 100644 --- a/drivers/net/wireless/iwlwifi/dvm/commands.h +++ b/drivers/net/wireless/iwlwifi/dvm/commands.h | |||
@@ -1403,6 +1403,7 @@ enum { | |||
1403 | 1403 | ||
1404 | #define AGG_TX_STATUS_MSK 0x00000fff /* bits 0:11 */ | 1404 | #define AGG_TX_STATUS_MSK 0x00000fff /* bits 0:11 */ |
1405 | #define AGG_TX_TRY_MSK 0x0000f000 /* bits 12:15 */ | 1405 | #define AGG_TX_TRY_MSK 0x0000f000 /* bits 12:15 */ |
1406 | #define AGG_TX_TRY_POS 12 | ||
1406 | 1407 | ||
1407 | #define AGG_TX_STATE_LAST_SENT_MSK (AGG_TX_STATE_LAST_SENT_TTL_MSK | \ | 1408 | #define AGG_TX_STATE_LAST_SENT_MSK (AGG_TX_STATE_LAST_SENT_TTL_MSK | \ |
1408 | AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK | \ | 1409 | AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK | \ |
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c index d1dccb361391..6aec2df3bb27 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c | |||
@@ -908,6 +908,12 @@ static void iwlagn_count_agg_tx_err_status(struct iwl_priv *priv, u16 status) | |||
908 | } | 908 | } |
909 | } | 909 | } |
910 | 910 | ||
911 | static inline u32 iwlagn_get_scd_ssn(struct iwlagn_tx_resp *tx_resp) | ||
912 | { | ||
913 | return le32_to_cpup((__le32 *)&tx_resp->status + | ||
914 | tx_resp->frame_count) & MAX_SN; | ||
915 | } | ||
916 | |||
911 | static void iwl_rx_reply_tx_agg(struct iwl_priv *priv, | 917 | static void iwl_rx_reply_tx_agg(struct iwl_priv *priv, |
912 | struct iwlagn_tx_resp *tx_resp) | 918 | struct iwlagn_tx_resp *tx_resp) |
913 | { | 919 | { |
@@ -942,9 +948,15 @@ static void iwl_rx_reply_tx_agg(struct iwl_priv *priv, | |||
942 | if (tx_resp->frame_count == 1) | 948 | if (tx_resp->frame_count == 1) |
943 | return; | 949 | return; |
944 | 950 | ||
951 | IWL_DEBUG_TX_REPLY(priv, "TXQ %d initial_rate 0x%x ssn %d frm_cnt %d\n", | ||
952 | agg->txq_id, | ||
953 | le32_to_cpu(tx_resp->rate_n_flags), | ||
954 | iwlagn_get_scd_ssn(tx_resp), tx_resp->frame_count); | ||
955 | |||
945 | /* Construct bit-map of pending frames within Tx window */ | 956 | /* Construct bit-map of pending frames within Tx window */ |
946 | for (i = 0; i < tx_resp->frame_count; i++) { | 957 | for (i = 0; i < tx_resp->frame_count; i++) { |
947 | u16 fstatus = le16_to_cpu(frame_status[i].status); | 958 | u16 fstatus = le16_to_cpu(frame_status[i].status); |
959 | u8 retry_cnt = (fstatus & AGG_TX_TRY_MSK) >> AGG_TX_TRY_POS; | ||
948 | 960 | ||
949 | if (status & AGG_TX_STATUS_MSK) | 961 | if (status & AGG_TX_STATUS_MSK) |
950 | iwlagn_count_agg_tx_err_status(priv, fstatus); | 962 | iwlagn_count_agg_tx_err_status(priv, fstatus); |
@@ -952,6 +964,14 @@ static void iwl_rx_reply_tx_agg(struct iwl_priv *priv, | |||
952 | if (status & (AGG_TX_STATE_FEW_BYTES_MSK | | 964 | if (status & (AGG_TX_STATE_FEW_BYTES_MSK | |
953 | AGG_TX_STATE_ABORT_MSK)) | 965 | AGG_TX_STATE_ABORT_MSK)) |
954 | continue; | 966 | continue; |
967 | |||
968 | if (status & AGG_TX_STATUS_MSK || retry_cnt > 1) | ||
969 | IWL_DEBUG_TX_REPLY(priv, | ||
970 | "%d: status %s (0x%04x), try-count (0x%01x)\n", | ||
971 | i, | ||
972 | iwl_get_agg_tx_fail_reason(fstatus), | ||
973 | fstatus & AGG_TX_STATUS_MSK, | ||
974 | retry_cnt); | ||
955 | } | 975 | } |
956 | } | 976 | } |
957 | 977 | ||
@@ -982,12 +1002,6 @@ const char *iwl_get_agg_tx_fail_reason(u16 status) | |||
982 | } | 1002 | } |
983 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 1003 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
984 | 1004 | ||
985 | static inline u32 iwlagn_get_scd_ssn(struct iwlagn_tx_resp *tx_resp) | ||
986 | { | ||
987 | return le32_to_cpup((__le32 *)&tx_resp->status + | ||
988 | tx_resp->frame_count) & MAX_SN; | ||
989 | } | ||
990 | |||
991 | static void iwlagn_count_tx_err_status(struct iwl_priv *priv, u16 status) | 1005 | static void iwlagn_count_tx_err_status(struct iwl_priv *priv, u16 status) |
992 | { | 1006 | { |
993 | status &= TX_STATUS_MSK; | 1007 | status &= TX_STATUS_MSK; |
@@ -1119,8 +1133,14 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb, | |||
1119 | 1133 | ||
1120 | spin_lock_bh(&priv->sta_lock); | 1134 | spin_lock_bh(&priv->sta_lock); |
1121 | 1135 | ||
1122 | if (is_agg) | 1136 | if (is_agg) { |
1137 | WARN_ON_ONCE(sta_id >= IWLAGN_STATION_COUNT || | ||
1138 | tid >= IWL_MAX_TID_COUNT); | ||
1139 | if (txq_id != priv->tid_data[sta_id][tid].agg.txq_id) | ||
1140 | IWL_ERR(priv, "txq_id mismatch: %d %d\n", txq_id, | ||
1141 | priv->tid_data[sta_id][tid].agg.txq_id); | ||
1123 | iwl_rx_reply_tx_agg(priv, tx_resp); | 1142 | iwl_rx_reply_tx_agg(priv, tx_resp); |
1143 | } | ||
1124 | 1144 | ||
1125 | __skb_queue_head_init(&skbs); | 1145 | __skb_queue_head_init(&skbs); |
1126 | 1146 | ||
@@ -1224,16 +1244,17 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb, | |||
1224 | */ | 1244 | */ |
1225 | if (is_offchannel_skb && freed != 1) | 1245 | if (is_offchannel_skb && freed != 1) |
1226 | IWL_ERR(priv, "OFFCHANNEL SKB freed %d\n", freed); | 1246 | IWL_ERR(priv, "OFFCHANNEL SKB freed %d\n", freed); |
1227 | } | ||
1228 | 1247 | ||
1229 | IWL_DEBUG_TX_REPLY(priv, "TXQ %d status %s (0x%08x)\n", txq_id, | 1248 | IWL_DEBUG_TX_REPLY(priv, "TXQ %d status %s (0x%08x)\n", txq_id, |
1230 | iwl_get_tx_fail_reason(status), status); | 1249 | iwl_get_tx_fail_reason(status), status); |
1231 | 1250 | ||
1232 | IWL_DEBUG_TX_REPLY(priv, | 1251 | IWL_DEBUG_TX_REPLY(priv, |
1233 | "\t\t\t\tinitial_rate 0x%x retries %d, idx=%d ssn=%d seq_ctl=0x%x\n", | 1252 | "\t\t\t\tinitial_rate 0x%x retries %d, idx=%d ssn=%d seq_ctl=0x%x\n", |
1234 | le32_to_cpu(tx_resp->rate_n_flags), | 1253 | le32_to_cpu(tx_resp->rate_n_flags), |
1235 | tx_resp->failure_frame, SEQ_TO_INDEX(sequence), ssn, | 1254 | tx_resp->failure_frame, |
1236 | le16_to_cpu(tx_resp->seq_ctl)); | 1255 | SEQ_TO_INDEX(sequence), ssn, |
1256 | le16_to_cpu(tx_resp->seq_ctl)); | ||
1257 | } | ||
1237 | 1258 | ||
1238 | iwl_check_abort_status(priv, tx_resp->frame_count, status); | 1259 | iwl_check_abort_status(priv, tx_resp->frame_count, status); |
1239 | spin_unlock_bh(&priv->sta_lock); | 1260 | spin_unlock_bh(&priv->sta_lock); |