Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Use the proper channel for some things.



details:   https://anonhg.NetBSD.org/src/rev/29d13f0e1938
branches:  trunk
changeset: 346433:29d13f0e1938
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jul 13 00:01:27 2016 +0000

description:
Use the proper channel for some things.
Remove debugging now that it all works.

diffstat:

 sys/dev/ic/rt2860.c |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (56 lines):

diff -r b449a3ca125c -r 29d13f0e1938 sys/dev/ic/rt2860.c
--- a/sys/dev/ic/rt2860.c       Tue Jul 12 23:53:18 2016 +0000
+++ b/sys/dev/ic/rt2860.c       Wed Jul 13 00:01:27 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rt2860.c,v 1.20 2016/07/08 01:24:53 christos Exp $     */
+/*     $NetBSD: rt2860.c,v 1.21 2016/07/13 00:01:27 christos Exp $     */
 /*     $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */
 /*     $FreeBSD: head/sys/dev/ral/rt2860.c 297793 2016-04-10 23:07:00Z pfg $ */
 
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.20 2016/07/08 01:24:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.21 2016/07/13 00:01:27 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -63,9 +63,6 @@
 
 #include <dev/pci/pcidevs.h>
 
-#ifndef RAL_DEBUG
-#define RAL_DEBUG
-#endif
 #ifdef RAL_DEBUG
 #define DPRINTF(x)     do { if (rt2860_debug > 0) printf x; } while (0)
 #define DPRINTFN(n, x) do { if (rt2860_debug >= (n)) printf x; } while (0)
@@ -1509,7 +1506,6 @@
        uint32_t r;
 
        r = RAL_READ(sc, RT2860_INT_STATUS);
-       DPRINTF(("intr %#x\n", r));
        if (__predict_false(r == 0xffffffff))
                return 0;       /* device likely went away */
        if (r == 0)
@@ -1684,8 +1680,8 @@
 
                tap->wt_flags = 0;
                tap->wt_rate = rt2860_rates[ridx].rate;
-               tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
-               tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
+               tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
+               tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
                tap->wt_hwqueue = qid;
                if (mcs & RT2860_PHY_SHPRE)
                        tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
@@ -3146,7 +3142,7 @@
 rt2860_rssi2dbm(struct rt2860_softc *sc, uint8_t rssi, uint8_t rxchain)
 {
        struct ieee80211com *ic = &sc->sc_ic;
-       struct ieee80211_channel *c = ic->ic_ibss_chan;
+       struct ieee80211_channel *c = ic->ic_curchan;
        int delta;
 
        if (IEEE80211_IS_CHAN_5GHZ(c)) {



Home | Main Index | Thread Index | Old Index