Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+36 -22
+9 -5
net/mac80211/agg-rx.c
··· 83 83 if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, 84 84 &sta->sta, tid, NULL, 0)) 85 85 sdata_info(sta->sdata, 86 - "HW problem - can not stop rx aggregation for tid %d\n", 87 - tid); 86 + "HW problem - can not stop rx aggregation for %pM tid %d\n", 87 + sta->sta.addr, tid); 88 88 89 89 /* check if this is a self generated aggregation halt */ 90 90 if (initiator == WLAN_BACK_RECIPIENT && tx) ··· 159 159 } 160 160 rcu_read_unlock(); 161 161 162 - ht_dbg(sta->sdata, "rx session timer expired on tid %d\n", (u16)*ptid); 162 + ht_dbg(sta->sdata, "RX session timer expired on %pM tid %d\n", 163 + sta->sta.addr, (u16)*ptid); 163 164 164 165 set_bit(*ptid, sta->ampdu_mlme.tid_rx_timer_expired); 165 166 ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work); ··· 248 247 status = WLAN_STATUS_REQUEST_DECLINED; 249 248 250 249 if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { 251 - ht_dbg(sta->sdata, "Suspend in progress - Denying ADDBA request\n"); 250 + ht_dbg(sta->sdata, 251 + "Suspend in progress - Denying ADDBA request (%pM tid %d)\n", 252 + sta->sta.addr, tid); 252 253 goto end_no_lock; 253 254 } 254 255 ··· 320 317 321 318 ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START, 322 319 &sta->sta, tid, &start_seq_num, 0); 323 - ht_dbg(sta->sdata, "Rx A-MPDU request on tid %d result %d\n", tid, ret); 320 + ht_dbg(sta->sdata, "Rx A-MPDU request on %pM tid %d result %d\n", 321 + sta->sta.addr, tid, ret); 324 322 if (ret) { 325 323 kfree(tid_agg_rx->reorder_buf); 326 324 kfree(tid_agg_rx->reorder_time);
+27 -17
net/mac80211/agg-tx.c
··· 387 387 test_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) { 388 388 rcu_read_unlock(); 389 389 ht_dbg(sta->sdata, 390 - "timer expired on tid %d but we are not (or no longer) expecting addBA response there\n", 391 - tid); 390 + "timer expired on %pM tid %d but we are not (or no longer) expecting addBA response there\n", 391 + sta->sta.addr, tid); 392 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 398 ieee80211_stop_tx_ba_session(&sta->sta, tid); 398 399 rcu_read_unlock(); ··· 430 429 &sta->sta, tid, &start_seq_num, 0); 431 430 if (ret) { 432 431 ht_dbg(sdata, 433 - "BA request denied - HW unavailable for tid %d\n", tid); 432 + "BA request denied - HW unavailable for %pM tid %d\n", 433 + sta->sta.addr, tid); 434 434 spin_lock_bh(&sta->lock); 435 435 ieee80211_agg_splice_packets(sdata, tid_tx, tid); 436 436 ieee80211_assign_tid_tx(sta, tid, NULL); ··· 444 442 445 443 /* activate the timer for the recipient's addBA response */ 446 444 mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL); 447 - ht_dbg(sdata, "activated addBA response timer on tid %d\n", tid); 445 + ht_dbg(sdata, "activated addBA response timer on %pM tid %d\n", 446 + sta->sta.addr, tid); 448 447 449 448 spin_lock_bh(&sta->lock); 450 449 sta->ampdu_mlme.last_addba_req_time[tid] = jiffies; ··· 492 489 493 490 rcu_read_unlock(); 494 491 495 - ht_dbg(sta->sdata, "tx session timer expired on tid %d\n", (u16)*ptid); 492 + ht_dbg(sta->sdata, "tx session timer expired on %pM tid %d\n", 493 + sta->sta.addr, (u16)*ptid); 496 494 497 495 ieee80211_stop_tx_ba_session(&sta->sta, *ptid); 498 496 } ··· 529 525 530 526 if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { 531 527 ht_dbg(sdata, 532 - "BA sessions blocked - Denying BA session request\n"); 528 + "BA sessions blocked - Denying BA session request %pM tid %d\n", 529 + sta->sta.addr, tid); 533 530 return -EINVAL; 534 531 } 535 532 ··· 571 566 time_before(jiffies, sta->ampdu_mlme.last_addba_req_time[tid] + 572 567 HT_AGG_RETRIES_PERIOD)) { 573 568 ht_dbg(sdata, 574 - "BA request denied - waiting a grace period after %d failed requests on tid %u\n", 575 - sta->ampdu_mlme.addba_req_num[tid], tid); 569 + "BA request denied - waiting a grace period after %d failed requests on %pM tid %u\n", 570 + sta->ampdu_mlme.addba_req_num[tid], sta->sta.addr, tid); 576 571 ret = -EBUSY; 577 572 goto err_unlock_sta; 578 573 } ··· 581 576 /* check if the TID is not in aggregation flow already */ 582 577 if (tid_tx || sta->ampdu_mlme.tid_start_tx[tid]) { 583 578 ht_dbg(sdata, 584 - "BA request denied - session is not idle on tid %u\n", 585 - tid); 579 + "BA request denied - session is not idle on %pM tid %u\n", 580 + sta->sta.addr, tid); 586 581 ret = -EAGAIN; 587 582 goto err_unlock_sta; 588 583 } ··· 637 632 638 633 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); 639 634 640 - ht_dbg(sta->sdata, "Aggregation is on for tid %d\n", tid); 635 + ht_dbg(sta->sdata, "Aggregation is on for %pM tid %d\n", 636 + sta->sta.addr, tid); 641 637 642 638 drv_ampdu_action(local, sta->sdata, 643 639 IEEE80211_AMPDU_TX_OPERATIONAL, ··· 808 802 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); 809 803 810 804 if (!tid_tx || !test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { 811 - ht_dbg(sdata, "unexpected callback to A-MPDU stop\n"); 805 + ht_dbg(sdata, 806 + "unexpected callback to A-MPDU stop for %pM tid %d\n", 807 + sta->sta.addr, tid); 812 808 goto unlock_sta; 813 809 } 814 810 ··· 869 861 goto out; 870 862 871 863 if (mgmt->u.action.u.addba_resp.dialog_token != tid_tx->dialog_token) { 872 - ht_dbg(sta->sdata, "wrong addBA response token, tid %d\n", tid); 864 + ht_dbg(sta->sdata, "wrong addBA response token, %pM tid %d\n", 865 + sta->sta.addr, tid); 873 866 goto out; 874 867 } 875 868 876 869 del_timer_sync(&tid_tx->addba_resp_timer); 877 870 878 - ht_dbg(sta->sdata, "switched off addBA timer for tid %d\n", tid); 871 + ht_dbg(sta->sdata, "switched off addBA timer for %pM tid %d\n", 872 + sta->sta.addr, tid); 879 873 880 874 /* 881 875 * addba_resp_timer may have fired before we got here, and ··· 887 877 if (test_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state) || 888 878 test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) { 889 879 ht_dbg(sta->sdata, 890 - "got addBA resp for tid %d but we already gave up\n", 891 - tid); 880 + "got addBA resp for %pM tid %d but we already gave up\n", 881 + sta->sta.addr, tid); 892 882 goto out; 893 883 } 894 884