summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-01-07 23:08:39 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-01-07 23:08:39 +0000
commit05ec0ca18c2dd74878fdeb9cc1025f9a0cef5aae (patch)
treed1303d6af4dd5a9ce371646ce0d4320cd596436c /sys
parent05916101ba1ee791de4e14081375b8162c54df0d (diff)
Fix A-MPDU parameters in link quality firmware commands in iwn(4) and iwm(4).
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_iwm.c6
-rw-r--r--sys/dev/pci/if_iwn.c6
-rw-r--r--sys/dev/pci/if_iwnreg.h5
3 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index ac84f2a832c..295a510edf2 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.74 2016/01/06 19:56:50 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.75 2016/01/07 23:08:38 stsp Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
@@ -5447,6 +5447,10 @@ iwm_setrates(struct iwm_node *in)
lq->single_stream_ant_msk = IWM_ANT_A;
lq->dual_stream_ant_msk = IWM_ANT_AB;
+ lq->agg_time_limit = htole16(4000); /* 4ms */
+ lq->agg_disable_start_th = 3;
+ lq->agg_frame_cnt_limit = 0x3f;
+
cmd.data[0] = &in->in_lq;
if (iwm_send_cmd(sc, &cmd) != 0) {
DPRINTF(("%s: IWM_LQ_CMD failed\n", DEVNAME(sc)));
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index 84d91ad62f2..6d5abff7a9a 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.152 2016/01/06 19:56:50 stsp Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.153 2016/01/07 23:08:38 stsp Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -3380,7 +3380,7 @@ iwn_set_link_quality(struct iwn_softc *sc, struct ieee80211_node *ni)
linkq.id = wn->id;
linkq.antmsk_1stream = txant;
linkq.antmsk_2stream = IWN_ANT_AB;
- linkq.ampdu_max = 31;
+ linkq.ampdu_max = IWN_AMPDU_MAX;
linkq.ampdu_threshold = 3;
linkq.ampdu_limit = htole16(4000); /* 4ms */
@@ -3462,7 +3462,7 @@ iwn_add_broadcast_node(struct iwn_softc *sc, int async, int ridx)
linkq.id = sc->broadcast_id;
linkq.antmsk_1stream = txant;
linkq.antmsk_2stream = IWN_ANT_AB;
- linkq.ampdu_max = 64;
+ linkq.ampdu_max = IWN_AMPDU_MAX_NO_AGG;
linkq.ampdu_threshold = 3;
linkq.ampdu_limit = htole16(4000); /* 4ms */
diff --git a/sys/dev/pci/if_iwnreg.h b/sys/dev/pci/if_iwnreg.h
index cd0018a7fdd..1d9a2bcb8d8 100644
--- a/sys/dev/pci/if_iwnreg.h
+++ b/sys/dev/pci/if_iwnreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwnreg.h,v 1.50 2016/01/04 13:54:19 stsp Exp $ */
+/* $OpenBSD: if_iwnreg.h,v 1.51 2016/01/07 23:08:38 stsp Exp $ */
/*-
* Copyright (c) 2007, 2008
@@ -710,6 +710,9 @@ struct iwn_cmd_link_quality {
uint16_t ampdu_limit;
uint8_t ampdu_threshold;
uint8_t ampdu_max;
+#define IWN_AMPDU_MAX_UNLIMITED 0
+#define IWN_AMPDU_MAX_NO_AGG 1
+#define IWN_AMPDU_MAX 63
uint32_t reserved2;
struct {
uint8_t plcp;