svn commit: r249945 - user/adrian/net80211_tx/sys/net80211
Adrian Chadd
adrian at FreeBSD.org
Fri Apr 26 17:12:52 UTC 2013
Author: adrian
Date: Fri Apr 26 17:12:51 2013
New Revision: 249945
URL: http://svnweb.freebsd.org/changeset/base/249945
Log:
Work around the recent if_output() API changes in -HEAD so this code
can still compile on -9.
This isn't the "right" solution as it's exposing FreeBSD specific
stuff outside of ieee80211_freebsd.[ch]. But this'll have to do for now.
Modified:
user/adrian/net80211_tx/sys/net80211/ieee80211.c
user/adrian/net80211_tx/sys/net80211/ieee80211_output.c
user/adrian/net80211_tx/sys/net80211/ieee80211_proto.h
user/adrian/net80211_tx/sys/net80211/ieee80211_var.h
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211.c
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211.c Fri Apr 26 17:08:07 2013 (r249944)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211.c Fri Apr 26 17:12:51 2013 (r249945)
@@ -241,9 +241,15 @@ null_transmit(struct ifnet *ifp, struct
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);
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211_output.c
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211_output.c Fri Apr 26 17:08:07 2013 (r249944)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211_output.c Fri Apr 26 17:12:51 2013 (r249945)
@@ -448,9 +448,15 @@ ieee80211_raw_output(struct ieee80211vap
* 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;
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211_proto.h
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211_proto.h Fri Apr 26 17:08:07 2013 (r249944)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211_proto.h Fri Apr 26 17:12:51 2013 (r249945)
@@ -96,8 +96,13 @@ int ieee80211_mgmt_output(struct ieee802
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_raw_output(struct ieee80211vap *, struct ieee80211_node *,
struct mbuf *, const struct ieee80211_bpf_params *);
void ieee80211_send_setup(struct ieee80211_node *, struct mbuf *, int, int,
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211_var.h
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211_var.h Fri Apr 26 17:08:07 2013 (r249944)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211_var.h Fri Apr 26 17:12:51 2013 (r249945)
@@ -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);
More information about the svn-src-user
mailing list