From owner-freebsd-mobile@FreeBSD.ORG Tue Mar 24 18:59:57 2009 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9B081065674 for ; Tue, 24 Mar 2009 18:59:57 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-ew0-f171.google.com (mail-ew0-f171.google.com [209.85.219.171]) by mx1.freebsd.org (Postfix) with ESMTP id 23AD18FC24 for ; Tue, 24 Mar 2009 18:59:56 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by ewy19 with SMTP id 19so1943968ewy.43 for ; Tue, 24 Mar 2009 11:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=DGW4UTz0l4TONbzZsstYLwhqVlGBRB5B+CSsFa+r5ro=; b=buz8N5d1Zcyqv4AB1NOmSZ//lQbGeyCpYwjNfjecJ5sxJqx8umujJ0WwTxVANUUd63 e14Y0WQUe3T3uooHWjpm2BQo9azScIW9xgYxkjIhaYEpqKHXCFB0dov+EdVq2+SD55zj Bxj27lIE1XJahWuIdkyrWRPpDDxEK/ZqiRRLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ougjpFcYGbIHWzg3DOiQlPnu64CL1tlmjnadVo785Up2VjU7hWSOQpxjn/Sd1C3juL vHgyjzYrb6DYGqx4ThaAvMfBTsAxf/awWe3JxUNxT9xLBZUGPbikZbhx5HUkaEdF7yrg V3zNbBPn1pQDPM9ANb2VzHebybbELsztkbQ1I= MIME-Version: 1.0 Received: by 10.210.11.17 with SMTP id 17mr2221688ebk.7.1237921195803; Tue, 24 Mar 2009 11:59:55 -0700 (PDT) In-Reply-To: <49C91475.9080303@twilley.org> References: <49C7E0F8.9000701@twilley.org> <3a142e750903231441g184fa5d1r57515c77d01e6dd4@mail.gmail.com> <49C82A4B.5090108@twilley.org> <3a142e750903240022n10d8b8cdy3787cc6b423df3c8@mail.gmail.com> <49C91475.9080303@twilley.org> Date: Tue, 24 Mar 2009 19:59:55 +0100 Message-ID: <3a142e750903241159m57464eb7wd50a6e88fd1390c2@mail.gmail.com> From: "Paul B. Mahol" To: Jack Twilley Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-mobile@freebsd.org Subject: Re: RT2860 NDIS needs rate.bin, where is it? X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2009 18:59:58 -0000 On 3/24/09, Jack Twilley wrote: > Paul B. Mahol wrote: >> On 3/24/09, Jack Twilley wrote: >>> Paul B. Mahol wrote: >>>> On 3/23/09, Jack Twilley wrote: >>>>> NDIS finally works again in 8.0-CURRENT so I thought I'd try to get my >>>>> RT2860 wireless working. I built the rt2860_sys.ko using ndisgen and >>>>> copied rt2860.bin into /compat/ndis and kldloaded the new module. NDIS >>>>> complains that it can't open /compat/ndis/rate.bin with errno 2. I >>>>> don't have a rate.bin to give it, there wasn't one in the Windows >>>>> bundle >>>>> or the Linux one though it is referenced in the Linux driver source >>>>> code. I tried copying rt2860.bin to rate.bin but that didn't work. >>>>> >>>>> I tried starting wpa_supplicant anyway, and got this: >>>>> >>>>> Starting wpa_supplicant. >>>>> ioctl[SIOCG80211, op 98, len 32]: Invalid argument >>>>> ELOOP: remaining socket: sock=5 eloop_data=0x28407140 >>>>> user_data=0x2840e040 handler=0x8069f40 >>>>> /etc/rc.d/wpa_supplicant: WARNING: failed to start wpa_supplicant >>>> Please, tell me that you start wpa_supplicant with -Dndis flag. >>>> >>> I ran 'sh -x /etc/rc.d/wpa_supplicant start ndis0' to see how the script >>> was starting the program. Here is the original command line: >>> >>> /usr/sbin/wpa_supplicant -s -B -i ndis0 -c /etc/wpa_supplicant.conf -D >>> bsd -P /var/run/wpa_supplicant/ndis0.pid >>> >>> I replaced '-D bsd' with '-D ndis' and still got a return code of 255. >>> I double-checked to ensure the module was loaded, and adding '-dd' did >>> not increase the debug output. >>> >>> I also read the /etc/rc.d/wpa_supplicant script to see how it detected >>> whether or not to use '-D ndis'. Turns out it calls a function named >>> 'is_ndis_interface()' which checks a sysctl named >>> 'net.wlan.${1#wlan}.%parent' but there is no 'net.wlan.ndis0.%parent', >>> nor is there any 'net.wlan.ndis0' keys. There *is* 'net.ndis.0.%parent' >>> which is set to pci1 and 'net.ndis.0.%driver' which is set to ndis -- >>> the latter sounds like a possibly sensible test for '-D ndis' if you ask >>> me. >>> >>> Anyway, the fact that the sysctl wasn't present makes me think the >>> failure to load /compat/ndis/rate.bin might have caused 'ndis_attach()' >>> to not call 'ndis_create_sysctls()', or 'ndis_attach_pci()' to not call >>> 'ndis_attach()', or so on -- but I can't tell where 'NdisOpenFile()' >>> gets called so I'm not sure. >>> >>> Does this sound reasonable? What do you think? >> >> Probably, in my case net.wlan.0.%parent is ndis0 >> >> What is displayed on kldload and device attach on console? >> Try it with sysctl debug.ndis=1. >> >> > > Here is dmesg output from 'kldload rt2860_sys.ko' after running 'sysctl > debug.ndis=1': > > no match for ZwWriteFile > no match for ZwCreateFile > no match for ZwReadFile > ndis0: <802.11n Wireless LAN Card> mem 0xfbef0000-0xfbefffff irq 19 at > device0.0 on pci1 > ndis0: [ITHREAD] > ndis0: NDIS API version: 5.0 > NDIS: open file /compat/ndis/rate.bin failed: 2 > attach done. > halting done. > > /var/log/messages doesn't have anything new to add -- an unknown USB > device is detected but that's the camera so I'm not worried. Perhaps rate.bin is already in that firmware. But I dont understand why "dummy called" is not displayed. Either required functions are not implemented or already present one are wrongly implemented. What about of "ktrace kldload ./rt2860_sys.ko"? -- Paul