diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-08-04 17:31:47 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-08-04 17:31:47 +0000 |
commit | 3219473338481bbf002644f4789331d0e0cb4188 (patch) | |
tree | 03a828774b14269c5f82ecae10e1a1b37d7029bb | |
parent | 62ba7c752cc464f345d14a2971fddc8dadf5cc13 (diff) |
Compile a debug printf in ieee80211_match_bss() by default, previously
guarded by the IEEE80211_DEBUG preprocessor flag. This shows one line
per detected AP after a scan, and indicates which APs are considered
candidates for association.
Shorten the output a bit to fit into 80 columns more likely.
ok sthen@
-rw-r--r-- | sys/net80211/ieee80211_node.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index ee0307581ee..463a2cadef8 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.118 2017/07/19 19:50:58 stsp Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.119 2017/08/04 17:31:46 stsp Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -516,11 +516,9 @@ ieee80211_match_bss(struct ieee80211com *ic, struct ieee80211_node *ni) fail |= 0x40; } -#ifdef IEEE80211_DEBUG if (ic->ic_if.if_flags & IFF_DEBUG) { - printf(" %c %s", fail ? '-' : '+', - ether_sprintf(ni->ni_macaddr)); - printf(" %s%c", ether_sprintf(ni->ni_bssid), + printf(" %c %s%c", fail ? '-' : '+', + ether_sprintf(ni->ni_bssid), fail & 0x20 ? '!' : ' '); printf(" %3d%c", ieee80211_chan2ieee(ic, ni->ni_chan), fail & 0x01 ? '!' : ' '); @@ -543,7 +541,7 @@ ieee80211_match_bss(struct ieee80211com *ic, struct ieee80211_node *ni) ieee80211_print_essid(ni->ni_essid, ni->ni_esslen); printf("%s\n", fail & 0x10 ? "!" : ""); } -#endif + return fail; } |