net: clean up empty lines in .c and .h files

This commit is contained in:
Mateusz Guzik 2020-09-01 21:19:14 +00:00
parent 586ee69f09
commit 662c13053f
403 changed files with 297 additions and 1695 deletions

View File

@ -38,7 +38,6 @@
#define ALTQ3_CLFIER_COMPAT /* for compatibility with altq-3 classifier */
#endif
/* altq discipline type */
#define ALTQT_NONE 0 /* reserved */
#define ALTQT_CBQ 1 /* cbq */
@ -57,14 +56,12 @@
#define ALTQT_CODEL 14 /* CoDel */
#define ALTQT_MAX 15 /* should be max discipline type + 1 */
/* simple token backet meter profile */
struct tb_profile {
u_int64_t rate; /* rate in bit-per-sec */
u_int32_t depth; /* depth in bytes */
};
/*
* generic packet counter
*/
@ -76,7 +73,6 @@ struct pktcntr {
#define PKTCNTR_ADD(cntr, len) \
do { (cntr)->packets++; (cntr)->bytes += len; } while (/*CONSTCOND*/ 0)
#ifdef _KERNEL
#include <net/altq/altq_var.h>
#endif
@ -105,5 +101,5 @@ static inline int altq_stats_version(int scheduler)
default: return (0);
}
}
#endif /* _ALTQ_ALTQ_H_ */

View File

@ -55,7 +55,6 @@
#include <net/altq/altq.h>
#include <net/altq/altq_cbq.h>
/*
* Forward Declarations.
*/

View File

@ -111,7 +111,6 @@ typedef struct _cbq_class_stats_ {
* header.
*/
#ifdef _KERNEL
/*
* Define macros only good for kernel drivers and modules.
@ -122,7 +121,6 @@ typedef struct _cbq_class_stats_ {
#define CBQ_MAX_CLASSES 256
/*
* Define State structures.
*/

View File

@ -246,7 +246,6 @@ codel_dequeue(struct ifaltq *ifq, int op)
if (op == ALTDQ_POLL)
return (qhead(cif->cl_q));
m = codel_getq(&cif->codel, cif->cl_q);
if (m != NULL) {
IFQ_DEC_LEN(ifq);

View File

@ -157,7 +157,6 @@ fairq_add_altq(struct ifnet *ifp, struct pf_altq *a)
if (!ALTQ_IS_READY(&ifp->if_snd))
return (ENODEV);
pif = malloc(sizeof(struct fairq_if),
M_DEVBUF, M_WAITOK | M_ZERO);
pif->pif_bandwidth = a->ifbandwidth;

View File

@ -133,8 +133,6 @@ static void get_class_stats_v1(struct hfsc_classstats_v1 *,
struct hfsc_class *);
static struct hfsc_class *clh_to_clp(struct hfsc_if *, u_int32_t);
/*
* macros
*/
@ -142,7 +140,6 @@ static struct hfsc_class *clh_to_clp(struct hfsc_if *, u_int32_t);
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
int
hfsc_pfattach(struct pf_altq *a)
{
@ -307,7 +304,6 @@ hfsc_clear_interface(struct hfsc_if *hif)
{
struct hfsc_class *cl;
/* clear out the classes */
while (hif->hif_rootclass != NULL &&
(cl = hif->hif_rootclass->cl_children) != NULL) {
@ -569,7 +565,6 @@ hfsc_class_destroy(struct hfsc_class *cl)
s = splnet();
IFQ_LOCK(cl->cl_hif->hif_ifq);
if (!qempty(cl->cl_q))
hfsc_purgeq(cl);
@ -729,7 +724,6 @@ hfsc_dequeue(struct ifaltq *ifq, int op)
cur_time = read_machclk();
if (op == ALTDQ_REMOVE && hif->hif_pollcache != NULL) {
cl = hif->hif_pollcache;
hif->hif_pollcache = NULL;
/* check if the class was scheduled by real-time criteria */
@ -754,7 +748,6 @@ hfsc_dequeue(struct ifaltq *ifq, int op)
*/
cl = hif->hif_rootclass;
while (is_a_parent_class(cl)) {
cl = actlist_firstfit(cl, cur_time);
if (cl == NULL) {
#ifdef ALTQ_DEBUG
@ -962,7 +955,6 @@ init_vf(struct hfsc_class *cl, int len)
cur_time = 0;
go_active = 1;
for ( ; cl->cl_parent != NULL; cl = cl->cl_parent) {
if (go_active && cl->cl_nactive++ == 0)
go_active = 1;
else
@ -1052,7 +1044,6 @@ update_vf(struct hfsc_class *cl, int len, u_int64_t cur_time)
go_passive = qempty(cl->cl_q);
for (; cl->cl_parent != NULL; cl = cl->cl_parent) {
cl->cl_total += len;
if (cl->cl_fsc == NULL || cl->cl_nactive == 0)
@ -1596,7 +1587,7 @@ get_class_stats_v0(struct hfsc_classstats_v0 *sp, struct hfsc_class *cl)
}
#undef SATU32
sp->total = cl->cl_total;
sp->cumul = cl->cl_cumul;
@ -1742,5 +1733,4 @@ clh_to_clp(struct hfsc_if *hif, u_int32_t chandle)
return (NULL);
}
#endif /* ALTQ_HFSC */

View File

@ -57,7 +57,7 @@ struct service_curve_v1 {
/* Latest version of struct service_curve_vX */
#define HFSC_SERVICE_CURVE_VERSION 1
/* special class handles */
#define HFSC_NULLCLASS_HANDLE 0
#define HFSC_MAX_CLASSES 64
@ -167,7 +167,6 @@ struct hfsc_classstats_v1 {
* from mixing of public-API and internal bits in each scheduler-specific
* header.
*/
#ifdef _KERNEL
/*

View File

@ -74,11 +74,9 @@ static struct mbuf *priq_getq(struct priq_class *);
static struct mbuf *priq_pollq(struct priq_class *);
static void priq_purgeq(struct priq_class *);
static void get_class_stats(struct priq_classstats *, struct priq_class *);
static struct priq_class *clh_to_clp(struct priq_if *, u_int32_t);
int
priq_pfattach(struct pf_altq *a)
{
@ -640,5 +638,4 @@ clh_to_clp(struct priq_if *pif, u_int32_t chandle)
return (NULL);
}
#endif /* ALTQ_PRIQ */

View File

@ -42,7 +42,6 @@ extern "C" {
#define PRIQ_MAXPRI 16 /* upper limit of the number of priorities */
/* priq class flags */
#define PRCF_RED 0x0001 /* use RED */
#define PRCF_ECN 0x0002 /* use RED/ECN */
@ -54,7 +53,6 @@ extern "C" {
/* special class handles */
#define PRIQ_NULLCLASS_HANDLE 0
struct priq_classstats {
u_int32_t class_handle;
@ -76,7 +74,6 @@ struct priq_classstats {
* header.
*/
#ifdef _KERNEL
struct priq_class {

View File

@ -162,13 +162,11 @@
* to switch to the random-drop policy, define "RED_RANDOM_DROP".
*/
/* default red parameter values */
static int default_th_min = TH_MIN;
static int default_th_max = TH_MAX;
static int default_inv_pmax = INV_P_MAX;
/*
* red support routines
*/
@ -629,5 +627,4 @@ pow_w(struct wtab *w, int n)
return (val);
}
#endif /* ALTQ_RED */

View File

@ -32,7 +32,6 @@
#include <net/altq/altq_classq.h>
/* red flags */
#define REDF_ECN4 0x01 /* use packet marking for IPv4 packets */
#define REDF_ECN6 0x02 /* use packet marking for IPv6 packets */
@ -58,10 +57,8 @@ struct redstats {
u_int marked_packets;
};
#ifdef _KERNEL
/* weight table structure for idle time calibration */
struct wtab {
struct wtab *w_next;
@ -96,7 +93,6 @@ typedef struct red {
struct wtab *red_wtab; /* weight table */
struct timeval red_last; /* time when the queue becomes idle */
struct {
struct pktcntr xmit_cnt;
struct pktcntr drop_cnt;
@ -106,7 +102,6 @@ typedef struct red {
} red_stats;
} red_t;
/* red drop types */
#define DTYPE_NODROP 0 /* no drop */
#define DTYPE_FORCED 1 /* a "forced" drop */

View File

@ -447,5 +447,4 @@ rio_getq(rio_t *rp, class_queue_t *q)
return (m);
}
#endif /* ALTQ_RIO */

View File

@ -38,14 +38,12 @@
*/
#define RIO_NDROPPREC 3 /* number of drop precedence values */
/* rio flags */
#define RIOF_ECN4 0x01 /* use packet marking for IPv4 packets */
#define RIOF_ECN6 0x02 /* use packet marking for IPv6 packets */
#define RIOF_ECN (RIOF_ECN4 | RIOF_ECN6)
#define RIOF_CLEARDSCP 0x200 /* clear diffserv codepoint */
#ifdef _KERNEL
typedef struct rio {
@ -84,7 +82,6 @@ typedef struct rio {
struct redstats q_stats[RIO_NDROPPREC]; /* statistics */
} rio_t;
extern rio_t *rio_alloc(int, struct redparams *, int, int);
extern void rio_destroy(rio_t *);
extern void rio_getstats(rio_t *, struct redstats *);

View File

@ -64,7 +64,6 @@
/*
* Local Macros
*/
#define reset_cutoff(ifd) { ifd->cutoff_ = RM_MAXDEPTH; }
/*
@ -652,7 +651,6 @@ rmc_delete_class(struct rm_ifdat *ifd, struct rm_class *cl)
free(cl, M_DEVBUF);
}
/*
* void
* rmc_init(...) - Initialize the resource management data structures

View File

@ -243,7 +243,7 @@ altq_disable(ifq)
ASSERT(ifq->ifq_len == 0);
ifq->altq_flags &= ~(ALTQF_ENABLED|ALTQF_CLASSIFY);
splx(s);
IFQ_UNLOCK(ifq);
return 0;
}
@ -330,7 +330,7 @@ tbr_set(ifq, profile)
struct tb_profile *profile;
{
struct tb_regulator *tbr, *otbr;
if (tbr_dequeue_ptr == NULL)
tbr_dequeue_ptr = tbr_dequeue;
@ -841,7 +841,6 @@ write_dsfield(struct mbuf *m, struct altq_pktattr *pktattr, u_int8_t dsfield)
return;
}
/*
* high resolution clock support taking advantage of a machine dependent
* high resolution time counter (e.g., timestamp counter of intel pentium).
@ -1811,7 +1810,6 @@ filt2fibmask(filt)
return (mask);
}
/*
* helper functions to handle IPv4 fragments.
* currently only in-sequence fragments are handled.
@ -1831,7 +1829,6 @@ static TAILQ_HEAD(ip4f_list, ip4_frag) ip4f_list; /* IPv4 fragment cache */
#define IP4F_TABSIZE 16 /* IPv4 fragment cache size */
static void
ip4f_cache(ip, fin)
struct ip *ip;
@ -1871,7 +1868,6 @@ ip4f_lookup(ip, fin)
ip->ip_src.s_addr == fp->ip4f_info.fi_src.s_addr &&
ip->ip_dst.s_addr == fp->ip4f_info.fi_dst.s_addr &&
ip->ip_p == fp->ip4f_info.fi_proto) {
/* found the matching entry */
fin->fi_sport = fp->ip4f_info.fi_sport;
fin->fi_dport = fp->ip4f_info.fi_dport;

View File

@ -74,7 +74,6 @@ struct ifaltq {
struct top_cdnr *altq_cdnr;
};
#ifdef _KERNEL
/*

View File

@ -577,7 +577,6 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp,
* for the link level header.
*/
switch (linktype) {
case DLT_SLIP:
sockp->sa_family = AF_INET;
hlen = 0;
@ -1428,7 +1427,6 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
CURVNET_SET(TD_TO_VNET(td));
switch (cmd) {
default:
error = EINVAL;
break;

View File

@ -832,7 +832,6 @@ bstp_assign_roles(struct bstp_state *bs)
bp->bp_desg_fdelay = bs->bs_root_fdelay;
bp->bp_desg_htime = bs->bs_bridge_htime;
switch (bp->bp_infois) {
case BSTP_INFO_DISABLED:
bstp_set_port_role(bp, BSTP_ROLE_DISABLED);

View File

@ -178,7 +178,6 @@
#define BSTP_INFO_AGED 3
#define BSTP_INFO_DISABLED 4
#define BSTP_MESSAGE_AGE_INCR (1 * 256) /* in 256ths of a second */
#define BSTP_TICK_VAL (1 * 256) /* in 256ths of a second */
#define BSTP_LINK_TIMER (BSTP_TICK_VAL * 15)

View File

@ -161,7 +161,6 @@ debugnet_handle_ip(struct debugnet_pcb *pcb, struct mbuf **mb)
return;
}
if (m->m_pkthdr.len > ip->ip_len) {
/* Truncate the packet to the IP length. */
if (m->m_len == m->m_pkthdr.len) {
m->m_len = ip->ip_len;

View File

@ -206,7 +206,6 @@ VNET_DEFINE_STATIC(int, lacp_default_strict_mode) = 1;
SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, default_strict_mode,
CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(lacp_default_strict_mode), 0,
"LACP strict protocol compliance default");
#define LACP_DPRINTF(a) if (V_lacp_debug & 0x01) { lacp_dprintf a ; }
#define LACP_TRACE(a) if (V_lacp_debug & 0x02) { lacp_dprintf(a,"%s\n",__func__); }
#define LACP_TPRINTF(a) if (V_lacp_debug & 0x04) { lacp_dprintf a ; }
@ -607,7 +606,7 @@ lacp_req(struct lagg_softc *sc, void *data)
struct lacp_aggregator *la;
bzero(req, sizeof(struct lacp_opreq));
/*
* If the LACP softc is NULL, return with the opreq structure full of
* zeros. It is normal for the softc to be NULL while the lagg is
@ -1102,7 +1101,6 @@ lacp_compose_key(struct lacp_port *lp)
uint16_t key;
if ((lp->lp_state & LACP_STATE_AGGREGATION) == 0) {
/*
* non-aggregatable links should have unique keys.
*
@ -1677,7 +1675,6 @@ lacp_sm_ptx_tx_schedule(struct lacp_port *lp)
if (!(lp->lp_state & LACP_STATE_ACTIVITY) &&
!(lp->lp_partner.lip_state & LACP_STATE_ACTIVITY)) {
/*
* NO_PERIODIC
*/

View File

@ -488,7 +488,6 @@ VNET_SYSUNINIT(vnet_if_return, SI_SUB_VNET_DONE, SI_ORDER_ANY,
vnet_if_return, NULL);
#endif
static void *
if_grow(void)
{
@ -688,7 +687,7 @@ if_rele(struct ifnet *ifp)
void
ifq_init(struct ifaltq *ifq, struct ifnet *ifp)
{
mtx_init(&ifq->ifq_mtx, ifp->if_xname, "if send queue", MTX_DEF);
if (ifq->ifq_maxlen == 0)
@ -1838,7 +1837,6 @@ ifa_free(struct ifaddr *ifa)
NET_EPOCH_CALL(ifa_destroy, &ifa->ifa_epoch_ctx);
}
static int
ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa,
struct sockaddr *ia)
@ -2358,7 +2356,7 @@ if_qflush(struct ifnet *ifp)
{
struct mbuf *m, *n;
struct ifaltq *ifq;
ifq = &ifp->if_snd;
IFQ_LOCK(ifq);
#ifdef ALTQ
@ -3142,7 +3140,7 @@ if_setflag(struct ifnet *ifp, int flag, int pflag, int *refcount, int onswitch)
/* Save ifnet parameters for if_ioctl() may fail */
oldcount = *refcount;
oldflags = ifp->if_flags;
/*
* See if we aren't the only and touching refcount is enough.
* Actually toggle interface flag if we are the first or last.
@ -3430,7 +3428,6 @@ if_freemulti(struct ifmultiaddr *ifma)
NET_EPOCH_CALL(if_destroymulti, &ifma->ifma_epoch_ctx);
}
/*
* Register an additional multicast address with a network interface.
*
@ -4029,7 +4026,7 @@ void
if_register_com_alloc(u_char type,
if_com_alloc_t *a, if_com_free_t *f)
{
KASSERT(if_com_alloc[type] == NULL,
("if_register_com_alloc: %d already registered", type));
KASSERT(if_com_free[type] == NULL,
@ -4042,7 +4039,7 @@ if_register_com_alloc(u_char type,
void
if_deregister_com_alloc(u_char type)
{
KASSERT(if_com_alloc[type] != NULL,
("if_deregister_com_alloc: %d not registered", type));
KASSERT(if_com_free[type] != NULL,
@ -4154,7 +4151,7 @@ if_getdrvflags(if_t ifp)
{
return ((struct ifnet *)ifp)->if_drv_flags;
}
int
if_setdrvflags(if_t ifp, int flags)
{
@ -4162,7 +4159,6 @@ if_setdrvflags(if_t ifp, int flags)
return (0);
}
int
if_setflags(if_t ifp, int flags)
{
@ -4376,7 +4372,6 @@ if_getamcount(if_t ifp)
return ((struct ifnet *)ifp)->if_amcount;
}
int
if_setsendqready(if_t ifp)
{
@ -4537,7 +4532,7 @@ if_settransmitfn(if_t ifp, if_transmit_fn_t start_fn)
void if_setqflushfn(if_t ifp, if_qflush_fn_t flush_fn)
{
((struct ifnet *)ifp)->if_qflush = flush_fn;
}
void

View File

@ -164,7 +164,6 @@ struct if_data {
#define IFF_RENAMING 0x400000 /* (n) interface is being renamed */
#define IFF_NOGROUP 0x800000 /* (n) interface is not part of any groups */
/*
* Old names for driver flags so that user space tools can continue to use
* the old (portable) names.

View File

@ -364,7 +364,6 @@ static int bridge_fragment(struct ifnet *, struct mbuf **mp,
static void bridge_linkstate(struct ifnet *ifp);
static void bridge_linkcheck(struct bridge_softc *sc);
/* The default bridge vlan is 1 (IEEE 802.1Q-2003 Table 9-2) */
#define VLANTAGOF(_m) \
(_m->m_flags & M_VLANTAG) ? EVL_VLANOFTAG(_m->m_pkthdr.ether_vtag) : 1
@ -784,7 +783,6 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
NET_EPOCH_ENTER(et);
switch (cmd) {
case SIOCADDMULTI:
case SIOCDELMULTI:
break;

View File

@ -239,7 +239,7 @@ if_clone_createif(struct if_clone *ifc, char *name, size_t len, caddr_t params)
err = ifc_simple_create(ifc, name, len, params);
else
err = (*ifc->ifc_create)(ifc, name, len, params);
if (!err) {
ifp = ifunit(name);
if (ifp == NULL)
@ -669,7 +669,7 @@ ifc_simple_match(struct if_clone *ifc, const char *name)
{
const char *cp;
int i;
/* Match the name */
for (cp = name, i = 0; i < strlen(ifc->ifc_name); i++, cp++) {
if (ifc->ifc_name[i] != *cp)
@ -721,7 +721,6 @@ ifc_simple_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
*/
panic("if_clone_create(): interface name too long");
}
}
return (0);

View File

@ -72,7 +72,6 @@ struct sockaddr_dl {
#define CLLADDR(s) ((c_caddr_t)((s)->sdl_data + (s)->sdl_nlen))
#define LLINDEX(s) ((s)->sdl_index)
struct ifnet;
struct sockaddr_dl *link_alloc_sdl(size_t, int);
void link_free_sdl(struct sockaddr *sa);

View File

@ -489,7 +489,7 @@ epair_transmit_locked(struct ifnet *ifp, struct mbuf *m)
if (m == NULL)
return (0);
/*
* We are not going to use the interface en/dequeue mechanism
* on the TX side. We are called from ether_output_frame()
@ -609,7 +609,7 @@ static void
epair_qflush(struct ifnet *ifp)
{
struct epair_softc *sc;
sc = ifp->if_softc;
KASSERT(sc != NULL, ("%s: ifp=%p, epair_softc gone? sc=%p\n",
__func__, ifp, sc));
@ -681,7 +681,6 @@ epair_init(void *dummy __unused)
{
}
/*
* Interface cloning functions.
* We use our private ones so that we can create/destroy our secondary
@ -800,7 +799,7 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
ifc_free_unit(ifc, unit);
return (ENOSPC);
}
/*
* Cross-reference the interfaces so we will be able to free both.
*/
@ -825,7 +824,7 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
ifmedia_init(&scb->media, 0, epair_media_change, epair_media_status);
ifmedia_add(&scb->media, IFM_ETHER | IFM_10G_T, 0, NULL);
ifmedia_set(&scb->media, IFM_ETHER | IFM_10G_T);
/* Finish initialization of interface <n>a. */
ifp = sca->ifp;
ifp->if_softc = sca;
@ -932,7 +931,7 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp)
*/
if (ifp->if_softc == NULL)
return (0);
unit = ifp->if_dunit;
sca = ifp->if_softc;
oifp = sca->oifp;

View File

@ -122,7 +122,6 @@ static void ether_reassign(struct ifnet *, struct vnet *, char *);
#endif
static int ether_requestencap(struct ifnet *, struct if_encap_req *);
#define senderr(e) do { error = (e); goto bad;} while (0)
static void
@ -200,7 +199,6 @@ ether_requestencap(struct ifnet *ifp, struct if_encap_req *req)
return (0);
}
static int
ether_resolve_addr(struct ifnet *ifp, struct mbuf *m,
const struct sockaddr *dst, struct route *ro, u_char *phdr,
@ -545,7 +543,6 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
/* draft-ietf-6man-ipv6only-flag */
/* Catch ETHERTYPE_IP, and ETHERTYPE_[REV]ARP if we are v6-only. */
if ((ND_IFINFO(ifp)->flags & ND6_IFF_IPV6_ONLY_MASK) != 0) {
switch (etype) {
case ETHERTYPE_IP:
case ETHERTYPE_ARP:
@ -774,7 +771,7 @@ vnet_ether_init(__unused void *arg)
}
VNET_SYSINIT(vnet_ether_init, SI_SUB_PROTO_IF, SI_ORDER_ANY,
vnet_ether_init, NULL);
#ifdef VIMAGE
static void
vnet_ether_pfil_destroy(__unused void *arg)
@ -795,8 +792,6 @@ VNET_SYSUNINIT(vnet_ether_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY,
vnet_ether_destroy, NULL);
#endif
static void
ether_input(struct ifnet *ifp, struct mbuf *m)
{

View File

@ -400,7 +400,6 @@ gif_qflush(struct ifnet *ifp __unused)
}
int
gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
struct route *ro)
@ -721,4 +720,3 @@ gif_delete_tunnel(struct gif_softc *sc)
GIF2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING;
if_link_state_change(GIF2IFP(sc), LINK_STATE_DOWN);
}

View File

@ -1003,7 +1003,6 @@ ipsec_set_addresses(struct ifnet *ifp, struct sockaddr *src,
key_sockaddrcmp(&saidx->src.sa, src, 0) == 0 &&
key_sockaddrcmp(&saidx->dst.sa, dst, 0) == 0)
return (0); /* Nothing has been changed. */
}
/* If reqid is not set, generate new one. */
if (ipsec_init_reqid(sc) != 0)

View File

@ -803,7 +803,6 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp)
lagg_setmulti(lp);
if ((error = lagg_proto_addport(sc, lp)) != 0) {
/* Remove the port, without calling pr_delport. */
lagg_port_destroy(lp, 0);
@ -1046,7 +1045,6 @@ lagg_get_counter(struct ifnet *ifp, ift_counter cnt)
*/
vsum += sc->detached_counters.val[cnt];
return (vsum);
}
@ -2425,4 +2423,3 @@ lagg_lacp_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m)
m->m_pkthdr.rcvif = ifp;
return (m);
}

View File

@ -874,7 +874,6 @@ llatbl_llt_show(struct lltable *llt)
for (i = 0; i < llt->llt_hsize; i++) {
CK_LIST_FOREACH(lle, &llt->lle_head[i], lle_next) {
llatbl_lle_show((struct llentry_sa *)lle);
if (db_pager_quit)
return;

View File

@ -393,7 +393,6 @@ loioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
}
switch (ifr->ifr_addr.sa_family) {
#ifdef INET
case AF_INET:
break;

View File

@ -233,7 +233,6 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
return(EINVAL);
switch (cmd) {
/*
* Set the current media.
*/
@ -390,7 +389,7 @@ ifmedia_baudrate(int mword)
/* Not known. */
return (0);
}
#ifdef IFMEDIA_DEBUG
static const struct ifmedia_description ifm_type_descriptions[] =
IFM_TYPE_DESCRIPTIONS;

View File

@ -108,7 +108,6 @@ void ifmedia_set(struct ifmedia *ifm, int mword);
int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr,
struct ifmedia *ifm, u_long cmd);
/* Compute baudrate for a given media. */
uint64_t ifmedia_baudrate(int);

View File

@ -150,4 +150,3 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! */
static SYSCTL_NODE(_net_link_generic, IFMIB_IFDATA, ifdata,
CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ifdata,
"Interface table");

View File

@ -47,7 +47,6 @@
* $FreeBSD$
*/
#ifndef _NET_IF_PFSYNC_H_
#define _NET_IF_PFSYNC_H_

View File

@ -742,7 +742,7 @@ static void
sppp_ifstart_sched(void *dummy)
{
struct sppp *sp = dummy;
sp->if_start(SP2IFP(sp));
}
@ -1005,7 +1005,7 @@ sppp_attach(struct ifnet *ifp)
/* Initialize mtx lock */
mtx_init(&sp->mtx, "sppp", MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE);
/* Initialize keepalive handler. */
callout_init(&sp->keepalive_callout, 1);
callout_reset(&sp->keepalive_callout, hz * 10, sppp_keepalive,
@ -1863,7 +1863,6 @@ sppp_cp_input(const struct cp *cp, struct sppp *sp, struct mbuf *m)
}
}
/*
* The generic part of all Up/Down/Open/Close/TO event handlers.
* Basically, the state transition handling in the automaton.
@ -1930,7 +1929,6 @@ sppp_down_event(const struct cp *cp, struct sppp *sp)
}
}
static void
sppp_open_event(const struct cp *cp, struct sppp *sp)
{
@ -1980,7 +1978,6 @@ sppp_open_event(const struct cp *cp, struct sppp *sp)
}
}
static void
sppp_close_event(const struct cp *cp, struct sppp *sp)
{
@ -2680,7 +2677,7 @@ sppp_lcp_tlu(struct sppp *sp)
/* notify low-level driver of state change */
if (sp->pp_chg)
sp->pp_chg(sp, (int)sp->pp_phase);
if (sp->pp_phase == PHASE_NETWORK)
/* if no NCP is starting, close down */
sppp_lcp_check_and_close(sp);
@ -3070,7 +3067,6 @@ sppp_ipcp_RCR(struct sppp *sp, struct lcp_header *h, int len)
else
log(-1, "%s [not agreed] ",
sppp_dotted_quad(desiredaddr));
}
p[2] = hisaddr >> 24;
p[3] = hisaddr >> 16;
@ -3836,7 +3832,6 @@ static void sppp_ipv6cp_down(struct sppp *sp)
{
}
static void sppp_ipv6cp_open(struct sppp *sp)
{
}
@ -4188,7 +4183,6 @@ sppp_chap_input(struct sppp *sp, struct mbuf *m)
log(-1, ">\n");
}
break;
}
}
@ -4506,7 +4500,6 @@ sppp_pap_input(struct sppp *sp, struct mbuf *m)
log(-1, ">\n");
}
break;
}
}
@ -5228,7 +5221,6 @@ sppp_phase_network(struct sppp *sp)
sppp_lcp_check_and_close(sp);
}
static const char *
sppp_cp_type_name(u_char type)
{

View File

@ -168,7 +168,6 @@ struct tuntap_softc {
#define TAP_ALL_OFFLOAD (CSUM_TSO | CSUM_TCP | CSUM_UDP |\
CSUM_TCP_IPV6 | CSUM_UDP_IPV6)
/*
* All mutable global variables in if_tun are locked using tunmtx, with
* the exception of tundebug, which is used unlocked, and the drivers' *clones,
@ -387,7 +386,6 @@ tun_busy(struct tuntap_softc *tp)
return (ret);
}
static void
tun_unbusy(struct tuntap_softc *tp)
{
@ -476,8 +474,6 @@ tuntap_driver_from_flags(int tun_flags)
return (NULL);
}
static int
tun_clone_match(struct if_clone *ifc, const char *name)
{

View File

@ -342,7 +342,7 @@ static void
vlan_inithash(struct ifvlantrunk *trunk)
{
int i, n;
/*
* The trunk must not be locked here since we call malloc(M_WAITOK).
* It is OK in case this function is called before the trunk struct
@ -414,7 +414,7 @@ vlan_remhash(struct ifvlantrunk *trunk, struct ifvlan *ifv)
VLAN_XLOCK_ASSERT();
KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__));
b = 1 << trunk->hwidth;
i = HASH(ifv->ifv_vid, trunk->hmask);
CK_SLIST_FOREACH(ifv2, &trunk->hash[i], ifv_list)
@ -1232,7 +1232,6 @@ vlan_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
return p->if_output(ifp, m, dst, ro);
}
/*
* The ifp->if_qflush entry point for vlan(4) is a no-op.
*/
@ -1633,7 +1632,7 @@ static int
vlan_setflags(struct ifnet *ifp, int status)
{
int error, i;
for (i = 0; vlan_pflags[i].flag; i++) {
error = vlan_setflag(ifp, vlan_pflags[i].flag,
status, vlan_pflags[i].func);

View File

@ -116,7 +116,6 @@ __FBSDID("$FreeBSD$");
* access.
*/
/*
* File organization:
* - private structures
@ -473,7 +472,6 @@ typedef struct if_rxd_info_pad {
CTASSERT(sizeof(struct if_pkt_info_pad) == sizeof(struct if_pkt_info));
CTASSERT(sizeof(struct if_rxd_info_pad) == sizeof(struct if_rxd_info));
static inline void
pkt_info_zero(if_pkt_info_t pi)
{
@ -584,7 +582,6 @@ static int iflib_no_tx_batch = 0;
SYSCTL_INT(_net_iflib, OID_AUTO, no_tx_batch, CTLFLAG_RW,
&iflib_no_tx_batch, 0, "minimize transmit latency at the possible expense of throughput");
#if IFLIB_DEBUG_COUNTERS
static int iflib_tx_seen;
@ -610,7 +607,6 @@ SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills, CTLFLAG_RD,
SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills_large, CTLFLAG_RD,
&iflib_fl_refills_large, 0, "# large refills");
static int iflib_txq_drain_flushing;
static int iflib_txq_drain_oactive;
static int iflib_txq_drain_notready;
@ -622,7 +618,6 @@ SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_oactive, CTLFLAG_RD,
SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_notready, CTLFLAG_RD,
&iflib_txq_drain_notready, 0, "# drain notready");
static int iflib_encap_load_mbuf_fail;
static int iflib_encap_pad_mbuf_fail;
static int iflib_encap_txq_avail_fail;
@ -1205,7 +1200,6 @@ iflib_netmap_intr(struct netmap_adapter *na, int onoff)
CTX_UNLOCK(ctx);
}
static int
iflib_netmap_attach(if_ctx_t ctx)
{
@ -1239,7 +1233,6 @@ iflib_netmap_txq_init(if_ctx_t ctx, iflib_txq_t txq)
if (slot == NULL)
return (0);
for (int i = 0; i < ctx->ifc_softc_ctx.isc_ntxd[0]; i++) {
/*
* In netmap mode, set the map for the packet buffer.
* NOTE: Some drivers (not this one) also need to set
@ -1534,7 +1527,6 @@ iflib_fast_intr_rxtx(void *arg)
return (FILTER_HANDLED);
}
static int
iflib_fast_intr_ctx(void *arg)
{
@ -1931,7 +1923,6 @@ iflib_rxsd_alloc(iflib_rxq_t rxq)
return (err);
}
/*
* Internal service routines
*/
@ -2217,7 +2208,6 @@ iflib_fl_setup(iflib_fl_t fl)
fl->ifl_cltype = m_gettype(fl->ifl_buf_size);
fl->ifl_zone = m_getzone(fl->ifl_buf_size);
/*
* Avoid pre-allocating zillions of clusters to an idle card
* potentially speeding up attach. In any case make sure
@ -2550,7 +2540,6 @@ prefetch_pkts(iflib_fl_t fl, int cidx)
int nrxd = fl->ifl_size;
caddr_t next_rxd;
nextptr = (cidx + CACHE_PTR_INCREMENT) & (nrxd-1);
prefetch(&fl->ifl_sds.ifsd_m[nextptr]);
prefetch(&fl->ifl_sds.ifsd_cl[nextptr]);
@ -3601,7 +3590,6 @@ iflib_completed_tx_reclaim(iflib_txq_t txq, int thresh)
printf("%s processed=%ju cleaned=%ju tx_nsegments=%d reclaim=%d thresh=%d\n", __FUNCTION__,
txq->ift_processed, txq->ift_cleaned, txq->ift_ctx->ifc_softc_ctx.isc_tx_nsegments,
reclaim, thresh);
}
#endif
return (0);
@ -3940,7 +3928,6 @@ _task_fn_admin(void *context)
iflib_txq_check_drain(txq, IFLIB_RESTART_BUDGET);
}
static void
_task_fn_iov(void *context)
{
@ -3985,7 +3972,6 @@ iflib_if_init_locked(if_ctx_t ctx)
iflib_init_locked(ctx);
}
static void
iflib_if_init(void *arg)
{
@ -4103,7 +4089,7 @@ iflib_altq_if_start(if_t ifp)
{
struct ifaltq *ifq = &ifp->if_snd;
struct mbuf *m;
IFQ_LOCK(ifq);
IFQ_DEQUEUE_NOLOCK(ifq, m);
while (m != NULL) {
@ -4153,7 +4139,6 @@ iflib_if_qflush(if_t ifp)
if_qflush(ifp);
}
#define IFCAP_FLAGS (IFCAP_HWCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \
IFCAP_TSO | IFCAP_VLAN_HWTAGGING | IFCAP_HWSTATS | \
IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | \
@ -4447,7 +4432,6 @@ iflib_device_probe(device_t dev)
(ent->pvi_subdevice_id == 0)) &&
((pci_rev_id == ent->pvi_rev_id) ||
(ent->pvi_rev_id == 0))) {
device_set_desc_copy(dev, ent->pvi_name);
/* this needs to be changed to zero if the bus probing code
* ever stops re-probing on best match because the sctx
@ -5275,7 +5259,6 @@ iflib_device_shutdown(device_t dev)
return bus_generic_suspend(dev);
}
int
iflib_device_resume(device_t dev)
{
@ -5370,7 +5353,6 @@ iflib_module_event_handler(module_t mod, int what, void *arg)
*
**********************************************************************/
static void
_iflib_assert(if_shared_ctx_t sctx)
{
@ -6801,7 +6783,6 @@ iflib_add_device_sysctl_post(if_ctx_t ctx)
CTLFLAG_RD,
&fl->ifl_cl_dequeued, "clusters freed");
#endif
}
}

View File

@ -167,7 +167,6 @@ typedef struct pci_vendor_info {
uint32_t pvi_class_mask;
const char *pvi_name;
} pci_vendor_info_t;
#define PVID(vendor, devid, name) {vendor, devid, 0, 0, 0, 0, name}
#define PVID_OEM(vendor, devid, svid, sdevid, revid, name) {vendor, devid, svid, sdevid, revid, 0, name}
#define PVID_END {0, 0, 0, 0, 0, 0, NULL}
@ -380,7 +379,6 @@ typedef enum {
*/
#define IFLIB_PSEUDO_ETHER 0x80000
/*
* These enum values are used in iflib_needs_restart to indicate to iflib
* functions whether or not the interface needs restarting when certain events

View File

@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
#include <sys/md5.h>
#include <sys/proc.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_types.h>

View File

@ -420,7 +420,6 @@ drbr_advance(struct ifnet *ifp, struct buf_ring *br)
return (buf_ring_advance_sc(br));
}
static __inline struct mbuf *
drbr_dequeue_cond(struct ifnet *ifp, struct buf_ring *br,
int (*func) (struct mbuf *, void *), void *arg)

View File

@ -109,7 +109,6 @@ drain_ring_locked(struct ifmp_ring *r, union ring_state os, uint16_t prev, int b
total = 0;
while (cidx != pidx) {
/* Items from cidx to pidx are available for consumption. */
n = r->drain(r, cidx, pidx);
if (n == 0) {
@ -184,7 +183,6 @@ drain_ring_lockless(struct ifmp_ring *r, union ring_state os, uint16_t prev, int
total = 0;
while (cidx != pidx) {
/* Items from cidx to pidx are available for consumption. */
n = r->drain(r, cidx, pidx);
if (n == 0) {
@ -491,7 +489,6 @@ ifmp_ring_check_drainage(struct ifmp_ring *r, int budget)
ns.state = os.state;
ns.flags = BUSY;
#ifdef MP_RING_NO_64BIT_ATOMICS
mtx_lock(&r->lock);
if (r->state != os.state) {
@ -509,7 +506,6 @@ ifmp_ring_check_drainage(struct ifmp_ring *r, int budget)
if (!atomic_cmpset_acq_64(&r->state, os.state, ns.state))
return;
drain_ring_lockless(r, ns, os.flags, budget);
#endif
}

View File

@ -692,7 +692,7 @@ netisr_register_vnet(const struct netisr_handler *nhp)
KASSERT(netisr_proto[proto].np_handler != NULL,
("%s(%u): protocol not registered for %s", __func__, proto,
nhp->nh_name));
V_netisr_enable[proto] = 1;
NETISR_WUNLOCK();
}
@ -760,7 +760,7 @@ netisr_unregister_vnet(const struct netisr_handler *nhp)
KASSERT(netisr_proto[proto].np_handler != NULL,
("%s(%u): protocol not registered for %s", __func__, proto,
nhp->nh_name));
V_netisr_enable[proto] = 0;
netisr_drain_proto_vnet(curvnet, proto);

View File

@ -235,7 +235,6 @@ struct netmap_slot {
#define NETMAP_MAX_FRAGS 64 /* max number of fragments */
/*
* struct netmap_ring
*
@ -308,7 +307,6 @@ struct netmap_ring {
struct netmap_slot slot[0]; /* array of slots. */
};
/*
* RING FLAGS
*/

View File

@ -144,7 +144,6 @@
*
*/
/*
* struct nmreq overlays a struct ifreq (just the name)
*/
@ -216,7 +215,6 @@ struct nmreq {
#define NETMAP_SETSOCKOPT _IO('i', 140)
#define NETMAP_GETSOCKOPT _IO('i', 141)
/* These linknames are for the Netmap Core Driver */
#define NETMAP_NT_DEVICE_NAME L"\\Device\\NETMAP"
#define NETMAP_DOS_DEVICE_NAME L"\\DosDevices\\netmap"

View File

@ -123,14 +123,12 @@
( ((char *)(buf) - ((char *)(ring) + (ring)->buf_ofs) ) / \
(ring)->nr_buf_size )
static inline uint32_t
nm_ring_next(struct netmap_ring *r, uint32_t i)
{
return ( unlikely(i + 1 == r->num_slots) ? 0 : i + 1);
}
/*
* Return 1 if we have pending transmissions in the tx ring.
* When everything is complete ring->head = ring->tail + 1 (modulo ring size)
@ -296,9 +294,6 @@ struct nm_desc {
#define IS_NETMAP_DESC(d) ((d) && P2NMD(d)->self == P2NMD(d))
#define NETMAP_FD(d) (P2NMD(d)->fd)
/*
* The callback, invoked on each received packet. Same as libpcap
*/
@ -355,7 +350,6 @@ enum {
NM_OPEN_RING_CFG = 0x800000, /* tx|rx rings|slots */
};
/*
* nm_close() closes and restores the port to its previous state
*/
@ -436,7 +430,6 @@ win_remove_fd_record(int fd)
}
}
HANDLE
win_get_netmap_handle(int fd)
{
@ -921,7 +914,6 @@ nm_open(const char *ifname, const struct nmreq *req,
goto fail;
}
#ifdef DEBUG_NETMAP_USER
{ /* debugging code */
int i;
@ -953,7 +945,6 @@ nm_open(const char *ifname, const struct nmreq *req,
return NULL;
}
static int
nm_close(struct nm_desc *d)
{
@ -977,7 +968,6 @@ nm_close(struct nm_desc *d)
return 0;
}
static int
nm_mmap(struct nm_desc *d, const struct nm_desc *parent)
{
@ -1067,7 +1057,6 @@ nm_inject(struct nm_desc *d, const void *buf, size_t size)
return 0; /* fail */
}
/*
* Same prototype as pcap_dispatch(), only need to cast.
*/

View File

@ -330,7 +330,6 @@ extern struct sx pf_end_lock;
(neg) \
)
struct pf_rule_uid {
uid_t uid[2];
u_int8_t op;
@ -378,7 +377,6 @@ struct pf_pool {
u_int8_t opts;
};
/* A packed Operating System description for fingerprinting */
typedef u_int32_t pf_osfp_t;
#define PF_OSFP_ANY ((pf_osfp_t)0)
@ -480,7 +478,6 @@ struct pf_osfp_ioctl {
int fp_getnum; /* DIOCOSFPGET number */
};
union pf_rule_ptr {
struct pf_rule *ptr;
u_int32_t nr;
@ -629,7 +626,6 @@ struct pf_rule {
#define PFSTATE_ADAPT_START 60000 /* default adaptive timeout start */
#define PFSTATE_ADAPT_END 120000 /* default adaptive timeout end */
struct pf_threshold {
u_int32_t limit;
#define PF_THRESHOLD_MULT 1000
@ -1448,7 +1444,6 @@ struct pfioc_iface {
int pfiio_flags;
};
/*
* ioctl operations
*/

View File

@ -78,7 +78,6 @@ static char rn_ones[RADIX_MAX_KEY_LEN] = {
-1, -1, -1, -1, -1, -1, -1, -1,
};
static int rn_lexobetter(void *m_arg, void *n_arg);
static struct radix_mask *
rn_new_radix_mask(struct radix_node *tt,
@ -1059,7 +1058,6 @@ rn_walktree_from(struct radix_head *h, void *a, void *m,
/* printf("root, stopping"); */
stopping = 1;
}
}
return (0);
}
@ -1134,7 +1132,7 @@ rn_detachhead_internal(struct radix_head *head)
KASSERT((head != NULL),
("%s: head already freed", __func__));
/* Free <left,root,right> nodes. */
R_Free(head);
}
@ -1210,4 +1208,3 @@ rn_detachhead(void **head)
return (1);
}

View File

@ -99,7 +99,7 @@ rn_mpath_count(struct radix_node *rn)
{
uint32_t i = 0;
struct rtentry *rt;
while (rn != NULL) {
rt = (struct rtentry *)rn;
i += rt->rt_weight;
@ -274,4 +274,3 @@ mpath_init(void)
}
SYSINIT(mpath_init, SI_SUB_LAST, SI_ORDER_ANY, mpath_init, NULL);
#endif

View File

@ -328,7 +328,6 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst,
return (ifa);
}
/*
* Copy most of @rt data into @info.
*
@ -367,7 +366,6 @@ rt_exportinfo(struct rtentry *rt, struct rt_addrinfo *info, int flags)
src = rt_mask(rt);
dst = info->rti_info[RTAX_NETMASK];
if (src != NULL && dst != NULL) {
/*
* Radix stores different value in sa_len,
* assume rt_mask() to have the same length
@ -718,7 +716,6 @@ rt_updatemtu(struct ifnet *ifp)
}
}
#if 0
int p_sockaddr(char *buf, int buflen, struct sockaddr *s);
int rt_print(char *buf, int buflen, struct rtentry *rt);
@ -742,7 +739,7 @@ p_sockaddr(char *buf, int buflen, struct sockaddr *s)
if (inet_ntop(s->sa_family, paddr, buf, buflen) == NULL)
return (0);
return (strlen(buf));
}
@ -981,7 +978,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum)
rn = rnh->rnh_lookup(dst, netmask, &rnh->head);
#ifdef RADIX_MPATH
if (rt_mpath_capable(rnh)) {
if (rn == NULL)
error = ESRCH;
else {
@ -1115,7 +1111,7 @@ rt_routemsg(int cmd, struct rtentry *rt, struct ifnet *ifp, int rti_addrs,
KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE,
("unexpected cmd %d", cmd));
KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs),
("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs));
@ -1138,7 +1134,7 @@ rt_routemsg_info(int cmd, struct rt_addrinfo *info, int fibnum)
KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE || cmd == RTM_CHANGE,
("unexpected cmd %d", cmd));
KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs),
("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs));
@ -1147,7 +1143,6 @@ rt_routemsg_info(int cmd, struct rt_addrinfo *info, int fibnum)
return (rtsock_routemsg_info(cmd, info, fibnum));
}
/*
* This is called to generate messages from the routing socket
* indicating a network interface has had addresses associated with it.
@ -1171,4 +1166,3 @@ rt_newaddrmsg_fib(int cmd, struct ifaddr *ifa, struct rtentry *rt, int fibnum)
rt_addrmsg(cmd, ifa, fibnum);
}
}

View File

@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$");
static MALLOC_DEFINE(M_NHOP, "nhops", "nexthops data");
/* Hash management functions */
int
@ -384,4 +383,3 @@ find_nhop(struct nh_control *ctl, const struct nhop_priv *nh_priv)
return (nh_priv_ret);
}

View File

@ -166,7 +166,6 @@ struct nhop_object {
_nh = NULL; \
} while (0)
void nhop_free(struct nhop_object *nh);
struct sysctl_req;
@ -222,7 +221,4 @@ struct mpath_external {
uint32_t mp_group_size;
};
#endif

View File

@ -99,7 +99,6 @@ _Static_assert(sizeof(struct nhop_object) <= 128,
static uma_zone_t nhops_zone; /* Global zone for each and every nexthop */
#define NHOP_OBJECT_ALIGNED_SIZE roundup2(sizeof(struct nhop_object), \
2 * CACHE_LINE_SIZE)
#define NHOP_PRIV_ALIGNED_SIZE roundup2(sizeof(struct nhop_priv), \
@ -181,7 +180,6 @@ set_nhop_mtu_from_info(struct nhop_object *nh, const struct rt_addrinfo *info)
if (info->rti_mflags & RTV_MTU) {
if (info->rti_rmx->rmx_mtu != 0) {
/*
* MTU was explicitly provided by user.
* Keep it.
@ -189,7 +187,6 @@ set_nhop_mtu_from_info(struct nhop_object *nh, const struct rt_addrinfo *info)
nh->nh_priv->rt_flags |= RTF_FIXEDMTU;
} else {
/*
* User explicitly sets MTU to 0.
* Assume rollback to default.
@ -532,7 +529,6 @@ finalize_nhop(struct nh_control *ctl, struct rt_addrinfo *info,
print_nhop("FINALIZE", nh);
if (link_nhop(ctl, nh_priv) == 0) {
/*
* Adding nexthop to the datastructures
* failed. Call destructor w/o waiting for
@ -687,7 +683,6 @@ nhop_free_any(struct nhop_object *nh)
nhop_free(nh);
}
/* Helper functions */
uint32_t
@ -858,4 +853,3 @@ nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w)
return (0);
}

View File

@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
#define _BLOCKS_TO_ITEMS(_blocks) ((uint32_t)(_blocks) * BLOCK_ITEMS)
#define _ITEMS_TO_BLOCKS(_items) ((_items) / BLOCK_ITEMS)
static void _bitmask_init_idx(void *index, uint32_t items);
void
@ -111,7 +110,6 @@ _bitmask_init_idx(void *_idx, uint32_t items)
*idx &= ~(u_long)1; /* Always skip index 0 */
}
/*
* _try_merge api to allow shrinking?
*/
@ -216,4 +214,3 @@ bitmask_free_idx(struct bitmask_head *bi, uint16_t idx)
return (0);
}

View File

@ -57,7 +57,6 @@ _cht_need_resize(const struct _cht_head *head)
return (_cht_get_resize_size(head) > 0);
}
#ifndef typeof
#define typeof __typeof
#endif
@ -152,11 +151,9 @@ struct _HNAME##_head { \
} \
} while(0)
#define CHT_SLIST_FOREACH(_head, _PX, _x) \
for (uint32_t _i = 0; _i < (_head)->hash_size; _i++) { \
for (_x = CHT_FIRST(_head, _i); _x; _x = _PX##_next(_x))
#define CHT_SLIST_FOREACH_END }
#define CHT_SLIST_RESIZE(_head, _PX, _new_void_ptr, _new_hsize) \
@ -197,4 +194,3 @@ int bitmask_alloc_idx(struct bitmask_head *bi, uint16_t *pidx);
int bitmask_free_idx(struct bitmask_head *bi, uint16_t idx);
#endif

View File

@ -47,7 +47,6 @@ CHT_SLIST_DEFINE(nhops, struct nhop_priv);
/* next object accessor */
#define nhops_next(_obj) (_obj)->nh_next
struct nh_control {
struct nhops_head nh_head; /* hash table head */
struct bitmask_head nh_idx_head; /* nhop index head */
@ -64,7 +63,6 @@ struct nh_control {
#define NHOPS_LOCK_DESTROY(ctl) rw_destroy(&(ctl)->ctl_lock)
#define NHOPS_WLOCK_ASSERT(ctl) rw_assert(&(ctl)->ctl_lock, RA_WLOCKED)
/* Control plane-only nhop data */
struct nhop_object;
struct nhop_priv {
@ -94,4 +92,3 @@ struct nhop_priv *unlink_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv)
int cmp_priv(const struct nhop_priv *_one, const struct nhop_priv *_two);
#endif

View File

@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
#include <vm/uma.h>
/*
* This file contains control plane routing tables functions.
*
@ -99,7 +98,7 @@ VNET_DEFINE_STATIC(uma_zone_t, rtzone);
void
vnet_rtzone_init()
{
V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
}
@ -158,8 +157,6 @@ rtfree(struct rtentry *rt)
&rt->rt_epoch_ctx);
}
static struct rib_head *
get_rnh(uint32_t fibnum, const struct rt_addrinfo *info)
{
@ -359,7 +356,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *info,
return (error);
}
/*
* Removes route defined by @info from the kernel table specified by @fibnum and
* sa_family in @info->rti_info[RTAX_DST].
@ -752,7 +748,6 @@ change_route_conditional(struct rib_head *rnh, struct rtentry *rt,
} else {
/* Prefix exists, try to update */
if (rnd_orig->rnd_nhop == rt_new->rt_nhop) {
/*
* Nhop/mpath group hasn't changed. Flip
* to the new precalculated one and return
@ -812,7 +807,6 @@ rib_action(uint32_t fibnum, int action, struct rt_addrinfo *info,
return (error);
}
struct rt_delinfo
{
struct rt_addrinfo info;
@ -947,7 +941,6 @@ allocate_subscription(rib_subscription_cb_t *f, void *arg,
return (rs);
}
/*
* Subscribe for the changes in the routing table specified by @fibnum and
* @family.
@ -1061,4 +1054,3 @@ rib_destroy_subscriptions(struct rib_head *rnh)
RIB_WUNLOCK(rnh);
NET_EPOCH_EXIT(et);
}

View File

@ -44,7 +44,6 @@ struct rib_cmd_info {
struct nhop_object *rc_nh_new; /* Target nhop OR mpath */
};
int rib_add_route(uint32_t fibnum, struct rt_addrinfo *info,
struct rib_cmd_info *rc);
int rib_del_route(uint32_t fibnum, struct rt_addrinfo *info,
@ -85,4 +84,3 @@ struct rib_subscription *rib_subscribe_internal(struct rib_head *rnh,
int rib_unsibscribe(uint32_t fibnum, int family, struct rib_subscription *rs);
#endif

View File

@ -131,4 +131,3 @@ rib_lookup(uint32_t fibnum, const struct sockaddr *dst, uint32_t flags,
return (nh);
}

View File

@ -324,4 +324,3 @@ rt_tables_get_gen(uint32_t table, sa_family_t family)
__func__, table, family));
return (rnh->rnh_gen);
}

View File

@ -153,11 +153,9 @@ tmproutes_init(struct rib_head *rh)
callout_init(&rh->expire_callout, 1);
}
void
tmproutes_destroy(struct rib_head *rh)
{
callout_drain(&rh->expire_callout);
}

View File

@ -127,7 +127,6 @@ VNET_PCPUSTAT_DECLARE(struct rtstat, rtstat);
VNET_PCPUSTAT_ADD(struct rtstat, rtstat, name, (val))
#define RTSTAT_INC(name) RTSTAT_ADD(name, 1)
/*
* Convert a 'struct radix_node *' to a 'struct rtentry *'.
* The operation can be done safely (in this code) because a
@ -211,7 +210,7 @@ struct rtentry {
#define _RT_SELECT_NHOP(_nh, _flowid) \
((!NH_IS_MULTIPATH(_nh)) ? (_nh) : _SELECT_NHOP(_nh, _flowid))
#define RT_SELECT_NHOP(_rt, _flowid) _RT_SELECT_NHOP((_rt)->rt_nhop, _flowid)
/* route_temporal.c */
void tmproutes_update(struct rib_head *rnh, struct rtentry *rt);
void tmproutes_init(struct rib_head *rh);

View File

@ -284,7 +284,7 @@ rss_naive_hash(u_int keylen, const uint8_t *key, u_int datalen,
uint32_t
rss_hash(u_int datalen, const uint8_t *data)
{
switch (rss_hashalgo) {
case RSS_HASH_TOEPLITZ:
return (toeplitz_hash(sizeof(rss_key), rss_key, datalen,

View File

@ -849,7 +849,6 @@ route_output(struct mbuf *m, struct socket *so, ...)
struct nhop_object *nh;
fibnum = so->so_fibnum;
#define senderr(e) { error = e; goto flush;}
if (m == NULL || ((m->m_len < sizeof(long)) &&
(m = m_pullup(m, sizeof(long))) == NULL))
@ -1053,7 +1052,6 @@ send_rtm_reply(struct socket *so, struct rt_msghdr *rtm, struct mbuf *m,
}
}
static void
rt_getmetrics(const struct rtentry *rt, const struct nhop_object *nh,
struct rt_metrics *out)
@ -1151,7 +1149,6 @@ rtsock_msg_mbuf(int type, struct rt_addrinfo *rtinfo)
int len, dlen;
switch (type) {
case RTM_DELADDR:
case RTM_NEWADDR:
len = sizeof(struct ifa_msghdr);
@ -1238,7 +1235,6 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int *
#endif
switch (type) {
case RTM_DELADDR:
case RTM_NEWADDR:
if (w != NULL && w->w_op == NET_RT_IFLISTL) {
@ -2040,7 +2036,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
error = sysctl_wire_old_buffer(req, 0);
if (error)
return (error);
/*
* Allocate reply buffer in advance.
* All rtsock messages has maximum length of u_short.
@ -2147,4 +2143,3 @@ static struct domain routedomain = {
};
VNET_DOMAIN_SET(route);

View File

@ -209,5 +209,3 @@ enum {
SFF_8436_VENDOR_RSRVD_START = 224,
SFF_8436_VENDOR_RSRVD_END = 255,
};

View File

@ -61,7 +61,6 @@
* driver.
*/
/* Table 3.1 Two-wire interface ID: Data Fields */
enum {

View File

@ -87,7 +87,6 @@ sl_compress_init(struct slcompress *comp, int max_state)
comp->flags = SLF_TOSS;
}
/* ENCODE encodes a number that is known to be non-zero. ENCODEZ
* checks for zero (since zero has to be encoded in the long, 3 byte
* form).
@ -309,7 +308,6 @@ sl_compress_tcp(struct mbuf *m, struct ip *ip, struct slcompress *comp,
}
switch(changes) {
case 0:
/*
* Nothing changed. If this packet contains data and the
@ -407,7 +405,6 @@ sl_compress_tcp(struct mbuf *m, struct ip *ip, struct slcompress *comp,
return (TYPE_UNCOMPRESSED_TCP);
}
int
sl_uncompress_tcp(u_char **bufp, int len, u_int type, struct slcompress *comp)
{
@ -465,7 +462,6 @@ sl_uncompress_tcp_core(u_char *buf, int buflen, int total_len, u_int type,
u_int vjlen;
switch (type) {
case TYPE_UNCOMPRESSED_TCP:
ip = (struct ip *) buf;
if (ip->ip_p >= MAX_STATES)

View File

@ -106,7 +106,6 @@
#define TCP_PUSH_BIT 0x10
/*
* "state" data for each active tcp conversation on the wire. This is
* basically a copy of the entire IP/TCP header from the last packet

View File

@ -201,14 +201,14 @@ void vnet_log_recursion(struct vnet *, const char *, int);
const char *saved_vnet_lpush = curthread->td_vnet_lpush; \
curvnet = arg; \
curthread->td_vnet_lpush = __func__;
#define CURVNET_SET_VERBOSE(arg) \
CURVNET_SET_QUIET(arg) \
if (saved_vnet) \
vnet_log_recursion(saved_vnet, saved_vnet_lpush, __LINE__);
#define CURVNET_SET(arg) CURVNET_SET_VERBOSE(arg)
#define CURVNET_RESTORE() \
VNET_ASSERT(curvnet != NULL && (saved_vnet == NULL || \
saved_vnet->vnet_magic_n == VNET_MAGIC_N), \
@ -224,12 +224,12 @@ void vnet_log_recursion(struct vnet *, const char *, int);
__FILE__, __LINE__, __func__, curvnet, (arg))); \
struct vnet *saved_vnet = curvnet; \
curvnet = arg;
#define CURVNET_SET_VERBOSE(arg) \
CURVNET_SET_QUIET(arg)
#define CURVNET_SET(arg) CURVNET_SET_VERBOSE(arg)
#define CURVNET_RESTORE() \
VNET_ASSERT(curvnet != NULL && (saved_vnet == NULL || \
saved_vnet->vnet_magic_n == VNET_MAGIC_N), \

View File

@ -101,7 +101,6 @@ struct ieee80211_frame_addr4 {
uint8_t i_addr4[IEEE80211_ADDR_LEN];
} __packed;
struct ieee80211_qosframe_addr4 {
uint8_t i_fc[2];
uint8_t i_dur[2];
@ -742,7 +741,6 @@ struct ieee80211_ie_htinfo {
#define IEEE80211_HTINFO_BASIC_STBCMCS_S 0
#define IEEE80211_HTINFO_DUALPROTECTED 0x80
/*
* 802.11ac definitions - 802.11ac-2013 .
*/

View File

@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>

View File

@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/socket.h>
#include <net/if.h>

View File

@ -747,7 +747,6 @@ ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k,
return (cip->ic_miclen > 0 ? cip->ic_demic(k, m, force) : 1);
}
static void
load_ucastkey(void *arg, struct ieee80211_node *ni)
{

View File

@ -209,7 +209,6 @@ tkip_encap(struct ieee80211_key *k, struct mbuf *m)
if ((! is_mgmt) && (k->wk_flags & IEEE80211_KEY_NOIV))
return 1;
hdrlen = ieee80211_hdrspace(ic, mtod(m, void *));
/*
@ -790,25 +789,21 @@ wep_decrypt(u8 *key, struct mbuf *m, u_int off, size_t data_len)
return 0;
}
static __inline u32 rotl(u32 val, int bits)
{
return (val << bits) | (val >> (32 - bits));
}
static __inline u32 rotr(u32 val, int bits)
{
return (val >> bits) | (val << (32 - bits));
}
static __inline u32 xswap(u32 val)
{
return ((val & 0x00ff00ff) << 8) | ((val & 0xff00ff00) >> 8);
}
#define michael_block(l, r) \
do { \
r ^= rotl(l, 17); \
@ -821,7 +816,6 @@ do { \
l += r; \
} while (0)
static __inline u32 get_le32_split(u8 b0, u8 b1, u8 b2, u8 b3)
{
return b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
@ -832,7 +826,6 @@ static __inline u32 get_le32(const u8 *p)
return get_le32_split(p[0], p[1], p[2], p[3]);
}
static __inline void put_le32(u8 *p, u32 v)
{
p[0] = v;

View File

@ -629,7 +629,6 @@ ieee80211_get_rx_params_ptr(struct mbuf *m)
return (&rx->params);
}
/*
* Add TOA parameters to the given mbuf.
*/
@ -1148,4 +1147,3 @@ MODULE_DEPEND(wlan, ether, 1, 1, 1);
#ifdef IEEE80211_ALQ
MODULE_DEPEND(wlan, alq, 1, 1, 1);
#endif /* IEEE80211_ALQ */

View File

@ -154,7 +154,7 @@ typedef struct mtx ieee80211_psq_lock_t;
IF_UNLOCK(ifq); \
} while (0)
#endif /* IF_PREPEND_LIST */
/*
* Age queue definitions.
*/

View File

@ -1637,7 +1637,7 @@ ieee80211_deliver_l2uf(struct ieee80211_node *ni)
struct mbuf *m;
struct l2_update_frame *l2uf;
struct ether_header *eh;
m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni,
@ -1652,14 +1652,14 @@ ieee80211_deliver_l2uf(struct ieee80211_node *ni)
/* src: associated STA */
IEEE80211_ADDR_COPY(eh->ether_shost, ni->ni_macaddr);
eh->ether_type = htons(sizeof(*l2uf) - sizeof(*eh));
l2uf->dsap = 0;
l2uf->ssap = 0;
l2uf->control = 0xf5;
l2uf->xid[0] = 0x81;
l2uf->xid[1] = 0x80;
l2uf->xid[2] = 0x00;
m->m_pkthdr.len = m->m_len = sizeof(*l2uf);
hostap_deliver_data(vap, ni, m);
}

View File

@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/endian.h>
#include <sys/socket.h>
#include <net/if.h>
@ -2915,7 +2915,6 @@ ieee80211_send_bar(struct ieee80211_node *ni,
uint8_t *frm;
int tid, ret;
IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N,
tap->txa_ni,
"%s: called",

View File

@ -120,7 +120,6 @@ static void hwmp_peerdown(struct ieee80211_node *);
static struct timeval ieee80211_hwmp_preqminint = { 0, 100000 };
static struct timeval ieee80211_hwmp_perrminint = { 0, 100000 };
/* NB: the Target Address set in a Proactive PREQ is the broadcast address. */
static const uint8_t broadcastaddr[IEEE80211_ADDR_LEN] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
@ -217,7 +216,6 @@ SYSCTL_PROC(_net_wlan_hwmp, OID_AUTO, inact,
&mesh_proto_hwmp.mpp_inact, 0, ieee80211_sysctl_msecs_ticks, "I",
"mesh route inactivity timeout (ms)");
static void
ieee80211_hwmp_init(void)
{
@ -1878,7 +1876,6 @@ hwmp_rediscover_cb(void *arg)
hr->hr_preqretries++;
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_HWMP, rt->rt_dest,
"start path rediscovery , target seq %u", hr->hr_seq);
/*

View File

@ -37,9 +37,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/endian.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_var.h>

View File

@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/systm.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_dl.h>

View File

@ -371,7 +371,6 @@ enum {
IEEE80211_HWMP_ROOTMODE_RANN = 3, /* use RANN elemid */
};
/*
* Set the active channel list by IEEE channel #: each channel
* to be marked active is set in a bit vector. Note this list is

View File

@ -895,7 +895,6 @@ ieee80211_mesh_mark_gate(struct ieee80211vap *vap, const uint8_t *addr,
return gr;
}
/*
* Helper function to note the Mesh Peer Link FSM change.
*/
@ -951,7 +950,7 @@ static void
mesh_checkid(void *arg, struct ieee80211_node *ni)
{
uint16_t *r = arg;
if (*r == ni->ni_mllid)
*(uint16_t *)arg = 0;
}
@ -2186,7 +2185,7 @@ mesh_parse_meshpeering_action(struct ieee80211_node *ni,
return NULL;
}
}
/*
* Close frames are accepted if meshid is the same.
* Verify the other two types.
@ -2231,7 +2230,7 @@ mesh_parse_meshpeering_action(struct ieee80211_node *ni,
}
return NULL;
}
return (const struct ieee80211_meshpeer_ie *) mp;
}
@ -2510,7 +2509,7 @@ mesh_recv_action_meshlmetric(struct ieee80211_node *ni,
(const struct ieee80211_meshlmetric_ie *)
(frm+2); /* action + code */
struct ieee80211_meshlmetric_ie lm_rep;
if (ie->lm_flags & IEEE80211_MESH_LMETRIC_FLAGS_REQ) {
lm_rep.lm_flags = 0;
lm_rep.lm_metric = mesh_airtime_calc(ni);
@ -2606,7 +2605,6 @@ mesh_recv_action_meshgate(struct ieee80211_node *ni,
/* corresponding mesh gate found & GANN accepted */
found = 1;
break;
}
if (found == 0) {
/* this GANN is from a new mesh Gate add it to known table. */
@ -3005,7 +3003,7 @@ static void
mesh_peer_timeout_backoff(struct ieee80211_node *ni)
{
uint32_t r;
r = arc4random();
ni->ni_mltval += r % ni->ni_mltval;
callout_reset(&ni->ni_mltimer, ni->ni_mltval, mesh_peer_timeout_cb,
@ -3039,7 +3037,7 @@ mesh_peer_timeout_cb(void *arg)
IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_MESH,
ni, "mesh link timeout, state %d, retry counter %d",
ni->ni_mlstate, ni->ni_mlrcnt);
switch (ni->ni_mlstate) {
case IEEE80211_NODE_MESH_IDLE:
case IEEE80211_NODE_MESH_ESTABLISHED:

View File

@ -90,7 +90,6 @@ enum {
/* Authentication Protocol Identifier */
enum {
IEEE80211_MESHCONF_AUTH_DISABLED = 0,
/* Simultaneous Authenticaction of Equals */
IEEE80211_MESHCONF_AUTH_SEA = 1,

View File

@ -574,7 +574,6 @@ check_bss_debug(struct ieee80211vap *vap, struct ieee80211_node *ni)
}
#endif /* IEEE80211_DEBUG */
int
ieee80211_ibss_merge_check(struct ieee80211_node *ni)
{
@ -640,7 +639,6 @@ ieee80211_ibss_node_check_new(struct ieee80211_node *ni,
* Check if the scan SSID matches the SSID list for the VAP.
*/
for (i = 0; i < vap->iv_des_nssid; i++) {
/* Sanity length check */
if (vap->iv_des_ssid[i].len != scan->ssid[1])
continue;
@ -1815,7 +1813,6 @@ ieee80211_init_neighbor(struct ieee80211_node *ni,
(ni->ni_vap->iv_flags_vht & IEEE80211_FVHT_VHT)) {
do_vht_setup = 1;
}
}
/* NB: must be after ni_chan is setup */

View File

@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/endian.h>
#include <sys/socket.h>
#include <net/bpf.h>
#include <net/ethernet.h>
#include <net/if.h>
@ -174,7 +174,6 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m,
BPF_MTAP(ifp, m); /* 802.3 tx */
/*
* Figure out if we can do A-MPDU, A-MSDU or FF.
*
@ -327,8 +326,6 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m,
return (0);
}
/*
* Send the given mbuf through the given vap.
*
@ -1479,7 +1476,7 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni,
int meshhdrsize, meshae;
uint8_t *qos;
int is_amsdu = 0;
IEEE80211_TX_LOCK_ASSERT(ic);
is_mcast = !! (m->m_flags & (M_MCAST | M_BCAST));
@ -2645,7 +2642,6 @@ ieee80211_send_mgmt(struct ieee80211_node *ni, int type, int arg)
memset(&params, 0, sizeof(params));
switch (type) {
case IEEE80211_FC0_SUBTYPE_AUTH:
status = arg >> 16;
arg &= 0xffff;

View File

@ -582,7 +582,6 @@ static const uint16_t ht40_bps[32] = {
216, 432, 648, 864, 1296, 1728, 1944, 2160
};
#define OFDM_PLCP_BITS 22
#define HT_L_STF 8
#define HT_L_LTF 8

View File

@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/socket.h>
#include <net/if.h>

View File

@ -104,7 +104,6 @@ const char *ieee80211_wme_acnames[] = {
"WME_UPSD",
};
/*
* Reason code descriptions were (mostly) obtained from
* IEEE Std 802.11-2012, pp. 442-445 Table 8-36.
@ -1693,7 +1692,7 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
/* XXX WDS? */
/* XXX MBSS? */
if (do_aggrmode) {
chanp = &wme->wme_chanParams.cap_wmeParams[WME_AC_BE];
bssp = &wme->wme_bssChanParams.cap_wmeParams[WME_AC_BE];
@ -1713,7 +1712,6 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
chanp->wmep_logcwmax, chanp->wmep_txopLimit);
}
/*
* Change the contention window based on the number of associated
* stations. If the number of associated stations is 1 and
@ -1996,7 +1994,6 @@ ieee80211_start_locked(struct ieee80211vap *vap)
* to be brought up auto-up the parent if necessary.
*/
if (ic->ic_nrunning++ == 0) {
/* reset the channel to a known good channel */
if (ieee80211_start_check_reset_chan(vap))
ieee80211_start_reset_chan(vap);

View File

@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/endian.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_var.h>

View File

@ -286,7 +286,6 @@ enum ieee80211_radiotap_type {
#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */
#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
/* For IEEE80211_RADIOTAP_MCS */
#define IEEE80211_RADIOTAP_MCS_HAVE_BW 0x01
#define IEEE80211_RADIOTAP_MCS_HAVE_MCS 0x02

View File

@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/condvar.h>
#include <sys/socket.h>
#include <net/if.h>

View File

@ -1556,7 +1556,7 @@ static int
adhoc_start(struct ieee80211_scan_state *ss, struct ieee80211vap *vap)
{
struct sta_table *st = ss->ss_priv;
makescanlist(ss, vap, adhocScanTable);
if (ss->ss_mindwell == 0)

View File

@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/condvar.h>
#include <sys/socket.h>
#include <net/if.h>
@ -232,7 +232,6 @@ ieee80211_swscan_start_scan_locked(const struct ieee80211_scanner *scan,
return 0;
}
/*
* Start a scan unless one is already going.
*

View File

@ -1580,7 +1580,6 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype,
* us then get us out of STA mode powersave.
*/
if (tim_ucast == 1) {
/*
* Wake us out of SLEEP state if we're
* in it; and if we're doing bgscan

View File

@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/endian.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_llc.h>
@ -590,7 +590,6 @@ ieee80211_amsdu_encap(struct ieee80211vap *vap, struct mbuf *m1, int hdrspace,
return NULL;
}
static void
ff_transmit(struct ieee80211_node *ni, struct mbuf *m)
{

View File

@ -87,7 +87,7 @@ struct ieee80211_tdma_state {
const struct ieee80211_rx_stats *rxs, int, int);
void (*tdma_opdetach)(struct ieee80211vap *);
};
#define TDMA_UPDATE_SLOT 0x0001 /* tdma_slot changed */
#define TDMA_UPDATE_SLOTCNT 0x0002 /* tdma_slotcnt changed */
#define TDMA_UPDATE_SLOTLEN 0x0004 /* tdma_slotlen changed */

Some files were not shown because too many files have changed in this diff Show More