mac80211: update to version based on 4.19-rc4
[openwrt/staging/blogic.git] / package / kernel / mac80211 / patches / 393-mac80211-shorten-the-IBSS-debug-messages.patch
1 From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2 Date: Fri, 31 Aug 2018 11:31:13 +0300
3 Subject: [PATCH] mac80211: shorten the IBSS debug messages
4
5 When tracing is enabled, all the debug messages are recorded and must
6 not exceed MAX_MSG_LEN (100) columns. Longer debug messages grant the
7 user with:
8
9 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]
10 Workqueue: phy1 ieee80211_iface_work [mac80211]
11 RIP: 0010:trace_event_raw_event_mac80211_msg_event+0xab/0xc0 [mac80211]
12 Call Trace:
13 __sdata_dbg+0xbd/0x120 [mac80211]
14 ieee80211_ibss_rx_queued_mgmt+0x15f/0x510 [mac80211]
15 ieee80211_iface_work+0x21d/0x320 [mac80211]
16
17 Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
18 Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
19 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
20 ---
21
22 --- a/net/mac80211/ibss.c
23 +++ b/net/mac80211/ibss.c
24 @@ -947,8 +947,8 @@ static void ieee80211_rx_mgmt_deauth_ibs
25 if (len < IEEE80211_DEAUTH_FRAME_LEN)
26 return;
27
28 - ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM BSSID=%pM (reason: %d)\n",
29 - mgmt->sa, mgmt->da, mgmt->bssid, reason);
30 + ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
31 + ibss_dbg(sdata, "\tBSSID=%pM (reason: %d)\n", mgmt->bssid, reason);
32 sta_info_destroy_addr(sdata, mgmt->sa);
33 }
34
35 @@ -966,9 +966,9 @@ static void ieee80211_rx_mgmt_auth_ibss(
36 auth_alg = le16_to_cpu(mgmt->u.auth.auth_alg);
37 auth_transaction = le16_to_cpu(mgmt->u.auth.auth_transaction);
38
39 - ibss_dbg(sdata,
40 - "RX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=%d)\n",
41 - mgmt->sa, mgmt->da, mgmt->bssid, auth_transaction);
42 + ibss_dbg(sdata, "RX Auth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
43 + ibss_dbg(sdata, "\tBSSID=%pM (auth_transaction=%d)\n",
44 + mgmt->bssid, auth_transaction);
45
46 if (auth_alg != WLAN_AUTH_OPEN || auth_transaction != 1)
47 return;
48 @@ -1175,10 +1175,10 @@ static void ieee80211_rx_bss_info(struct
49 rx_timestamp = drv_get_tsf(local, sdata);
50 }
51
52 - ibss_dbg(sdata,
53 - "RX beacon SA=%pM BSSID=%pM TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n",
54 + ibss_dbg(sdata, "RX beacon SA=%pM BSSID=%pM TSF=0x%llx\n",
55 mgmt->sa, mgmt->bssid,
56 - (unsigned long long)rx_timestamp,
57 + (unsigned long long)rx_timestamp);
58 + ibss_dbg(sdata, "\tBCN=0x%llx diff=%lld @%lu\n",
59 (unsigned long long)beacon_timestamp,
60 (unsigned long long)(rx_timestamp - beacon_timestamp),
61 jiffies);
62 @@ -1537,9 +1537,9 @@ static void ieee80211_rx_mgmt_probe_req(
63
64 tx_last_beacon = drv_tx_last_beacon(local);
65
66 - ibss_dbg(sdata,
67 - "RX ProbeReq SA=%pM DA=%pM BSSID=%pM (tx_last_beacon=%d)\n",
68 - mgmt->sa, mgmt->da, mgmt->bssid, tx_last_beacon);
69 + ibss_dbg(sdata, "RX ProbeReq SA=%pM DA=%pM\n", mgmt->sa, mgmt->da);
70 + ibss_dbg(sdata, "\tBSSID=%pM (tx_last_beacon=%d)\n",
71 + mgmt->bssid, tx_last_beacon);
72
73 if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da))
74 return;