diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 6b6987d69dc3..a7546c9f7413 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -241,9 +241,15 @@ null_transmit(struct ifnet *ifp, struct mbuf *m) return EACCES; /* XXX EIO/EPERM? */ } +#if __FreeBSD_version >= 1000031 static int null_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro) +#else +static int +null_output(struct ifnet *ifp, struct mbuf *m, + struct sockaddr *dst, struct route *ro) +#endif { if_printf(ifp, "discard raw packet\n"); return null_transmit(ifp, m); diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 3be382cf277b..0b86ecc2e8f3 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -482,9 +482,15 @@ ieee80211_raw_output(struct ieee80211vap *vap, struct ieee80211_node *ni, * connect bpf write calls to the 802.11 layer for injecting * raw 802.11 frames. */ +#if __FreeBSD_version >= 1000031 int ieee80211_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro) +#else +int +ieee80211_output(struct ifnet *ifp, struct mbuf *m, + struct sockaddr *dst, struct route *ro) +#endif { #define senderr(e) do { error = (e); goto bad;} while (0) struct ieee80211_node *ni = NULL; diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h index 94dd097649e4..4d993b6e5860 100644 --- a/sys/net80211/ieee80211_proto.h +++ b/sys/net80211/ieee80211_proto.h @@ -96,8 +96,13 @@ int ieee80211_mgmt_output(struct ieee80211_node *, struct mbuf *, int, struct ieee80211_bpf_params *); int ieee80211_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); +#if __FreeBSD_version >= 1000031 int ieee80211_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *ro); +#else +int ieee80211_output(struct ifnet *, struct mbuf *, + struct sockaddr *, struct route *ro); +#endif int ieee80211_vap_pkt_send_dest(struct ieee80211vap *, struct mbuf *, struct ieee80211_node *); int ieee80211_raw_output(struct ieee80211vap *, struct ieee80211_node *, diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 5c88924bf401..174fabca829a 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -496,8 +496,13 @@ struct ieee80211vap { int (*iv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); /* 802.3 output method for raw frame xmit */ +#if __FreeBSD_version >= 1000031 int (*iv_output)(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); +#else + int (*iv_output)(struct ifnet *, struct mbuf *, + struct sockaddr *, struct route *); +#endif uint64_t iv_spare[6]; }; MALLOC_DECLARE(M_80211_VAP);