From owner-freebsd-current@FreeBSD.ORG Wed Sep 7 13:30:53 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A489106564A; Wed, 7 Sep 2011 13:30:53 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id F39928FC21; Wed, 7 Sep 2011 13:30:52 +0000 (UTC) Received: by fxe4 with SMTP id 4so778519fxe.13 for ; Wed, 07 Sep 2011 06:30:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.76.201 with SMTP id d9mr2048203fak.119.1315402251743; Wed, 07 Sep 2011 06:30:51 -0700 (PDT) Sender: bschmidt@techwires.net Received: by 10.223.73.202 with HTTP; Wed, 7 Sep 2011 06:30:51 -0700 (PDT) X-Originating-IP: [91.46.214.235] In-Reply-To: References: <1315390225.3285.5.camel@esl.kevlo.org.kevlo.org> Date: Wed, 7 Sep 2011 15:30:51 +0200 X-Google-Sender-Auth: 8G-IiV08VluXZORPwa5vQyCijOs Message-ID: From: Bernhard Schmidt To: Tz-Huan Huang Content-Type: text/plain; charset=ISO-8859-1 Cc: Kevin Lo , freebsd-current@freebsd.org Subject: Re: "Intel Centrino Advanced-N + WiMAX 6250" doesn't work X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 13:30:53 -0000 On Wed, Sep 7, 2011 at 15:11, Tz-Huan Huang wrote: > On Wed, Sep 7, 2011 at 20:34, Bernhard Schmidt wrote: >> On Wed, Sep 7, 2011 at 12:10, Kevin Lo wrote: >>> >>> Please try attached patch. It seems like OpenBSD added support >>> for 6205, but I'm not sure if it works for 6250. > > Okay, I am re-building the kernel now, > will report here if any news. > >> Worth a try, but I don't think it will make a difference. I had that >> code once (it should even be visible on the svn history) but removed >> it because it isn't required, the 6005 series devices work very well >> without it (I'm using a 6230 (6000g2b) daily) without issues. What is >> import though is which calibration results are sent to the runtime >> firmware, I suspect there might be an issue in >> iwn5000_rx_calib_results() around IWN5000_PHY_CALIB_DC. >> >> I remember that someone reported the 6250 devices working once, it >> might be worth going over the last revisions (there where some >> calibration related changes) and figure out which one broke it. > > Yes, this device works fine according to this post: > http://forums.freebsd.org/showthread.php?t=19839 > > I have scanned the source but it seems that the iwn sources changed a lot... Yeah, thanks, I start to remember.. Seems like I broke 6250 support by adding support for 6005. Point is, the DC calibration result generated by the init firmware is too large (saving calibration result code=8 len=3964, compare with other results..) to pass over to the runtime firmware, this is where it chokes. The solution is to not bother about it at all and let the runtime firmware do the calibration again, so no need to send anything. Basically, Kevin's patch is correct, it should also just remove handling of PHY_CALIB_DC in iwn5000_rx_calib_results(), ideally for all >= 6000 devices. Can you try this in addition to Kevin's patch? Index: if_iwn.c =================================================================== --- if_iwn.c (revision 225188) +++ if_iwn.c (working copy) @@ -2502,9 +2502,7 @@ iwn5000_rx_calib_results(struct iwn_softc *sc, str switch (calib->code) { case IWN5000_PHY_CALIB_DC: - if ((sc->sc_flags & IWN_FLAG_INTERNAL_PA) == 0 && - (sc->hw_type == IWN_HW_REV_TYPE_5150 || - sc->hw_type >= IWN_HW_REV_TYPE_6000)) + if (sc->hw_type == IWN_HW_REV_TYPE_5150) idx = 0; break; case IWN5000_PHY_CALIB_LO: Thanks -- Bernhard