diff options
author | adrian <adrian@FreeBSD.org> | 2015-06-04 17:54:41 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2015-06-04 17:54:41 +0000 |
commit | 128e89a1f9b28a6cad7a63a9c72fd62c97d67cbe (patch) | |
tree | e796f4524ffe8830b812201b5d1e3a6f4698a551 /sys/net80211 | |
parent | 3eca9cadb10aee64e6ed593571e834dc0c3f290d (diff) | |
download | FreeBSD-src-128e89a1f9b28a6cad7a63a9c72fd62c97d67cbe.zip FreeBSD-src-128e89a1f9b28a6cad7a63a9c72fd62c97d67cbe.tar.gz |
Tag outbound raw 802.11 frames with both the node and an mbuf tag
with the transmit params.
This allows raw 802.11 frames to be queued in the driver if necessary,
rather than requiring it to be direct-dispatched into the hardware.
Tested:
* ath(4), STA mode
* iwn(4), STA mode
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc.
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_output.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index e1652ea..5eb5959 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -508,6 +508,25 @@ ieee80211_raw_output(struct ieee80211vap *vap, struct ieee80211_node *ni, { struct ieee80211com *ic = vap->iv_ic; + /* + * Set node - the caller has taken a reference, so ensure + * that the mbuf has the same node value that + * it would if it were going via the normal path. + */ + m->m_pkthdr.rcvif = (void *)ni; + + /* + * Attempt to add bpf transmit parameters. + * + * For now it's ok to fail; the raw_xmit api still takes + * them as an option. + * + * Later on when ic_raw_xmit() has params removed, + * they'll have to be added - so fail the transmit if + * they can't be. + */ + (void) ieee80211_add_xmit_params(m, params); + return (ic->ic_raw_xmit(ni, m, params)); } |