summaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-01-06 19:56:51 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-01-06 19:56:51 +0000
commitd575727a699b5ec3165be3e08326b53b4e0cb80c (patch)
tree54f4a9517c3f5ead6fddf9299540da741c45543d /sys/net80211
parent52b6752f60789fae7f60401ddd3c639f23a989a6 (diff)
Initialize the A-MPDU parameters field in HT capability elements.
ok kettenis@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211.h10
-rw-r--r--sys/net80211/ieee80211_output.c4
-rw-r--r--sys/net80211/ieee80211_var.h3
3 files changed, 13 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h
index ef15fda8c45..ae0348702c6 100644
--- a/sys/net80211/ieee80211.h
+++ b/sys/net80211/ieee80211.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211.h,v 1.55 2016/01/04 12:32:06 stsp Exp $ */
+/* $OpenBSD: ieee80211.h,v 1.56 2016/01/06 19:56:50 stsp Exp $ */
/* $NetBSD: ieee80211.h,v 1.6 2004/04/30 23:51:53 dyoung Exp $ */
/*-
@@ -588,6 +588,14 @@ enum {
*/
#define IEEE80211_AMPDU_PARAM_LE 0x03
#define IEEE80211_AMPDU_PARAM_SS 0x1c
+#define IEEE80211_AMPDU_PARAM_SS_NONE (0 << 2)
+#define IEEE80211_AMPDU_PARAM_SS_0_25 (1 << 2)
+#define IEEE80211_AMPDU_PARAM_SS_0_5 (2 << 2)
+#define IEEE80211_AMPDU_PARAM_SS_1 (3 << 2)
+#define IEEE80211_AMPDU_PARAM_SS_2 (4 << 2)
+#define IEEE80211_AMPDU_PARAM_SS_4 (5 << 2)
+#define IEEE80211_AMPDU_PARAM_SS_8 (6 << 2)
+#define IEEE80211_AMPDU_PARAM_SS_16 (7 << 2)
/* bits 5-7 reserved */
/*
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index a58391ffbe1..e823452395a 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_output.c,v 1.105 2016/01/05 18:41:16 stsp Exp $ */
+/* $OpenBSD: ieee80211_output.c,v 1.106 2016/01/06 19:56:50 stsp Exp $ */
/* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */
/*-
@@ -1021,7 +1021,7 @@ ieee80211_add_htcaps(u_int8_t *frm, struct ieee80211com *ic)
*frm++ = IEEE80211_ELEMID_HTCAPS;
*frm++ = 26;
LE_WRITE_2(frm, ic->ic_htcaps); frm += 2;
- *frm++ = 0; /* XXX A-MPDU params */
+ *frm++ = ic->ic_ampdu_params;
memcpy(frm, ic->ic_sup_mcs, 10); frm += 10;
LE_WRITE_2(frm, (ic->ic_max_rxrate & IEEE80211_MCS_RX_RATE_HIGH));
frm += 2;
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 920c769a3dd..63105a4969a 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_var.h,v 1.68 2016/01/05 18:41:16 stsp Exp $ */
+/* $OpenBSD: ieee80211_var.h,v 1.69 2016/01/06 19:56:50 stsp Exp $ */
/* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */
/*-
@@ -318,6 +318,7 @@ struct ieee80211com {
u_int32_t ic_txbfcaps;
u_int16_t ic_htcaps;
+ u_int8_t ic_ampdu_params;
u_int8_t ic_sup_mcs[howmany(80, NBBY)];
u_int16_t ic_max_rxrate; /* in Mb/s, 0 <= rate <= 1023 */
u_int8_t ic_tx_mcs_set;