summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_proto.h
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-04-08 09:20:45 +0000
committeradrian <adrian@FreeBSD.org>2011-04-08 09:20:45 +0000
commit04a664ee1baf82bf5944c99c19b983121b136b2b (patch)
treef9e05b144f48a3d203c359da6d5d69c1a7c22daa /sys/net80211/ieee80211_proto.h
parent416bdcba5e6296557c941806cd8ce943d47a90ff (diff)
downloadFreeBSD-src-04a664ee1baf82bf5944c99c19b983121b136b2b.zip
FreeBSD-src-04a664ee1baf82bf5944c99c19b983121b136b2b.tar.gz
Add initial support for MIMO statistics to net80211.
This introduces struct ieee80211_rx_stats - which stores the various kinds of RX statistics which a MIMO and non-MIMO 802.11 device can export. It also fleshes out the mimo export to userland (node_getmimoinfo()). It assumes that MIMO radios (for now) export both ctl and ext channels. Non-11n MIMO radios are possible (and I believe Atheros made at least one), so if that chipset support is added, extra flags to the struct ieee80211_rx_stats can be added to extend this support. Two new input functions have been added - ieee80211_input_mimo() and ieee80211_input_mimo_all() - which MIMO-aware devices can call with MIMO specific statistics. 802.11 devices calling the non-MIMO input functions will still function.
Diffstat (limited to 'sys/net80211/ieee80211_proto.h')
-rw-r--r--sys/net80211/ieee80211_proto.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h
index c280847..7e88216 100644
--- a/sys/net80211/ieee80211_proto.h
+++ b/sys/net80211/ieee80211_proto.h
@@ -61,9 +61,36 @@ void ieee80211_syncflag(struct ieee80211vap *, int flag);
void ieee80211_syncflag_ht(struct ieee80211vap *, int flag);
void ieee80211_syncflag_ext(struct ieee80211vap *, int flag);
+#define IEEE80211_R_NF 0x0000001 /* global NF value valid */
+#define IEEE80211_R_RSSI 0x0000002 /* global RSSI value valid */
+#define IEEE80211_R_C_CHAIN 0x0000004 /* RX chain count valid */
+#define IEEE80211_R_C_NF 0x0000008 /* per-chain NF value valid */
+#define IEEE80211_R_C_RSSI 0x0000010 /* per-chain RSSI value valid */
+#define IEEE80211_R_C_EVM 0x0000020 /* per-chain EVM valid */
+#define IEEE80211_R_C_HT40 0x0000040 /* RX'ed packet is 40mhz, pilots 4,5 valid */
+
+struct ieee80211_rx_stats {
+ uint32_t r_flags; /* IEEE80211_R_* flags */
+ uint8_t c_chain; /* number of RX chains involved */
+ int16_t c_nf_ctl[IEEE80211_MAX_CHAINS]; /* per-chain NF */
+ int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */
+ int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */
+ int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */
+ uint8_t nf; /* global NF */
+ uint8_t rssi; /* global RSSI */
+ uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS];
+ /* per-chain, per-pilot EVM values */
+};
+
#define ieee80211_input(ni, m, rssi, nf) \
((ni)->ni_vap->iv_input(ni, m, rssi, nf))
int ieee80211_input_all(struct ieee80211com *, struct mbuf *, int, int);
+
+int ieee80211_input_mimo(struct ieee80211_node *, struct mbuf *,
+ struct ieee80211_rx_stats *);
+int ieee80211_input_mimo_all(struct ieee80211com *, struct mbuf *,
+ struct ieee80211_rx_stats *);
+
struct ieee80211_bpf_params;
int ieee80211_mgmt_output(struct ieee80211_node *, struct mbuf *, int,
struct ieee80211_bpf_params *);
OpenPOWER on IntegriCloud