1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

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
MFC after:	1 week
This commit is contained in:
Bjoern A. Zeeb 2021-09-04 09:24:51 +00:00
parent 49c220b021
commit cb5c07649a

View File

@ -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 *,