svn commit: r258082 - head/sys/dev/usb/wlan
Kevin Lo
kevlo at FreeBSD.org
Wed Nov 13 05:21:42 UTC 2013
Author: kevlo
Date: Wed Nov 13 05:21:41 2013
New Revision: 258082
URL: http://svnweb.freebsd.org/changeset/base/258082
Log:
- Use bit twiddling macro to set IEEE80211_MODE_11A
- On the RT3572 chipset, there's no need to configure BBP register 86
Modified:
head/sys/dev/usb/wlan/if_run.c
Modified: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- head/sys/dev/usb/wlan/if_run.c Wed Nov 13 04:31:27 2013 (r258081)
+++ head/sys/dev/usb/wlan/if_run.c Wed Nov 13 05:21:41 2013 (r258082)
@@ -568,7 +568,7 @@ run_attach(device_t self)
struct ieee80211com *ic;
struct ifnet *ifp;
uint32_t ver;
- int i, ntries, error;
+ int ntries, error;
uint8_t iface_index, bands;
device_set_usb_desc(self);
@@ -665,27 +665,11 @@ run_attach(device_t self)
bands = 0;
setbit(&bands, IEEE80211_MODE_11B);
setbit(&bands, IEEE80211_MODE_11G);
+ if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850 ||
+ sc->rf_rev == RT3070_RF_3052)
+ setbit(&bands, IEEE80211_MODE_11A);
ieee80211_init_channels(ic, NULL, &bands);
- /*
- * Do this by own because h/w supports
- * more channels than ieee80211_init_channels()
- */
- if (sc->rf_rev == RT2860_RF_2750 ||
- sc->rf_rev == RT2860_RF_2850 ||
- sc->rf_rev == RT3070_RF_3052) {
- /* set supported .11a rates */
- for (i = 14; i < nitems(rt2860_rf2850); i++) {
- uint8_t chan = rt2860_rf2850[i].chan;
- ic->ic_channels[ic->ic_nchans].ic_freq =
- ieee80211_ieee2mhz(chan, IEEE80211_CHAN_A);
- ic->ic_channels[ic->ic_nchans].ic_ieee = chan;
- ic->ic_channels[ic->ic_nchans].ic_flags = IEEE80211_CHAN_A;
- ic->ic_channels[ic->ic_nchans].ic_extieee = 0;
- ic->ic_nchans++;
- }
- }
-
ieee80211_ifattach(ic, sc->sc_bssid);
ic->ic_scan_start = run_scan_start;
@@ -3581,7 +3565,7 @@ run_select_chan_group(struct run_softc *
run_bbp_write(sc, 62, 0x37 - sc->lna[group]);
run_bbp_write(sc, 63, 0x37 - sc->lna[group]);
run_bbp_write(sc, 64, 0x37 - sc->lna[group]);
- if (sc->mac_ver < 0x5390)
+ if (sc->mac_ver < 0x3572)
run_bbp_write(sc, 86, 0x00);
if (group == 0) {
More information about the svn-src-all
mailing list