aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-4965-tx.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-4965-tx.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
index fcc938e1cf6c..efc21be8a940 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
+++ b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c
@@ -235,13 +235,13 @@ static void il4965_tx_cmd_build_hwcrypto(struct il_priv *il,
235 memcpy(tx_cmd->key, keyconf->key, keyconf->keylen); 235 memcpy(tx_cmd->key, keyconf->key, keyconf->keylen);
236 if (info->flags & IEEE80211_TX_CTL_AMPDU) 236 if (info->flags & IEEE80211_TX_CTL_AMPDU)
237 tx_cmd->tx_flags |= TX_CMD_FLG_AGG_CCMP_MSK; 237 tx_cmd->tx_flags |= TX_CMD_FLG_AGG_CCMP_MSK;
238 IL_DEBUG_TX(il, "tx_cmd with AES hwcrypto\n"); 238 D_TX("tx_cmd with AES hwcrypto\n");
239 break; 239 break;
240 240
241 case WLAN_CIPHER_SUITE_TKIP: 241 case WLAN_CIPHER_SUITE_TKIP:
242 tx_cmd->sec_ctl = TX_CMD_SEC_TKIP; 242 tx_cmd->sec_ctl = TX_CMD_SEC_TKIP;
243 ieee80211_get_tkip_p2k(keyconf, skb_frag, tx_cmd->key); 243 ieee80211_get_tkip_p2k(keyconf, skb_frag, tx_cmd->key);
244 IL_DEBUG_TX(il, "tx_cmd with tkip hwcrypto\n"); 244 D_TX("tx_cmd with tkip hwcrypto\n");
245 break; 245 break;
246 246
247 case WLAN_CIPHER_SUITE_WEP104: 247 case WLAN_CIPHER_SUITE_WEP104:
@@ -253,7 +253,7 @@ static void il4965_tx_cmd_build_hwcrypto(struct il_priv *il,
253 253
254 memcpy(&tx_cmd->key[3], keyconf->key, keyconf->keylen); 254 memcpy(&tx_cmd->key[3], keyconf->key, keyconf->keylen);
255 255
256 IL_DEBUG_TX(il, "Configuring packet for WEP encryption " 256 D_TX("Configuring packet for WEP encryption "
257 "with key %d\n", keyconf->keyidx); 257 "with key %d\n", keyconf->keyidx);
258 break; 258 break;
259 259
@@ -298,7 +298,7 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
298 298
299 spin_lock_irqsave(&il->lock, flags); 299 spin_lock_irqsave(&il->lock, flags);
300 if (il_is_rfkill(il)) { 300 if (il_is_rfkill(il)) {
301 IL_DEBUG_DROP(il, "Dropping - RF KILL\n"); 301 D_DROP("Dropping - RF KILL\n");
302 goto drop_unlock; 302 goto drop_unlock;
303 } 303 }
304 304
@@ -306,11 +306,11 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
306 306
307#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG 307#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG
308 if (ieee80211_is_auth(fc)) 308 if (ieee80211_is_auth(fc))
309 IL_DEBUG_TX(il, "Sending AUTH frame\n"); 309 D_TX("Sending AUTH frame\n");
310 else if (ieee80211_is_assoc_req(fc)) 310 else if (ieee80211_is_assoc_req(fc))
311 IL_DEBUG_TX(il, "Sending ASSOC frame\n"); 311 D_TX("Sending ASSOC frame\n");
312 else if (ieee80211_is_reassoc_req(fc)) 312 else if (ieee80211_is_reassoc_req(fc))
313 IL_DEBUG_TX(il, "Sending REASSOC frame\n"); 313 D_TX("Sending REASSOC frame\n");
314#endif 314#endif
315 315
316 hdr_len = ieee80211_hdrlen(fc); 316 hdr_len = ieee80211_hdrlen(fc);
@@ -323,13 +323,13 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
323 sta_id = il_sta_id_or_broadcast(il, ctx, info->control.sta); 323 sta_id = il_sta_id_or_broadcast(il, ctx, info->control.sta);
324 324
325 if (sta_id == IL_INVALID_STATION) { 325 if (sta_id == IL_INVALID_STATION) {
326 IL_DEBUG_DROP(il, "Dropping - INVALID STATION: %pM\n", 326 D_DROP("Dropping - INVALID STATION: %pM\n",
327 hdr->addr1); 327 hdr->addr1);
328 goto drop_unlock; 328 goto drop_unlock;
329 } 329 }
330 } 330 }
331 331
332 IL_DEBUG_TX(il, "station Id %d\n", sta_id); 332 D_TX("station Id %d\n", sta_id);
333 333
334 if (sta) 334 if (sta)
335 sta_priv = (void *)sta->drv_priv; 335 sta_priv = (void *)sta->drv_priv;
@@ -499,9 +499,9 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
499 tx_cmd->dram_lsb_ptr = cpu_to_le32(scratch_phys); 499 tx_cmd->dram_lsb_ptr = cpu_to_le32(scratch_phys);
500 tx_cmd->dram_msb_ptr = il_get_dma_hi_addr(scratch_phys); 500 tx_cmd->dram_msb_ptr = il_get_dma_hi_addr(scratch_phys);
501 501
502 IL_DEBUG_TX(il, "sequence nr = 0X%x\n", 502 D_TX("sequence nr = 0X%x\n",
503 le16_to_cpu(out_cmd->hdr.sequence)); 503 le16_to_cpu(out_cmd->hdr.sequence));
504 IL_DEBUG_TX(il, "tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); 504 D_TX("tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags));
505 il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd, sizeof(*tx_cmd)); 505 il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd, sizeof(*tx_cmd));
506 il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len); 506 il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len);
507 507
@@ -909,11 +909,11 @@ int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
909 spin_lock_irqsave(&il->sta_lock, flags); 909 spin_lock_irqsave(&il->sta_lock, flags);
910 tid_data = &il->stations[sta_id].tid[tid]; 910 tid_data = &il->stations[sta_id].tid[tid];
911 if (tid_data->tfds_in_queue == 0) { 911 if (tid_data->tfds_in_queue == 0) {
912 IL_DEBUG_HT(il, "HW queue is empty\n"); 912 D_HT("HW queue is empty\n");
913 tid_data->agg.state = IL_AGG_ON; 913 tid_data->agg.state = IL_AGG_ON;
914 ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); 914 ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
915 } else { 915 } else {
916 IL_DEBUG_HT(il, 916 D_HT(
917 "HW queue is NOT empty: %d packets in HW queue\n", 917 "HW queue is NOT empty: %d packets in HW queue\n",
918 tid_data->tfds_in_queue); 918 tid_data->tfds_in_queue);
919 tid_data->agg.state = IL_EMPTYING_HW_QUEUE_ADDBA; 919 tid_data->agg.state = IL_EMPTYING_HW_QUEUE_ADDBA;
@@ -991,7 +991,7 @@ int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
991 * queue we selected previously, i.e. before the 991 * queue we selected previously, i.e. before the
992 * session was really started completely. 992 * session was really started completely.
993 */ 993 */
994 IL_DEBUG_HT(il, "AGG stop before setup done\n"); 994 D_HT("AGG stop before setup done\n");
995 goto turn_off; 995 goto turn_off;
996 case IL_AGG_ON: 996 case IL_AGG_ON:
997 break; 997 break;
@@ -1004,14 +1004,14 @@ int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
1004 1004
1005 /* The queue is not empty */ 1005 /* The queue is not empty */
1006 if (write_ptr != read_ptr) { 1006 if (write_ptr != read_ptr) {
1007 IL_DEBUG_HT(il, "Stopping a non empty AGG HW QUEUE\n"); 1007 D_HT("Stopping a non empty AGG HW QUEUE\n");
1008 il->stations[sta_id].tid[tid].agg.state = 1008 il->stations[sta_id].tid[tid].agg.state =
1009 IL_EMPTYING_HW_QUEUE_DELBA; 1009 IL_EMPTYING_HW_QUEUE_DELBA;
1010 spin_unlock_irqrestore(&il->sta_lock, flags); 1010 spin_unlock_irqrestore(&il->sta_lock, flags);
1011 return 0; 1011 return 0;
1012 } 1012 }
1013 1013
1014 IL_DEBUG_HT(il, "HW queue is empty\n"); 1014 D_HT("HW queue is empty\n");
1015 turn_off: 1015 turn_off:
1016 il->stations[sta_id].tid[tid].agg.state = IL_AGG_OFF; 1016 il->stations[sta_id].tid[tid].agg.state = IL_AGG_OFF;
1017 1017
@@ -1054,7 +1054,7 @@ int il4965_txq_check_empty(struct il_priv *il,
1054 (q->read_ptr == q->write_ptr)) { 1054 (q->read_ptr == q->write_ptr)) {
1055 u16 ssn = SEQ_TO_SN(tid_data->seq_number); 1055 u16 ssn = SEQ_TO_SN(tid_data->seq_number);
1056 int tx_fifo = il4965_get_fifo_from_tid(ctx, tid); 1056 int tx_fifo = il4965_get_fifo_from_tid(ctx, tid);
1057 IL_DEBUG_HT(il, 1057 D_HT(
1058 "HW queue empty: continue DELBA flow\n"); 1058 "HW queue empty: continue DELBA flow\n");
1059 il4965_txq_agg_disable(il, txq_id, ssn, tx_fifo); 1059 il4965_txq_agg_disable(il, txq_id, ssn, tx_fifo);
1060 tid_data->agg.state = IL_AGG_OFF; 1060 tid_data->agg.state = IL_AGG_OFF;
@@ -1064,7 +1064,7 @@ int il4965_txq_check_empty(struct il_priv *il,
1064 case IL_EMPTYING_HW_QUEUE_ADDBA: 1064 case IL_EMPTYING_HW_QUEUE_ADDBA:
1065 /* We are reclaiming the last packet of the queue */ 1065 /* We are reclaiming the last packet of the queue */
1066 if (tid_data->tfds_in_queue == 0) { 1066 if (tid_data->tfds_in_queue == 0) {
1067 IL_DEBUG_HT(il, 1067 D_HT(
1068 "HW queue empty: continue ADDBA flow\n"); 1068 "HW queue empty: continue ADDBA flow\n");
1069 tid_data->agg.state = IL_AGG_ON; 1069 tid_data->agg.state = IL_AGG_ON;
1070 ieee80211_start_tx_ba_cb_irqsafe(ctx->vif, addr, tid); 1070 ieee80211_start_tx_ba_cb_irqsafe(ctx->vif, addr, tid);
@@ -1169,7 +1169,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il,
1169 1169
1170 /* Mark that the expected block-ack response arrived */ 1170 /* Mark that the expected block-ack response arrived */
1171 agg->wait_for_ba = 0; 1171 agg->wait_for_ba = 0;
1172 IL_DEBUG_TX_REPLY(il, "BA %d %d\n", agg->start_idx, 1172 D_TX_REPLY("BA %d %d\n", agg->start_idx,
1173 ba_resp->seq_ctl); 1173 ba_resp->seq_ctl);
1174 1174
1175 /* Calculate shift to align block-ack bits with our Tx window bits */ 1175 /* Calculate shift to align block-ack bits with our Tx window bits */
@@ -1178,7 +1178,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il,
1178 sh += 0x100; 1178 sh += 0x100;
1179 1179
1180 if (agg->frame_count > (64 - sh)) { 1180 if (agg->frame_count > (64 - sh)) {
1181 IL_DEBUG_TX_REPLY(il, "more frames than bitmap size"); 1181 D_TX_REPLY("more frames than bitmap size");
1182 return -1; 1182 return -1;
1183 } 1183 }
1184 1184
@@ -1195,7 +1195,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il,
1195 while (sent_bitmap) { 1195 while (sent_bitmap) {
1196 ack = sent_bitmap & 1ULL; 1196 ack = sent_bitmap & 1ULL;
1197 successes += ack; 1197 successes += ack;
1198 IL_DEBUG_TX_REPLY(il, "%s ON i=%d idx=%d raw=%d\n", 1198 D_TX_REPLY("%s ON i=%d idx=%d raw=%d\n",
1199 ack ? "ACK" : "NACK", i, 1199 ack ? "ACK" : "NACK", i,
1200 (agg->start_idx + i) & 0xff, 1200 (agg->start_idx + i) & 0xff,
1201 agg->start_idx + i); 1201 agg->start_idx + i);
@@ -1203,7 +1203,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il,
1203 ++i; 1203 ++i;
1204 } 1204 }
1205 1205
1206 IL_DEBUG_TX_REPLY(il, "Bitmap %llx\n", 1206 D_TX_REPLY("Bitmap %llx\n",
1207 (unsigned long long)bitmap); 1207 (unsigned long long)bitmap);
1208 1208
1209 info = IEEE80211_SKB_CB(il->txq[scd_flow].txb[agg->start_idx].skb); 1209 info = IEEE80211_SKB_CB(il->txq[scd_flow].txb[agg->start_idx].skb);
@@ -1282,7 +1282,7 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il,
1282 * since it is possible happen very often and in order 1282 * since it is possible happen very often and in order
1283 * not to fill the syslog, don't enable the logging by default 1283 * not to fill the syslog, don't enable the logging by default
1284 */ 1284 */
1285 IL_DEBUG_TX_REPLY(il, 1285 D_TX_REPLY(
1286 "BA scd_flow %d does not match txq_id %d\n", 1286 "BA scd_flow %d does not match txq_id %d\n",
1287 scd_flow, agg->txq_id); 1287 scd_flow, agg->txq_id);
1288 return; 1288 return;
@@ -1293,12 +1293,12 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il,
1293 1293
1294 spin_lock_irqsave(&il->sta_lock, flags); 1294 spin_lock_irqsave(&il->sta_lock, flags);
1295 1295
1296 IL_DEBUG_TX_REPLY(il, "REPLY_COMPRESSED_BA [%d] Received from %pM, " 1296 D_TX_REPLY("REPLY_COMPRESSED_BA [%d] Received from %pM, "
1297 "sta_id = %d\n", 1297 "sta_id = %d\n",
1298 agg->wait_for_ba, 1298 agg->wait_for_ba,
1299 (u8 *) &ba_resp->sta_addr_lo32, 1299 (u8 *) &ba_resp->sta_addr_lo32,
1300 ba_resp->sta_id); 1300 ba_resp->sta_id);
1301 IL_DEBUG_TX_REPLY(il, "TID = %d, SeqCtl = %d, bitmap = 0x%llx," 1301 D_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx,"
1302 "scd_flow = " 1302 "scd_flow = "
1303 "%d, scd_ssn = %d\n", 1303 "%d, scd_ssn = %d\n",
1304 ba_resp->tid, 1304 ba_resp->tid,
@@ -1306,7 +1306,7 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il,
1306 (unsigned long long)le64_to_cpu(ba_resp->bitmap), 1306 (unsigned long long)le64_to_cpu(ba_resp->bitmap),
1307 ba_resp->scd_flow, 1307 ba_resp->scd_flow,
1308 ba_resp->scd_ssn); 1308 ba_resp->scd_ssn);
1309 IL_DEBUG_TX_REPLY(il, "DAT start_idx = %d, bitmap = 0x%llx\n", 1309 D_TX_REPLY("DAT start_idx = %d, bitmap = 0x%llx\n",
1310 agg->start_idx, 1310 agg->start_idx,
1311 (unsigned long long)agg->bitmap); 1311 (unsigned long long)agg->bitmap);
1312 1312