From owner-freebsd-wireless@FreeBSD.ORG Sun Jun 2 11:50:00 2013 Return-Path: Delivered-To: FreeBSD-wireless@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8C070B94 for ; Sun, 2 Jun 2013 11:50:00 +0000 (UTC) (envelope-from w8hdkim@gmail.com) Received: from mail-qa0-x235.google.com (mail-qa0-x235.google.com [IPv6:2607:f8b0:400d:c00::235]) by mx1.freebsd.org (Postfix) with ESMTP id 56B441FC4 for ; Sun, 2 Jun 2013 11:49:57 +0000 (UTC) Received: by mail-qa0-f53.google.com with SMTP id bs12so1296239qab.19 for ; Sun, 02 Jun 2013 04:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=970pW1JZclEJsGDgITo4nRW358wihU+n0c0UsNK2Nco=; b=zLtC57VvdiUh53tN6fynqBy8qNg2xAZ0IRZAmED61HxLN2k4BySm6QVAm/QuQmDEw+ FPQDk4asJFu38ACTHcyb6kQTh0JaQ//GscDGX8agIYmIUznj7+SO9Xwtg/SnRzijrCWv QkMNXhNe8+9l8VHbzqnhje6SRH4aOMeZwQJngubBqYKf6wJXJ1OXKGrwPT9RplzfeVGP ixbR5jZrooGn99ASdKlElWITVBiDOkf+6AIhWORCkn6Bh76BywOcdhkocLaTX+f8RJhj 9bmAKF5oR3Qph21EhseL6Uc2PNBD6eB9HzQiZLA23ope7WQ0+80NuBwHI11GTqn+AMX5 nFGA== MIME-Version: 1.0 X-Received: by 10.49.16.42 with SMTP id c10mr17103175qed.33.1370173796587; Sun, 02 Jun 2013 04:49:56 -0700 (PDT) Received: by 10.49.63.103 with HTTP; Sun, 2 Jun 2013 04:49:56 -0700 (PDT) Date: Sun, 2 Jun 2013 07:49:56 -0400 Message-ID: Subject: panic: ath_legacy_tx_dma_restart: Q3: called with PUTRUNNING=1 From: Kim Culhan To: FreeBSD-wireless@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 02 Jun 2013 11:50:00 -0000 Been seeing panics as in the Subject for a few weeks. Now running (and seeing the panics) with r251078M. Please let me know if additional info is needed. thanks -kim From owner-freebsd-wireless@FreeBSD.ORG Sun Jun 2 11:58:21 2013 Return-Path: Delivered-To: FreeBSD-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5FBE4D4A for ; Sun, 2 Jun 2013 11:58:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x22c.google.com (mail-qc0-x22c.google.com [IPv6:2607:f8b0:400d:c01::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 27EAC1FF4 for ; Sun, 2 Jun 2013 11:58:17 +0000 (UTC) Received: by mail-qc0-f172.google.com with SMTP id z1so1661920qcx.3 for ; Sun, 02 Jun 2013 04:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=MjAnPDoRQHOIkZ67J+p1/kK3fx+bNxB4AVx3GnMeDhE=; b=Z7K5+JgYMZD8sKyK/7tA2L6EFo7H1DYg+Nsmurj9d3Qv//+P7WwrjTxpjWicnscNcz dOI264bxAE2n5yzAhvgc5yno5nbnKCJnmXe4AjBwaHLMC/E5y7iAG9jUZ/JiaNtpJ3pi A3JHMGpLUdK77WPTofjPmXLRZdh3pSjooz+kwfajr6fjD/zDJzkJbTmLccNLqW7/De0z mSZGUKiKlXfEoHRULCi2mNtUkUkw+GqgGbc0RCUoxrAJ69+nB5DnIxJ9JSUzM8dq7fkJ 99+YAwNNytC2u/puOTraMRfYpe7wbeOOkvEKvJFI9RtQ1jLDyrqJLvj/GJtMVPm/vFmX mb2w== MIME-Version: 1.0 X-Received: by 10.224.172.1 with SMTP id j1mr15024723qaz.15.1370174297487; Sun, 02 Jun 2013 04:58:17 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Sun, 2 Jun 2013 04:58:17 -0700 (PDT) In-Reply-To: References: Date: Sun, 2 Jun 2013 04:58:17 -0700 X-Google-Sender-Auth: sm4aCnKzBhTRTgXbBEj_WUq_2jk Message-ID: Subject: Re: panic: ath_legacy_tx_dma_restart: Q3: called with PUTRUNNING=1 From: Adrian Chadd To: Kim Culhan Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 02 Jun 2013 11:58:21 -0000 hi, Can you please provide the backtrace? thanks, adrian On 2 June 2013 04:49, Kim Culhan wrote: > Been seeing panics as in the Subject for a few weeks. > > Now running (and seeing the panics) with r251078M. > > Please let me know if additional info is needed. > > thanks > -kim > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Sun Jun 2 16:59:11 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C67D659A for ; Sun, 2 Jun 2013 16:59:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-f44.google.com (mail-qe0-f44.google.com [209.85.128.44]) by mx1.freebsd.org (Postfix) with ESMTP id 905FC1001 for ; Sun, 2 Jun 2013 16:59:11 +0000 (UTC) Received: by mail-qe0-f44.google.com with SMTP id 6so1901507qeb.3 for ; Sun, 02 Jun 2013 09:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=U1o6d6lMh9Ah4Hv1ZCl9WP3YSt6v9HtWcwEGDxnDFAg=; b=WaCHh0LVr9f3ES03QV5BFCSG2OU3u74A3KYSeRXnYFNWVUdkPUX+YtzcI7UBuIrfmC /E6Wu27QNianYj96m/h3zttWpTiOLwDTmbGhYTFMZMX3daGaIlHyow4mUrHZ83qzfZp7 1+tBS0lQIoOw0Ugn+Zx7oMeFYUCI1fv1kK00lp+YSO589lJYSdvY3w7cleewt1CN62rG l0QgtCeQW/AHIaBerNo/hnrMAOA3Se9P1gM9KjdMWJG4ZhK2+mIAb18i4xJCyVd7SF0n mkyhCLTbdW2n8uuK64+aQ1P8Z4e0nyW3MfljhLnM008zpKGylbriT1escinZDpNslwWX 3nIA== MIME-Version: 1.0 X-Received: by 10.49.37.9 with SMTP id u9mr17723811qej.57.1370192345546; Sun, 02 Jun 2013 09:59:05 -0700 (PDT) Received: by 10.224.71.12 with HTTP; Sun, 2 Jun 2013 09:59:05 -0700 (PDT) In-Reply-To: References: Date: Sun, 2 Jun 2013 09:59:05 -0700 Message-ID: Subject: Re: Atheros AR5B22 WLAN+Bluetooth support on FreeBSD From: Adrian Chadd To: Miguel Clara Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 02 Jun 2013 16:59:11 -0000 Hi, It's supported in -HEAD. Bluetooth may or may not work. I've not sat down and focused on that, sorry. adrian On 2 June 2013 08:00, Miguel Clara wrote: > Hi, > > Sorry for the direct mail, but I not sure about the correct steps to > take when a driver is missing... if there a mailling list I should > contact first please do tell me and ignore the rest of the message, I > understand you probably have much important things to do. > > In any case there's no arm in trying... > > I recently bought a Acer S3 Ultrabook, the machine does not have a LAN > port so Wireless support is really important in this module, this > seams to be common in other Ultrabooks... > > Anyway the model of the wifi card is as stated in the subject Atheros AR5B22. > From what I read in wiki.freebsd.org/dev/ath(4) this device doesn't > have support yet, and I'm wondering if it ever will? > > pciconf -lv show the following output: > > none2@pci0:2:0:0: class=0x028000 card=0xe052105b chip=0x0034168c > rev=0x01 hdr=0x00 > vendor = 'Atheros Communications Inc.' > class = network > > Not sure if any additional info is needed. > > Thanks From owner-freebsd-wireless@FreeBSD.ORG Sun Jun 2 17:18:58 2013 Return-Path: Delivered-To: FreeBSD-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3BB38FEB for ; Sun, 2 Jun 2013 17:18:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x22d.google.com (mail-qc0-x22d.google.com [IPv6:2607:f8b0:400d:c01::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 044331091 for ; Sun, 2 Jun 2013 17:18:57 +0000 (UTC) Received: by mail-qc0-f173.google.com with SMTP id c11so1711361qcv.4 for ; Sun, 02 Jun 2013 10:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=HCTnEAEwDlrRDxkbZ/o4m4dU1mTZUtkQpOht1Lcx/ks=; b=r2QhTOFUMQN85mRHopgqtdCD48yQ42NzrRHbZK+T6yNYqZ/a8O/4TkYUuprDRTYi4x Q/UQ9tEvrA4dKT6T9KW6l6XCmxchlhFlv48Abvz4tzqXKJwgyjJDHn/PpjqSc7Bd9xjf lgfx348brJKfelVEsdME5jtSJGbBDpnxpHK17N/6nRdBpfM9N9FcvBDiy8Dne+4gvP75 IYNzPSs8n3/U8fUj3O9GPqA9R5ARzrEoFfZp4s4F7INa9YyDt6LSACnGO+S80scu3EFA 1+MLDBFIT3Oo93OAlisr4qH1D/39K4PpxH6zzfRTpjwpdIeUdSwxurU7t5ITn5lGPN8v z7bg== MIME-Version: 1.0 X-Received: by 10.229.149.14 with SMTP id r14mr3596578qcv.59.1370193537511; Sun, 02 Jun 2013 10:18:57 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Sun, 2 Jun 2013 10:18:57 -0700 (PDT) In-Reply-To: References: Date: Sun, 2 Jun 2013 10:18:57 -0700 X-Google-Sender-Auth: 9qFuiQ_SdRxrLL8YZ_mb2FczNwU Message-ID: Subject: Re: panic: ath_legacy_tx_dma_restart: Q3: called with PUTRUNNING=1 From: Adrian Chadd To: Kim Culhan Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 02 Jun 2013 17:18:58 -0000 Hi, So this is yet another instance of the MAC being tickled slightly wrong/racy, which could lead to hardware lockups or general craziness. It's happening during a stuck beacon whilst in AP mode. I'll go and review the transmit/receive/reset path again and ensure it's all shut down right during this reset. Thanks! adrian On 2 June 2013 04:49, Kim Culhan wrote: > Been seeing panics as in the Subject for a few weeks. > > Now running (and seeing the panics) with r251078M. > > Please let me know if additional info is needed. > > thanks > -kim > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Sun Jun 2 17:19:18 2013 Return-Path: Delivered-To: FreeBSD-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 44A2D6A for ; Sun, 2 Jun 2013 17:19:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x232.google.com (mail-qc0-x232.google.com [IPv6:2607:f8b0:400d:c01::232]) by mx1.freebsd.org (Postfix) with ESMTP id 0C8F21094 for ; Sun, 2 Jun 2013 17:19:17 +0000 (UTC) Received: by mail-qc0-f178.google.com with SMTP id l11so1741525qcy.9 for ; Sun, 02 Jun 2013 10:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=pdPx0VdpSM8NPEx/8mLxQm9ogK4yGH6ZxTK2PkWXO5U=; b=TwBLBb9mwkSB9KmYgojDTOzT8g+pOK/NNujGXq+K4NU0lhw6wSavjJlAiiNsGLMfIv /rctVJrfZONkRO8A1PlHHZ2G+yWvd0/PbRz+R9K3H955Ydqzqvc7QEAiRj+Bl+6LhSXf wJMZzvO0xVLjsj5haG2iqgkKx3KZlpwZravBgNtSokalmFqZ7zJwEs//VsbQheZTN/0r rkFDNpOM5AP/drK8HCUUmy8gyyNz6wPAYydTRtOODk+HqD/J7jJeZlbDswP23NNROsYq IdCJ+v5W/8szxk9RSdcM5bPvO+wKFnkNFQ0NQbygXK6PLpgEi5nuqu5iCibL3I7jYk2y 7iNw== MIME-Version: 1.0 X-Received: by 10.229.206.197 with SMTP id fv5mr6513220qcb.60.1370193557643; Sun, 02 Jun 2013 10:19:17 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Sun, 2 Jun 2013 10:19:17 -0700 (PDT) In-Reply-To: References: Date: Sun, 2 Jun 2013 10:19:17 -0700 X-Google-Sender-Auth: Cu6lNuPt7wF1a5rND9xckzJiXkA Message-ID: Subject: Re: panic: ath_legacy_tx_dma_restart: Q3: called with PUTRUNNING=1 From: Adrian Chadd To: Kim Culhan Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 02 Jun 2013 17:19:18 -0000 Oh, and please file a PR. With that core.txt file. It's fine. adrian On 2 June 2013 10:18, Adrian Chadd wrote: > Hi, > > So this is yet another instance of the MAC being tickled slightly > wrong/racy, which could lead to hardware lockups or general craziness. > > It's happening during a stuck beacon whilst in AP mode. > > I'll go and review the transmit/receive/reset path again and ensure > it's all shut down right during this reset. > > Thanks! > > > adrian > > On 2 June 2013 04:49, Kim Culhan wrote: >> Been seeing panics as in the Subject for a few weeks. >> >> Now running (and seeing the panics) with r251078M. >> >> Please let me know if additional info is needed. >> >> thanks >> -kim >> _______________________________________________ >> freebsd-wireless@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless >> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Sun Jun 2 22:26:05 2013 Return-Path: Delivered-To: FreeBSD-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D80223A9 for ; Sun, 2 Jun 2013 22:26:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x236.google.com (mail-qc0-x236.google.com [IPv6:2607:f8b0:400d:c01::236]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9551B17 for ; Sun, 2 Jun 2013 22:26:05 +0000 (UTC) Received: by mail-qc0-f182.google.com with SMTP id n1so1811238qcw.13 for ; Sun, 02 Jun 2013 15:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=lQtdO+w5fB6Z0MQw7T8dnrD7vjEEBH41pY7ztSp0hpM=; b=VIvcPgyAygQhpmK0jkH/VXU0zW+qr+j7rC/cJaa7iBSIgvQh7SoxYhlH6BdjhgKDlW mDdQU9H9/clvgLsq4K2wCUbSlWyFzvwEf46QPCNNmiACpx1FZxpqtxwxs8Ero96SilIf 21CozJZ1PM6dZ9PQhJWgJxAc8NLhxlmtPOxHxzvgyG8vYVSmJ2/VazpAKU2aSTMvYAnj a0aaW2cA9XjIocyyhul9adrh7Tgu3JkfgM+i6lvq22U9M71pY4KuVYZbIXVDaB8nufaW lY+3rNatRwYjnn5N/C4f0LuhRVpp7aTttUbXH+I4+nJLWWC0ZY69s1Ixa7x3AigA9MPI P1uw== MIME-Version: 1.0 X-Received: by 10.49.104.37 with SMTP id gb5mr19182340qeb.41.1370211965193; Sun, 02 Jun 2013 15:26:05 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Sun, 2 Jun 2013 15:26:05 -0700 (PDT) In-Reply-To: References: Date: Sun, 2 Jun 2013 15:26:05 -0700 X-Google-Sender-Auth: EtRhHXuVis4QBGQivGjjCQCzGGc Message-ID: Subject: Re: panic: ath_legacy_tx_dma_restart: Q3: called with PUTRUNNING=1 From: Adrian Chadd To: Kim Culhan Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 02 Jun 2013 22:26:05 -0000 On 2 June 2013 04:49, Kim Culhan wrote: > Been seeing panics as in the Subject for a few weeks. > > Now running (and seeing the panics) with r251078M. > > Please let me know if additional info is needed. So, just to brain dump what the story is here. I changed the TX DMA code to implement exactly what the hardware guys want - I touch TxDP once, then I just use the link pointer in the last descriptor in the list to restart DMA. This fix is designed to catch if DMA is being restarted _after_ we've already started DMA and written a TxDP to the hardware. So, either: * I've screwed up the stuck beacon reset path and the hardware isn't being fully stopped before DMA is restarted (which I've done some simple testing of; it doesn't seem like that); * There's some parallel transmission going on that's managed to queue a frame to the transmit queue _and_ start DMA before the reset has completed. Now, in days gone past (read pre FreeBSD-10) this kind of stuff would happen all the time and well, it may explain a lot of why things can get very unhappy. I'm trying to eliminate these, which means adding KASSERT()s to the kernel as I find conditions that must not occur, and .. Kim found one. So I'll go chase this one down. Thanks Kim! Adrian From owner-freebsd-wireless@FreeBSD.ORG Sun Jun 2 22:31:26 2013 Return-Path: Delivered-To: FreeBSD-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 23EA84CC for ; Sun, 2 Jun 2013 22:31:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x235.google.com (mail-qc0-x235.google.com [IPv6:2607:f8b0:400d:c01::235]) by mx1.freebsd.org (Postfix) with ESMTP id DDFFA1B3F for ; Sun, 2 Jun 2013 22:31:25 +0000 (UTC) Received: by mail-qc0-f181.google.com with SMTP id u11so1818216qcx.12 for ; Sun, 02 Jun 2013 15:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=aahPozaZ8NraYPniYsaRY5ngvB2E3Nqz9u8BUmZdf+Q=; b=vqSJ6szPNXnKKjGZAgHjQgUkQJF7fzYiqTAqmQo6PqwIjHIky5gKji0S8kJUGjVuPv X6qjP2QdxtRfhzWnbxAt79zOIQYoPegnn907uI59VEjynmYWgtJ/a14x8AOJsIEwdi5s 93Gi/ot35d0shgoIarzg6v6u/FLztNjscT4aLpHcF1iXvigj4NYDIK36Hk7jRSBAVip/ JFsCsMdYWBBJZYPCkoI7WYqxvGMbizcRQ51RIX3WusaUsKckhyA+MjDb/j77QrXbFxat Slv8a4dYJwQYa2PmAPI69cHN7WoYjhYUCJQJ0tSCSxnHzpAugjiULl5MQMIOObPUy3EK xy7A== MIME-Version: 1.0 X-Received: by 10.49.38.169 with SMTP id h9mr18684579qek.54.1370212285366; Sun, 02 Jun 2013 15:31:25 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Sun, 2 Jun 2013 15:31:25 -0700 (PDT) In-Reply-To: References: Date: Sun, 2 Jun 2013 15:31:25 -0700 X-Google-Sender-Auth: 0q6Q6JcjXEDItvY9_4602njx7jI Message-ID: Subject: Re: panic: ath_legacy_tx_dma_restart: Q3: called with PUTRUNNING=1 From: Adrian Chadd To: Kim Culhan Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 02 Jun 2013 22:31:26 -0000 .. and stupidly, my reset code does this: * wait for tx/rx to finish * bump reset counter rather than what it should be doing, which is: * bump reset counter * wait for tx/rx to finish because TX will continue if the reset flag isn't set. And I bet that's what is going on. Thanks for pointing this out Kim! I'll add this to the PR you create and push out a fix to HEAD for you to try ASAP. Adrian On 2 June 2013 15:26, Adrian Chadd wrote: > On 2 June 2013 04:49, Kim Culhan wrote: >> Been seeing panics as in the Subject for a few weeks. >> >> Now running (and seeing the panics) with r251078M. >> >> Please let me know if additional info is needed. > > So, just to brain dump what the story is here. > > I changed the TX DMA code to implement exactly what the hardware guys > want - I touch TxDP once, then I just use the link pointer in the last > descriptor in the list to restart DMA. > > This fix is designed to catch if DMA is being restarted _after_ we've > already started DMA and written a TxDP to the hardware. > > So, either: > > * I've screwed up the stuck beacon reset path and the hardware isn't > being fully stopped before DMA is restarted (which I've done some > simple testing of; it doesn't seem like that); > * There's some parallel transmission going on that's managed to queue > a frame to the transmit queue _and_ start DMA before the reset has > completed. > > Now, in days gone past (read pre FreeBSD-10) this kind of stuff would > happen all the time and well, it may explain a lot of why things can > get very unhappy. I'm trying to eliminate these, which means adding > KASSERT()s to the kernel as I find conditions that must not occur, and > .. Kim found one. > > So I'll go chase this one down. > > Thanks Kim! > > > > Adrian From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 3 02:43:22 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 63AFA424 for ; Mon, 3 Jun 2013 02:43:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qa0-x22c.google.com (mail-qa0-x22c.google.com [IPv6:2607:f8b0:400d:c00::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E50711B3 for ; Mon, 3 Jun 2013 02:43:22 +0000 (UTC) Received: by mail-qa0-f44.google.com with SMTP id hu16so1549704qab.3 for ; Sun, 02 Jun 2013 19:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=8a+YAPigdvQEpCL30iIkrbuE2loDkhTkVi7jEIx9FN8=; b=b5/GORfkNufl1ygy628e3GKDxepEz1N2qkkqvWuEXwOqLFVYhBVH1JW+tU1KGbQGCM rHjHI9SIFLPZbRiwvRbJqazkt6PNkAWnuiVAiccHglfpnfj1DoTdbQMS/euaAUErbp4c P5Qxi9gfMWjdbpQiiAtMdWRCm0iO1hEi15zdgtmaksxnZoBG2yqboOTNRFDX/7thwlwC /nBo8ozXZ/ngf55wlFoavsQSJKI8CJ8XBzdT++j6Yt0/bXB8MIfFVhPnnUhFxZm/OHhq GhB1Ter6mbg3W4jgW9y5/L1KDpcrtc/E7tXvUCtxFATRSNJewhFzgo4EWTZ9Uzd+Pr3G pvmQ== MIME-Version: 1.0 X-Received: by 10.229.172.138 with SMTP id l10mr174823qcz.25.1370227401748; Sun, 02 Jun 2013 19:43:21 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Sun, 2 Jun 2013 19:43:21 -0700 (PDT) Date: Sun, 2 Jun 2013 19:43:21 -0700 X-Google-Sender-Auth: trEoTBQ1PQk0ObIBJGKkiF9LRlQ Message-ID: Subject: playing with 802.11p / DMCA-86P2 From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 03 Jun 2013 02:43:22 -0000 So Unex gave me a couple of their 802.11p NICs to play with. http://www.unex.com.tw/product/dcma-86p2 It's a NIC specifically designed for the 5.9GHz band for 802.11p deployments. Now, the NIC probes and detects fine under FreeBSD. The main issue is the lack of regulatory information for said NIC. It's calibrated for 5.8-5.9GHz; it likely will work on other 5GHz channels but: * there's lots of filtering on the front end of this thing, so it's highly attenuated outside of the 11p frequencies; * the power calibration curves for transmit power control are _only_ for 5.8/5.9GHz. So to bring this up: * I have to add a new SKU for this particular NIC, as it comes up as regdomain/SKU 0x0 (ie, they didn't bother programming in one. Grr.) * I have to add a new regulatory domain entry for it, specifically to allow 5.8/5.9GHz operation. * We have to figure out which regulatory domains these cards are actually ok to use, and what the maximum transmit power is for each. But if people want to tinker with 802.11p and have the relevant licencing to do so, they will mostly work out of the box. adrian From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 3 11:06:54 2013 Return-Path: Delivered-To: freebsd-wireless@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C51A9605 for ; Mon, 3 Jun 2013 11:06:54 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id B48E713CC for ; Mon, 3 Jun 2013 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r53B6sgf015217 for ; Mon, 3 Jun 2013 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r53B6s47015215 for freebsd-wireless@FreeBSD.org; Mon, 3 Jun 2013 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 3 Jun 2013 11:06:54 GMT Message-Id: <201306031106.r53B6s47015215@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-wireless@FreeBSD.org Subject: Current problem reports assigned to freebsd-wireless@FreeBSD.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 03 Jun 2013 11:06:54 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/178986 wireless [ath] Change mac address of ath(4) is not reflected wh o kern/178492 wireless [ath] ath0 (AR9287) panic o kern/178491 wireless [ath] ath0 (AR9287) stuck beacon o kern/178477 wireless [ath] missed beacon / soft reset in STA mode results i o kern/178470 wireless [panic][ath] bss vap can and does change o kern/178411 wireless [ral] [panic] FreeBSD kernel crash in rt2860 o kern/178379 wireless [net80211] [ath] WPA rekey on the STA side fails when o kern/178378 wireless [net80211] crypto state isn't reset during a reassocia o kern/178263 wireless [ath] review the use of ic_freq / ic_ieee / ic_flags / o kern/177847 wireless [ath] With TPC enabled, TX power values aren't clamped o kern/177846 wireless [ath] [net80211] net80211 TX power limit isn't correct o conf/177688 wireless WiFi regodmains information is inconsistent between "e o kern/177530 wireless [ath] ath driver isn't 32 bit int clean o kern/177465 wireless [iwn] 20%-100% packet loss with iwn driver o kern/177451 wireless [ieee80211] page fault in ieee80211_tx_mgt_timeout o kern/176238 wireless [ath] [patch] Correct buffer size calculation and simp o kern/176201 wireless [net80211] [patch] 11n station includes unrelated ht p o kern/176104 wireless [iwn] iwn0: iwn_intr: fatal firmware error o kern/175870 wireless [iwn] /etc/rc.d/netif restart cause system crash o kern/175722 wireless [ath]lot of bad seriesx hwrate in kernel messages o kern/175446 wireless [ath] high volumes of PHY errors lead to BB/MAC hangs o kern/175227 wireless [ath] beacon timers aren't necessarily reprogrammed af o kern/175183 wireless [iwn] iwn(4) becomes unresponsive during initial confi o kern/175053 wireless [iwn] iwn firmware error on 9-stable with Ultimate-N 6 o kern/174891 wireless [ieee80211] struct ieee80211_node is freed during acti o kern/174722 wireless [wlan] can't use channel 12 and 13 (14) with my wifi i o kern/174661 wireless [wlan] lost alias on wlan interface o kern/174283 wireless [net80211] panics in ieee80211_ff_age() and ieee80211_ o kern/174276 wireless [ath] if_ath memory modified after free o kern/174273 wireless [net80211] taking down a net80211 node with active fas o kern/173917 wireless [iwn] wpa-supplicant issues on iwn o kern/173898 wireless [iwn] [patch] iwn(4) DOES support 6235 chip. o kern/173883 wireless [ath] ath0: unable to attach - pci issue? o kern/173711 wireless [ath] powerd kills ath on the Asus EeePC 1005HA o kern/173342 wireless PS-Poll isn't working o kern/173336 wireless [ath] Atheros card improper device poweroff handling o o kern/172955 wireless [ath] 11n does not work in adhoc mode o kern/172706 wireless [wpi] wpi0 fails to load firmware when using country o kern/172672 wireless [ubt] Bluetooth device recognised but not working o kern/172661 wireless hostapd(8) securing wireless adapter in HostAP mode is o kern/172338 wireless [ath] [net80211] CCMP IV transmit counters are not cor o kern/171598 wireless [ath] TP-Link TL-WN951N W-LAN PCI Adapter 300 MBit stu o kern/171235 wireless [ath] ath loses connection, system freezes on netif re o kern/170889 wireless [ath] ath driver uses some uninitilized memory o kern/170620 wireless [ath] LOR and deadlock when multiple vaps are used o kern/170573 wireless [iwi] Intel 2200BG iwi NIC hangs with need multicast c o kern/170513 wireless [ath] ath logs: ath_tx_aggr_comp_aggr: AR5416 bug: o kern/170433 wireless [ath] TX hang after a stuck beacon message with active o kern/170397 wireless [ath] [patch] Uninitialized variables in ah_eeprom_928 o kern/170302 wireless [ath] 802.11n frames are not being transmitted with mu o kern/170281 wireless [ath] 802.11n locks up on aggregation setup (ampdutx) o kern/170098 wireless [ath] [net80211] VAPs (Virtual access points) with Ath o kern/170066 wireless [ral] ral(4) rt61pci Linksys freezes the machine as so o kern/169432 wireless [ath] BAR TX hang when aggregation session is reset du p kern/169362 wireless [ath] AR5416: radar pulse PHY errors sometimes include o kern/169336 wireless [ath] ANI isn't triggering in a busy/noisy environment o kern/169199 wireless [ath] Cannot set up static ip addresses for wireless w o kern/169084 wireless [ath] suspend/resume doesn't cause a rescan; the assoc o kern/168530 wireless [ath] Broken WEP probably o kern/168393 wireless AR9285: suspend/resume sometimes fails o kern/168170 wireless [net80211] ieee80211_send_bar() doesn't complete corre o kern/167870 wireless [ath] adhoc wifi client does not join an existing IBSS o kern/167834 wireless [ath] kickpcu; 'handled 0 packets' o kern/167828 wireless [iwn] iwn(4) doesn't recover automatically after firmw o kern/167798 wireless ifconfig(8): problem with "ifconfig list scan" command o kern/167491 wireless [ath] TID != hardware queue TID in ath_tx_aggr_comp_ag o kern/167113 wireless [ath] AR5210: "stuck" TX seems to be occuring, without o kern/167080 wireless [ath] channel switch on another VAP break channel setu o kern/166684 wireless [ath] [net80211] mgmtrate/mcastrate isn't updated base p kern/166642 wireless [ieee80211] [patch] in 802.11n mode for FreeBSD AP, ha o kern/166641 wireless [ieee80211] [patch] mbuf/cluster leak in AP mode in 80 p kern/166357 wireless [ath] 802.11n TX stall when the first frame in the BAW o kern/166286 wireless [net80211] [ath] initial switch to HT40 isn't causing p kern/166190 wireless [ath] TX hangs and frames stuck in TX queue o kern/166086 wireless [Patch][ath] Reflect state of rfkill switch in a sysct o kern/165969 wireless [ath] Slower performance in adhoc mode vs Client/AP mo o kern/165966 wireless [ath] ath0: device timeout on SMP machines due to race o kern/165895 wireless [ath] overly busy cabq can tie up all tx buffers o kern/165870 wireless [bwn] bwn driver does not attach on HP Pavilion dv9420 o kern/165866 wireless [ath] TX hangs, requiring a "scan" to properly reset t o kern/165849 wireless [ath] [hang] network ath driver freeze o kern/165595 wireless [ipw] ipw(4): Can't load firmare for ipw2200bg o kern/165543 wireless [ath] ath0 endless scanning of channels without connec o kern/165517 wireless [net80211] bgscan isn't triggered when invalid beacons o kern/165475 wireless [ath] operational mode change doesn't poke the underly o kern/165382 wireless [kernel] taskqueue_unblock doesn't unblock currently q o kern/165306 wireless [ath] race conditions between scanning and beacon time o kern/165220 wireless [ath] "ath_rx_tasklet: sc_inreset_cnt > 0; skipping" m o kern/165214 wireless [ieee80211] Kernel panic in ieee80211_output.c:2505 o kern/165212 wireless [ath] No WiFi on Acer Aspire One 751h (Atheros AR5BHB6 o kern/165149 wireless [ath] [net80211] Ping with data length more than iv_fr o kern/165146 wireless [net80211] Net802.11 Fragment number is assigned 1 (sh o kern/165060 wireless [ath] vap->iv_bss race conditions causing crashes insi o kern/165021 wireless [ath] ath device timeout during scan/attach, if wlan_c o kern/164721 wireless [ath] ath device timeouts o kern/164499 wireless [wi] [patch] if_wi needs fix for big endian architectu o kern/164382 wireless [ath] crash when down/deleting a vap - inside ieee8021 o kern/164365 wireless [iwi] iwi0: UP/DOWN in o bin/164102 wireless hostapd not configured for 802.11n o kern/163759 wireless [ath] ath(4) "stops working" in hostap mode o kern/163724 wireless [mwl] [patch] NULL check before dereference o kern/163719 wireless [ath] ath interface do not receive multicast o kern/163689 wireless [ath] TX timeouts when sending probe/mgmt frames durin o kern/163574 wireless [net80211] overly-frequent HT occupancy changes o kern/163573 wireless [ath] hostap mode TX buffer hang o kern/163559 wireless [ath] kernel panic AH_DEBUG o kern/163318 wireless [ath] ath(4) stops working p kern/163312 wireless [panic] [ath driver] kernel panic: page fault with ath o kern/163237 wireless [ath] AR5416 as HostAP. Delays among clients when a cl o kern/163082 wireless [ath] ar9285 diversity fixes o kern/162648 wireless [ath] AR9227 ADC DC calibration failure o kern/162647 wireless [ath] 11n TX aggregation session / TX hang o kern/161293 wireless [iwn] hang at startup when starting network o kern/161035 wireless [ieee80211] Incorrect number describing 11ng MCS rate o kern/160391 wireless [ieee80211] [patch] Panic in mesh mode o kern/160296 wireless [zyd] [panic] 802.11 usb device reboots system on 'ifc o misc/160176 wireless [mips] [panic] Kernel panic on AR7161 platform with AR o kern/157449 wireless [ath] MAC address conflict causes system to freeze o kern/157243 wireless [ath] investigate beacon TX (AP) / RX (STA) when under o kern/156904 wireless [ath] AR9285 antenna diversity algorithm is buggy and o kern/156884 wireless [ath] ath instablity o kern/156327 wireless [bwn] bwn driver causes 20%-50% packet loss o kern/156322 wireless [wpi] no ahdemo support for if_wpi o kern/156321 wireless [ath] ahdemo doesn't work with if_ath o kern/155498 wireless [ral] ral(4) needs to be resynced with OpenBSD's to ga o kern/155100 wireless [ath] ath driver on busy channel: "stuck beacon" p kern/154598 wireless [ath] Atheros 5424/2424 can't connect to WPA network o kern/154567 wireless [ath] ath(4) lot of bad series(0) o kern/154327 wireless [ath] AR5416 in station mode hangs when transmitting f o kern/154284 wireless [ath] Modern ath wifi cards (such as AR9285) have miss o kern/154153 wireless [ath] AR5213 + MIPS + WPA group key packet corruption o kern/153594 wireless [wlan] netif/devd race o kern/153448 wireless [ath] ath networking device loses association after a o kern/152750 wireless [ath] ath0 lot of bad series hwrate o kern/151198 wireless [ath] ath/5416 fails bgscan with "ath0: ath_chan_set: o kern/149786 wireless [bwn] bwn on Dell Inspiron 1150: connections stall o kern/149516 wireless [ath] ath(4) hostap with fake MAC/BSSID results in sta o kern/149373 wireless [realtek/atheros]: None of my network card working o kern/148322 wireless [ath] Triggering atheros wifi beacon misses in hostap o kern/148317 wireless [ath] FreeBSD 7.x hostap memory leak in net80211 or At o kern/148078 wireless [ath] wireless networking stops functioning o kern/146426 wireless [mwl] 802.11n rates not possible on mwl o kern/146425 wireless [mwl] mwl dropping all packets during and after high u o kern/145826 wireless [panic] [ath] Unable to configure adhoc mode on ath0/w o kern/144987 wireless [wpi] [panic] injecting packets with wlaninject using o kern/144755 wireless [wlan] netif/devd race o bin/144109 wireless hostapd(8) uses the MAC of the wireless interface, but o conf/143079 wireless hostapd(8) startup missing multi wlan functionality p kern/140567 wireless [ath] [patch] ath is not worked on my notebook PC o kern/140245 wireless [ath] [panic] Kernel panic during network activity on o kern/137592 wireless [ath] panic - 7-STABLE (Aug 7, 2009 UTC) crashes on ne o kern/136943 wireless [wpi] [lor] wpi0_com_lock / wpi0 o kern/136836 wireless [ath] atheros card stops functioning after about 12 ho o kern/132722 wireless [ath] Wifi ath0 associates fine with AP, but DHCP or I o bin/131549 wireless ifconfig(8) can't clear 'monitor' mode on the wireless o kern/126475 wireless [ath] [panic] ath pcmcia card inevitably panics under o kern/125721 wireless [ath] Terrible throughput/high ping latency with Ubiqu o kern/125617 wireless [ath] [panic] ath(4) related panic o kern/125501 wireless [ath] atheros cardbus driver hangs o kern/125332 wireless [ath] [panic] crash under any non-tiny networking unde o kern/124767 wireless [iwi] Wireless connection using iwi0 driver (Intel 220 o kern/124753 wireless [ieee80211] net80211 discards power-save queue packets o kern/121061 wireless [ath] [panic] panic while ejecting ath(4)-adapter duri o docs/120456 wireless ath(4) needs to specify requirement on wlan_scan_sta o kern/119513 wireless [ath] [irq] inserting dlink dwl-g630 wireless card res o kern/116747 wireless [ndis] FreeBSD 7.0-CURRENT crash with Dell TrueMobile f kern/105348 wireless [ath] ath device stopps TX 167 problems total. From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 3 11:27:49 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 696EA5CF; Mon, 3 Jun 2013 11:27:49 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 432C11811; Mon, 3 Jun 2013 11:27:49 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r53BRnXe022854; Mon, 3 Jun 2013 11:27:49 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r53BRnkk022853; Mon, 3 Jun 2013 11:27:49 GMT (envelope-from linimon) Date: Mon, 3 Jun 2013 11:27:49 GMT Message-Id: <201306031127.r53BRnkk022853@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-wireless@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: kern/179232: [ath] panic in ath X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 03 Jun 2013 11:27:49 -0000 Old Synopsis: panic in ath New Synopsis: [ath] panic in ath Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless Responsible-Changed-By: linimon Responsible-Changed-When: Mon Jun 3 11:27:32 UTC 2013 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=179232 From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 3 19:11:35 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0AE251C7; Mon, 3 Jun 2013 19:11:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D9AD810BA; Mon, 3 Jun 2013 19:11:34 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r53JBYmk015789; Mon, 3 Jun 2013 19:11:34 GMT (envelope-from adrian@freefall.freebsd.org) Received: (from adrian@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r53JBYQF015788; Mon, 3 Jun 2013 19:11:34 GMT (envelope-from adrian) Date: Mon, 3 Jun 2013 19:11:34 GMT Message-Id: <201306031911.r53JBYQF015788@freefall.freebsd.org> To: adrian@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-wireless@FreeBSD.org From: adrian@FreeBSD.org Subject: Re: kern/179269: [ath] [AR9285] RX antenna diversity is not functioning correctly; breaks single-antenna designs X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 03 Jun 2013 19:11:35 -0000 Synopsis: [ath] [AR9285] RX antenna diversity is not functioning correctly; breaks single-antenna designs Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless Responsible-Changed-By: adrian Responsible-Changed-When: Mon Jun 3 19:11:23 UTC 2013 Responsible-Changed-Why: Punt to maintainer http://www.freebsd.org/cgi/query-pr.cgi?pr=179269 From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 3 19:17:39 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 02B1C9A0 for ; Mon, 3 Jun 2013 19:17:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qa0-x22c.google.com (mail-qa0-x22c.google.com [IPv6:2607:f8b0:400d:c00::22c]) by mx1.freebsd.org (Postfix) with ESMTP id BD1161116 for ; Mon, 3 Jun 2013 19:17:38 +0000 (UTC) Received: by mail-qa0-f44.google.com with SMTP id hu16so2058553qab.17 for ; Mon, 03 Jun 2013 12:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=oe5jnthwT5N5SLmrXRoeBdfYNlCZLwzUjr1hqXLjQKQ=; b=wq0t6ePuGoJrk28UTbOl7z84XZWvmYgPDUkcSP8/Zz/FWDOZIrd+I/r+XiW+lWAQDg b/ozLqj3vlzenkoYU2qwNL18ZnfO3aAnAeVpBf5U7w9khjxfZvwVd89GtK+9tIxPyPcV +QscLIYSA4FEUFuJ1UGr/LbRdcwVHIgEavtgl4hw+0OkIVzE2ZVCJk0cpxY1IW7KB5rW AeRUxKenT5YUCKeT05QGjY2Q54eRVKsnlxnQ5dx90/vCcn16iD9OQfer9UfUf2t5n78w /YtpKoO4dvjng5yzoBcH0WqDqpHlWfRdCUpI9oEsRxMQ/oVKpEmD8pqCn+PO+snx91JI f1lA== MIME-Version: 1.0 X-Received: by 10.224.148.19 with SMTP id n19mr20343185qav.66.1370287058344; Mon, 03 Jun 2013 12:17:38 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Mon, 3 Jun 2013 12:17:38 -0700 (PDT) Date: Mon, 3 Jun 2013 12:17:38 -0700 X-Google-Sender-Auth: 2L2netjDYmlfbu4oKp0xxi1isaI Message-ID: Subject: So long, and thanks for all the fish (kinda) From: Adrian Chadd To: ath9k-devel , linux-wireless@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 03 Jun 2013 19:17:39 -0000 Hi all, This Friday will be my last day at Qualcomm Atheros. I've enjoyed working with the extremely bright and driven engineers and designers that make the wireless chips and SoCs that people everywhere take for granted. I've achieved a bunch of goals both with their internal product development and open source. But now it's time to move onto different things. I'd especially like to thank Luis Rodriguez for introducing me to the QCA folk and helping me get access to the Atheros open source project, as well as the follow-up discussions that led to me being hired. The open source wireless community has been driving innovation in a lot of areas for a number of years. I'd like to hope that I've had a small, positive effect on that. I wish you all the best of luck in pushing forward and continuing to innovate. Now, I'm still NDA-enabled and I quite like hacking on this wireless stuff so I won't be quitting hacking on things. I will just have other things on my mind. Good luck to you all! Adrian From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 3 19:20:01 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8F25A9EE for ; Mon, 3 Jun 2013 19:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 668501124 for ; Mon, 3 Jun 2013 19:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r53JK1Vu016970 for ; Mon, 3 Jun 2013 19:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r53JK1fX016969; Mon, 3 Jun 2013 19:20:01 GMT (envelope-from gnats) Date: Mon, 3 Jun 2013 19:20:01 GMT Message-Id: <201306031920.r53JK1fX016969@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/179269: commit references a PR X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service 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: Mon, 03 Jun 2013 19:20:01 -0000 The following reply was made to PR kern/179269; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/179269: commit references a PR Date: Mon, 3 Jun 2013 19:14:42 +0000 (UTC) Author: adrian Date: Mon Jun 3 19:14:29 2013 New Revision: 251340 URL: http://svnweb.freebsd.org/changeset/base/251340 Log: Fix receive on the AR9285 (Kite) with only one antenna connected. The main problem here is that fast and driver RX diversity isn't actually configured; I need to figure out why that is. That said, this makes the single-antenna connected AR9285 and AR2427 (AR9285 w/ no 11n) work correctly. PR: kern/179269 Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Jun 3 19:13:44 2013 (r251339) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Jun 3 19:14:29 2013 (r251340) @@ -136,7 +136,20 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO * Preserve the antenna on a channel change */ saveDefAntenna = OS_REG_READ(ah, AR_DEF_ANTENNA); - if (saveDefAntenna == 0) /* XXX magic constants */ + + /* + * Don't do this for the AR9285 - it breaks RX for single + * antenna designs when diversity is disabled. + * + * I'm not sure what this was working around; it may be + * something to do with the AR5416. Certainly this register + * isn't supposed to be used by the MIMO chips for anything + * except for defining the default antenna when an external + * phase array / smart antenna is connected. + * + * See PR: kern/179269 . + */ + if ((! AR_SREV_KITE(ah)) && saveDefAntenna == 0) /* XXX magic constants */ saveDefAntenna = 1; /* Save hardware flag before chip reset clears the register */ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Mon Jun 3 19:40:01 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 72C304BD for ; Mon, 3 Jun 2013 19:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 48CCE120C for ; Mon, 3 Jun 2013 19:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r53Je1YD020419 for ; Mon, 3 Jun 2013 19:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r53Je1JS020418; Mon, 3 Jun 2013 19:40:01 GMT (envelope-from gnats) Date: Mon, 3 Jun 2013 19:40:01 GMT Message-Id: <201306031940.r53Je1JS020418@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/179232: commit references a PR X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service 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: Mon, 03 Jun 2013 19:40:01 -0000 The following reply was made to PR kern/179232; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/179232: commit references a PR Date: Mon, 3 Jun 2013 19:39:50 +0000 (UTC) Author: adrian Date: Mon Jun 3 19:39:37 2013 New Revision: 251342 URL: http://svnweb.freebsd.org/changeset/base/251342 Log: Fix the order of TX shutdown and reset. * Grab the reset lock first, so any subsequent interrupt, TX, RX work will fail * Then shut down interrupts * Then wait for TX/RX to finish running At this point no further work will be running, so it's safe to do the reset path code. PR: kern/179232 Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Jun 3 19:29:03 2013 (r251341) +++ head/sys/dev/ath/if_ath.c Mon Jun 3 19:39:37 2013 (r251342) @@ -2328,12 +2328,27 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T taskqueue_block(sc->sc_tq); ATH_PCU_LOCK(sc); - ath_hal_intrset(ah, 0); /* disable interrupts */ - ath_txrx_stop_locked(sc); /* Ensure TX/RX is stopped */ + + /* + * Grab the reset lock before TX/RX is stopped. + * + * This is needed to ensure that when the TX/RX actually does finish, + * no further TX/RX/reset runs in parallel with this. + */ if (ath_reset_grablock(sc, 1) == 0) { device_printf(sc->sc_dev, "%s: concurrent reset! Danger!\n", __func__); } + + /* disable interrupts */ + ath_hal_intrset(ah, 0); + + /* + * Now, ensure that any in progress TX/RX completes before we + * continue. + */ + ath_txrx_stop_locked(sc); + ATH_PCU_UNLOCK(sc); /* @@ -4871,12 +4886,18 @@ ath_chan_set(struct ath_softc *sc, struc taskqueue_block(sc->sc_tq); ATH_PCU_LOCK(sc); - ath_hal_intrset(ah, 0); /* Stop new RX/TX completion */ - ath_txrx_stop_locked(sc); /* Stop pending RX/TX completion */ + + /* Stop new RX/TX/interrupt completion */ if (ath_reset_grablock(sc, 1) == 0) { device_printf(sc->sc_dev, "%s: concurrent reset! Danger!\n", __func__); } + + ath_hal_intrset(ah, 0); + + /* Stop pending RX/TX completion */ + ath_txrx_stop_locked(sc); + ATH_PCU_UNLOCK(sc); DPRINTF(sc, ATH_DEBUG_RESET, "%s: %u (%u MHz, flags 0x%x)\n", _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Tue Jun 4 10:34:37 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5D1CDCD1 for ; Tue, 4 Jun 2013 10:34:37 +0000 (UTC) (envelope-from sandeep.suresh@yahoo.co.in) Received: from nm21-vm3.bullet.mail.sg3.yahoo.com (nm21-vm3.bullet.mail.sg3.yahoo.com [106.10.151.34]) by mx1.freebsd.org (Postfix) with ESMTP id BF95A1985 for ; Tue, 4 Jun 2013 10:34:36 +0000 (UTC) Received: from [106.10.166.116] by nm21.bullet.mail.sg3.yahoo.com with NNFMP; 04 Jun 2013 10:34:30 -0000 Received: from [106.10.151.253] by tm5.bullet.mail.sg3.yahoo.com with NNFMP; 04 Jun 2013 10:34:30 -0000 Received: from [127.0.0.1] by omp1002.mail.sg3.yahoo.com with NNFMP; 04 Jun 2013 10:34:30 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 431286.12649.bm@omp1002.mail.sg3.yahoo.com Received: (qmail 48691 invoked by uid 60001); 4 Jun 2013 10:34:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s1024; t=1370342070; bh=7QprLWWnHyPQ15i86ay1MRvY/EAb5ZTaAQHof3ezi10=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=nYBNJ0XxeEX8j0HoantGTEtlypUaVYjP3WJDiSMlvsLggI/b9rNG0GBv4BP7w9H8uHyAZgLQLfGr0t0jf1bQiBJ1KEIG+Q/9JCi24K25ov0+VrpFDAP2ELFFMEeB/8v5mvkAeon2mWkHgVHyLFt23lV59Y3a75lPZ8JtxiRib68= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=e196TaSJRBRaNz71Y0CvZlPVW0iwLYKlCDQj1SxeOWCJIgZ/HulzRyz1C2fbPjNe4Y+Yp0eYM+zkmpcA+zRiZHpzVH16ykmGa+IZptgn2JHYjyLrKJ6F9uS9rl0VnCz8LBlhG7Hp2+2kUMhWVOCZvPS7Y+/4lxS+0e+YuvN0IUs=; X-YMail-OSG: dxUmC4sVM1n9ZshoqSHi7Ea9tUBhIHymccOIy7B_AZb.VAp 6gYXldxYqsEJAkDpg0saSPvbVODOGijk.ik0nWoPrHJdb.z48x.pqQXsv7Y3 sSDMrsEqB6tck4NLBOIAwMzwcc5jMjIlx3cGfVe3N3fo3CQ.8c.syz8kqLQ7 n3_KMgNHWLhqrjLsb1bHiCADabAFJqLZ8ORj68Zz84M9WikKYzRygPjQXNEG Hzu.Q99VQbAqk2mIjwmPPH.SFQWXYX1QQZUXhoO1pOotF5Cxs8GJ2QqRxxg_ fAYuTOmOJJgzw68SKTPL175fLV6as5T3376KdswhTlSMYAex_tAz6FFlrFRb ia_8vn0261P5GZyy66dUKc6fczs1IejnaF4TYRIzvnC5Cf47Hugh9Wd32dQk 15hmQPGy9EU3FuIPNkbCZ0HsOD3AlLsP_.76xpD3MfNEljDnE31NPpRJzi8u 54v9Y__Kp7AziUnGXx_oyUu8yBUqYWJzoPD6JThz4fTaNmZOsa1meCyIUweY Feyf8s6gxV5CEXS9X4e4BIIzbZyfCqFReG0FiQkeqHcg- Received: from [199.63.142.252] by web193503.mail.sg3.yahoo.com via HTTP; Tue, 04 Jun 2013 18:34:30 SGT X-Rocket-MIMEInfo: 002.001, SGVsbG8gTXIuQWRyaWFuLArCoMKgwqDCoERvZXMgdGhhdCBtZWFuIHdlIHdpbGwgbm90IGdldCB5b3VyIGd1aWRhbmNlIG1vdmluZyBmdXJ0aGVyOyBJIGRpZCBub3QgZ2V0IHRoZSBtZXNzYWdlPwpSZWdhcmRzClNhbmRlZXAuCgoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KRnJvbTogQWRyaWFuIENoYWRkIDxhZHJpYW5AZnJlZWJzZC5vcmc.ClRvOiBhdGg5ay1kZXZlbCA8YXRoOWstZGV2ZWxAbGlzdHMuYXRoOWsub3JnPjsgbGludXgtd2lyZWxlc3NAdmdlci5rZXJuZWwub3JnIApDYzogZnIBMAEBAQE- X-Mailer: YahooMailWebService/0.8.145.547 References: Message-ID: <1370342070.43364.YahooMailNeo@web193503.mail.sg3.yahoo.com> Date: Tue, 4 Jun 2013 18:34:30 +0800 (SGT) From: sandeep suresh Subject: Re: [ath9k-devel] So long, and thanks for all the fish (kinda) To: Adrian Chadd In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sandeep suresh 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, 04 Jun 2013 10:34:37 -0000 Hello Mr.Adrian,=0A=A0=A0=A0=A0Does that mean we will not get your guidance= moving further; I did not get the message?=0ARegards=0ASandeep.=0A=0A=0A__= ______________________________=0AFrom: Adrian Chadd =0A= To: ath9k-devel ; linux-wireless@vger.kernel.o= rg =0ACc: freebsd-wireless@freebsd.org =0ASent: Tuesday, 4 June 2013 12:47 = AM=0ASubject: [ath9k-devel] So long, and thanks for all the fish (kinda)=0A= =0A=0AHi all,=0A=0AThis Friday will be my last day at Qualcomm Atheros. I'v= e enjoyed=0Aworking with the extremely bright and driven engineers and desi= gners=0Athat make the wireless chips and SoCs that people everywhere=0Atake= for granted. I've achieved a bunch of goals both with their=0Ainternal pro= duct development and open source. But now it's time to=0Amove onto differen= t things.=0A=0AI'd especially like to thank Luis Rodriguez for introducing = me to the=0AQCA folk and helping me get access to the Atheros open source p= roject,=0Aas well as the follow-up discussions that led to me being hired.= =0A=0AThe open source wireless community has been driving innovation in a= =0Alot of areas for a number of years. I'd like to hope that I've had a=0As= mall, positive effect on that. I wish you all the best of luck in=0Apushing= forward and continuing to innovate.=0A=0ANow, I'm still NDA-enabled and I = quite like hacking on this wireless=0Astuff so I won't be quitting hacking = on things. I will just have other=0Athings on my mind.=0A=0AGood luck to yo= u all!=0A=0A=0AAdrian=0A_______________________________________________=0Aa= th9k-devel mailing list=0Aath9k-devel@lists.ath9k.org=0Ahttps://lists.ath9k= .org/mailman/listinfo/ath9k-devel From owner-freebsd-wireless@FreeBSD.ORG Wed Jun 5 22:50:25 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5AA8CF0D for ; Wed, 5 Jun 2013 22:50:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qa0-x22e.google.com (mail-qa0-x22e.google.com [IPv6:2607:f8b0:400d:c00::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 2598F186F for ; Wed, 5 Jun 2013 22:50:25 +0000 (UTC) Received: by mail-qa0-f46.google.com with SMTP id ih17so816566qab.12 for ; Wed, 05 Jun 2013 15:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=gComhwI2bPN9fVevEjVqU6N7IZtsBJ3Cg7/kYFzglf0=; b=TyXB9Fk1m7RIWM94uW6vhx5WhDTt3F+tBYARding+4PPQ6NA+bTIN/B7HvVHZegvhn 2694z6IhqmekO/KHWlOb0bF8DxtB+IBH4PdfEvrGCYdklEN+l7aZNrzxs+Kn27WrFA8o FZ+xYlph/mOh43sXAp+vIq6ANvpLpW1YREAZ/Lb0+JQ7ghcKlaVs2IYcr1oG+eqZ+cB9 p0y38yc+P7wrtrbxFiNUsdOI1mdzu8LfaDDRhFil/Rz/meMy9ewLtv36qnhCR1NkxGSW h5pO0bL+SVRl/RE/FYakh/hKtyy0RtK7Z/qv9qk6bcz3ltY6jtz6kwMz0k3CkqB2Tkul L9SA== MIME-Version: 1.0 X-Received: by 10.224.119.83 with SMTP id y19mr30513135qaq.7.1370472624204; Wed, 05 Jun 2013 15:50:24 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Wed, 5 Jun 2013 15:50:24 -0700 (PDT) Date: Wed, 5 Jun 2013 15:50:24 -0700 X-Google-Sender-Auth: P4xVm7euBuQYgEdHQvA1J8FV10M Message-ID: Subject: AR9285 antenna diversity - a journey From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 05 Jun 2013 22:50:25 -0000 Hi all, I made the mistake of whacking an AR9285 into an EEEPC I have here. It has one antenna. So, I thought, I'll just whack it onto the primary antenna as I know the AR9285 only transmits on the main antenna (the second antenna connector is only for receive.) And it didn't work. Thus started the journey of "what the hell kind of weird crap is going on here." The TL;DR version - if you use an AR9285 or AR2427, please update to the latest -HEAD. The short version: It's a 1x1 chip. But it has two receive inputs - LNA1 and LNA2. LNA1 shares with TX and it's 3dB less sensitive than LNA2. So ideally you want to configure things so you receive on LNA2. There's also a receive antenna switch table and switch bit that can connect to an external antenna switch. If you don't have an AR9285 + bluetooth combo, you very likely don't have an antenna switch. So _normally_, this is what you have: * Antenna 1 / Main : connects to LNA1, is used for TX * Antenna 2 / Alt : connects to LNA2, is used for RX. Now if you're using a single-antenna device, that can only connect to LNA1. Next, there's how it's configured up. There's this thing called "LNA combining." Where the BB mixes the LNA signals in different ways. The four configurations are: * LNA1 only * LNA2 only * LNA1-LNA2 * LNA1+LNA2 Then there's two profiles - "main" and "alt." You configure "main" as the receive profile that the BB tries first. If it has time, it'll try the "alt" config and if that's better than main, it'll flip over to using this to receive the frame. These get programmed in by some settings in the EEPROM. Now - what happened: I naively thought that the driver code "just worked." It turns out that yes, the driver code just worked, except for setting AR_DEF_ANTENNA to 1 instead of the default (0). This meant the MAC would tell the PHY that it should just do receive on the alternate config. If you have a single antenna connected to LNA1 _and_ your NIC EEPROM settings default to "main = LNA1, alt=LNA2", it'll always receive on LNA2. This obviously would result in badness - you always receive on a non-connected antenna. So, I fixed that. It worked. But I wanted some better diagnostic/debugging tools. The first thing I did was to hack the receive path to log the LNA configuration used in the RX antenna field, rather than having it default to something useless. So now, athstats shows this: Antenna profile: [0] tx 6232 rx 17364 [1] tx 0 rx 64685 [2] tx 0 rx 9615 These map as following: rx0 = LNA1-LNA2 rx1 = LNA2 rx2 = LNA1 rx3 = LNA1+LNA2 rx4->rx7 is the same as rx0->rx3, but with the "external" RX antenna diversity switch set to '1'. So now, you can watch this live: adrian@lucy:~/work/freebsd/ath/head/src/sys/dev/ath]> athstats -o input,output,rxstbc,rx0,rx1,rx2,rx3,rx4,rx5,rx6,rx7,rssi 1 input output rxstbc ant0(rx) ant1(rx) ant2(rx) ant3(rx) ant4(rx) ant5(rx) ant6(rx) ant7(rx) rssi 95610 7740 8242 17364 68075 10171 0 0 0 0 0 26 59 2 0 0 53 6 0 0 0 0 0 35 50 2 0 0 46 4 0 0 0 0 0 35 66 2 0 0 60 6 0 0 0 0 0 38 60 0 0 0 56 4 0 0 0 0 0 33 .. Next, I wanted to log what the default settings were. That way if people come to me and say that their AR9285 behaves crappy, I at least have the information needed. Behold, from the attach code: [ath] AR9285 Main LNA config: LNA2 [ath] AR9285 Alt LNA config: LNA1 [ath] LNA diversity enabled, Diversity enabled [ath] Enabling diversity for Kite It will now tell you what the main/alternate configuration is specified in the EEPROM and whether diversity is enabled or disabled. After much discussion and research, I've discovered why - for laptops with one antenna, the only real guaranteed way to do this without hacking the driver is to default the EEPROM settings to _not_ enable diversity. Even if the NIC has two antenna connectors and you do hook up a separate antenna. So now this is all done and sorted out, I'm going to document how it all holds together, add some run time configuration twiddles for controlling the AR9285 antenna diversity parameters, and see about writing a tool to log/track the receive antenna configurations so people can tinker with things and figure out why things are performing badly or not. So what's this mean for you? If you have two antennas hooked up, good. If you have one antenna hooked up to the AR9285, the above _must_ say the main configuration is LNA1 if diversity is disabled. or it just won't work. If it says MAIN=LNA2 and diversity is disabled, it will _only_ receive on the second (alt) antenna, and thus you'll have crappy (no) receive performance. Phew! Adrian From owner-freebsd-wireless@FreeBSD.ORG Thu Jun 6 00:36:46 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 21BE2671; Thu, 6 Jun 2013 00:36:46 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) by mx1.freebsd.org (Postfix) with ESMTP id DD76D1BDA; Thu, 6 Jun 2013 00:36:45 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id x14so5544697ief.12 for ; Wed, 05 Jun 2013 17:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=NXVBQtZi9d9ynJvyLR6bg6AV7z/IbAiR6hv5p8C7mmo=; b=eLzG4lNxZCc1cFFPLOq87/H83SSMsNhpzcz5oKlhGR0l9ff+euis6cC5Dyatfat4id cGw6a8OHpqXxiZ7W5l/MjeUOgTzCfhSLVnO2dByQlwfLNGptsydcmR6Yt+rttdytUy1q Mitx9gsxEkB6c1zh7jRR7/68/DlXdpzZlwgCBtRUBsPYFKRYFd6lxtbLAx7WxfUmfhtq zXK1PoEE6kE8oyUpZx/RBqjzcuSV47pXXgad6D3EcPpHB6FLcyqX+uGgoij+gzMtj0ee P/rgAPDm8+art/t70rgbdP2OQov78CgTgZkzni1pjn2ta5GJq+D82sc4woczRubZVkSp fEDw== X-Received: by 10.42.41.210 with SMTP id q18mr16069155ice.13.1370479005643; Wed, 05 Jun 2013 17:36:45 -0700 (PDT) Received: from [192.168.1.34] (c-98-212-197-211.hsd1.il.comcast.net. [98.212.197.211]) by mx.google.com with ESMTPSA id ft3sm8645255igb.10.2013.06.05.17.36.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Jun 2013 17:36:44 -0700 (PDT) Message-ID: <51AFD970.3050808@gmail.com> Date: Wed, 05 Jun 2013 19:36:00 -0500 From: Joshua Isom User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: So long, and thanks for all the fish (kinda) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ath9k-devel , linux-wireless@vger.kernel.org, freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 06 Jun 2013 00:36:46 -0000 First, NOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!! Second, will you still be given datasheets on new wireless chips to enable support? Or will you at least be able to encourage Atheros to release the datasheets? Tell them I bought Atheros because of you! On 6/3/2013 2:17 PM, Adrian Chadd wrote: > Hi all, > > This Friday will be my last day at Qualcomm Atheros. I've enjoyed > working with the extremely bright and driven engineers and designers > that make the wireless chips and SoCs that people everywhere > take for granted. I've achieved a bunch of goals both with their > internal product development and open source. But now it's time to > move onto different things. > > I'd especially like to thank Luis Rodriguez for introducing me to the > QCA folk and helping me get access to the Atheros open source project, > as well as the follow-up discussions that led to me being hired. > > The open source wireless community has been driving innovation in a > lot of areas for a number of years. I'd like to hope that I've had a > small, positive effect on that. I wish you all the best of luck in > pushing forward and continuing to innovate. > > Now, I'm still NDA-enabled and I quite like hacking on this wireless > stuff so I won't be quitting hacking on things. I will just have other > things on my mind. > > Good luck to you all! > > > Adrian > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org" > From owner-freebsd-wireless@FreeBSD.ORG Thu Jun 6 16:17:11 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 506469F9 for ; Thu, 6 Jun 2013 16:17:11 +0000 (UTC) (envelope-from ESC1113699761651_1101166016578_41557_r20@in.constantcontact.com) Received: from ccm27.constantcontact.com (ccm27.constantcontact.com [208.75.123.162]) by mx1.freebsd.org (Postfix) with ESMTP id 1240E1C55 for ; Thu, 6 Jun 2013 16:17:10 +0000 (UTC) Received: from ccm198.constantcontact.com (p2-pen3.ad.prodcc.net [10.252.0.103]) by p2-dmail13.ccm27.constantcontact.com (Postfix) with ESMTP id B747B1AFAF2 for ; Thu, 6 Jun 2013 11:57:04 -0400 (EDT) Received: from p2-jbsched04.ad.prodcc.net (p2-pen6.ad.prodcc.net [10.252.0.106]) by p2-mail203.ccm198.constantcontact.com (Postfix) with ESMTP id DA824FA4204 for ; Thu, 6 Jun 2013 11:56:57 -0400 (EDT) DKIM-Signature: v=1; q=dns/txt; a=rsa-sha256; c=relaxed/relaxed; s=206038; d=oem-source.ccsend.com; h=to:subject:mime-version:message-id:from:date:sender:list-unsubscribe:reply-to; bh=v2FFR5lTSbZIttFbzr+pJLLV3ks6wwGYmwn1rTJ7wh8=; b=FhDgrhffr7KJejuRZl3WHmhUcyGtyZLIcwNYkIJAVVHTDzCoVMrI6mutVPF/VhLxZxJ/bC2hp/cJSLj89YYLsjbUsfKPyPxqk+WcERu+d6S+nQHX9jh9muKNEIV7zxGCYpBanXoJMUZi/6Q3se4XQtYZnr5SFe7LXbVWvdf5P1w= Message-ID: <1113699761651.1101166016578.41557.4.711555E@scheduler.constantcontact.com> Date: Thu, 6 Jun 2013 11:56:57 -0400 (EDT) From: Oemsource Sender: Oemsource To: freebsd-wireless@freebsd.org Subject: OEM Source, Inc MIME-Version: 1.0 X-Mailer: Roving Constant Contact 2009 (http://www.constantcontact.com) X-Return-Path-Hint: ESC1113699761651_1101166016578_41557_r20@in.constantcontact.com X-Roving-ID: 1101166016578.41557 X-Lumos-SenderID: 1101166016578 X-Roving-CampaignId: 1113699761651 X-Roving-StreamId: 0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: alex@oemsourceinc.com 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: Thu, 06 Jun 2013 16:17:11 -0000 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Brand new Griffin Iphone 4S Car charger ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OEM Source, Inc 140 58th unit: 4G Brooklyn, New York 11220 212-729-1016 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Forward this email http://ui.constantcontact.com/sa/fwtf.jsp?llr=cc5xjrbab&m=1101166016578&ea=freebsd-wireless@freebsd.org&a=1113699761651 This email was sent to freebsd-wireless@freebsd.org by alex@oemsourceinc.com. Update Profile/Email Address http://visitor.constantcontact.com/do?p=oo&mse=0019NWEzvrUeHqqyiM1rFMkb_gRr_wyQ5P1lucj7ybOBvE%3D&t=001NVgtNaWFvXSaQcu_8MWrlQ%3D%3D&lang=001FCSs65SMrsI%3D&reason=001y5KaVlBn7_Y%3D&llr=cc5xjrbab Instant removal with SafeUnsubscribe(TM) http://visitor.constantcontact.com/do?p=un&mse=0019NWEzvrUeHqqyiM1rFMkb_gRr_wyQ5P1lucj7ybOBvE%3D&t=001NVgtNaWFvXSaQcu_8MWrlQ%3D%3D&lang=001FCSs65SMrsI%3D&reason=001y5KaVlBn7_Y%3D&llr=cc5xjrbab Privacy Policy: http://ui.constantcontact.com/roving/CCPrivacyPolicy.jsp Online Marketing by Constant Contact(R) www.constantcontact.com OEM Source, Inc | 140 58th unit: 4G | Brooklyn | NY | 11220 From owner-freebsd-wireless@FreeBSD.ORG Fri Jun 7 09:08:22 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BEF914DB for ; Fri, 7 Jun 2013 09:08:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-f43.google.com (mail-qe0-f43.google.com [209.85.128.43]) by mx1.freebsd.org (Postfix) with ESMTP id 8605B125D for ; Fri, 7 Jun 2013 09:08:22 +0000 (UTC) Received: by mail-qe0-f43.google.com with SMTP id k5so2597385qej.30 for ; Fri, 07 Jun 2013 02:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=yBp/sSvYu1/lAmPD7RauBIN1js4bBM6YkD5atsSlqE0=; b=lTrx4YfyG1iVOYYmV0nnvwhbMKOxjYz+boZZW/chw2KM9Ytm+Q1fkciRtVCeS8bSzC eZammHhRKUmUosphvdcrWbN72cLoiH6XbSlCbh7zX1Da2jaKRQohd0IE22XXM+JPWgeT nnen3EAwwdwdLE+UTO6AwRia3qL8D1yyUrlBAQEnAvwyUQU+FFsfjzbZAwDU62vAnIet 4MG3ECX+NQ6flYKICTfwHLmuYYxCKmSX4TJ9Kc+p6JToFD2hh8gzzO8CfGUv63Rl30r0 i4/4KOSpEwcwYkFO1Exuc9dK9LgmgHNgz7ijQS5HXB1iPxTRKUzS1KdxOaqh2R38TtVF 8ngA== MIME-Version: 1.0 X-Received: by 10.49.14.132 with SMTP id p4mr16525877qec.38.1370596096122; Fri, 07 Jun 2013 02:08:16 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Fri, 7 Jun 2013 02:08:16 -0700 (PDT) In-Reply-To: <201306070902.r57922vx030605@svn.freebsd.org> References: <201306070902.r57922vx030605@svn.freebsd.org> Date: Fri, 7 Jun 2013 02:08:16 -0700 X-Google-Sender-Auth: 5l45-OUV19mEKq9NOXutrVORmpE Message-ID: Subject: Fwd: svn commit: r251487 - in head/sys: conf dev/ath modules/ath From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 07 Jun 2013 09:08:22 -0000 Hi, If you have an AR9285+AR3011 combo card, this commit is for you. It enables basic bluetooth coexistence support for this setup. I need to figure out how to disable ASPM in this instance, but I don't think it's going to be a big problem considering we currently don't have support to put the MAC to sleep in station mode to conserve power. Please let me know if you have this module and if this improves or breaks your bluetooth setup. Thanks! Adrian ---------- Forwarded message ---------- From: Adrian Chadd Date: 7 June 2013 02:02 Subject: svn commit: r251487 - in head/sys: conf dev/ath modules/ath To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Author: adrian Date: Fri Jun 7 09:02:02 2013 New Revision: 251487 URL: http://svnweb.freebsd.org/changeset/base/251487 Log: Bring over the initial static bluetooth coexistence configuration for the WB195 combo NIC - an AR9285 w/ an AR3011 USB bluetooth NIC. The AR3011 is wired up using a 3-wire coexistence scheme to the AR9285. The code in if_ath_btcoex.c sets up the initial hardware mapping and coexistence configuration. There's nothing special about it - it's static; it doesn't try to configure bluetooth / MAC traffic priorities or try to figure out what's actually going on. It's enough to stop basic bluetooth traffic from causing traffic stalls and diassociation from the wireless network. To use this code, you must have the above NIC. No, it won't work for the AR9287+AR3012, nor the AR9485, AR9462 or AR955x combo cards. Then you set a kernel hint before boot or before kldload, where 'X' is the unit number of your AR9285 NIC: # kenv hint.ath.X.btcoex_profile=wb195 This will then appear in your boot messages: [100482] athX: Enabling WB195 BTCOEX This code is going to evolve pretty quickly (well, depending upon my spare time) so don't assume the btcoex API is going to stay stable. In order to use the bluetooth side, you must also load in firmware using ath3kfw and the binary firmware file (ath3k-1.fw in my case.) Tested: * AR9280, no interference * WB195 - AR9285 + AR3011 combo; STA mode; basic bluetooth inquiries were enough to cause traffic stalls and disassociations. This has stopped with the btcoex profile code. TODO: * Importantly - the AR9285 needs ASPM disabled if bluetooth coexistence is enabled. No, I don't know why. It's likely some kind of bug to do with the AR3011 sending bluetooth coexistence signals whilst the device is asleep. Since we don't actually sleep the MAC just yet, it shouldn't be a problem. That said, to be totally correct: + ASPM should be disabled - upon attach and wakeup + The PCIe powersave HAL code should never be called Look at what the ath9k driver does for inspiration. * Add WB197 (AR9287+AR3012) support * Add support for the AR9485, which is another combo like the AR9285 * The later NICs have a different signaling mechanism between the MAC and the bluetooth device; I haven't even begun to experiment with making that HAL code work. But it should be a lot more automatic. * The hardware can do much more interesting traffic weighting with bluetooth and wifi traffic. None of this is currently used. Ideally someone would code up something to watch the bluetooth traffic GPIO (via an interrupt) and then watch it go high/low; then figure out what the bluetooth traffic is and adjust things appropriately. * If I get the time I may add in some code to at least track this stuff and expose statistics. But it's up to someone else to experiment with the bluetooth coexistence support and add the interesting stuff (like "real" detection of bulk, audio, etc bluetooth traffic patterns and change wifi parameters appropriately - eg, maximum aggregate length, transmit power, using quiet time to control TX duty cycle, etc.) Added: head/sys/dev/ath/if_ath_btcoex.c (contents, props changed) head/sys/dev/ath/if_ath_btcoex.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ath/if_ath.c head/sys/modules/ath/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Jun 7 08:06:48 2013 (r251486) +++ head/sys/conf/files Fri Jun 7 09:02:02 2013 (r251487) @@ -725,6 +725,8 @@ dev/ath/if_ath.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_beacon.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/if_ath_btcoex.c optional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_debug.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_keycache.c optional ath \ Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Jun 7 08:06:48 2013 (r251486) +++ head/sys/dev/ath/if_ath.c Fri Jun 7 09:02:02 2013 (r251487) @@ -111,6 +111,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -521,6 +522,14 @@ ath_attach(u_int16_t devid, struct ath_s goto bad2; } + /* Attach bluetooth coexistence module */ + if (ath_btcoex_attach(sc) < 0) { + device_printf(sc->sc_dev, + "%s: unable to attach bluetooth coexistence\n", __func__); + error = EIO; + goto bad2; + } + /* Start DFS processing tasklet */ TASK_INIT(&sc->sc_dfstask, 0, ath_dfs_tasklet, sc); @@ -1029,6 +1038,7 @@ ath_detach(struct ath_softc *sc) #ifdef ATH_DEBUG_ALQ if_ath_alq_tidyup(&sc->sc_alq); #endif + ath_btcoex_detach(sc); ath_spectral_detach(sc); ath_dfs_detach(sc); ath_desc_free(sc); @@ -1589,6 +1599,11 @@ ath_resume(struct ath_softc *sc) ath_spectral_enable(sc, ic->ic_curchan); /* + * Let bluetooth coexistence at in case it's needed for this channel + */ + ath_btcoex_enable(sc, ic->ic_curchan); + + /* * If we're doing TDMA, enforce the TXOP limitation for chips that * support it. */ @@ -2045,6 +2060,11 @@ ath_init(void *arg) ath_spectral_enable(sc, ic->ic_curchan); /* + * Let bluetooth coexistence at in case it's needed for this channel + */ + ath_btcoex_enable(sc, ic->ic_curchan); + + /* * If we're doing TDMA, enforce the TXOP limitation for chips that * support it. */ @@ -2384,6 +2404,11 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T ath_spectral_enable(sc, ic->ic_curchan); /* + * Let bluetooth coexistence at in case it's needed for this channel + */ + ath_btcoex_enable(sc, ic->ic_curchan); + + /* * If we're doing TDMA, enforce the TXOP limitation for chips that * support it. */ @@ -4946,6 +4971,12 @@ ath_chan_set(struct ath_softc *sc, struc ath_spectral_enable(sc, chan); /* + * Let bluetooth coexistence at in case it's needed for this + * channel + */ + ath_btcoex_enable(sc, ic->ic_curchan); + + /* * If we're doing TDMA, enforce the TXOP limitation for chips * that support it. */ Added: head/sys/dev/ath/if_ath_btcoex.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_btcoex.c Fri Jun 7 09:02:02 2013 (r251487) @@ -0,0 +1,281 @@ +/*- + * Copyright (c) 2013 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#include +__FBSDID("$FreeBSD$"); + +/* + * This implements some very basic bluetooth coexistence methods for + * the ath(4) hardware. + */ +#include "opt_ath.h" +#include "opt_inet.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include /* XXX for ether_sprintf */ + +#include + +#include + +#ifdef INET +#include +#include +#endif + +#include +#include + +/* + * Initial AR9285 / (WB195) bluetooth coexistence settings, + * just for experimentation. + * + * Return 0 for OK; errno for error. + * + * XXX TODO: There needs to be a PCIe workaround to disable ASPM if + * bluetooth coexistence is enabled. + */ +static int +ath_btcoex_cfg_wb195(struct ath_softc *sc) +{ + HAL_BT_COEX_INFO btinfo; + HAL_BT_COEX_CONFIG btconfig; + struct ath_hal *ah = sc->sc_ah; + + if (! ath_hal_btcoex_supported(ah)) + return (EINVAL); + + bzero(&btinfo, sizeof(btinfo)); + bzero(&btconfig, sizeof(btconfig)); + + device_printf(sc->sc_dev, "Enabling WB195 BTCOEX\n"); + + btinfo.bt_module = HAL_BT_MODULE_JANUS; + btinfo.bt_coex_config = HAL_BT_COEX_CFG_3WIRE; + /* + * These are the three GPIO pins hooked up between the AR9285 and + * the AR3011. + */ + btinfo.bt_gpio_bt_active = 6; + btinfo.bt_gpio_bt_priority = 7; + btinfo.bt_gpio_wlan_active = 5; + btinfo.bt_active_polarity = 1; /* XXX not used */ + btinfo.bt_single_ant = 1; /* 1 antenna on ar9285 ? */ + btinfo.bt_isolation = 0; /* in dB, not used */ + + ath_hal_btcoex_set_info(ah, &btinfo); + + btconfig.bt_time_extend = 0; + btconfig.bt_txstate_extend = 1; /* true */ + btconfig.bt_txframe_extend = 1; /* true */ + btconfig.bt_mode = HAL_BT_COEX_MODE_SLOTTED; + btconfig.bt_quiet_collision = 1; /* true */ + btconfig.bt_rxclear_polarity = 1; /* true */ + btconfig.bt_priority_time = 2; + btconfig.bt_first_slot_time = 5; + btconfig.bt_hold_rxclear = 1; /* true */ + + ath_hal_btcoex_set_config(ah, &btconfig); + + /* + * Enable antenna diversity. + */ + ath_hal_btcoex_set_parameter(ah, HAL_BT_COEX_ANTENNA_DIVERSITY, 1); + + return (0); +} + +#if 0 +/* + * When using bluetooth coexistence, ASPM needs to be disabled + * otherwise the sleeping interferes with the bluetooth (USB) + * operation and the MAC sleep/wakeup hardware. + */ +static int +ath_btcoex_aspm_wb195(struct ath_softc *sc) +{ + + /* XXX TODO: clear device ASPM L0S and L1 */ + /* XXX TODO: clear _parent_ ASPM L0S and L1 */ +} +#endif + +/* + * Methods which are required + */ + +/* + * Attach btcoex to the given interface + */ +int +ath_btcoex_attach(struct ath_softc *sc) +{ + int ret; + struct ath_hal *ah = sc->sc_ah; + const char *profname; + + /* + * No chipset bluetooth coexistence? Then do nothing. + */ + if (! ath_hal_btcoex_supported(ah)) + return (0); + + /* + * Look at the hints to determine which bluetooth + * profile to configure. + */ + ret = resource_string_value(device_get_name(sc->sc_dev), + device_get_unit(sc->sc_dev), + "btcoex_profile", + &profname); + if (ret != 0) { + /* nothing to do */ + return (0); + } + + if (strncmp(profname, "wb195", 5) == 0) { + ret = ath_btcoex_cfg_wb195(sc); + } else { + return (0); + } + + /* + * Propagate up failure from the actual attach phase. + */ + if (ret != 0) + return (ret); + + return (0); +} + +/* + * Detach btcoex from the given interface + */ +int +ath_btcoex_detach(struct ath_softc *sc) +{ + + return (0); +} + +/* + * Configure or disable bluetooth coexistence on the given channel. + * + * For AR9285/AR9287/AR9485, we'll never see a 5GHz channel, so we just + * assume bluetooth coexistence is always on. + * + * For AR9462, we may see a 5GHz channel; bluetooth coexistence should + * not be enabled on those channels. + */ +int +ath_btcoex_enable(struct ath_softc *sc, const struct ieee80211_channel *chan) +{ + + return (0); +} + +/* + * Handle ioctl requests from the diagnostic interface. + * + * The initial part of this code resembles ath_ioctl_diag(); + * it's likely a good idea to reduce duplication between + * these two routines. + */ +int +ath_btcoex_ioctl(struct ath_softc *sc, struct ath_diag *ad) +{ + unsigned int id = ad->ad_id & ATH_DIAG_ID; + void *indata = NULL; + void *outdata = NULL; + u_int32_t insize = ad->ad_in_size; + u_int32_t outsize = ad->ad_out_size; + int error = 0; +// int val; + + if (ad->ad_id & ATH_DIAG_IN) { + /* + * Copy in data. + */ + indata = malloc(insize, M_TEMP, M_NOWAIT); + if (indata == NULL) { + error = ENOMEM; + goto bad; + } + error = copyin(ad->ad_in_data, indata, insize); + if (error) + goto bad; + } + if (ad->ad_id & ATH_DIAG_DYN) { + /* + * Allocate a buffer for the results (otherwise the HAL + * returns a pointer to a buffer where we can read the + * results). Note that we depend on the HAL leaving this + * pointer for us to use below in reclaiming the buffer; + * may want to be more defensive. + */ + outdata = malloc(outsize, M_TEMP, M_NOWAIT); + if (outdata == NULL) { + error = ENOMEM; + goto bad; + } + } + switch (id) { + default: + error = EINVAL; + } + if (outsize < ad->ad_out_size) + ad->ad_out_size = outsize; + if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_size)) + error = EFAULT; +bad: + if ((ad->ad_id & ATH_DIAG_IN) && indata != NULL) + free(indata, M_TEMP); + if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL) + free(outdata, M_TEMP); + return (error); +} + Added: head/sys/dev/ath/if_ath_btcoex.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_btcoex.h Fri Jun 7 09:02:02 2013 (r251487) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2013 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#ifndef __IF_ATH_BTCOEX_H__ +#define __IF_ATH_BTCOEX_H__ + +extern int ath_btcoex_attach(struct ath_softc *sc); +extern int ath_btcoex_detach(struct ath_softc *sc); +extern int ath_btcoex_ioctl(struct ath_softc *sc, struct ath_diag *ad); +extern int ath_btcoex_enable(struct ath_softc *sc, + const struct ieee80211_channel *ch); + +#endif /* __IF_ATH_BTCOEX_H__ */ Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Fri Jun 7 08:06:48 2013 (r251486) +++ head/sys/modules/ath/Makefile Fri Jun 7 09:02:02 2013 (r251487) @@ -38,6 +38,7 @@ KMOD= if_ath SRCS= if_ath.c if_ath_alq.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c SRCS+= if_ath_tx.c if_ath_tx_ht.c if_ath_led.c if_ath_rx.c if_ath_tdma.c SRCS+= if_ath_beacon.c if_ath_rx_edma.c if_ath_tx_edma.c if_ath_spectral.c +SRCS+= if_ath_btcoex.c # NB: v3 eeprom support used by both AR5211 and AR5212; just include it SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h opt_wlan.h From owner-freebsd-wireless@FreeBSD.ORG Fri Jun 7 11:00:26 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D0F30319; Fri, 7 Jun 2013 11:00:26 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (unknown [IPv6:2001:7b8:30f:e0::5059:ee8a]) by mx1.freebsd.org (Postfix) with ESMTP id 89BCE17C0; Fri, 7 Jun 2013 11:00:26 +0000 (UTC) Received: from mx1.psconsult.nl (mx1.hvnu.psconsult.nl [46.44.189.154]) by mx1.psconsult.nl (8.14.5/8.14.4) with ESMTP id r57B0JNT014431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Jun 2013 13:00:24 +0200 (CEST) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.5/8.14.4/Submit) id r57B0IJl014430; Fri, 7 Jun 2013 13:00:18 +0200 (CEST) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Fri, 7 Jun 2013 13:00:18 +0200 From: Paul Schenkeveld To: Adrian Chadd Subject: Re: So long, and thanks for all the fish (kinda) Message-ID: <20130607110018.GA14266@psconsult.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 07 Jun 2013 11:00:26 -0000 Hi Adrian, On Mon, Jun 03, 2013 at 12:17:38PM -0700, Adrian Chadd wrote: > Hi all, > > This Friday will be my last day at Qualcomm Atheros. I've enjoyed > working with the extremely bright and driven engineers and designers > that make the wireless chips and SoCs that people everywhere > take for granted. I've achieved a bunch of goals both with their > internal product development and open source. But now it's time to > move onto different things. > > I'd especially like to thank Luis Rodriguez for introducing me to the > QCA folk and helping me get access to the Atheros open source project, > as well as the follow-up discussions that led to me being hired. > > The open source wireless community has been driving innovation in a > lot of areas for a number of years. I'd like to hope that I've had a > small, positive effect on that. I wish you all the best of luck in > pushing forward and continuing to innovate. > > Now, I'm still NDA-enabled and I quite like hacking on this wireless > stuff so I won't be quitting hacking on things. I will just have other > things on my mind. > > Good luck to you all! Thank you very much for all the work you have done for the project. You've really left an impression that's noticed by ordinary users like myself. I wish you all the best with whatever you'll be doing next and hope to meet you again somewhere in the BSD community. With kind regards, Paul Schenkeveld From owner-freebsd-wireless@FreeBSD.ORG Fri Jun 7 11:04:47 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 37390376; Fri, 7 Jun 2013 11:04:47 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (unknown [IPv6:2001:7b8:30f:e0::5059:ee8a]) by mx1.freebsd.org (Postfix) with ESMTP id C195A17E9; Fri, 7 Jun 2013 11:04:46 +0000 (UTC) Received: from mx1.psconsult.nl (mx1.hvnu.psconsult.nl [46.44.189.154]) by mx1.psconsult.nl (8.14.5/8.14.4) with ESMTP id r57B4eku028462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Jun 2013 13:04:45 +0200 (CEST) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.5/8.14.4/Submit) id r57B4eah028461; Fri, 7 Jun 2013 13:04:40 +0200 (CEST) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Fri, 7 Jun 2013 13:04:40 +0200 From: Paul Schenkeveld To: Adrian Chadd Subject: Re: State os VAP support Message-ID: <20130607110440.GB14266@psconsult.nl> References: <20130429101449.GA27298@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 07 Jun 2013 11:04:47 -0000 On Sun, May 19, 2013 at 10:30:45PM -0700, Adrian Chadd wrote: > Oh, I found the 'bssid' option. > > Try something like 'ifconfig wlanX create wlanmode hostap bssid mode 11g...' > > See if the MAC addresses for each are different. I seem to be able to change the bssid from a login session but trying to do that from rc.conf fails and leaves the wlanX mac addresses set to the ath0 address. I haven't had the opportunity to document the behaviour yet and saw you good-bye message so I'm afraid this one will go into the pr database hoping thatsomeone will pick it up some day. > If you still see the "Discard message X" then that's an orthogonal > issue which we need to diagnose. I don't see that in my testing. Haven't seen those messages. > Adrian Thanks for all your responses! With kind regards, Paul Schenkeveld From owner-freebsd-wireless@FreeBSD.ORG Fri Jun 7 17:15:09 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4B042374 for ; Fri, 7 Jun 2013 17:15:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-f45.google.com (mail-qe0-f45.google.com [209.85.128.45]) by mx1.freebsd.org (Postfix) with ESMTP id 1311D1B2D for ; Fri, 7 Jun 2013 17:15:08 +0000 (UTC) Received: by mail-qe0-f45.google.com with SMTP id w7so23871qeb.18 for ; Fri, 07 Jun 2013 10:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=hHtRrVjWOIdFjenacwHCV+4IWei1X6qZ8wYf5A4Sspg=; b=Q8NzMd/XJse6pJaSuy6yvsq5X/iFZkRzwuARzHYQlYnP106NnVZ1448NFO8fapMcF9 49cpmIS51vaglmGd2h9h84Xgw5k5qxoHyEwtgjr+fuw4fO8qlUks8R4vOZU6vpo4VXnL L2ZsrDzXfcE56LkUbozaWje/O/Ui3PAjEsIgpD6QRjWwqKa8oKjYJnEC/hWCxpeIm//M KW9pBziG9PfuISXMswyydlj7F6TNWPFOZTxhV/+FsigcXoRMW4Lm4VznclgJPOfJK9GB hMasvDCDWftacr/YrG84Z5KzVH9A9obRIfTznbvgDbHZrID6aObvVCVE7mQDN6bXiFQh Saqw== MIME-Version: 1.0 X-Received: by 10.49.49.167 with SMTP id v7mr48873620qen.10.1370625301899; Fri, 07 Jun 2013 10:15:01 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Fri, 7 Jun 2013 10:15:01 -0700 (PDT) In-Reply-To: <20130607110440.GB14266@psconsult.nl> References: <20130429101449.GA27298@psconsult.nl> <20130607110440.GB14266@psconsult.nl> Date: Fri, 7 Jun 2013 10:15:01 -0700 X-Google-Sender-Auth: X8NtxFXYk1_ceRAWO-JOfADTfs8 Message-ID: Subject: Re: State os VAP support From: Adrian Chadd To: Paul Schenkeveld Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 07 Jun 2013 17:15:09 -0000 Oh I'm not stopping my wifi hacking. ;) adrian On 7 June 2013 04:04, Paul Schenkeveld wrote: > On Sun, May 19, 2013 at 10:30:45PM -0700, Adrian Chadd wrote: >> Oh, I found the 'bssid' option. >> >> Try something like 'ifconfig wlanX create wlanmode hostap bssid mode 11g...' >> >> See if the MAC addresses for each are different. > > I seem to be able to change the bssid from a login session but trying > to do that from rc.conf fails and leaves the wlanX mac addresses set to > the ath0 address. > > I haven't had the opportunity to document the behaviour yet and saw > you good-bye message so I'm afraid this one will go into the pr > database hoping thatsomeone will pick it up some day. > >> If you still see the "Discard message X" then that's an orthogonal >> issue which we need to diagnose. I don't see that in my testing. > > Haven't seen those messages. > >> Adrian > > Thanks for all your responses! > > With kind regards, > > Paul Schenkeveld From owner-freebsd-wireless@FreeBSD.ORG Sat Jun 8 15:28:40 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2D1112A7; Sat, 8 Jun 2013 15:28:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-f45.google.com (mail-qe0-f45.google.com [209.85.128.45]) by mx1.freebsd.org (Postfix) with ESMTP id D7AEB113D; Sat, 8 Jun 2013 15:28:39 +0000 (UTC) Received: by mail-qe0-f45.google.com with SMTP id w7so458720qeb.18 for ; Sat, 08 Jun 2013 08:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=c3vKGuuHL40oZVRtqT85dMZEo8edZkkEW/izyewlarM=; b=zASkf/tQmt5WW6RXT3ig6jCQmn1PUwJNogOixPFT3RAtSBpW6mYSgjNfrsAb0ngYpG 2MBGcnj5HS4EDPtEjyHe4lrdrgZNtfZyikKw5w6+lgFzkHWWjIu9yizRvAtY1r/jxiC+ cPkBnMiofDUgYEGo2z0a6Q+J+h8fKNaLhEvzYiRIAJMEiPQqaf2JM7jFu9E16KYmfYRT L/Ca0THz9Zf9zkfOUEsLhtviQZqpEetu9tu2qbr++t5saR+n10NmDvL9xlVhrUJc4J/Z X5WX7Go+u15KDD3TyKB/c6WTNjOr8dmokzXvcDIQ44O6wHmvP38LFgC5usH3cctpxRMk EZKA== MIME-Version: 1.0 X-Received: by 10.224.87.200 with SMTP id x8mr2136807qal.7.1370705318862; Sat, 08 Jun 2013 08:28:38 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Sat, 8 Jun 2013 08:28:38 -0700 (PDT) In-Reply-To: References: Date: Sat, 8 Jun 2013 08:28:38 -0700 X-Google-Sender-Auth: DbZrBM5U-JWNij0rt53kPrI3Ex0 Message-ID: Subject: Re: Thinkpad T60 with Atheros working only after restart from Windows From: Adrian Chadd To: Lyubomir Yotov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org, freebsd-mobile@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 08 Jun 2013 15:28:40 -0000 Hm! Ok, this should be working. I frequently test (read: every other day) with the AR5416. But you're not the first person to report this bug. Unfortunately when this happens, the interrupts aren't actually making it to the OS. Can you check the output of vmstat -i whilst you're doing it? The ath0 counter should be increasing. adrian On 8 June 2013 06:49, Lyubomir Yotov wrote: > Hello, > I have a Thinkpad T60 with dual boot between Windows XP and FreeBSD > 9.1-Release: > > uname -a > FreeBSD T60.workgroup 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: Tue Dec > 4 06:55:39 UTC 2012 > root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > i386 > > I am trying to use my wifi card which is: > > dmesg > .... > ath0: mem 0xedf00000-0xedf0ffff irq 17 at device 0.0 on pci3 > ath0: AR5418 mac 12.10 RF5133 phy 8.1 > .... > > pciconf -lv > .... > ath0@pci0:3:0:0: class=0x028000 card=0x0033168c chip=0x0024168c > rev=0x01 hdr=0x00 > vendor = 'Atheros Communications Inc.' > device = 'AR5008 Wireless Network Adapter' > class = network > ..... > > I followed several HOW-TOs in order to make it work. Unfortunately I it is > working only after I reboot from my Windows installation (regardless of the > position of the wifi switch on the front panel of the notebook). After > restart from Windows everything is fine - the wifi associates with the AP > and I can use it. If I reboot the system during the boot and afterwards I > constantly get: > > ath0: device timeout > > When I get the device status through ifconfig I can see that ath0 is > associated but wlan0 is not associated. > > ifconfig ath0 > ath0: flags=8843 metric 0 mtu 2290 > ether 00:19:7e:91:xx:xx > nd6 options=29 > media: IEEE 802.11 Wireless Ethernet autoselect mode 11g > status: associated > > ifconfig wlan0 > wlan0: flags=8843 metric 0 mtu 1500 > ether 00:19:7e:91:xx:xx > nd6 options=29 > media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) > status: no carrier > ssid "" channel 5 (2432 MHz 11g) > regdomain 98 indoor ecm authmode WPA privacy ON deftxkey UNDEF > txpower 20 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 bgscanidle > 250 > roam:rssi 7 roam:rate 5 protmode CTS wme burst roaming MANUAL > > > In /var/log/messages I get: > > Jun 8 16:39:16 PC wpa_supplicant[3463]: Trying to associate with > 54:e6:fc:ae:xx:xx (SSID='access1' freq=2432 MHz) > Jun 8 16:39:20 PC kernel: ath0: device timeout > Jun 8 16:39:26 PC wpa_supplicant[3463]: Authentication with > 54:e6:fc:ae:xx:xx timed out. > > If I scan for wireless networks I get a list and my ap is in the list > > ifconfig wlan0 scan > SSID/MESH ID BSSID CHAN RATE S:N INT CAPS > net1 00:11:11:01:xx:xx 6 54M -68:-96 100 EP > 5edf9c 70:71:bc:26:xx:xx 11 54M -68:-96 100 EP WPS WPA WME > access1 54:e6:fc:ae:xx:xx 5 54M -66:-96 100 EP WPA HTCAP WME > > > In rc.local I have: > > wlans_ath0="wlan0" > ifconfig_wlan0="WPA DHCP" > > In wpa_supplicant I have: > > ctrl_interface=/var/run/wpa_supplicant > eapol_version=2 > ap_scan=1 > fast_reauth=1 > > network={ > ssid="access1" > psk="secret1" > priority=5 > } > network={ > ssid="access2" > psk="secret2" > priority=5 > } > > I searched the net for solution to my problem but I couldn't find one. Can > you help me with this? > > > Regards, > > Lyubomir > _______________________________________________ > freebsd-mobile@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mobile > To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Sat Jun 8 23:10:07 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 04A4D548 for ; Sat, 8 Jun 2013 23:10:07 +0000 (UTC) (envelope-from paranormal@isgroup.com.ua) Received: from isgroup.com.ua (mail.isgroup.com.ua [46.229.54.104]) by mx1.freebsd.org (Postfix) with ESMTP id 7CEB518D7 for ; Sat, 8 Jun 2013 23:10:05 +0000 (UTC) Received: from [213.111.71.103] (unused-213.111.71.103.bilink.ua [213.111.71.103] (may be forged)) (authenticated bits=0) by isgroup.com.ua (8.14.5/8.14.5) with ESMTP id r58MsI4m062071 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 9 Jun 2013 01:54:18 +0300 (EEST) (envelope-from paranormal@isgroup.com.ua) Subject: Re: WDS From: paranormal To: freebsd-wireless@freebsd.org In-Reply-To: References: <201304252228.21591.onyx@z-up.ru> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-O8T6SOdhU6KOhC80Mt3X" Date: Sun, 09 Jun 2013 01:53:44 +0300 Message-ID: <1370732024.18664.25.camel@eva02> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-Spam-Status: No, score=-101.1 required=5.0 tests=BAYES_00,RDNS_NONE, USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on isgroup.com.ua X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 08 Jun 2013 23:10:07 -0000 --=-O8T6SOdhU6KOhC80Mt3X Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Keep in mind that WDS is the thing which makes possible to crack AP up to 6-10 hours depends on signal and luck. WDS consists only from numbers there is not so much combinations... On Thu, 2013-04-25 at 13:01 -0700, Adrian Chadd wrote: > hi! >=20 > There's some WDS scripts in src/tools/tools - but I've never tested WDS. >=20 > I'd really love it if someone would post a howto on making WDS and DWDS w= ork! >=20 >=20 >=20 > adrian >=20 >=20 > On 25 April 2013 11:28, Dmitry Kolosov wrote: > > I need to expand my home wireless network. > > My environment: > > 1. FreeBSD 9-S based AP with ath0 (AR922X as for pciconf= ) > > configured this way: > > wlans_ath0=3D"wlan0" > > create_args_wlan0=3D"wlanmode hostap dturbo regdomain RU" > > ifconfig_wlan0=3D"channel 2:g ssid mynet_ath 192.168.22.1/24" > > hostapd_enable=3D"YES" > > > > 2. FreeBSD 9-S based STA with ath0 configured this way: > > wlans_ath0=3D"wlan0" > > create_args_wlan0=3D"regdomain RU" > > ifconfig_wlan0=3D"WPA DHCP" > > wpa_supplicant_flags=3D"-sq" > > > > 3. I have DLink DWL 2100AP with WDS support. > > > > Please, point me to corresponding manual to setup a WDS to expand my wi= reless. > > Also, any advices about my configuration are _very_ welcomed! > > Thanks in advance! > > _______________________________________________ > > freebsd-wireless@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.= org" > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.or= g" --=-O8T6SOdhU6KOhC80Mt3X Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAABCgAGBQJRs7X4AAoJEJv+PjkKQxN0fzgQAKEFu5K9O4n8yVjcRIvfw091 Njy79nnxwy2FSKcYSQvnU3WUF4+VQhkFX3c6SoQm2Hrp3HkRfJqlxkkfmXJ+/PBn jBhGQ3qYQFeb5GI31EmazLPw268AXdO4tKujDE1XaO3pSmQuW3/AYUg7zg10Pef4 8S56Nm19JCGzCvT+LDuga2GW2A+0wfnhWSwK93SYESkm00xCViehRSam3rw/xYX9 ejGOh2V7pxIAr4rb8AukDo1vsfGszsCEX7Xcrywtdn8eJ2LwOcUQwdaUPp7GUaZS NZlblsZ8n7dDAuGeqP+wDwsxZlqv0vKDN9pPvbRB19fS2+wOfCofVkx+iKKeJb/1 nc8+yWRIFhWkjMl+na2yAgFqgAr8osU3pQAHzrPI4RrL/ARLtqdlsxa5SQzf3scv opxr6LsHvf4pmM+Ntui3EfAuPW9KTWFQvtPkVC+7BTZp2teRzF4+1XszseRSy/L/ yFo799+iEGT4k3YLo7rxT9hxr5tSe1Q7quyAj+QKBz/FrgxmXahaPF/vg/GKL73i V6ebWTYNRFJ4blD+WPMv4FDCRAp+EBpIdR2hEQMmGEiwP7R3eIsiP81vWQ6LtM0e Ovy/a3qi/Fg1r/oUcBlLER2kz6GlsW5mgMhhVNe0Wjp18Pifxp/XK6PgER8rnedT us6PrFEyqNijjAbKKqWz =cAJi -----END PGP SIGNATURE----- --=-O8T6SOdhU6KOhC80Mt3X--