Remove three useless debug messages, remove meaningless XXXs, and remove

ieee80211_note_frame (unused).
This commit is contained in:
maxv 2018-05-08 07:02:07 +00:00
parent 7cc5177d0c
commit 2b9c280811
4 changed files with 8 additions and 44 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee80211_crypto.c,v 1.22 2018/04/10 07:53:36 maxv Exp $ */
/* $NetBSD: ieee80211_crypto.c,v 1.23 2018/05/08 07:02:07 maxv Exp $ */
/*
* Copyright (c) 2001 Atsushi Onoe
@ -37,7 +37,7 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.12 2005/08/08 18:46:35 sam Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ieee80211_crypto.c,v 1.22 2018/04/10 07:53:36 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee80211_crypto.c,v 1.23 2018/05/08 07:02:07 maxv Exp $");
#endif
#ifdef _KERNEL_OPT
@ -647,9 +647,6 @@ ieee80211_crypto_decap(struct ieee80211com *ic,
}
if (m == NULL) {
IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO,
"[%s] unable to pullup %s header\n",
ether_sprintf(wh->i_addr2), cip->ic_name);
ic->ic_stats.is_rx_tooshort++;
return NULL;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee80211_input.c,v 1.110 2018/01/21 14:13:49 maxv Exp $ */
/* $NetBSD: ieee80211_input.c,v 1.111 2018/05/08 07:02:07 maxv Exp $ */
/*
* Copyright (c) 2001 Atsushi Onoe
@ -37,7 +37,7 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.110 2018/01/21 14:13:49 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.111 2018/05/08 07:02:07 maxv Exp $");
#endif
#ifdef _KERNEL_OPT
@ -173,9 +173,6 @@ ieee80211_input_data(struct ieee80211com *ic, struct mbuf **mp,
if (m->m_len < hdrspace &&
(m = m_pullup(m, hdrspace)) == NULL) {
IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_ANY,
ni->ni_macaddr, NULL,
"data too short: expecting %u", hdrspace);
ic->ic_stats.is_rx_tooshort++;
goto out;
}
@ -3247,23 +3244,6 @@ ieee80211_note(struct ieee80211com *ic, const char *fmt, ...)
if_printf(ic->ic_ifp, "%s", buf); /* NB: no \n */
}
void
ieee80211_note_frame(struct ieee80211com *ic,
const struct ieee80211_frame *wh,
const char *fmt, ...)
{
char buf[128]; /* XXX */
va_list ap;
char ebuf[3 * ETHER_ADDR_LEN];
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if_printf(ic->ic_ifp, "[%s] %s\n",
ether_snprintf(ebuf, sizeof(ebuf),
ieee80211_getbssid(ic, wh)), buf);
}
void
ieee80211_note_mac(struct ieee80211com *ic,
const u_int8_t mac[IEEE80211_ADDR_LEN],

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee80211_output.c,v 1.62 2018/05/03 17:14:37 maxv Exp $ */
/* $NetBSD: ieee80211_output.c,v 1.63 2018/05/08 07:02:07 maxv Exp $ */
/*
* Copyright (c) 2001 Atsushi Onoe
@ -37,16 +37,13 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.34 2005/08/10 16:22:29 sam Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.62 2018/05/03 17:14:37 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.63 2018/05/08 07:02:07 maxv Exp $");
#endif
#ifdef _KERNEL_OPT
#include "opt_inet.h"
#endif
#ifdef __NetBSD__
#endif /* __NetBSD__ */
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
@ -247,7 +244,6 @@ ieee80211_send_nulldata(struct ieee80211_node *ni)
MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m == NULL) {
/* XXX debug msg */
ic->ic_stats.is_tx_nobuf++;
ieee80211_unref_node(&ni);
return ENOMEM;
@ -434,8 +430,6 @@ ieee80211_mbuf_adjust(struct ieee80211com *ic, int hdrsize,
if (M_LEADINGSPACE(m) < needed_space - TO_BE_RECLAIMED) {
struct mbuf *n = m_gethdr(M_NOWAIT, m->m_type);
if (n == NULL) {
IEEE80211_DPRINTF(ic, IEEE80211_MSG_OUTPUT,
"%s: cannot expand storage\n", __func__);
ic->ic_stats.is_tx_nobuf++;
m_freem(m);
return NULL;
@ -997,7 +991,7 @@ bad:
/* reclaim fragments but leave original frame for caller to free */
for (m = m0->m_nextpkt; m != NULL; m = next) {
next = m->m_nextpkt;
m->m_nextpkt = NULL; /* XXX paranoid */
m->m_nextpkt = NULL;
m_freem(m);
}
m0->m_nextpkt = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee80211_var.h,v 1.32 2018/01/16 07:53:02 maxv Exp $ */
/* $NetBSD: ieee80211_var.h,v 1.33 2018/05/08 07:02:07 maxv Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@ -401,15 +401,9 @@ ieee80211_anyhdrspace(struct ieee80211com *ic, const void *data)
if (ieee80211_msg(_ic, _m)) \
ieee80211_note_mac(_ic, _mac, _fmt, __VA_ARGS__); \
} while (0)
#define IEEE80211_NOTE_FRAME(_ic, _m, _wh, _fmt, ...) do { \
if (ieee80211_msg(_ic, _m)) \
ieee80211_note_frame(_ic, _wh, _fmt, __VA_ARGS__); \
} while (0)
void ieee80211_note(struct ieee80211com *ic, const char *fmt, ...);
void ieee80211_note_mac(struct ieee80211com *ic,
const u_int8_t mac[IEEE80211_ADDR_LEN], const char *fmt, ...);
void ieee80211_note_frame(struct ieee80211com *ic,
const struct ieee80211_frame *wh, const char *fmt, ...);
#define ieee80211_msg_debug(_ic) \
((_ic)->ic_debug & IEEE80211_MSG_DEBUG)
#define ieee80211_msg_dumppkts(_ic) \
@ -429,7 +423,6 @@ void ieee80211_note_frame(struct ieee80211com *ic,
#else
#define IEEE80211_DPRINTF(_ic, _m, _fmt, ...)
#define IEEE80211_NOTE(_ic, _m, _ni, _fmt, ...)
#define IEEE80211_NOTE_FRAME(_ic, _m, _wh, _fmt, ...)
#define IEEE80211_NOTE_MAC(_ic, _m, _mac, _fmt, ...)
#define ieee80211_msg_dumppkts(_ic) 0
#define ieee80211_msg(_ic, _m) 0