summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2015-12-03 14:39:38 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2015-12-03 14:39:38 +0000
commit7d41bfb8b894c3be5eb96adf7ff11db11f64fd44 (patch)
tree4ef4425d9d89a4ea0d260a01288c3c7aed0ab68a /sys
parent900ca52f452b1e2056cfe5645438ca7f9fa23d0d (diff)
ieee80211com's ic_sup_mcs array is smaller than it used to be because part of
it has been split out into new struct fields. The athn(4) driver was still assuming the old size and wrote beyond the ic_sup_mcs array. Make the driver write to the new ic_tx_mcs_set field instead. found by daniel@ with gcc 4.9 ok sthen@ kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/athn.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index 0d2b74b640b..51cfed88adf 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.90 2015/11/25 03:09:58 dlg Exp $ */
+/* $OpenBSD: athn.c,v 1.91 2015/12/03 14:39:37 stsp Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -312,12 +312,10 @@ athn_attach(struct athn_softc *sc)
/* Set supported HT rates. */
for (i = 0; i < nrxstreams; i++)
ic->ic_sup_mcs[i] = 0xff;
- /* Set the "Tx MCS Set Defined" bit. */
- ic->ic_sup_mcs[12] |= 0x01;
+ ic->ic_tx_mcs_set |= IEEE80211_TX_MCS_SET_DEFINED;
if (ntxstreams != nrxstreams) {
- /* Set "Tx Rx MCS Set Not Equal" bit. */
- ic->ic_sup_mcs[12] |= 0x02;
- ic->ic_sup_mcs[12] |= (ntxstreams - 1) << 2;
+ ic->ic_tx_mcs_set |= IEEE80211_TX_RX_MCS_NOT_EQUAL;
+ ic->ic_tx_mcs_set |= (ntxstreams - 1) << 2;
}
}
#endif