Return-path: Received: from mail-fx0-f217.google.com ([209.85.220.217]:65037 "EHLO mail-fx0-f217.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbZHSOyl convert rfc822-to-8bit (ORCPT ); Wed, 19 Aug 2009 10:54:41 -0400 Received: by fxm17 with SMTP id 17so3843475fxm.37 for ; Wed, 19 Aug 2009 07:54:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4A8C0B38.2020402@huijgen.tk> References: <69e28c910908181329r4b6b7cc8w3c9c0d79dda3730c@mail.gmail.com> <69e28c910908190428s46f3d25dnb2f2d8591f99618f@mail.gmail.com> <4A8BF35E.1090507@huijgen.tk> <1250687066.1067.25.camel@johannes.local> <69e28c910908190626s46fd0bfer5cc9dec9c5bb1c24@mail.gmail.com> <4A8C02D8.7080309@huijgen.tk> <69e28c910908190654v231d66c7k6a223f481f702c7c@mail.gmail.com> <4A8C056A.4050005@huijgen.tk> <69e28c910908190703h1ad7e98bqa4fe55a5fe7800e2@mail.gmail.com> <4A8C0B38.2020402@huijgen.tk> From: =?ISO-8859-1?Q?G=E1bor_Stefanik?= Date: Wed, 19 Aug 2009 16:54:21 +0200 Message-ID: <69e28c910908190754p4f96f2ddhec00300a1c287f5c@mail.gmail.com> Subject: Re: [ANN] b43 LP-PHY support (BCM4310/4312/4315) working (partially)! To: Mark Huijgen Cc: Johannes Berg , Larry Finger , Broadcom Wireless , linux-wireless Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: 2009/8/19 Mark Huijgen : > G?bor Stefanik wrote: >> 2009/8/19 Mark Huijgen : >> >>> G?bor Stefanik wrote: >>> >>>> 2009/8/19 Mark Huijgen : >>>> >>>> >>>>> G?bor Stefanik wrote: >>>>> >>>>> >>>>>> Mark, could you produce a dmesg output with the new firmware, patches >>>>>> applied, and channel set to 1? Post the output of dmesg after scanning >>>>>> & probably associating, if possible. (Scan/assoc may produce messages >>>>>> in dmesg.) >>>>>> >>>>>> >>>>>> >>>>> I tested this already, but with default chan set to 1, I cannot get the >>>>> interface up. >>>>> This is somewhere in my mail, but it got a bit messy after I noticed >>>>> that after >>>>> changing some of the code my modules got installed in another directory >>>>> (-dirty). >>>>> >>>>> I just restarted the notebook, but now the results are different again... >>>>> >>>>> New firmware, with patches applied and default channel 7: >>>>> [ ? 72.160057] b43-phy1: Loading firmware version 478.104 (2008-07-01 >>>>> 00:50:23) >>>>> [ ? 72.163484] b43-phy1 debug: RC calib: Failed to switch to channel 7, >>>>> error = -5 >>>>> [ ? 72.168100] b43-phy1 debug: Switch to init channel failed, error = -5. >>>>> >>>>> Recompile module with default chan 1, patches still applied and new >>>>> firmware, >>>>> # modprobe -r b43 && modprobe b43 verbose=3 && ifconfig wlan0 up >>>>> >>>>> [ ?430.259877] b43-phy2 debug: Switch to init channel failed, error = -5. >>>>> >>>>> Recompile again, but with default chan back to 7, still patched and >>>>> still new firmware. >>>>> So same as in first situation: >>>>> # modprobe -r b43 && modprobe b43 verbose=3 && ifconfig wlan0 up >>>>> >>>>> [ ?524.748062] b43-phy3 debug: Chip initialized >>>>> >>>>> And I can get my interface up and working! >>>>> >>>>> Without this procedure I have not been able to get a working chip. Seems >>>>> the partially >>>>> initialized state after each try, allows the next try to get a bit >>>>> further. And together with >>>>> the default channel switching between 1 and 7, I get a working chip, but >>>>> a chip that does >>>>> not seem to be able to find my AP thats on channel 1. >>>>> >>>>> If I now change default chan to 1 again, I am getting the same error as >>>>> in step 2 above. >>>>> I have not been able to get the interface up with default chan set to 1. >>>>> >>>>> Mark >>>>> >>>>> >>>>> >>>>> >>>> What do you see in dmesg after running a scan? >>>> >>>> >>> After step 2, interface cannot be brought up: >>> # iw dev wlan0 scan >>> command failed: Network is down (-100) >>> >>> No extra output in dmesg >>> >>> After step 3 (so with default chan 7 again), interface comes up and I >>> can scan: >>> # iw dev wlan0 scan >>> <> >>> >>> No extra output generated in dmesg. >>> >>> I must add that I do not have debugging messages enabled for any >>> mac80211 related options, only for b43 module. >>> >> >> That's not needed. >> >> However, try "iw dev wlan0 scan trigger". >> >> Also, try switching to all B/G channels manually. >> > To summarize, all cases with patches and new firmware: > case 1: cold boot with default channel 7, RC calib error and 'init > channel failed' error, > case 2: recompile+reload b43 with default channel 1, just 'init channel > failed' error, > case 3: recompile+reload b43 with default channel 7, works > > > You mean 'iw dev wlan0 set channel 1' for example? > > In case 2 (with default chan 1), ifconfig wlan0 gives error > "SIOCSIFFLAGS: Input/output error" > > # iw dev wlan0 set channel 1 > no output generated, also nothing in dmesg > > # iw dev wlan0 scan trigger > command failed: Network is down (-100) > nothing in dmesg. > > Both commands do not give any output in dmesg in case 3 either. > > Tried channel 1 up to 11, 12 and higher gives 'command failed: Invalid > argument (-22)', which is expected I think. Set your regulatory domain to something that allows higher channels (e.g. iw reg set JP - this one unlocks channels 1-14 (14 is CCK/802.11b only); or iw reg set HU - channels 1-13) to test channels 14 and up. Also, test this: Create a monitor interface (iw dev wlan0 interface add mon0 type monitor) Up the interface (ifconfig mon0 up) Set channel to 1 (iwconfig mon0 channel 1 or iw dev wlan0 set channel 1) Run tcpdump on the interface (tcpdump -i mon0). Try for other channel values as well. (You don't need to recreate the interface for each channel, just use the channel-setting command to switch the channel.) You should see packets on all channels. Another thing to try: add a printk to b43_lpphy_op_set_channel and print out new_channel. This will log all channel change requests (including automatic ones) to dmesg, which can be helpful. If you set your AP to channel 11, can you connect to it & use it as normal? > > > >> One more thing to try is create a monitor interface and run kismet on >> it. In addition, you can use aireplay-ng on the monitor interface to >> test TX. >> > Never done anything with monitor mode before, so when I have some time > I'll look into it. > -- Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)