summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2015-03-02 22:12:57 +0000
committerjsg <jsg@openbsd.org>2015-03-02 22:12:57 +0000
commitc1e2f59b2b209a5d9e3b10baa4b28b0fd2c27f0f (patch)
tree0c51fdcb73a90cc567ffef59d8a174c865f67c0a
parentAdd three extra checks that test proper removal of the P flag. Currently 2 fail (diff)
downloadwireguard-openbsd-c1e2f59b2b209a5d9e3b10baa4b28b0fd2c27f0f.tar.xz
wireguard-openbsd-c1e2f59b2b209a5d9e3b10baa4b28b0fd2c27f0f.zip
sc_fixed_ridx is initialised to 0 but tested as it it were initialised
to -1. The result of this is tx frames were always sent out at fixed rate 0 instead of ni_txrate. Match the iwn behaviour and test ic_fixed_rate for -1 instead. Problem spotted by kettenis@ in an earlier diff. ok kettenis@ stsp@
-rw-r--r--sys/dev/pci/if_iwm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index a199a273f12..bc19315c6e5 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.28 2015/03/02 13:59:38 jsg Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.29 2015/03/02 22:12:57 jsg Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
@@ -3715,7 +3715,7 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, struct iwm_node *in,
/* for data frames, use RS table */
if (type == IEEE80211_FC0_TYPE_DATA) {
- if (sc->sc_fixed_ridx != -1) {
+ if (sc->sc_ic.ic_fixed_rate != -1) {
tx->initial_rate_index = sc->sc_fixed_ridx;
} else {
tx->initial_rate_index = (nrates-1) - in->in_ni.ni_txrate;