Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci sc_fixed_ridx is initialised to 0 but tested as ...



details:   https://anonhg.NetBSD.org/src/rev/1cb043d8e000
branches:  trunk
changeset: 806624:1cb043d8e000
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Tue Mar 03 09:34:40 2015 +0000

description:
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.

>From OpenBSD rev.1.29.

diffstat:

 sys/dev/pci/if_iwm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 66f33a26fc07 -r 1cb043d8e000 sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c      Tue Mar 03 09:27:35 2015 +0000
+++ b/sys/dev/pci/if_iwm.c      Tue Mar 03 09:34:40 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwm.c,v 1.20 2015/03/03 09:27:35 nonaka Exp $       */
+/*     $NetBSD: if_iwm.c,v 1.21 2015/03/03 09:34:40 nonaka Exp $       */
 /*     OpenBSD: if_iwm.c,v 1.18 2015/02/11 01:12:42 brad Exp   */
 
 /*
@@ -105,7 +105,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.20 2015/03/03 09:27:35 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.21 2015/03/03 09:34:40 nonaka Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -3817,7 +3817,7 @@
 
        /* 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;



Home | Main Index | Thread Index | Old Index