Commit 27c4ad84fd015d1a4e9dae5f949e19507afb75c1

Authored by Emmanuel Grumbach
Committed by Greg Kroah-Hartman
1 parent e132eb09fd

mac80211: shorten the IBSS debug messages

[ Upstream commit c6e57b3896fc76299913b8cfd82d853bee8a2c84 ]

When tracing is enabled, all the debug messages are recorded and must
not exceed MAX_MSG_LEN (100) columns. Longer debug messages grant the
user with:

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]
Workqueue: phy1 ieee80211_iface_work [mac80211]
 RIP: 0010:trace_event_raw_event_mac80211_msg_event+0xab/0xc0 [mac80211]
 Call Trace:
  __sdata_dbg+0xbd/0x120 [mac80211]
  ieee80211_ibss_rx_queued_mgmt+0x15f/0x510 [mac80211]
  ieee80211_iface_work+0x21d/0x320 [mac80211]

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 11 additions and 11 deletions Side-by-side Diff

... ... @@ -947,8 +947,8 @@
947 947 if (len < IEEE80211_DEAUTH_FRAME_LEN)
948 948 return;
949 949  
950   - ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM BSSID=%pM (reason: %d)\n",
951   - mgmt->sa, mgmt->da, mgmt->bssid, reason);
  950 + ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
  951 + ibss_dbg(sdata, "\tBSSID=%pM (reason: %d)\n", mgmt->bssid, reason);
952 952 sta_info_destroy_addr(sdata, mgmt->sa);
953 953 }
954 954  
... ... @@ -966,9 +966,9 @@
966 966 auth_alg = le16_to_cpu(mgmt->u.auth.auth_alg);
967 967 auth_transaction = le16_to_cpu(mgmt->u.auth.auth_transaction);
968 968  
969   - ibss_dbg(sdata,
970   - "RX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=%d)\n",
971   - mgmt->sa, mgmt->da, mgmt->bssid, auth_transaction);
  969 + ibss_dbg(sdata, "RX Auth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
  970 + ibss_dbg(sdata, "\tBSSID=%pM (auth_transaction=%d)\n",
  971 + mgmt->bssid, auth_transaction);
972 972  
973 973 if (auth_alg != WLAN_AUTH_OPEN || auth_transaction != 1)
974 974 return;
975 975  
... ... @@ -1175,10 +1175,10 @@
1175 1175 rx_timestamp = drv_get_tsf(local, sdata);
1176 1176 }
1177 1177  
1178   - ibss_dbg(sdata,
1179   - "RX beacon SA=%pM BSSID=%pM TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n",
  1178 + ibss_dbg(sdata, "RX beacon SA=%pM BSSID=%pM TSF=0x%llx\n",
1180 1179 mgmt->sa, mgmt->bssid,
1181   - (unsigned long long)rx_timestamp,
  1180 + (unsigned long long)rx_timestamp);
  1181 + ibss_dbg(sdata, "\tBCN=0x%llx diff=%lld @%lu\n",
1182 1182 (unsigned long long)beacon_timestamp,
1183 1183 (unsigned long long)(rx_timestamp - beacon_timestamp),
1184 1184 jiffies);
... ... @@ -1537,9 +1537,9 @@
1537 1537  
1538 1538 tx_last_beacon = drv_tx_last_beacon(local);
1539 1539  
1540   - ibss_dbg(sdata,
1541   - "RX ProbeReq SA=%pM DA=%pM BSSID=%pM (tx_last_beacon=%d)\n",
1542   - mgmt->sa, mgmt->da, mgmt->bssid, tx_last_beacon);
  1540 + ibss_dbg(sdata, "RX ProbeReq SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
  1541 + ibss_dbg(sdata, "\tBSSID=%pM (tx_last_beacon=%d)\n",
  1542 + mgmt->bssid, tx_last_beacon);
1543 1543  
1544 1544 if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da))
1545 1545 return;