aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-30 16:24:36 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-12-13 18:51:33 -0500
commit9decde95be8a77a16f5668544bee45d41a7ae665 (patch)
treed5ef30fe7e9e0b03a4d1e9482c75017a26955413 /drivers
parentae0b693c12cc78913085733d28e0e0e6020db6f4 (diff)
iwlagn: fix debug variable access
The compiler correctly warns: iwl-agn-tx.c: In function ‘iwlagn_tx_status_reply_compressed_ba’: iwl-agn-tx.c:1240: warning: ‘bitmap’ may be used uninitialized in this function Move the debug print to the branch that reads the bitmap, and move the variables too so it's more obvious where they are needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 72b1f262796c..24a11b8f73bc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1237,7 +1237,6 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1237 int i, sh, ack; 1237 int i, sh, ack;
1238 u16 seq_ctl = le16_to_cpu(ba_resp->seq_ctl); 1238 u16 seq_ctl = le16_to_cpu(ba_resp->seq_ctl);
1239 u16 scd_flow = le16_to_cpu(ba_resp->scd_flow); 1239 u16 scd_flow = le16_to_cpu(ba_resp->scd_flow);
1240 u64 bitmap, sent_bitmap;
1241 int successes = 0; 1240 int successes = 0;
1242 struct ieee80211_tx_info *info; 1241 struct ieee80211_tx_info *info;
1243 1242
@@ -1278,6 +1277,8 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1278 IWL_DEBUG_HT(priv, "agg frames sent:%d, acked:%d\n", 1277 IWL_DEBUG_HT(priv, "agg frames sent:%d, acked:%d\n",
1279 ba_resp->txed, ba_resp->txed_2_done); 1278 ba_resp->txed, ba_resp->txed_2_done);
1280 } else { 1279 } else {
1280 u64 bitmap, sent_bitmap;
1281
1281 /* don't use 64-bit values for now */ 1282 /* don't use 64-bit values for now */
1282 bitmap = le64_to_cpu(ba_resp->bitmap) >> sh; 1283 bitmap = le64_to_cpu(ba_resp->bitmap) >> sh;
1283 1284
@@ -1298,7 +1299,11 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1298 sent_bitmap >>= 1; 1299 sent_bitmap >>= 1;
1299 ++i; 1300 ++i;
1300 } 1301 }
1302
1303 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n",
1304 (unsigned long long)bitmap);
1301 } 1305 }
1306
1302 info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb); 1307 info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb);
1303 memset(&info->status, 0, sizeof(info->status)); 1308 memset(&info->status, 0, sizeof(info->status));
1304 info->flags |= IEEE80211_TX_STAT_ACK; 1309 info->flags |= IEEE80211_TX_STAT_ACK;
@@ -1313,8 +1318,6 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1313 } 1318 }
1314 iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info); 1319 iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info);
1315 1320
1316 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap);
1317
1318 return 0; 1321 return 0;
1319} 1322}
1320 1323