From owner-freebsd-wireless@FreeBSD.ORG Tue Jan 27 01:43:22 2015 Return-Path: Delivered-To: wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7385CD5 for ; Tue, 27 Jan 2015 01:43:22 +0000 (UTC) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B5B83C6 for ; Tue, 27 Jan 2015 01:43:22 +0000 (UTC) Received: by mail-ig0-f171.google.com with SMTP id r10so1736479igi.4 for ; Mon, 26 Jan 2015 17:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=F7mp0waW855myrteosexKA5LkO8wYl0bv2SuqZPvzFE=; b=ixIZ9XHM5jc3+v4ZOHiMH3gpJx6NhhEi9/ugcnyT1x7JA7WXMjZQUZ0Vm1JxhMKGPs Mk2TnfWwoyfwngVeYvyvEGVhvXbExheXwWJ1qkh9txqCbRF81SyYAPgJ/LfeeSkO7XtM f0kE8kkcsj8pXbuo0npG6qzTXvHr9j03fGCn2wj2MCQ7RVbtKjYa7bABUPzuVFh04/Ow iX9+oQg7lOufQFQpkJvEbnGBh1bS1gBcL2LcjKCJIBMXtvMrdM3/8MS/myNI4Id9/q6g vaWR5PMnFcua6bl6w8FZ1jPzesIUhjXd5TJiWDBZZt8mjSSU3CUFKkn5AzNcaML08TNW AFMg== MIME-Version: 1.0 X-Received: by 10.107.136.158 with SMTP id s30mr21279824ioi.8.1422323002069; Mon, 26 Jan 2015 17:43:22 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Mon, 26 Jan 2015 17:43:21 -0800 (PST) In-Reply-To: <54C2B2F7.3060308@att.net> References: <284932058.303050.1420924294011.JavaMail.yahoo@jws10628.mail.bf1.yahoo.com> <54C2B2F7.3060308@att.net> Date: Mon, 26 Jan 2015 17:43:21 -0800 X-Google-Sender-Auth: 9Qc9cMqQutETG5_UknRVHprbGDE Message-ID: Subject: Re: Atheros AR9565 detected, not working From: Adrian Chadd To: Anthony Jenkins Content-Type: text/plain; charset=UTF-8 Cc: Anthony Jenkins , "wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 01:43:22 -0000 On 23 January 2015 at 12:45, Anthony Jenkins wrote: > Here's a patch that works on my laptop's AR9565 - it just allows GPIO BIT_11 > accesses. No idea why that works; I thought I discovered BIT_8 was the > rfkill bit. I tried allowing both BIT_11 /and/ BIT_8, but that doesn't work > (wpa_supplicant(8) can never authenticate). May dig further, but I'm kinda > swamped with stuff. I'm glad you dug this far! > I can conditionally allow BIT_11 GPIOs if the device is an AR9565... should > I do that? I think we should just kill the check entirely for now. I'll go look at doing that soon. > Why/how does the Atheros driver emit invalid GPIO bit controls for a device? > In other words, if my Atheros 123456 chip wants to do XXX, how does that > translate to a GPIO bit access that needs to be blocked in the low-level > GPIO functions? Yet another way to put it, what's that blocking logic in > ar9300_gpio.c there for? Well, because upper layer routines may ask for GPIO pins to do things (like configure LEDs, antenna switches, etc.) It's not just the HAL that's asking for GPIO assignments. It's not invalid - it's that some chips will glue other things into GPIO lines. Things like external low noise RX amplifiers, high power TX amplifiers, etc. -adrian