aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/agg-tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-01-16 04:39:44 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-18 15:55:15 -0500
commit0a214d3f7e5041685ebff054628a4354bedd78c3 (patch)
tree2041b3dca4e8ef6a5e3f849a37caade3cba6d725 /net/mac80211/agg-tx.c
parent0f19b41e223d787251c59137e61fc5145c13d1c4 (diff)
mac80211: improve aggregation debug messages
A lot of the aggregation messages don't indicate the station so they're hard to understand if there are multiple sessions in progress. Make that easier by adding the MAC address to most messages. Also add the TID if it wasn't already there. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/agg-tx.c')
-rw-r--r--net/mac80211/agg-tx.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 2f0ccbc5f13e..e90911819ed4 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -387,12 +387,13 @@ static void sta_addba_resp_timer_expired(unsigned long data)
387 test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) { 387 test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) {
388 rcu_read_unlock(); 388 rcu_read_unlock();
389 ht_dbg(sta->sdata, 389 ht_dbg(sta->sdata,
390 "timer expired on tid %d but we are not (or no longer) expecting addBA response there\n", 390 "timer expired on %pM tid %d but we are not (or no longer) expecting addBA response there\n",
391 tid); 391 sta->sta.addr, tid);
392 return; 392 return;
393 } 393 }
394 394
395 ht_dbg(sta->sdata, "addBA response timer expired on tid %d\n", tid); 395 ht_dbg(sta->sdata, "addBA response timer expired on %pM tid %d\n",
396 sta->sta.addr, tid);
396 397
397 ieee80211_stop_tx_ba_session(&sta->sta, tid); 398 ieee80211_stop_tx_ba_session(&sta->sta, tid);
398 rcu_read_unlock(); 399 rcu_read_unlock();
@@ -429,7 +430,8 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
429 &sta->sta, tid, &start_seq_num, 0); 430 &sta->sta, tid, &start_seq_num, 0);
430 if (ret) { 431 if (ret) {
431 ht_dbg(sdata, 432 ht_dbg(sdata,
432 "BA request denied - HW unavailable for tid %d\n", tid); 433 "BA request denied - HW unavailable for %pM tid %d\n",
434 sta->sta.addr, tid);
433 spin_lock_bh(&sta->lock); 435 spin_lock_bh(&sta->lock);
434 ieee80211_agg_splice_packets(sdata, tid_tx, tid); 436 ieee80211_agg_splice_packets(sdata, tid_tx, tid);
435 ieee80211_assign_tid_tx(sta, tid, NULL); 437 ieee80211_assign_tid_tx(sta, tid, NULL);
@@ -442,7 +444,8 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
442 444
443 /* activate the timer for the recipient's addBA response */ 445 /* activate the timer for the recipient's addBA response */
444 mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL); 446 mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL);
445 ht_dbg(sdata, "activated addBA response timer on tid %d\n", tid); 447 ht_dbg(sdata, "activated addBA response timer on %pM tid %d\n",
448 sta->sta.addr, tid);
446 449
447 spin_lock_bh(&sta->lock); 450 spin_lock_bh(&sta->lock);
448 sta->ampdu_mlme.last_addba_req_time[tid] = jiffies; 451 sta->ampdu_mlme.last_addba_req_time[tid] = jiffies;
@@ -489,7 +492,8 @@ static void sta_tx_agg_session_timer_expired(unsigned long data)
489 492
490 rcu_read_unlock(); 493 rcu_read_unlock();
491 494
492 ht_dbg(sta->sdata, "tx session timer expired on tid %d\n", (u16)*ptid); 495 ht_dbg(sta->sdata, "tx session timer expired on %pM tid %d\n",
496 sta->sta.addr, (u16)*ptid);
493 497
494 ieee80211_stop_tx_ba_session(&sta->sta, *ptid); 498 ieee80211_stop_tx_ba_session(&sta->sta, *ptid);
495} 499}
@@ -525,7 +529,8 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
525 529
526 if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { 530 if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) {
527 ht_dbg(sdata, 531 ht_dbg(sdata,
528 "BA sessions blocked - Denying BA session request\n"); 532 "BA sessions blocked - Denying BA session request %pM tid %d\n",
533 sta->sta.addr, tid);
529 return -EINVAL; 534 return -EINVAL;
530 } 535 }
531 536
@@ -566,8 +571,8 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
566 time_before(jiffies, sta->ampdu_mlme.last_addba_req_time[tid] + 571 time_before(jiffies, sta->ampdu_mlme.last_addba_req_time[tid] +
567 HT_AGG_RETRIES_PERIOD)) { 572 HT_AGG_RETRIES_PERIOD)) {
568 ht_dbg(sdata, 573 ht_dbg(sdata,
569 "BA request denied - waiting a grace period after %d failed requests on tid %u\n", 574 "BA request denied - waiting a grace period after %d failed requests on %pM tid %u\n",
570 sta->ampdu_mlme.addba_req_num[tid], tid); 575 sta->ampdu_mlme.addba_req_num[tid], sta->sta.addr, tid);
571 ret = -EBUSY; 576 ret = -EBUSY;
572 goto err_unlock_sta; 577 goto err_unlock_sta;
573 } 578 }
@@ -576,8 +581,8 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
576 /* check if the TID is not in aggregation flow already */ 581 /* check if the TID is not in aggregation flow already */
577 if (tid_tx || sta->ampdu_mlme.tid_start_tx[tid]) { 582 if (tid_tx || sta->ampdu_mlme.tid_start_tx[tid]) {
578 ht_dbg(sdata, 583 ht_dbg(sdata,
579 "BA request denied - session is not idle on tid %u\n", 584 "BA request denied - session is not idle on %pM tid %u\n",
580 tid); 585 sta->sta.addr, tid);
581 ret = -EAGAIN; 586 ret = -EAGAIN;
582 goto err_unlock_sta; 587 goto err_unlock_sta;
583 } 588 }
@@ -632,7 +637,8 @@ static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
632 637
633 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); 638 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
634 639
635 ht_dbg(sta->sdata, "Aggregation is on for tid %d\n", tid); 640 ht_dbg(sta->sdata, "Aggregation is on for %pM tid %d\n",
641 sta->sta.addr, tid);
636 642
637 drv_ampdu_action(local, sta->sdata, 643 drv_ampdu_action(local, sta->sdata,
638 IEEE80211_AMPDU_TX_OPERATIONAL, 644 IEEE80211_AMPDU_TX_OPERATIONAL,
@@ -802,7 +808,9 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid)
802 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); 808 tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
803 809
804 if (!tid_tx || !test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { 810 if (!tid_tx || !test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) {
805 ht_dbg(sdata, "unexpected callback to A-MPDU stop\n"); 811 ht_dbg(sdata,
812 "unexpected callback to A-MPDU stop for %pM tid %d\n",
813 sta->sta.addr, tid);
806 goto unlock_sta; 814 goto unlock_sta;
807 } 815 }
808 816
@@ -861,13 +869,15 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
861 goto out; 869 goto out;
862 870
863 if (mgmt->u.action.u.addba_resp.dialog_token != tid_tx->dialog_token) { 871 if (mgmt->u.action.u.addba_resp.dialog_token != tid_tx->dialog_token) {
864 ht_dbg(sta->sdata, "wrong addBA response token, tid %d\n", tid); 872 ht_dbg(sta->sdata, "wrong addBA response token, %pM tid %d\n",
873 sta->sta.addr, tid);
865 goto out; 874 goto out;
866 } 875 }
867 876
868 del_timer_sync(&tid_tx->addba_resp_timer); 877 del_timer_sync(&tid_tx->addba_resp_timer);
869 878
870 ht_dbg(sta->sdata, "switched off addBA timer for tid %d\n", tid); 879 ht_dbg(sta->sdata, "switched off addBA timer for %pM tid %d\n",
880 sta->sta.addr, tid);
871 881
872 /* 882 /*
873 * addba_resp_timer may have fired before we got here, and 883 * addba_resp_timer may have fired before we got here, and
@@ -877,8 +887,8 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
877 if (test_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state) || 887 if (test_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state) ||
878 test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { 888 test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) {
879 ht_dbg(sta->sdata, 889 ht_dbg(sta->sdata,
880 "got addBA resp for tid %d but we already gave up\n", 890 "got addBA resp for %pM tid %d but we already gave up\n",
881 tid); 891 sta->sta.addr, tid);
882 goto out; 892 goto out;
883 } 893 }
884 894