The branch main has been updated by adrian:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=674362e27015394e105125598cb1518506ae1efa

commit 674362e27015394e105125598cb1518506ae1efa
Author:     Adrian Chadd <adr...@freebsd.org>
AuthorDate: 2025-06-01 15:30:58 +0000
Commit:     Adrian Chadd <adr...@freebsd.org>
CommitDate: 2025-06-04 03:34:35 +0000

    net80211: migrate direct printf() to net80211_printf()
    
    Mechanically migrate printf() -> net80211_printf().
    A few places looked like they should be using net80211_vap_printf(),
    so migrate those appropriately.
    
    Differential Revision:  https://reviews.freebsd.org/D50644
    Reviewed by:    bz
---
 sys/net80211/ieee80211.c          | 22 ++++++-------
 sys/net80211/ieee80211_adhoc.c    |  2 +-
 sys/net80211/ieee80211_alq.c      |  4 +--
 sys/net80211/ieee80211_crypto.c   |  8 ++---
 sys/net80211/ieee80211_hostap.c   |  4 +--
 sys/net80211/ieee80211_hwmp.c     |  3 +-
 sys/net80211/ieee80211_input.c    | 21 ++++++++-----
 sys/net80211/ieee80211_ioctl.c    |  2 +-
 sys/net80211/ieee80211_mesh.c     |  5 +--
 sys/net80211/ieee80211_node.c     | 66 ++++++++++++++++++++-------------------
 sys/net80211/ieee80211_output.c   |  3 +-
 sys/net80211/ieee80211_power.c    |  3 +-
 sys/net80211/ieee80211_proto.c    | 66 +++++++++++++++++++--------------------
 sys/net80211/ieee80211_radiotap.c |  4 +--
 sys/net80211/ieee80211_scan.c     | 20 ++++++------
 sys/net80211/ieee80211_scan_sta.c | 16 +++++-----
 sys/net80211/ieee80211_sta.c      |  9 +++---
 sys/net80211/ieee80211_superg.c   | 11 ++++---
 sys/net80211/ieee80211_tdma.c     | 24 ++++++++------
 sys/net80211/ieee80211_vht.c      | 21 ++++++++-----
 20 files changed, 167 insertions(+), 147 deletions(-)

diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index 44d6a3294bdc..65ecb5d77607 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -1204,7 +1204,7 @@ set_vht_extchan(struct ieee80211_channel *c)
                return (0);
 
        if (IEEE80211_IS_CHAN_VHT80P80(c)) {
-               printf("%s: TODO VHT80+80 channel (ieee=%d, flags=0x%08x)\n",
+               net80211_printf("%s: TODO VHT80+80 channel (ieee=%d, 
flags=0x%08x)\n",
                    __func__, c->ic_ieee, c->ic_flags);
        }
 
@@ -1219,7 +1219,7 @@ set_vht_extchan(struct ieee80211_channel *c)
                                    ieee80211_mhz2ieee(midpoint, c->ic_flags);
                                c->ic_vht_ch_freq2 = 0;
 #if 0
-                               printf("%s: %d, freq=%d, midpoint=%d, freq1=%d, 
freq2=%d\n",
+                               net80211_printf("%s: %d, freq=%d, midpoint=%d, 
freq1=%d, freq2=%d\n",
                                    __func__, c->ic_ieee, c->ic_freq, midpoint,
                                    c->ic_vht_ch_freq1, c->ic_vht_ch_freq2);
 #endif
@@ -1240,7 +1240,7 @@ set_vht_extchan(struct ieee80211_channel *c)
                                    ieee80211_mhz2ieee(midpoint, c->ic_flags);
                                c->ic_vht_ch_freq2 = 0;
 #if 0
-                               printf("%s: %d, freq=%d, midpoint=%d, freq1=%d, 
freq2=%d\n",
+                               net80211_printf("%s: %d, freq=%d, midpoint=%d, 
freq1=%d, freq2=%d\n",
                                    __func__, c->ic_ieee, c->ic_freq, midpoint,
                                    c->ic_vht_ch_freq1, c->ic_vht_ch_freq2);
 #endif
@@ -1265,7 +1265,7 @@ set_vht_extchan(struct ieee80211_channel *c)
                return (1);
        }
 
-       printf("%s: unknown VHT channel type (ieee=%d, flags=0x%08x)\n",
+       net80211_printf("%s: unknown VHT channel type (ieee=%d, 
flags=0x%08x)\n",
            __func__, c->ic_ieee, c->ic_flags);
 
        return (0);
@@ -1313,7 +1313,7 @@ addchan(struct ieee80211_channel chans[], int maxchans, 
int *nchans,
                return (ENOBUFS);
 
 #if 0
-       printf("%s: %d of %d: ieee=%d, freq=%d, flags=0x%08x\n",
+       net80211_printf("%s: %d of %d: ieee=%d, freq=%d, flags=0x%08x\n",
            __func__, *nchans, maxchans, ieee, freq, flags);
 #endif
 
@@ -1343,7 +1343,7 @@ copychan_prev(struct ieee80211_channel chans[], int 
maxchans, int *nchans,
                return (ENOBUFS);
 
 #if 0
-       printf("%s: %d of %d: flags=0x%08x\n",
+       net80211_printf("%s: %d of %d: flags=0x%08x\n",
            __func__, *nchans, maxchans, flags);
 #endif
 
@@ -2075,10 +2075,10 @@ ieee80211_announce(struct ieee80211com *ic)
                        if (mword == 0)
                                continue;
                        rate = ieee80211_media2rate(mword);
-                       printf("%s%d%sMbps", (i != 0 ? " " : ""),
+                       net80211_printf("%s%d%sMbps", (i != 0 ? " " : ""),
                            rate / 2, ((rate & 0x1) != 0 ? ".5" : ""));
                }
-               printf("\n");
+               net80211_printf("\n");
        }
        ieee80211_ht_announce(ic);
        ieee80211_vht_announce(ic);
@@ -2091,7 +2091,7 @@ ieee80211_announce_channels(struct ieee80211com *ic)
        char type;
        int i, cw;
 
-       printf("Chan  Freq  CW  RegPwr  MinPwr  MaxPwr\n");
+       net80211_printf("Chan  Freq  CW  RegPwr  MinPwr  MaxPwr\n");
        for (i = 0; i < ic->ic_nchans; i++) {
                c = &ic->ic_channels[i];
                if (IEEE80211_IS_CHAN_ST(c))
@@ -2118,7 +2118,7 @@ ieee80211_announce_channels(struct ieee80211com *ic)
                        cw = 5;
                else
                        cw = 20;
-               printf("%4d  %4d%c %2d%c %6d  %4d.%d  %4d.%d\n"
+               net80211_printf("%4d  %4d%c %2d%c %6d  %4d.%d  %4d.%d\n"
                        , c->ic_ieee, c->ic_freq, type
                        , cw
                        , IEEE80211_IS_CHAN_HT40U(c) ? '+' :
@@ -2366,7 +2366,7 @@ ieee80211_chan2mode(const struct ieee80211_channel *chan)
                return IEEE80211_MODE_FH;
 
        /* NB: should not get here */
-       printf("%s: cannot map channel to mode; freq %u flags 0x%x\n",
+       net80211_printf("%s: cannot map channel to mode; freq %u flags 0x%x\n",
                __func__, chan->ic_freq, chan->ic_flags);
        return IEEE80211_MODE_11B;
 }
diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c
index 85baa132ebcf..adb83004d815 100644
--- a/sys/net80211/ieee80211_adhoc.c
+++ b/sys/net80211/ieee80211_adhoc.c
@@ -235,7 +235,7 @@ adhoc_newstate(struct ieee80211vap *vap, enum 
ieee80211_state nstate, int arg)
                                    ether_sprintf(ni->ni_bssid));
                                ieee80211_print_essid(vap->iv_bss->ni_essid,
                                    ni->ni_esslen);
-                               printf(" channel %d start %uMbit/s\n",
+                               net80211_printf(" channel %d start %uMbit/s\n",
                                    ieee80211_chan2ieee(ic, ic->ic_curchan),
                                    ieee80211_node_get_txrate_kbit(ni) / 1000);
                        }
diff --git a/sys/net80211/ieee80211_alq.c b/sys/net80211/ieee80211_alq.c
index c25ef11163d0..95a607a12265 100644
--- a/sys/net80211/ieee80211_alq.c
+++ b/sys/net80211/ieee80211_alq.c
@@ -79,7 +79,7 @@ ieee80211_alq_setlogging(int enable)
                    ieee80211_alq_qsize, 0);
                ieee80211_alq_lost = 0;
                ieee80211_alq_logged = 0;
-               printf("net80211: logging to %s enabled; "
+               net80211_printf("net80211: logging to %s enabled; "
                    "struct size %d bytes\n",
                    ieee80211_alq_logfile,
                    (int) sizeof(struct ieee80211_alq_rec));
@@ -87,7 +87,7 @@ ieee80211_alq_setlogging(int enable)
                if (ieee80211_alq)
                        alq_close(ieee80211_alq);
                ieee80211_alq = NULL;
-               printf("net80211: logging disabled\n");
+               net80211_printf("net80211: logging disabled\n");
                error = 0;
        }
        return (error);
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
index 6b636da9fa2c..1e63ca46f28f 100644
--- a/sys/net80211/ieee80211_crypto.c
+++ b/sys/net80211/ieee80211_crypto.c
@@ -261,12 +261,12 @@ void
 ieee80211_crypto_register(const struct ieee80211_cipher *cip)
 {
        if (cip->ic_cipher >= IEEE80211_CIPHER_MAX) {
-               printf("%s: cipher %s has an invalid cipher index %u\n",
+               net80211_printf("%s: cipher %s has an invalid cipher index 
%u\n",
                        __func__, cip->ic_name, cip->ic_cipher);
                return;
        }
        if (ciphers[cip->ic_cipher] != NULL && ciphers[cip->ic_cipher] != cip) {
-               printf("%s: cipher %s registered with a different template\n",
+               net80211_printf("%s: cipher %s registered with a different 
template\n",
                        __func__, cip->ic_name);
                return;
        }
@@ -280,12 +280,12 @@ void
 ieee80211_crypto_unregister(const struct ieee80211_cipher *cip)
 {
        if (cip->ic_cipher >= IEEE80211_CIPHER_MAX) {
-               printf("%s: cipher %s has an invalid cipher index %u\n",
+               net80211_printf("%s: cipher %s has an invalid cipher index 
%u\n",
                        __func__, cip->ic_name, cip->ic_cipher);
                return;
        }
        if (ciphers[cip->ic_cipher] != NULL && ciphers[cip->ic_cipher] != cip) {
-               printf("%s: cipher %s registered with a different template\n",
+               net80211_printf("%s: cipher %s registered with a different 
template\n",
                        __func__, cip->ic_name);
                return;
        }
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index 7f5cffcbb145..990b07f90032 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -309,7 +309,7 @@ hostap_newstate(struct ieee80211vap *vap, enum 
ieee80211_state nstate, int arg)
                                    ether_sprintf(ni->ni_bssid));
                                ieee80211_print_essid(ni->ni_essid,
                                    ni->ni_esslen);
-                               printf(" channel %d start %uMbit/s\n",
+                               net80211_printf(" channel %d start %uMbit/s\n",
                                    ieee80211_chan2ieee(ic, ic->ic_curchan),
                                    ieee80211_node_get_txrate_kbit(ni) / 1000);
                        }
@@ -2218,7 +2218,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf 
*m0,
                    vhtcap != NULL &&
                    vhtinfo != NULL) {
                        /* XXX TODO; see below */
-                       printf("%s: VHT TODO!\n", __func__);
+                       net80211_vap_printf(vap, "%s: VHT TODO!\n", __func__);
                        ieee80211_vht_node_init(ni);
                        ieee80211_vht_update_cap(ni, vhtcap, vhtinfo);
                } else if (ni->ni_flags & IEEE80211_NODE_VHT)
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c
index c47e845bb8a8..b69210768c54 100644
--- a/sys/net80211/ieee80211_hwmp.c
+++ b/sys/net80211/ieee80211_hwmp.c
@@ -261,7 +261,8 @@ hwmp_vattach(struct ieee80211vap *vap)
        hs = IEEE80211_MALLOC(sizeof(struct ieee80211_hwmp_state), M_80211_VAP,
            IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
        if (hs == NULL) {
-               printf("%s: couldn't alloc HWMP state\n", __func__);
+               net80211_vap_printf(vap, "%s: couldn't alloc HWMP state\n",
+                   __func__);
                return;
        }
        hs->hs_maxhops = IEEE80211_HWMP_DEFAULT_MAXHOPS;
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index f8e9b4665b56..69ec286305b4 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -901,7 +901,7 @@ ieee80211_parse_action(struct ieee80211_node *ni, struct 
mbuf *m)
                break;
 #endif
        case IEEE80211_ACTION_CAT_VHT:
-               printf("%s: TODO: VHT handling!\n", __func__);
+               net80211_printf("%s: TODO: VHT handling!\n", __func__);
                break;
        }
        return 0;
@@ -915,10 +915,10 @@ void
 ieee80211_ssid_mismatch(struct ieee80211vap *vap, const char *tag,
        uint8_t mac[IEEE80211_ADDR_LEN], uint8_t *ssid)
 {
-       printf("[%s] discard %s frame, ssid mismatch: ",
+       net80211_printf("[%s] discard %s frame, ssid mismatch: ",
                ether_sprintf(mac), tag);
        ieee80211_print_essid(ssid + 2, ssid[1]);
-       printf("\n");
+       net80211_printf("\n");
 }
 
 /*
@@ -973,7 +973,8 @@ ieee80211_note_frame(const struct ieee80211vap *vap,
                ether_sprintf(ieee80211_getbssid(vap, wh)), buf);
 
        if (len >= sizeof(buf))
-               printf("%s: XXX buffer too small: len = %d\n", __func__, len);
+               net80211_printf("%s: XXX buffer too small: len = %d\n",
+                   __func__, len);
 }
 
 void
@@ -991,7 +992,8 @@ ieee80211_note_mac(const struct ieee80211vap *vap,
        net80211_vap_printf(vap, "[%s] %s\n", ether_sprintf(mac), buf);
 
        if (len >= sizeof(buf))
-               printf("%s: XXX buffer too small: len = %d\n", __func__, len);
+               net80211_printf("%s: XXX buffer too small: len = %d\n",
+                   __func__, len);
 }
 
 void
@@ -1013,7 +1015,8 @@ ieee80211_discard_frame(const struct ieee80211vap *vap,
            buf);
 
        if (len >= sizeof(buf))
-               printf("%s: XXX buffer too small: len = %d\n", __func__, len);
+               net80211_printf("%s: XXX buffer too small: len = %d\n",
+                   __func__, len);
 }
 
 void
@@ -1034,7 +1037,8 @@ ieee80211_discard_ie(const struct ieee80211vap *vap,
            type != NULL ? " " : "", type != NULL ? type : "", buf);
 
        if (len >= sizeof(buf))
-               printf("%s: XXX buffer too small: len = %d\n", __func__, len);
+               net80211_printf("%s: XXX buffer too small: len = %d\n",
+                   __func__, len);
 }
 
 void
@@ -1055,6 +1059,7 @@ ieee80211_discard_mac(const struct ieee80211vap *vap,
            type != NULL ? " " : "", type != NULL ? type : "", buf);
 
        if (len >= sizeof(buf))
-               printf("%s: XXX buffer too small: len = %d\n", __func__, len);
+               net80211_printf("%s: XXX buffer too small: len = %d\n",
+                   __func__, len);
 }
 #endif /* IEEE80211_DEBUG */
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 85d46c018d36..4c3e5fa94243 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -2131,7 +2131,7 @@ ieee80211_ioctl_setchannel(struct ieee80211vap *vap,
                        }
                        break;
                case IEEE80211_MODE_VHT_2GHZ:
-                       printf("%s: TBD\n", __func__);
+                       net80211_printf("%s: TBD\n", __func__);
                        break;
                case IEEE80211_MODE_VHT_5GHZ:
                        if (IEEE80211_IS_CHAN_A(c)) {
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index dac023af1e41..4a9cd5e66a97 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -664,7 +664,8 @@ mesh_vattach(struct ieee80211vap *vap)
        ms = IEEE80211_MALLOC(sizeof(struct ieee80211_mesh_state), M_80211_VAP,
            IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
        if (ms == NULL) {
-               printf("%s: couldn't alloc MBSS state\n", __func__);
+               net80211_vap_printf(vap, "%s: couldn't alloc MBSS state\n",
+                   __func__);
                return;
        }
        vap->iv_mesh = ms;
@@ -821,7 +822,7 @@ mesh_newstate(struct ieee80211vap *vap, enum 
ieee80211_state nstate, int arg)
                                ieee80211_print_essid(ni->ni_meshid,
                                    ni->ni_meshidlen);
                                /* XXX MCS/HT */
-                               printf(" channel %d\n",
+                               net80211_printf(" channel %d\n",
                                    ieee80211_chan2ieee(ic, ic->ic_curchan));
                        }
 #endif
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 360e5e7d9abd..de19bc6a7361 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -189,7 +189,8 @@ ieee80211_node_latevattach(struct ieee80211vap *vap)
                        IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
                if (vap->iv_aid_bitmap == NULL) {
                        /* XXX no way to recover */
-                       printf("%s: no memory for AID bitmap, max aid %d!\n",
+                       net80211_vap_printf(vap,
+                           "%s: no memory for AID bitmap, max aid %d!\n",
                            __func__, vap->iv_max_aid);
                        vap->iv_max_aid = 0;
                }
@@ -577,22 +578,22 @@ check_bss_debug(struct ieee80211vap *vap, struct 
ieee80211_node *ni)
            !IEEE80211_ADDR_EQ(vap->iv_des_bssid, ni->ni_bssid))
                fail |= 0x20;
 
-       printf(" %c %s", fail ? '-' : '+', ether_sprintf(ni->ni_macaddr));
-       printf(" %s%c", ether_sprintf(ni->ni_bssid), fail & 0x20 ? '!' : ' ');
-       printf(" %3d%c",
+       net80211_printf(" %c %s", fail ? '-' : '+', 
ether_sprintf(ni->ni_macaddr));
+       net80211_printf(" %s%c", ether_sprintf(ni->ni_bssid), fail & 0x20 ? '!' 
: ' ');
+       net80211_printf(" %3d%c",
            ieee80211_chan2ieee(ic, ni->ni_chan), fail & 0x01 ? '!' : ' ');
-       printf(" %2dM%c", (rate & IEEE80211_RATE_VAL) / 2,
+       net80211_printf(" %2dM%c", (rate & IEEE80211_RATE_VAL) / 2,
            fail & 0x08 ? '!' : ' ');
-       printf(" %4s%c",
+       net80211_printf(" %4s%c",
            (ni->ni_capinfo & IEEE80211_CAPINFO_ESS) ? "ess" :
            (ni->ni_capinfo & IEEE80211_CAPINFO_IBSS) ? "ibss" :
            "????",
            fail & 0x02 ? '!' : ' ');
-       printf(" %3s%c ",
+       net80211_printf(" %3s%c ",
            (ni->ni_capinfo & IEEE80211_CAPINFO_PRIVACY) ?  "wep" : "no",
            fail & 0x04 ? '!' : ' ');
        ieee80211_print_essid(ni->ni_essid, ni->ni_esslen);
-       printf("%s\n", fail & 0x10 ? "!" : "");
+       net80211_printf("%s\n", fail & 0x10 ? "!" : "");
 }
 #endif /* IEEE80211_DEBUG */
 
@@ -1035,10 +1036,9 @@ ieee80211_sta_join(struct ieee80211vap *vap, struct 
ieee80211_channel *chan,
            ni->ni_ies.vhtcap_ie != NULL &&
            vap->iv_vht_flags & IEEE80211_FVHT_VHT) {
                if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) {
-                       printf("%s: BSS %6D: 2GHz channel, VHT info; 
ignoring\n",
-                           __func__,
-                           ni->ni_macaddr,
-                           ":");
+                       net80211_vap_printf(ni->ni_vap,
+                           "%s: BSS %6D: 2GHz channel, VHT info; ignoring\n",
+                           __func__, ni->ni_macaddr, ":");
                } else {
                        ieee80211_vht_node_init(ni);
                        ieee80211_vht_updateparams(ni,
@@ -1166,7 +1166,7 @@ ieee80211_ies_expand(struct ieee80211_ies *ies)
        while (ielen > 1) {
                /* Make sure the given IE length fits into the total length. */
                if ((2 + ie[1]) > ielen) {
-                       printf("%s: malformed IEs! ies %p { data %p len %d }: "
+                       net80211_printf("%s: malformed IEs! ies %p { data %p 
len %d }: "
                            "ie %u len 2+%u > total len left %d\n",
                            __func__, ies, ies->data, ies->len,
                            ie[0], ie[1], ielen);
@@ -1607,7 +1607,8 @@ ieee80211_node_create_wds(struct ieee80211vap *vap,
                         */
                        ieee80211_ht_wds_init(ni);
                        if (vap->iv_vht_flags & IEEE80211_FVHT_VHT) {
-                               printf("%s: TODO: vht_wds_init\n", __func__);
+                               net80211_vap_printf(vap,
+                                   "%s: TODO: vht_wds_init\n", __func__);
                        }
                } else {
                        struct ieee80211_channel *c = ni->ni_chan;
@@ -1864,10 +1865,9 @@ ieee80211_init_neighbor(struct ieee80211_node *ni,
 
                if (do_vht_setup) {
                        if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) {
-                               printf("%s: BSS %6D: 2GHz channel, VHT info; 
ignoring\n",
-                                   __func__,
-                                   ni->ni_macaddr,
-                                   ":");
+                               net80211_vap_printf(ni->ni_vap,
+                                   "%s: BSS %6D: 2GHz channel, VHT info; 
ignoring\n",
+                                   __func__, ni->ni_macaddr, ":");
                        } else {
                                ieee80211_vht_node_init(ni);
                                ieee80211_vht_updateparams(ni,
@@ -2341,7 +2341,7 @@ ieee80211_node_table_cleanup(struct ieee80211_node_table 
*nt)
                int i;
                for (i = 0; i < nt->nt_keyixmax; i++)
                        if (nt->nt_keyixmap[i] != NULL)
-                               printf("%s: %s[%u] still active\n", __func__,
+                               net80211_printf("%s: %s[%u] still active\n", 
__func__,
                                        nt->nt_name, i);
 #endif
                IEEE80211_FREE(nt->nt_keyixmap, M_80211_NODE);
@@ -2645,36 +2645,36 @@ void
 ieee80211_dump_node(struct ieee80211_node_table *nt __unused,
     struct ieee80211_node *ni)
 {
-       printf("%p: mac %s refcnt %d\n", ni,
+       net80211_printf("%p: mac %s refcnt %d\n", ni,
                ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni));
-       printf("\tauthmode %u flags 0x%x\n",
+       net80211_printf("\tauthmode %u flags 0x%x\n",
                ni->ni_authmode, ni->ni_flags);
-       printf("\tassocid 0x%x txpower %u vlan %u\n",
+       net80211_printf("\tassocid 0x%x txpower %u vlan %u\n",
                ni->ni_associd, ni->ni_txpower, ni->ni_vlan);
-       printf("\ttxseq %u rxseq %u fragno %u rxfragstamp %u\n",
+       net80211_printf("\ttxseq %u rxseq %u fragno %u rxfragstamp %u\n",
                ni->ni_txseqs[IEEE80211_NONQOS_TID],
                ni->ni_rxseqs[IEEE80211_NONQOS_TID] >> IEEE80211_SEQ_SEQ_SHIFT,
                ni->ni_rxseqs[IEEE80211_NONQOS_TID] & IEEE80211_SEQ_FRAG_MASK,
                ni->ni_rxfragstamp);
-       printf("\trssi %d noise %d intval %u capinfo 0x%x\n",
+       net80211_printf("\trssi %d noise %d intval %u capinfo 0x%x\n",
                node_getrssi(ni), ni->ni_noise,
                ni->ni_intval, ni->ni_capinfo);
-       printf("\tbssid %s essid \"%.*s\" channel %u:0x%x\n",
+       net80211_printf("\tbssid %s essid \"%.*s\" channel %u:0x%x\n",
                ether_sprintf(ni->ni_bssid),
                ni->ni_esslen, ni->ni_essid,
                (ni->ni_chan != IEEE80211_CHAN_ANYC) ? ni->ni_chan->ic_freq : 0,
                (ni->ni_chan != IEEE80211_CHAN_ANYC) ? ni->ni_chan->ic_flags : 
0);
-       printf("\tinact %u inact_reload %u txrate type %d dot11rate %u\n",
+       net80211_printf("\tinact %u inact_reload %u txrate type %d dot11rate 
%u\n",
                ni->ni_inact, ni->ni_inact_reload,
                ni->ni_txrate.type,
                ni->ni_txrate.dot11rate);
-       printf("\thtcap %x htparam %x htctlchan %u ht2ndchan %u\n",
+       net80211_printf("\thtcap %x htparam %x htctlchan %u ht2ndchan %u\n",
                ni->ni_htcap, ni->ni_htparam,
                ni->ni_htctlchan, ni->ni_ht2ndchan);
-       printf("\thtopmode %x htstbc %x htchw %d (%s)\n",
+       net80211_printf("\thtopmode %x htstbc %x htchw %d (%s)\n",
                ni->ni_htopmode, ni->ni_htstbc,
                ni->ni_chw, ieee80211_ni_chw_to_str(ni->ni_chw));
-       printf("\tvhtcap %x freq1 %d freq2 %d vhtbasicmcs %x\n",
+       net80211_printf("\tvhtcap %x freq1 %d freq2 %d vhtbasicmcs %x\n",
                ni->ni_vhtcap, (int) ni->ni_vht_chan1, (int) ni->ni_vht_chan2,
                (int) ni->ni_vht_basicmcs);
        /* XXX VHT state */
@@ -3162,7 +3162,8 @@ ieee80211_node_get_txrate_dot11rate(struct ieee80211_node 
*ni)
                break;
        case IEEE80211_NODE_TXRATE_VHT:
        default:
-               printf("%s: called for VHT / unknown rate (type %d)!\n",
+               net80211_vap_printf(ni->ni_vap,
+                   "%s: called for VHT / unknown rate (type %d)!\n",
                    __func__, ni->ni_txrate.type);
                return (12);            /* OFDM6 for now */
        }
@@ -3324,8 +3325,9 @@ ieee80211_node_get_txrate_kbit(struct ieee80211_node *ni)
                    ni->ni_txrate.nss, ni->ni_txrate.mcs, false);
                break;
        default:
-               printf("%s: called for unknown rate (type %d)!\n",
-                   __func__, ni->ni_txrate.type);
+               net80211_vap_printf(ni->ni_vap,
+                   "%s: called for unknown rate (type %d)!\n", __func__,
+                   ni->ni_txrate.type);
                return (0);
        }
 
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 9466b4851881..a4151f807882 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1834,7 +1834,8 @@ ieee80211_encap(struct ieee80211vap *vap, struct 
ieee80211_node *ni,
                 * be forced to be non-QoS traffic to be A-MSDU encapsulated.
                 */
                if (is_amsdu)
-                       printf("%s: XXX ERROR: is_amsdu set; not QoS!\n",
+                       net80211_vap_printf(vap,
+                           "%s: XXX ERROR: is_amsdu set; not QoS!\n",
                            __func__);
        }
 
diff --git a/sys/net80211/ieee80211_power.c b/sys/net80211/ieee80211_power.c
index 13a49940f6f0..f39c6418710d 100644
--- a/sys/net80211/ieee80211_power.c
+++ b/sys/net80211/ieee80211_power.c
@@ -88,7 +88,8 @@ ieee80211_power_latevattach(struct ieee80211vap *vap)
                        M_80211_POWER,
                        IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
                if (vap->iv_tim_bitmap == NULL) {
-                       printf("%s: no memory for TIM bitmap!\n", __func__);
+                       net80211_vap_printf(vap,
+                           "%s: no memory for TIM bitmap!\n", __func__);
                        /* XXX good enough to keep from crashing? */
                        vap->iv_tim_len = 0;
                }
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index 14c0d2beaad5..0c161d98a55a 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -504,7 +504,7 @@ static      const struct ieee80211_aclator *acl = NULL;
 void
 ieee80211_aclator_register(const struct ieee80211_aclator *iac)
 {
-       printf("wlan: %s acl policy registered\n", iac->iac_name);
+       net80211_printf("wlan: %s acl policy registered\n", iac->iac_name);
        acl = iac;
 }
 
@@ -513,7 +513,7 @@ ieee80211_aclator_unregister(const struct ieee80211_aclator 
*iac)
 {
        if (acl == iac)
                acl = NULL;
-       printf("wlan: %s acl policy unregistered\n", iac->iac_name);
+       net80211_printf("wlan: %s acl policy unregistered\n", iac->iac_name);
 }
 
 const struct ieee80211_aclator *
@@ -538,14 +538,14 @@ ieee80211_print_essid(const uint8_t *essid, int len)
                        break;
        }
        if (i == len) {
-               printf("\"");
+               net80211_printf("\"");
                for (i = 0, p = essid; i < len; i++, p++)
-                       printf("%c", *p);
-               printf("\"");
+                       net80211_printf("%c", *p);
+               net80211_printf("\"");
        } else {
-               printf("0x");
+               net80211_printf("0x");
                for (i = 0, p = essid; i < len; i++, p++)
-                       printf("%02x", *p);
+                       net80211_printf("%02x", *p);
        }
 }
 
@@ -559,67 +559,67 @@ ieee80211_dump_pkt(struct ieee80211com *ic,
        wh = (const struct ieee80211_frame *)buf;
        switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
        case IEEE80211_FC1_DIR_NODS:
-               printf("NODS %s", ether_sprintf(wh->i_addr2));
-               printf("->%s", ether_sprintf(wh->i_addr1));
-               printf("(%s)", ether_sprintf(wh->i_addr3));
+               net80211_printf("NODS %s", ether_sprintf(wh->i_addr2));
+               net80211_printf("->%s", ether_sprintf(wh->i_addr1));
+               net80211_printf("(%s)", ether_sprintf(wh->i_addr3));
                break;
        case IEEE80211_FC1_DIR_TODS:
-               printf("TODS %s", ether_sprintf(wh->i_addr2));
-               printf("->%s", ether_sprintf(wh->i_addr3));
-               printf("(%s)", ether_sprintf(wh->i_addr1));
+               net80211_printf("TODS %s", ether_sprintf(wh->i_addr2));
+               net80211_printf("->%s", ether_sprintf(wh->i_addr3));
+               net80211_printf("(%s)", ether_sprintf(wh->i_addr1));
                break;
        case IEEE80211_FC1_DIR_FROMDS:
-               printf("FRDS %s", ether_sprintf(wh->i_addr3));
-               printf("->%s", ether_sprintf(wh->i_addr1));
-               printf("(%s)", ether_sprintf(wh->i_addr2));
+               net80211_printf("FRDS %s", ether_sprintf(wh->i_addr3));
+               net80211_printf("->%s", ether_sprintf(wh->i_addr1));
+               net80211_printf("(%s)", ether_sprintf(wh->i_addr2));
                break;
        case IEEE80211_FC1_DIR_DSTODS:
-               printf("DSDS %s", ether_sprintf((const uint8_t *)&wh[1]));
-               printf("->%s", ether_sprintf(wh->i_addr3));
-               printf("(%s", ether_sprintf(wh->i_addr2));
-               printf("->%s)", ether_sprintf(wh->i_addr1));
+               net80211_printf("DSDS %s", ether_sprintf((const uint8_t 
*)&wh[1]));
+               net80211_printf("->%s", ether_sprintf(wh->i_addr3));
+               net80211_printf("(%s", ether_sprintf(wh->i_addr2));
+               net80211_printf("->%s)", ether_sprintf(wh->i_addr1));
                break;
        }
        switch (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) {
        case IEEE80211_FC0_TYPE_DATA:
-               printf(" data");
+               net80211_printf(" data");
                break;
        case IEEE80211_FC0_TYPE_MGT:
-               printf(" %s", ieee80211_mgt_subtype_name(wh->i_fc[0]));
+               net80211_printf(" %s", ieee80211_mgt_subtype_name(wh->i_fc[0]));
                break;
        default:
-               printf(" type#%d", wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK);
+               net80211_printf(" type#%d", wh->i_fc[0] & 
IEEE80211_FC0_TYPE_MASK);
                break;
        }
        if (IEEE80211_QOS_HAS_SEQ(wh)) {
                const struct ieee80211_qosframe *qwh = 
                        (const struct ieee80211_qosframe *)buf;
-               printf(" QoS [TID %u%s]", qwh->i_qos[0] & IEEE80211_QOS_TID,
+               net80211_printf(" QoS [TID %u%s]", qwh->i_qos[0] & 
IEEE80211_QOS_TID,
                        qwh->i_qos[0] & IEEE80211_QOS_ACKPOLICY ? " ACM" : "");
        }
        if (IEEE80211_IS_PROTECTED(wh)) {
                int off;
 
                off = ieee80211_anyhdrspace(ic, wh);
-               printf(" WEP [IV %.02x %.02x %.02x",
+               net80211_printf(" WEP [IV %.02x %.02x %.02x",
                        buf[off+0], buf[off+1], buf[off+2]);
                if (buf[off+IEEE80211_WEP_IVLEN] & IEEE80211_WEP_EXTIV)
-                       printf(" %.02x %.02x %.02x",
+                       net80211_printf(" %.02x %.02x %.02x",
                                buf[off+4], buf[off+5], buf[off+6]);
-               printf(" KID %u]", buf[off+IEEE80211_WEP_IVLEN] >> 6);
+               net80211_printf(" KID %u]", buf[off+IEEE80211_WEP_IVLEN] >> 6);
        }
        if (rate >= 0)
-               printf(" %dM", rate / 2);
+               net80211_printf(" %dM", rate / 2);
        if (rssi >= 0)
-               printf(" +%d", rssi);
-       printf("\n");
+               net80211_printf(" +%d", rssi);
+       net80211_printf("\n");
        if (len > 0) {
                for (i = 0; i < len; i++) {
                        if ((i & 1) == 0)
-                               printf(" ");
-                       printf("%02x", buf[i]);
+                               net80211_printf(" ");
+                       net80211_printf("%02x", buf[i]);
                }
-               printf("\n");
+               net80211_printf("\n");
        }
 }
 
diff --git a/sys/net80211/ieee80211_radiotap.c 
b/sys/net80211/ieee80211_radiotap.c
index 79e00106a780..e79aba550f50 100644
--- a/sys/net80211/ieee80211_radiotap.c
+++ b/sys/net80211/ieee80211_radiotap.c
@@ -354,14 +354,14 @@ radiotap_offset(struct ieee80211_radiotap_header *rh,
                        continue;
                if (items[i].align == 0) {
                        /* NB: unidentified element, don't guess */
-                       printf("%s: unknown item %d\n", __func__, i);
+                       net80211_printf("%s: unknown item %d\n", __func__, i);
                        return -1;
                }
                off = roundup2(off, items[i].align);
                if (i == item) {
                        if (off + items[i].width > le16toh(rh->it_len)) {
                                /* NB: item does not fit in header data */
-                               printf("%s: item %d not in header data, "
+                               net80211_printf("%s: item %d not in header 
data, "
                                    "off %d width %zu len %d\n", __func__, i,
                                    off, items[i].width, le16toh(rh->it_len));
                                return -1;
diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c
index 78ee78fdd74c..d54cde157c6c 100644
--- a/sys/net80211/ieee80211_scan.c
+++ b/sys/net80211/ieee80211_scan.c
@@ -288,7 +288,7 @@ ieee80211_scan_dump_channels(const struct 
ieee80211_scan_state *ss)
        for (i = ss->ss_next; i < ss->ss_last; i++) {
                const struct ieee80211_channel *c = ss->ss_chans[i];
 
-               printf("%s%u%c", sep, ieee80211_chan2ieee(ic, c),
+               net80211_printf("%s%u%c", sep, ieee80211_chan2ieee(ic, c),
                    ieee80211_channel_type_char(c));
                sep = ", ";
        }
@@ -547,21 +547,21 @@ dump_country(const uint8_t *ie)
        int i, nbands, schan, nchan;
 
        if (cie->len < 3) {
-               printf(" <bogus country ie, len %d>", cie->len);
+               net80211_printf(" <bogus country ie, len %d>", cie->len);
                return;
        }
-       printf(" country [%c%c%c", cie->cc[0], cie->cc[1], cie->cc[2]);
+       net80211_printf(" country [%c%c%c", cie->cc[0], cie->cc[1], cie->cc[2]);
        nbands = (cie->len - 3) / sizeof(cie->band[0]);
        for (i = 0; i < nbands; i++) {
                schan = cie->band[i].schan;
                nchan = cie->band[i].nchan;
                if (nchan != 1)
-                       printf(" %u-%u,%u", schan, schan + nchan-1,
+                       net80211_printf(" %u-%u,%u", schan, schan + nchan-1,
                            cie->band[i].maxtxpwr);
                else
-                       printf(" %u,%u", schan, cie->band[i].maxtxpwr);
+                       net80211_printf(" %u,%u", schan, cie->band[i].maxtxpwr);
        }
-       printf("]");
+       net80211_printf("]");
 }
 
 void
@@ -570,18 +570,18 @@ ieee80211_scan_dump_probe_beacon(uint8_t subtype, int 
isnew,
        const struct ieee80211_scanparams *sp, int rssi)
 {
 
-       printf("[%s] %s%s on chan %u (bss chan %u) ",
+       net80211_printf("[%s] %s%s on chan %u (bss chan %u) ",
            ether_sprintf(mac), isnew ? "new " : "",
            ieee80211_mgt_subtype_name(subtype), sp->chan, sp->bchan);
        ieee80211_print_essid(sp->ssid + 2, sp->ssid[1]);
-       printf(" rssi %d\n", rssi);
+       net80211_printf(" rssi %d\n", rssi);
 
        if (isnew) {
-               printf("[%s] caps 0x%x bintval %u erp 0x%x", 
+               net80211_printf("[%s] caps 0x%x bintval %u erp 0x%x", 
                        ether_sprintf(mac), sp->capinfo, sp->bintval, sp->erp);
                if (sp->country != NULL)
                        dump_country(sp->country);
-               printf("\n");
+               net80211_printf("\n");
        }
 }
 #endif /* IEEE80211_DEBUG */
diff --git a/sys/net80211/ieee80211_scan_sta.c 
b/sys/net80211/ieee80211_scan_sta.c
index 69347a5d99cf..529552d3719a 100644
--- a/sys/net80211/ieee80211_scan_sta.c
+++ b/sys/net80211/ieee80211_scan_sta.c
@@ -1157,7 +1157,7 @@ match_bss(struct ieee80211vap *vap,
                fail |= MATCH_RSSI;
 #ifdef IEEE80211_DEBUG
        if (ieee80211_msg(vap, debug)) {
-               printf(" %c %s",
+               net80211_printf(" %c %s",
                    fail & MATCH_FAILS ? '=' :
                    fail & MATCH_NOTSEEN ? '^' :
                    fail & MATCH_CC ? '$' :
@@ -1170,23 +1170,23 @@ match_bss(struct ieee80211vap *vap,
 #endif
                    fail & MATCH_MESH_NOID ? 'm' :
                    fail ? '-' : '+', ether_sprintf(se->se_macaddr));
-               printf(" %s%c", ether_sprintf(se->se_bssid),
+               net80211_printf(" %s%c", ether_sprintf(se->se_bssid),
                    fail & MATCH_BSSID ? '!' : ' ');
-               printf(" %3d%c", ieee80211_chan2ieee(ic, se->se_chan),
+               net80211_printf(" %3d%c", ieee80211_chan2ieee(ic, se->se_chan),
                        fail & MATCH_CHANNEL ? '!' : ' ');
-               printf(" %+4d%c", se->se_rssi, fail & MATCH_RSSI ? '!' : ' ');
-               printf(" %2dM%c", (rate & IEEE80211_RATE_VAL) / 2,
+               net80211_printf(" %+4d%c", se->se_rssi, fail & MATCH_RSSI ? '!' 
: ' ');
+               net80211_printf(" %2dM%c", (rate & IEEE80211_RATE_VAL) / 2,
                    fail & MATCH_RATE ? '!' : ' ');
-               printf(" %4s%c",
+               net80211_printf(" %4s%c",
                    (se->se_capinfo & IEEE80211_CAPINFO_ESS) ? "ess" :
                    (se->se_capinfo & IEEE80211_CAPINFO_IBSS) ? "ibss" : "",
                    fail & MATCH_CAPINFO ? '!' : ' ');
-               printf(" %3s%c ",
+               net80211_printf(" %3s%c ",
                    (se->se_capinfo & IEEE80211_CAPINFO_PRIVACY) ?
                    "wep" : "no",
                    fail & MATCH_PRIVACY ? '!' : ' ');
                ieee80211_print_essid(se->se_ssid+2, se->se_ssid[1]);
-               printf("%s\n", fail & (MATCH_SSID | MATCH_MESHID) ? "!" : "");
+               net80211_printf("%s\n", fail & (MATCH_SSID | MATCH_MESHID) ? 
"!" : "");
        }
 #endif
        return fail;
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
index 9fc2bf8b7f68..a41e3f5793dd 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -415,7 +415,7 @@ sta_newstate(struct ieee80211vap *vap, enum ieee80211_state 
nstate, int arg)
                                    ether_sprintf(ni->ni_bssid));
                                ieee80211_print_essid(vap->iv_bss->ni_essid,
                                    ni->ni_esslen);
-                               printf(" channel %d start %uMbit/s\n",
+                               net80211_printf(" channel %d start %uMbit/s\n",
                                    ieee80211_chan2ieee(ic, ic->ic_curchan),
                                    ieee80211_node_get_txrate_kbit(ni) / 1000);
                        }
@@ -1870,10 +1870,9 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf 
*m0, int subtype,
                                 * We aren't ready for 2GHz VHT support.
                                 */
                                if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) {
-                                       printf("%s: peer %6D: VHT on 2GHz, 
ignoring\n",
-                                           __func__,
-                                           ni->ni_macaddr,
-                                           ":");
+                                       net80211_vap_printf(vap,
+                                           "%s: peer %6D: VHT on 2GHz, 
ignoring\n",
+                                           __func__, ni->ni_macaddr, ":");
                                } else {
                                        ieee80211_vht_node_init(ni);
                                        ieee80211_vht_updateparams(ni, vhtcap, 
vhtopmode);
diff --git a/sys/net80211/ieee80211_superg.c b/sys/net80211/ieee80211_superg.c
index fcf0c614b0a0..cd1516302561 100644
--- a/sys/net80211/ieee80211_superg.c
+++ b/sys/net80211/ieee80211_superg.c
@@ -115,8 +115,8 @@ ieee80211_superg_attach(struct ieee80211com *ic)
             sizeof(struct ieee80211_superg), M_80211_VAP,
             IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
        if (sg == NULL) {
-               printf("%s: cannot allocate SuperG state block\n",
-                   __func__);
+               net80211_ic_printf(ic,
+                   "%s: cannot allocate SuperG state block\n", __func__);
                return;
        }
        TIMEOUT_TASK_INIT(ic->ic_tq, &sg->ff_qtimer, 0, ff_age_all, ic);
@@ -382,7 +382,8 @@ ieee80211_ff_encap(struct ieee80211vap *vap, struct mbuf 
*m1, int hdrspace,
        ETHER_HEADER_COPY(&eh1, mtod(m1, caddr_t));
        m1 = ieee80211_mbuf_adjust(vap, hdrspace, key, m1);
        if (m1 == NULL) {
-               printf("%s: failed initial mbuf_adjust\n", __func__);
+               net80211_vap_printf(vap, "%s: failed initial mbuf_adjust\n",
+                   __func__);
                /* NB: ieee80211_mbuf_adjust handles msgs+statistics */
                m_freem(m2);
                goto bad;
@@ -398,7 +399,7 @@ ieee80211_ff_encap(struct ieee80211vap *vap, struct mbuf 
*m1, int hdrspace,
        m2 = ieee80211_mbuf_adjust(vap, 4, NULL, m2);
        if (m2 == NULL) {
                /* NB: ieee80211_mbuf_adjust handles msgs+statistics */
-               printf("%s: failed second \n", __func__);
+               net80211_vap_printf(vap, "%s: failed second \n", __func__);
                goto bad;
        }
 
@@ -714,7 +715,7 @@ stageq_remove(struct ieee80211com *ic, struct 
ieee80211_stageq *sq, struct mbuf
                }
                mprev = m;
        }
-       printf("%s: packet not found\n", __func__);
+       net80211_ic_printf(ic, "%s: packet not found\n", __func__);
 }
 
 static uint32_t
diff --git a/sys/net80211/ieee80211_tdma.c b/sys/net80211/ieee80211_tdma.c
index 90ab2525e488..956158dbe767 100644
--- a/sys/net80211/ieee80211_tdma.c
+++ b/sys/net80211/ieee80211_tdma.c
@@ -153,7 +153,8 @@ ieee80211_tdma_vattach(struct ieee80211vap *vap)
             sizeof(struct ieee80211_tdma_state), M_80211_VAP,
             IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
        if (ts == NULL) {
-               printf("%s: cannot allocate TDMA state block\n", __func__);
+               net80211_vap_printf(vap,
+                   "%s: cannot allocate TDMA state block\n", __func__);
                /* NB: fall back to adhdemo mode */
                vap->iv_caps &= ~IEEE80211_C_TDMA;
                return;
@@ -419,8 +420,9 @@ tdma_update(struct ieee80211vap *vap, const struct 
ieee80211_tdma_param *tdma,
        if (tdma->tdma_slotcnt != ts->tdma_slotcnt) {
                if (!TDMA_SLOTCNT_VALID(tdma->tdma_slotcnt)) {
                        if (ppsratecheck(&ts->tdma_lastprint, &ts->tdma_fails, 
1))
-                               printf("%s: bad slot cnt %u\n",
-                                   __func__, tdma->tdma_slotcnt);
+                               net80211_vap_printf(vap,
+                                   "%s: bad slot cnt %u\n", __func__,
+                                   tdma->tdma_slotcnt);
                        return 0;
                }
                update |= TDMA_UPDATE_SLOTCNT;
@@ -429,8 +431,8 @@ tdma_update(struct ieee80211vap *vap, const struct 
ieee80211_tdma_param *tdma,
        if (slotlen != ts->tdma_slotlen) {
                if (!TDMA_SLOTLEN_VALID(slotlen)) {
                        if (ppsratecheck(&ts->tdma_lastprint, &ts->tdma_fails, 
1))
-                               printf("%s: bad slot len %u\n",
-                                   __func__, slotlen);
+                               net80211_vap_printf(vap,
+                                   "%s: bad slot len %u\n", __func__, slotlen);
                        return 0;
                }
                update |= TDMA_UPDATE_SLOTLEN;
@@ -438,8 +440,9 @@ tdma_update(struct ieee80211vap *vap, const struct 
ieee80211_tdma_param *tdma,
        if (tdma->tdma_bintval != ts->tdma_bintval) {
                if (!TDMA_BINTVAL_VALID(tdma->tdma_bintval)) {
                        if (ppsratecheck(&ts->tdma_lastprint, &ts->tdma_fails, 
1))
-                               printf("%s: bad beacon interval %u\n",
-                                   __func__, tdma->tdma_bintval);
+                               net80211_vap_printf(vap,
+                                   "%s: bad beacon interval %u\n", __func__,
+                                   tdma->tdma_bintval);
                        return 0;
                }
                update |= TDMA_UPDATE_BINTVAL;
@@ -453,9 +456,10 @@ tdma_update(struct ieee80211vap *vap, const struct 
ieee80211_tdma_param *tdma,
                        if (isclr(tdma->tdma_inuse, slot))
                                break;
                if (slot <= 0) {
-                       printf("%s: no free slot, slotcnt %u inuse: 0x%x\n",
-                               __func__, tdma->tdma_slotcnt,
-                               tdma->tdma_inuse[0]);
+                       net80211_vap_printf(vap,
+                           "%s: no free slot, slotcnt %u inuse: 0x%x\n",
+                           __func__, tdma->tdma_slotcnt,
+                           tdma->tdma_inuse[0]);
                        /* XXX need to do something better */
                        return 0;
                }
diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c
index eb4ea615da75..e91977f1ef98 100644
--- a/sys/net80211/ieee80211_vht.c
+++ b/sys/net80211/ieee80211_vht.c
@@ -250,7 +250,8 @@ ieee80211_parse_vhtopmode(struct ieee80211_node *ni, const 
uint8_t *ie)
        ni->ni_vht_basicmcs = le16dec(ie + 5);
 
 #if 0
-       printf("%s: chan1=%d, chan2=%d, chanwidth=%d, basicmcs=0x%04x\n",
+       net80211_vap_printf(ni->ni_vap,
+           "%s: chan1=%d, chan2=%d, chanwidth=%d, basicmcs=0x%04x\n",
            __func__, ni->ni_vht_chan1, ni->ni_vht_chan2, ni->ni_vht_chanwidth,
            ni->ni_vht_basicmcs);
 #endif
@@ -774,7 +775,8 @@ ieee80211_add_vhtcap_ch(uint8_t *frm, struct ieee80211vap 
*vap,
 }
 
 static uint8_t
-ieee80211_vht_get_chwidth_ie(struct ieee80211_channel *c)
+ieee80211_vht_get_chwidth_ie(const struct ieee80211vap *vap,
+    const struct ieee80211_channel *c)
 {
 
        /*
@@ -794,7 +796,8 @@ ieee80211_vht_get_chwidth_ie(struct ieee80211_channel *c)
                return IEEE80211_VHT_CHANWIDTH_USE_HT;
 
        /* We shouldn't get here */
-       printf("%s: called on a non-VHT channel (freq=%d, flags=0x%08x\n",
+       net80211_vap_printf(vap,
+           "%s: called on a non-VHT channel (freq=%d, flags=0x%08x\n",
            __func__, (int) c->ic_freq, c->ic_flags);
        return IEEE80211_VHT_CHANWIDTH_USE_HT;
 }
@@ -820,7 +823,7 @@ ieee80211_add_vhtinfo(uint8_t *frm, struct ieee80211_node 
*ni)
        frm += 2;
 
*** 44 LINES SKIPPED ***

Reply via email to