svn commit: r247528 - user/adrian/net80211_tx/sys/net80211
Adrian Chadd
adrian at FreeBSD.org
Fri Mar 1 04:21:23 UTC 2013
Author: adrian
Date: Fri Mar 1 04:21:22 2013
New Revision: 247528
URL: http://svnweb.freebsd.org/changeset/base/247528
Log:
Migrate ic->ic_raw_xmit() to a VAP method.
It still calls ic->ic_raw_xmit() for now but it does make it easier to
convert into a queue method later.
Modified:
user/adrian/net80211_tx/sys/net80211/ieee80211_ht.c
user/adrian/net80211_tx/sys/net80211/ieee80211_hwmp.c
user/adrian/net80211_tx/sys/net80211/ieee80211_mesh.c
user/adrian/net80211_tx/sys/net80211/ieee80211_output.c
user/adrian/net80211_tx/sys/net80211/ieee80211_proto.h
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211_ht.c
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211_ht.c Fri Mar 1 03:25:43 2013 (r247527)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211_ht.c Fri Mar 1 04:21:22 2013 (r247528)
@@ -2393,7 +2393,7 @@ ieee80211_send_bar(struct ieee80211_node
* regardless of queue/TX success or failure.
*/
IEEE80211_TX_LOCK(ic);
- ret = ic->ic_raw_xmit(ni, m, NULL);
+ ret = ieee80211_raw_output(vap, ni, m, NULL);
IEEE80211_TX_UNLOCK(ic);
if (ret != 0) {
IEEE80211_NOTE(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_11N,
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211_hwmp.c
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211_hwmp.c Fri Mar 1 03:25:43 2013 (r247527)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211_hwmp.c Fri Mar 1 04:21:22 2013 (r247528)
@@ -673,7 +673,7 @@ hwmp_send_action(struct ieee80211vap *va
else
params.ibp_try0 = ni->ni_txparms->maxretry;
params.ibp_power = ni->ni_txpower;
- ret = ic->ic_raw_xmit(ni, m, ¶ms);
+ ret = ieee80211_raw_output(vap, ni, m, ¶ms);
IEEE80211_TX_UNLOCK(ic);
return (ret);
}
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211_mesh.c
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211_mesh.c Fri Mar 1 03:25:43 2013 (r247527)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211_mesh.c Fri Mar 1 04:21:22 2013 (r247528)
@@ -2780,7 +2780,7 @@ mesh_send_action(struct ieee80211_node *
IEEE80211_NODE_STAT(ni, tx_mgmt);
- ret = ic->ic_raw_xmit(ni, m, ¶ms);
+ ret = ieee80211_raw_output(vap, ni, m, ¶ms);
IEEE80211_TX_UNLOCK(ic);
return (ret);
}
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211_output.c
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211_output.c Fri Mar 1 03:25:43 2013 (r247527)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211_output.c Fri Mar 1 04:21:22 2013 (r247528)
@@ -430,6 +430,18 @@ ieee80211_start(struct ifnet *ifp)
}
/*
+ * 802.11 raw output routine.
+ */
+int
+ieee80211_raw_output(struct ieee80211vap *vap, struct ieee80211_node *ni,
+ struct mbuf *m, const struct ieee80211_bpf_params *params)
+{
+ struct ieee80211com *ic = vap->iv_ic;
+
+ return (ic->ic_raw_xmit(ni, m, params));
+}
+
+/*
* 802.11 output routine. This is (currently) used only to
* connect bpf write calls to the 802.11 layer for injecting
* raw 802.11 frames.
@@ -550,7 +562,7 @@ ieee80211_output(struct ifnet *ifp, stru
* this is a hack).
* NB: we assume sa_data is suitably aligned to cast.
*/
- ret = vap->iv_ic->ic_raw_xmit(ni, m,
+ ret = ieee80211_raw_output(vap, ni, m,
(const struct ieee80211_bpf_params *)(dst->sa_len ?
dst->sa_data : NULL));
IEEE80211_TX_UNLOCK(ic);
@@ -733,7 +745,7 @@ ieee80211_mgmt_output(struct ieee80211_n
#endif
IEEE80211_NODE_STAT(ni, tx_mgmt);
- ret = ic->ic_raw_xmit(ni, m, params);
+ ret = ieee80211_raw_output(vap, ni, m, params);
IEEE80211_TX_UNLOCK(ic);
return (ret);
}
@@ -839,7 +851,7 @@ ieee80211_send_nulldata(struct ieee80211
ieee80211_chan2ieee(ic, ic->ic_curchan),
wh->i_fc[1] & IEEE80211_FC1_PWR_MGT ? "ena" : "dis");
- ret = ic->ic_raw_xmit(ni, m, NULL);
+ ret = ieee80211_raw_output(vap, ni, m, NULL);
IEEE80211_TX_UNLOCK(ic);
return (ret);
}
@@ -1979,7 +1991,7 @@ ieee80211_send_probereq(struct ieee80211
} else
params.ibp_try0 = tp->maxretry;
params.ibp_power = ni->ni_txpower;
- ret = ic->ic_raw_xmit(ni, m, ¶ms);
+ ret = ieee80211_raw_output(vap, ni, m, ¶ms);
IEEE80211_TX_UNLOCK(ic);
return (ret);
}
@@ -2595,7 +2607,7 @@ ieee80211_send_proberesp(struct ieee8021
legacy ? " <legacy>" : "");
IEEE80211_NODE_STAT(bss, tx_mgmt);
- ret = ic->ic_raw_xmit(bss, m, NULL);
+ ret = ieee80211_raw_output(vap, bss, m, NULL);
IEEE80211_TX_UNLOCK(ic);
return (ret);
}
Modified: user/adrian/net80211_tx/sys/net80211/ieee80211_proto.h
==============================================================================
--- user/adrian/net80211_tx/sys/net80211/ieee80211_proto.h Fri Mar 1 03:25:43 2013 (r247527)
+++ user/adrian/net80211_tx/sys/net80211/ieee80211_proto.h Fri Mar 1 04:21:22 2013 (r247528)
@@ -98,6 +98,8 @@ int ieee80211_raw_xmit(struct ieee80211_
const struct ieee80211_bpf_params *);
int ieee80211_output(struct ifnet *, struct mbuf *,
struct sockaddr *, struct route *ro);
+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,
const uint8_t [IEEE80211_ADDR_LEN], const uint8_t [IEEE80211_ADDR_LEN],
const uint8_t [IEEE80211_ADDR_LEN]);
More information about the svn-src-user
mailing list