Date: Sat, 14 May 2016 23:41:28 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299792 - head/sys/dev/bwn Message-ID: <201605142341.u4ENfSeU088068@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sat May 14 23:41:28 2016 New Revision: 299792 URL: https://svnweb.freebsd.org/changeset/base/299792 Log: [bwn] Explicitly only work for SIBA parts; add some placeholder debugging. Set phy-full-init always to 1 for now; PHY-N supports being able to do partial init for things like fast channel changes but I'm going to ignore it all. Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Sat May 14 23:38:51 2016 (r299791) +++ head/sys/dev/bwn/if_bwn.c Sat May 14 23:41:28 2016 (r299792) @@ -1149,8 +1149,27 @@ bwn_attach_core(struct bwn_mac *mac) if (error) goto fail; - have_a = (high & BWN_TGSHIGH_HAVE_5GHZ) ? 1 : 0; - have_bg = (high & BWN_TGSHIGH_HAVE_2GHZ) ? 1 : 0; + /* XXX need bhnd */ + if (bwn_is_bus_siba(mac)) { + have_a = (high & BWN_TGSHIGH_HAVE_5GHZ) ? 1 : 0; + have_bg = (high & BWN_TGSHIGH_HAVE_2GHZ) ? 1 : 0; + } else { + device_printf(sc->sc_dev, "%s: not siba; bailing\n", __func__); + error = ENXIO; + goto fail; + } + +#if 0 + device_printf(sc->sc_dev, "%s: high=0x%08x, have_a=%d, have_bg=%d," + " deviceid=0x%04x, siba_deviceid=0x%04x\n", + __func__, + high, + have_a, + have_bg, + siba_get_pci_device(sc->sc_dev), + siba_get_chipid(sc->sc_dev)); +#endif + if (siba_get_pci_device(sc->sc_dev) != 0x4312 && siba_get_pci_device(sc->sc_dev) != 0x4319 && siba_get_pci_device(sc->sc_dev) != 0x4324) { @@ -1335,6 +1354,13 @@ bwn_phy_getinfo(struct bwn_mac *mac, int phy->rf_rev = (tmp & 0xf0000000) >> 28; phy->rf_ver = (tmp & 0x0ffff000) >> 12; phy->rf_manuf = (tmp & 0x00000fff); + + /* + * For now, just always do full init (ie, what bwn has traditionally + * done) + */ + phy->phy_do_full_init = 1; + if (phy->rf_manuf != 0x17f) /* 0x17f is broadcom */ goto unsupradio; if ((phy->type == BWN_PHYTYPE_A && (phy->rf_ver != 0x2060 || @@ -1416,6 +1442,11 @@ bwn_setup_channels(struct bwn_mac *mac, memset(ic->ic_channels, 0, sizeof(ic->ic_channels)); ic->ic_nchans = 0; + DPRINTF(sc, BWN_DEBUG_EEPROM, "%s: called; bg=%d, a=%d\n", + __func__, + have_bg, + have_a); + if (have_bg) bwn_addchannels(ic->ic_channels, IEEE80211_CHAN_MAX, &ic->ic_nchans, &bwn_chantable_bg, IEEE80211_CHAN_G);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605142341.u4ENfSeU088068>