PERFORCE change 43164 for review

Sam Leffler sam at FreeBSD.org
Sat Nov 29 19:39:36 PST 2003


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

Change 43164 by sam at sam_ebb on 2003/11/29 19:38:53

	add flags and rate to xmit side tapping per netbsd

Affected files ...

.. //depot/projects/netperf/sys/dev/wi/if_wi.c#17 edit
.. //depot/projects/netperf/sys/dev/wi/if_wireg.h#5 edit

Differences ...

==== //depot/projects/netperf/sys/dev/wi/if_wi.c#17 (text+ko) ====

@@ -979,6 +979,8 @@
 		}
 #if NBPFILTER > 0
 		if (sc->sc_drvbpf) {
+			sc->sc_tx_th.wt_rate =
+				ni->ni_rates.rs_rates[ni->ni_txrate];
 			bpf_mtap2(sc->sc_drvbpf,
 				&sc->sc_tx_th, sizeof(sc->sc_tx_th), m0);
 		}
@@ -1531,6 +1533,9 @@
 		sc->sc_rx_th.wr_time =
 			htole32((frmhdr.wi_rx_tstamp1 << 16) |
 				frmhdr.wi_rx_tstamp0);
+		sc->sc_rx_th.wr_flags = 0;
+		if (frmhdr.wi_status & WI_STAT_PCF)
+			sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_CFP;
 		bpf_mtap2(sc->sc_drvbpf,
 			&sc->sc_rx_th, sizeof(sc->sc_rx_th), m);
 	}

==== //depot/projects/netperf/sys/dev/wi/if_wireg.h#5 (text+ko) ====

@@ -707,10 +707,14 @@
 };
 
 #define WI_TX_RADIOTAP_PRESENT \
-	((1 << IEEE80211_RADIOTAP_CHANNEL))
+	((1 << IEEE80211_RADIOTAP_FLAGS) | \
+	 (1 << IEEE80211_RADIOTAP_RATE) | \
+	 (1 << IEEE80211_RADIOTAP_CHANNEL))
 
 struct wi_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
+	u_int8_t	wt_flags;
+	u_int8_t	wt_rate;
 	u_int16_t	wt_chan_freq;
 	u_int16_t	wt_chan_flags;
 };


More information about the p4-projects mailing list