summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-03-18 19:35:30 +0000
committeradrian <adrian@FreeBSD.org>2012-03-18 19:35:30 +0000
commita4e442e5d24331957da8aaea4165e07bc864e1a0 (patch)
tree302d926a2027d63b3d3c2ecd0d1b488e0a535b9a /sys/net80211
parentaee83c9da86f11a7957cfd3a042505191364aaa0 (diff)
downloadFreeBSD-src-a4e442e5d24331957da8aaea4165e07bc864e1a0.zip
FreeBSD-src-a4e442e5d24331957da8aaea4165e07bc864e1a0.tar.gz
Add a missing endian conversion.
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_alq.h125
1 files changed, 124 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_alq.h b/sys/net80211/ieee80211_alq.h
index 112c6b1..109fe61 100644
--- a/sys/net80211/ieee80211_alq.h
+++ b/sys/net80211/ieee80211_alq.h
@@ -27,7 +27,10 @@
#ifndef __IEEE80211_ALQ_H__
#define __IEEE80211_ALQ_H__
-#define IEEE80211_ALQ_PAYLOAD_SIZE 24
+/*
+ * 64 byte ieee80211_alq_rec size.
+ */
+#define IEEE80211_ALQ_PAYLOAD_SIZE 52
/*
* timestamp
@@ -50,4 +53,124 @@ struct ieee80211_alq_rec {
extern void ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op,
u_char *p, int l);
+/*
+ * Debugging entry points
+ */
+
+/*
+ * This should be called by the driver on each RX frame.
+ */
+#define IEEE80211_ALQ_OP_RXFRAME 0x1
+#define IEEE80211_ALQ_OP_TXFRAME 0x2
+#define IEEE80211_ALQ_OP_TXCOMPLETE 0x3
+#define IEEE80211_ALQ_OP_TX_BAW 0x4
+
+/* Driver-specific - for descriptor contents, etc */
+#define IEEE80211_ALQ_OP_RX_DESC 0x81
+#define IEEE80211_ALQ_OP_TX_DESC 0x82
+#define IEEE80211_ALQ_OP_TX_DESCCOMP 0x83
+
+struct ieee80211_alq_rx_frame_struct {
+ uint64_t tsf; /* Network order */
+ uintptr_t bf; /* Driver-specific buffer ptr */
+ uint8_t rxq; /* Driver-specific RX queue */
+ uint8_t pad[3]; /* Pad alignment */
+ struct ieee80211_qosframe wh; /* XXX 4 bytes, QoS? */
+};
+
+struct ieee80211_alq_tx_frame {
+ uint64_t tsf; /* Network order */
+ uintptr_t bf; /* Driver-specific buffer ptr */
+ uint32_t tx_flags; /* Driver-specific TX flags */
+ uint8_t txq; /* Driver-specific TX queue */
+ uint8_t pad[3]; /* Pad alignment */
+ struct ieee80211_qosframe wh; /* XXX 4 bytes, QoS? */
+};
+
+struct ieee80211_alq_tx_frame_complete {
+ uint64_t tsf; /* Network order */
+ uintptr_t bf; /* Driver-specific buffer ptr */
+ uint8_t txq; /* Driver-specific TX queue */
+ uint8_t txstatus; /* driver-specific TX status */
+ uint8_t pad[2]; /* Pad alignment */
+ struct ieee80211_qosframe wh; /* XXX 4 bytes, QoS? */
+};
+
+
+/*
+ * This is used for frame RX.
+ */
+static inline void
+ieee80211_alq_rx_frame(struct ieee80211vap *vap,
+ struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t rxq)
+{
+ struct ieee80211_alq_rx_frame_struct rf;
+
+ memset(&rf, 0, sizeof(rf));
+ rf.tsf = htole64(tsf);
+ rf.bf = (uintptr_t) bf;
+ rf.rxq = rxq;
+ memcpy(&rf.wh, wh, sizeof(struct ieee80211_qosframe));
+ ieee80211_alq_log(vap, IEEE80211_ALQ_OP_RXFRAME, (char *) &rf,
+ sizeof(rf));
+}
+
+/*
+ * Frame TX scheduling
+ */
+static inline void
+ieee80211_alq_tx_frame(struct ieee80211vap *vap,
+ struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t txq,
+ uint32_t tx_flags)
+{
+
+}
+
+/*
+ * Frame TX completion
+ */
+static inline void
+ieee80211_alq_tx_frame_comp(struct ieee80211vap *vap,
+ struct ieee80211_frame *wh, uint64_t tsf, void *bf, uint8_t txq,
+ uint8_t tx_status)
+{
+
+}
+
+struct ieee80211_alq_tx_baw_note_struct {
+ uintptr_t bf;
+ uint8_t tid;
+ uint8_t what;
+ uint16_t baw;
+ uint16_t wnd;
+ uint16_t new_baw;
+};
+
+/*
+ * TX BAW noting - add, remove, etc
+ */
+
+#define IEEE80211_ALQ_TX_BAW_ADD 0x1
+#define IEEE80211_ALQ_TX_BAW_COMPLETE 0x2
+
+static inline void
+ieee80211_alq_tx_baw_note(struct ieee80211vap *vap,
+ struct ieee80211_frame *wh, void *bf, uint8_t tid, uint8_t what,
+ uint16_t baw, uint16_t wnd, uint16_t new_baw)
+{
+ struct ieee80211_alq_tx_baw_note_struct tb;
+
+ memset(&tb, 0, sizeof(tb));
+
+ tb.bf = (uintptr_t) bf;
+ tb.tid = tid;
+ tb.what = what;
+ tb.baw = htons(baw);
+ tb.wnd = htons(wnd);
+ tb.new_baw = htons(new_baw);
+
+ ieee80211_alq_log(vap, IEEE80211_ALQ_OP_TX_BAW, (char *) &tb,
+ sizeof(tb));
+}
+
#endif /* __IEEE80211_ALQ_H__ */
OpenPOWER on IntegriCloud