PERFORCE change 137838 for review

Sam Leffler sam at FreeBSD.org
Sun Mar 16 16:15:09 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=137838

Change 137838 by sam at sam_ebb on 2008/03/16 16:14:30

	honor protection in the raw xmit path

Affected files ...

.. //depot/projects/vap/sys/dev/usb/if_ural.c#15 edit

Differences ...

==== //depot/projects/vap/sys/dev/usb/if_ural.c#15 (text+ko) ====

@@ -1403,7 +1403,20 @@
 		m_freem(m0);
 		return EINVAL;
 	}
-	/* XXX honor protection */
+	flags = 0;
+	if ((params->ibp_flags & IEEE80211_BPF_NOACK) == 0)
+		flags |= RAL_TX_ACK;
+	if (params->ibp_flags & (IEEE80211_BPF_RTS|IEEE80211_BPF_CTS)) {
+		error = ural_sendprot(sc, m0, ni,
+		    params->ibp_flags & IEEE80211_BPF_RTS ?
+			 IEEE80211_PROT_RTSCTS : IEEE80211_PROT_CTSONLY,
+		    rate);
+		if (error) {
+			m_freem(m0);
+			return error;
+		}
+		flags |= RAL_TX_IFS_SIFS;
+	}
 
 	if (bpf_peers_present(ifp->if_bpf)) {
 		struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
@@ -1420,10 +1433,6 @@
 	data->m = m0;
 	data->ni = ni;
 
-	flags = 0;
-	if ((params->ibp_flags & IEEE80211_BPF_NOACK) == 0)
-		flags |= RAL_TX_ACK;
-
 	m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE);
 	/* XXX need to setup descriptor ourself */
 	ural_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate);


More information about the p4-projects mailing list