Module Name:    src
Committed By:   christos
Date:           Wed Jul 13 00:01:27 UTC 2016

Modified Files:
        src/sys/dev/ic: rt2860.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ic/rt2860.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/rt2860.c
diff -u src/sys/dev/ic/rt2860.c:1.20 src/sys/dev/ic/rt2860.c:1.21
--- src/sys/dev/ic/rt2860.c:1.20	Thu Jul  7 21:24:53 2016
+++ src/sys/dev/ic/rt2860.c	Tue Jul 12 20:01:27 2016
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1
 
 #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 @@ rt2860_intr(void *arg)
 	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 @@ rt2860_tx(struct rt2860_softc *sc, struc
 
 		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 @@ static int8_t
 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)) {

Reply via email to