Date: Wed, 07 Sep 2011 18:10:25 +0800 From: Kevin Lo <kevlo@FreeBSD.org> To: Tz-Huan Huang <tzhuan@gmail.com> Cc: freebsd-current@FreeBSD.org Subject: Re: "Intel Centrino Advanced-N + WiMAX 6250" doesn't work Message-ID: <1315390225.3285.5.camel@esl.kevlo.org.kevlo.org> In-Reply-To: <CANSeK7wEK33PPTM4Qk3LXoHF%2B1MebyCGeZgCWodeqetx-mP%2BiA@mail.gmail.com> References: <CANSeK7wEK33PPTM4Qk3LXoHF%2B1MebyCGeZgCWodeqetx-mP%2BiA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-8DjMLoIOJUGcuHjd8u8v Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Tz-Huan Huang wrote: > Hi, > > I have a lenovo X201s with a "Intel Centrino Advanced-N + WiMAX 6250" bundled. > The device seems recognized as iwn0 correctly but it just doesn't work. > The command "ifconfig wlan0 up scan" return immediately and nothing showed. > > Is the device not supported, or do I miss something? > Any suggestion is welcome, thanks. > > Here is some information: > > $ uname -a > FreeBSD bud 9.0-BETA2 FreeBSD 9.0-BETA2 #2: Tue Sep 6 16:50:09 CST > 2011 root@bud:/usr/obj/usr/src/sys/BUD amd64 > > dmesg -a: > http://www.csie.ntu.edu.tw/~b90093/tmp/dmesg.txt > > rc.conf: > http://www.csie.ntu.edu.tw/~b90093/tmp/rc.conf > > kldstat -v > http://www.csie.ntu.edu.tw/~b90093/tmp/kldstat.txt Please try attached patch. It seems like OpenBSD added support for 6205, but I'm not sure if it works for 6250. > Tz-Huan Kevin --=-8DjMLoIOJUGcuHjd8u8v Content-Disposition: attachment; filename="patch-iwn" Content-Type: text/x-patch; name="patch-iwn"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: sys/dev/iwn/if_iwnreg.h =================================================================== --- sys/dev/iwn/if_iwnreg.h (revision 225433) +++ sys/dev/iwn/if_iwnreg.h (working copy) @@ -739,6 +739,8 @@ struct iwn5000_calib_elem { uint32_t enable; uint32_t start; +#define IWN5000_CALIB_DC (1 << 1) + uint32_t send; uint32_t apply; uint32_t reserved; Index: sys/dev/iwn/if_iwn.c =================================================================== --- sys/dev/iwn/if_iwn.c (revision 225433) +++ sys/dev/iwn/if_iwn.c (working copy) @@ -245,6 +245,7 @@ static int iwn_set_pslevel(struct iwn_softc *, int, int, int); static int iwn_send_btcoex(struct iwn_softc *); static int iwn_send_advanced_btcoex(struct iwn_softc *); +static int iwn5000_runtime_calib(struct iwn_softc *); static int iwn_config(struct iwn_softc *); static uint8_t *ieee80211_add_ssid(uint8_t *, const uint8_t *, u_int); static int iwn_scan(struct iwn_softc *); @@ -2594,6 +2595,14 @@ return; } + /* + * XXX Differential gain calibration makes the 6005 firmware + * crap out, so skip it for now. This effectively disables + * sensitivity tuning as well. + */ + if (sc->hw_type == IWN_HW_REV_TYPE_6005) + return; + if (calib->state == IWN_CALIB_STATE_ASSOC) iwn_collect_noise(sc, &stats->rx.general); else if (calib->state == IWN_CALIB_STATE_RUN) @@ -4995,6 +5004,19 @@ } static int +iwn5000_runtime_calib(struct iwn_softc *sc) +{ + struct iwn5000_calib_config cmd; + + memset(&cmd, 0, sizeof cmd); + cmd.ucode.once.enable = 0xffffffff; + cmd.ucode.once.start = IWN5000_CALIB_DC; + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: configuring runtime calibration\n", __func__); + return iwn_cmd(sc, IWN5000_CMD_CALIB_CONFIG, &cmd, sizeof(cmd), 0); +} + +static int iwn_config(struct iwn_softc *sc) { struct iwn_ops *ops = &sc->ops; @@ -5014,6 +5036,18 @@ } } + if (sc->hw_type == IWN_HW_REV_TYPE_6050 || + sc->hw_type == IWN_HW_REV_TYPE_6005) { + /* Configure runtime DC calibration. */ + error = iwn5000_runtime_calib(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not configure runtime calibration\n", + __func__); + return error; + } + } + /* Configure valid TX chains for >=5000 Series. */ if (sc->hw_type != IWN_HW_REV_TYPE_4965) { txmask = htole32(sc->txchainmask); --=-8DjMLoIOJUGcuHjd8u8v--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1315390225.3285.5.camel>