Use the proper channel for some things.

Remove debugging now that it all works.
This commit is contained in:
christos 2016-07-13 00:01:27 +00:00
parent a0b044b4d6
commit 59d044e5b1

View File

@ -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.20 2016/07/08 01:24:53 christos Exp $")
#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, struct mbuf *m, struct ieee80211_node *ni)
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)) {