393-mac80211-shorten-the-IBSS-debug-messages.patch 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. From: Emmanuel Grumbach <[email protected]>
  2. Date: Fri, 31 Aug 2018 11:31:13 +0300
  3. Subject: [PATCH] mac80211: shorten the IBSS debug messages
  4. When tracing is enabled, all the debug messages are recorded and must
  5. not exceed MAX_MSG_LEN (100) columns. Longer debug messages grant the
  6. user with:
  7. WARNING: CPU: 3 PID: 32642 at /tmp/wifi-core-20180806094828/src/iwlwifi-stack-dev/net/mac80211/./trace_msg.h:32 trace_event_raw_event_mac80211_msg_event+0xab/0xc0 [mac80211]
  8. Workqueue: phy1 ieee80211_iface_work [mac80211]
  9. RIP: 0010:trace_event_raw_event_mac80211_msg_event+0xab/0xc0 [mac80211]
  10. Call Trace:
  11. __sdata_dbg+0xbd/0x120 [mac80211]
  12. ieee80211_ibss_rx_queued_mgmt+0x15f/0x510 [mac80211]
  13. ieee80211_iface_work+0x21d/0x320 [mac80211]
  14. Signed-off-by: Emmanuel Grumbach <[email protected]>
  15. Signed-off-by: Luca Coelho <[email protected]>
  16. Signed-off-by: Johannes Berg <[email protected]>
  17. ---
  18. --- a/net/mac80211/ibss.c
  19. +++ b/net/mac80211/ibss.c
  20. @@ -947,8 +947,8 @@ static void ieee80211_rx_mgmt_deauth_ibs
  21. if (len < IEEE80211_DEAUTH_FRAME_LEN)
  22. return;
  23. - ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM BSSID=%pM (reason: %d)\n",
  24. - mgmt->sa, mgmt->da, mgmt->bssid, reason);
  25. + ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
  26. + ibss_dbg(sdata, "\tBSSID=%pM (reason: %d)\n", mgmt->bssid, reason);
  27. sta_info_destroy_addr(sdata, mgmt->sa);
  28. }
  29. @@ -966,9 +966,9 @@ static void ieee80211_rx_mgmt_auth_ibss(
  30. auth_alg = le16_to_cpu(mgmt->u.auth.auth_alg);
  31. auth_transaction = le16_to_cpu(mgmt->u.auth.auth_transaction);
  32. - ibss_dbg(sdata,
  33. - "RX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=%d)\n",
  34. - mgmt->sa, mgmt->da, mgmt->bssid, auth_transaction);
  35. + ibss_dbg(sdata, "RX Auth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
  36. + ibss_dbg(sdata, "\tBSSID=%pM (auth_transaction=%d)\n",
  37. + mgmt->bssid, auth_transaction);
  38. if (auth_alg != WLAN_AUTH_OPEN || auth_transaction != 1)
  39. return;
  40. @@ -1175,10 +1175,10 @@ static void ieee80211_rx_bss_info(struct
  41. rx_timestamp = drv_get_tsf(local, sdata);
  42. }
  43. - ibss_dbg(sdata,
  44. - "RX beacon SA=%pM BSSID=%pM TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n",
  45. + ibss_dbg(sdata, "RX beacon SA=%pM BSSID=%pM TSF=0x%llx\n",
  46. mgmt->sa, mgmt->bssid,
  47. - (unsigned long long)rx_timestamp,
  48. + (unsigned long long)rx_timestamp);
  49. + ibss_dbg(sdata, "\tBCN=0x%llx diff=%lld @%lu\n",
  50. (unsigned long long)beacon_timestamp,
  51. (unsigned long long)(rx_timestamp - beacon_timestamp),
  52. jiffies);
  53. @@ -1537,9 +1537,9 @@ static void ieee80211_rx_mgmt_probe_req(
  54. tx_last_beacon = drv_tx_last_beacon(local);
  55. - ibss_dbg(sdata,
  56. - "RX ProbeReq SA=%pM DA=%pM BSSID=%pM (tx_last_beacon=%d)\n",
  57. - mgmt->sa, mgmt->da, mgmt->bssid, tx_last_beacon);
  58. + ibss_dbg(sdata, "RX ProbeReq SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
  59. + ibss_dbg(sdata, "\tBSSID=%pM (tx_last_beacon=%d)\n",
  60. + mgmt->bssid, tx_last_beacon);
  61. if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da))
  62. return;