aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2021-09-04 09:24:51 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2021-11-19 00:01:24 +0000
commitbb989b92edd9eba7f80148378858ee0759d4dd13 (patch)
treeae2945aff25cb715413ad898d4bdc80145c09dcf
parentf9002b78d070e2603299e9ff7084ab79e8faaa55 (diff)
downloadsrc-bb989b92edd9eba7f80148378858ee0759d4dd13.tar.gz
src-bb989b92edd9eba7f80148378858ee0759d4dd13.zip
net80211: add func/line information to IEEE80211_DISCARD* macros
While debugging is very good in net80211, some log messages are repeated in multiple places 1:1. In order to distinguish where the discard happened and to speed up analysis, add __func__:__LINE__ information to all these messages. Sponsored by: The FreeBSD Foundation (cherry picked from commit cb5c07649aa005abb1e847c2cd5f816d762efb93)
-rw-r--r--sys/net80211/ieee80211_var.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 350c9b98441d..e70b7f8e2bb6 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -1067,15 +1067,18 @@ void ieee80211_note_frame(const struct ieee80211vap *,
*/
#define IEEE80211_DISCARD(_vap, _m, _wh, _type, _fmt, ...) do { \
if ((_vap)->iv_debug & (_m)) \
- ieee80211_discard_frame(_vap, _wh, _type, _fmt, __VA_ARGS__);\
+ ieee80211_discard_frame(_vap, _wh, _type, \
+ "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \
} while (0)
#define IEEE80211_DISCARD_IE(_vap, _m, _wh, _type, _fmt, ...) do { \
if ((_vap)->iv_debug & (_m)) \
- ieee80211_discard_ie(_vap, _wh, _type, _fmt, __VA_ARGS__);\
+ ieee80211_discard_ie(_vap, _wh, _type, \
+ "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \
} while (0)
#define IEEE80211_DISCARD_MAC(_vap, _m, _mac, _type, _fmt, ...) do { \
if ((_vap)->iv_debug & (_m)) \
- ieee80211_discard_mac(_vap, _mac, _type, _fmt, __VA_ARGS__);\
+ ieee80211_discard_mac(_vap, _mac, _type, \
+ "%s:%d: " _fmt, __func__, __LINE__, __VA_ARGS__); \
} while (0)
void ieee80211_discard_frame(const struct ieee80211vap *,