Page MenuHomeFreeBSD

D50643.id156442.diff
No OneTemporary

D50643.id156442.diff

diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -2748,7 +2748,7 @@
KASSERT(IEEE80211_IS_CTL(wh), ("%s: not a CTL frame (fc[0]=0x%04x)",
__func__, wh->i_fc[0]));
if (!IEEE80211_IS_CTL(wh)) {
- if_printf(vap->iv_ifp,
+ net80211_vap_printf(vap,
"%s: not a control frame (fc[0]=0x%04x)\n",
__func__, wh->i_fc[0]);
return (false);
diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c
--- a/sys/net80211/ieee80211_adhoc.c
+++ b/sys/net80211/ieee80211_adhoc.c
@@ -645,7 +645,8 @@
#ifdef IEEE80211_DEBUG
if ((ieee80211_msg_debug(vap) && doprint(vap, subtype)) ||
ieee80211_msg_dumppkts(vap)) {
- if_printf(ifp, "received %s from %s rssi %d\n",
+ net80211_vap_printf(vap,
+ "received %s from %s rssi %d\n",
ieee80211_mgt_subtype_name(subtype),
ether_sprintf(wh->i_addr2), rssi);
}
diff --git a/sys/net80211/ieee80211_amrr.c b/sys/net80211/ieee80211_amrr.c
--- a/sys/net80211/ieee80211_amrr.c
+++ b/sys/net80211/ieee80211_amrr.c
@@ -121,7 +121,7 @@
amrr = vap->iv_rs = IEEE80211_MALLOC(sizeof(struct ieee80211_amrr),
M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
if (amrr == NULL) {
- if_printf(vap->iv_ifp, "couldn't alloc ratectl structure\n");
+ net80211_vap_printf(vap, "couldn't alloc ratectl structure\n");
return;
}
amrr->amrr_min_success_threshold = IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD;
@@ -231,7 +231,8 @@
struct ieee80211_amrr_node *amn;
if (!amrr) {
- if_printf(vap->iv_ifp, "ratectl structure was not allocated, "
+ net80211_vap_printf(vap,
+ "ratectl structure was not allocated, "
"per-node structure allocation skipped\n");
return;
}
@@ -240,8 +241,8 @@
ni->ni_rctls = amn = IEEE80211_MALLOC(sizeof(struct ieee80211_amrr_node),
M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
if (amn == NULL) {
- if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl "
- "structure\n");
+ net80211_vap_printf(vap,
+ "couldn't alloc per-node ratectl structure\n");
return;
}
} else
diff --git a/sys/net80211/ieee80211_dfs.c b/sys/net80211/ieee80211_dfs.c
--- a/sys/net80211/ieee80211_dfs.c
+++ b/sys/net80211/ieee80211_dfs.c
@@ -144,7 +144,7 @@
ieee80211_notify_cac(ic, ic->ic_curchan,
IEEE80211_NOTIFY_CAC_RADAR);
- if_printf(vap->iv_ifp,
+ net80211_vap_printf(vap,
"CAC timer on channel %u (%u MHz) stopped due to radar\n",
ic->ic_curchan->ic_ieee, ic->ic_curchan->ic_freq);
@@ -153,7 +153,7 @@
vap->iv_des_chan = dfs->newchan;
ieee80211_new_state_locked(vap, IEEE80211_S_SCAN, 0);
} else {
- if_printf(vap->iv_ifp,
+ net80211_vap_printf(vap,
"CAC timer on channel %u (%u MHz) expired; "
"no radar detected\n",
ic->ic_curchan->ic_ieee, ic->ic_curchan->ic_freq);
@@ -187,7 +187,8 @@
IEEE80211_LOCK_ASSERT(ic);
callout_reset(&dfs->cac_timer, CAC_TIMEOUT, cac_timeout, vap);
- if_printf(vap->iv_ifp, "start %d second CAC timer on channel %u (%u MHz)\n",
+ net80211_vap_printf(vap,
+ "start %d second CAC timer on channel %u (%u MHz)\n",
ticks_to_secs(CAC_TIMEOUT),
ic->ic_curchan->ic_ieee, ic->ic_curchan->ic_freq);
ieee80211_notify_cac(ic, ic->ic_curchan, IEEE80211_NOTIFY_CAC_START);
@@ -206,7 +207,8 @@
/* NB: racey but not important */
if (callout_pending(&dfs->cac_timer)) {
- if_printf(vap->iv_ifp, "stop CAC timer on channel %u (%u MHz)\n",
+ net80211_vap_printf(vap,
+ "stop CAC timer on channel %u (%u MHz)\n",
ic->ic_curchan->ic_ieee, ic->ic_curchan->ic_freq);
ieee80211_notify_cac(ic, ic->ic_curchan,
IEEE80211_NOTIFY_CAC_STOP);
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -838,7 +838,8 @@
#ifdef IEEE80211_DEBUG
if ((ieee80211_msg_debug(vap) && doprint(vap, subtype)) ||
ieee80211_msg_dumppkts(vap)) {
- if_printf(ifp, "received %s from %s rssi %d\n",
+ net80211_vap_printf(vap,
+ "received %s from %s rssi %d\n",
ieee80211_mgt_subtype_name(subtype),
ether_sprintf(wh->i_addr2), rssi);
}
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -950,10 +950,11 @@
len = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- if_printf(vap->iv_ifp, "%s", buf); /* NB: no \n */
+ net80211_vap_printf(vap, "%s", buf); /* NB: no \n */
if (len >= sizeof(buf))
- printf("%s: XXX buffer too small: len = %d\n", __func__, len);
+ net80211_vap_printf(vap,
+ "%s: XXX buffer too small: len = %d\n", __func__, len);
}
void
@@ -968,7 +969,7 @@
va_start(ap, fmt);
len = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- if_printf(vap->iv_ifp, "[%s] %s\n",
+ net80211_vap_printf(vap, "[%s] %s\n",
ether_sprintf(ieee80211_getbssid(vap, wh)), buf);
if (len >= sizeof(buf))
@@ -987,7 +988,7 @@
va_start(ap, fmt);
len = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- if_printf(vap->iv_ifp, "[%s] %s\n", ether_sprintf(mac), buf);
+ 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);
@@ -1006,7 +1007,7 @@
len = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- if_printf(vap->iv_ifp, "[%s] discard %s frame, %s\n",
+ net80211_vap_printf(vap, "[%s] discard %s frame, %s\n",
ether_sprintf(ieee80211_getbssid(vap, wh)),
type != NULL ? type : ieee80211_mgt_subtype_name(wh->i_fc[0]),
buf);
@@ -1028,7 +1029,7 @@
len = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- if_printf(vap->iv_ifp, "[%s] discard%s%s information element, %s\n",
+ net80211_vap_printf(vap, "[%s] discard%s%s information element, %s\n",
ether_sprintf(ieee80211_getbssid(vap, wh)),
type != NULL ? " " : "", type != NULL ? type : "", buf);
@@ -1049,7 +1050,7 @@
len = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
- if_printf(vap->iv_ifp, "[%s] discard%s%s frame, %s\n",
+ net80211_vap_printf(vap, "[%s] discard%s%s frame, %s\n",
ether_sprintf(mac),
type != NULL ? " " : "", type != NULL ? type : "", buf);
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -1788,7 +1788,8 @@
if ((ieee80211_msg_debug(vap) &&
(vap->iv_ic->ic_flags & IEEE80211_F_SCAN)) ||
ieee80211_msg_dumppkts(vap)) {
- if_printf(ifp, "received %s from %s rssi %d\n",
+ net80211_vap_printf(vap,
+ "received %s from %s rssi %d\n",
ieee80211_mgt_subtype_name(subtype),
ether_sprintf(wh->i_addr2), rssi);
}
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -179,7 +179,7 @@
/* XXX should we allow max aid to be zero? */
if (vap->iv_max_aid < IEEE80211_AID_MIN) {
vap->iv_max_aid = IEEE80211_AID_MIN;
- if_printf(vap->iv_ifp,
+ net80211_vap_printf(vap,
"WARNING: max aid too small, changed to %d\n",
vap->iv_max_aid);
}
diff --git a/sys/net80211/ieee80211_rssadapt.c b/sys/net80211/ieee80211_rssadapt.c
--- a/sys/net80211/ieee80211_rssadapt.c
+++ b/sys/net80211/ieee80211_rssadapt.c
@@ -137,7 +137,7 @@
vap->iv_rs = rs = IEEE80211_MALLOC(sizeof(struct ieee80211_rssadapt),
M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
if (rs == NULL) {
- if_printf(vap->iv_ifp, "couldn't alloc ratectl structure\n");
+ net80211_vap_printf(vap, "couldn't alloc ratectl structure\n");
return;
}
rs->vap = vap;
@@ -178,7 +178,8 @@
const struct ieee80211_rateset *rs = &ni->ni_rates;
if (!rsa) {
- if_printf(vap->iv_ifp, "ratectl structure was not allocated, "
+ net80211_vap_printf(vap,
+ "ratectl structure was not allocated, "
"per-node structure allocation skipped\n");
return;
}
@@ -188,8 +189,8 @@
IEEE80211_MALLOC(sizeof(struct ieee80211_rssadapt_node),
M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
if (ra == NULL) {
- if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl "
- "structure\n");
+ net80211_vap_printf(vap,
+ "couldn't alloc per-node ratectl structure\n");
return;
}
} else
diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c
--- a/sys/net80211/ieee80211_scan.c
+++ b/sys/net80211/ieee80211_scan.c
@@ -299,9 +299,9 @@
{
struct ieee80211vap *vap = ss->ss_vap;
- if_printf(vap->iv_ifp, "scan set ");
+ net80211_vap_printf(vap, "scan set ");
ieee80211_scan_dump_channels(ss);
- printf(" dwell min %ums max %ums\n",
+ net80211_vap_printf(vap, " dwell min %ums max %ums\n",
ticks_to_msecs(ss->ss_mindwell), ticks_to_msecs(ss->ss_maxdwell));
}
#endif /* IEEE80211_DEBUG */
diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c
--- a/sys/net80211/ieee80211_scan_sw.c
+++ b/sys/net80211/ieee80211_scan_sw.c
@@ -815,11 +815,9 @@
* driver calls (whilst unlocked), update scandone.
*/
if ((scandone == 0) && ((ss_priv->ss_iflags & ISCAN_PAUSE) == ISCAN_CANCEL)) {
- /* XXX printf? */
- if_printf(vap->iv_ifp,
+ net80211_vap_printf(vap,
"%s: OOPS! scan cancelled during driver call (1) (ss_iflags=0x%x)!\n",
- __func__,
- ss_priv->ss_iflags);
+ __func__, ss_priv->ss_iflags);
scandone = 1;
}
@@ -886,11 +884,9 @@
* driver calls (whilst unlocked), update scandone.
*/
if (scandone == 0 && (ss_priv->ss_iflags & ISCAN_PAUSE) == ISCAN_CANCEL) {
- /* XXX printf? */
- if_printf(vap->iv_ifp,
+ net80211_vap_printf(vap,
"%s: OOPS! scan cancelled during driver call (2) (ss_iflags=0x%x)!\n",
- __func__,
- ss_priv->ss_iflags);
+ __func__, ss_priv->ss_iflags);
scandone = 1;
}
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -916,7 +916,8 @@
#ifdef IEEE80211_DEBUG
if ((ieee80211_msg_debug(vap) && doprint(vap, subtype)) ||
ieee80211_msg_dumppkts(vap)) {
- if_printf(ifp, "received %s from %s rssi %d\n",
+ net80211_vap_printf(vap,
+ "received %s from %s rssi %d\n",
ieee80211_mgt_subtype_name(subtype),
ether_sprintf(wh->i_addr2), rssi);
}
diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c
--- a/sys/net80211/ieee80211_wds.c
+++ b/sys/net80211/ieee80211_wds.c
@@ -703,7 +703,8 @@
}
#ifdef IEEE80211_DEBUG
if (ieee80211_msg_debug(vap) || ieee80211_msg_dumppkts(vap)) {
- if_printf(ifp, "received %s from %s rssi %d\n",
+ net80211_vap_printf(vap,
+ "received %s from %s rssi %d\n",
ieee80211_mgt_subtype_name(subtype),
ether_sprintf(wh->i_addr2), rssi);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 15, 10:09 PM (3 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27655280
Default Alt Text
D50643.id156442.diff (10 KB)

Event Timeline