From owner-freebsd-wireless@FreeBSD.ORG Sun Sep 23 22:32:47 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D11A0106566B for ; Sun, 23 Sep 2012 22:32:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id A44E38FC0C for ; Sun, 23 Sep 2012 22:32:47 +0000 (UTC) Received: by pbbrp8 with SMTP id rp8so1891102pbb.13 for ; Sun, 23 Sep 2012 15:32:46 -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=fWHRiEO+9w3no8tYmGJaQDirYadXHMh5uMPKn0u3vkg=; b=mk3MuA6a4xmjxyuVxdJWDi1TIYvlujsgt2tXOuIKSDvA8WiNgCN8MrrhYKbAR9eZci VKxK/+3MzdjCHZcs7MuzJuYQpVpBNOPmi/rBsFFgPwSXqI3S7mSr/sIjMI2YNFGKwKyi b7J7Pas6Fk+tFvqcUiibZpQk0icIMibViR39LwfDzsbpEOeJBXx9jmMCjNbp2FMljp0f vJSF6PQXgOPaXy1bDUnOacyAhgWYxzyObeohwMxnmCAIAfHtfU3Reg8Lhb1FdSaey8+a ohjntlX202kjQKM2LVEKd+8XV48+udxumVZbun/wbY3sdQPJg43vCV7JLqxmPYTn4KUJ D8PQ== MIME-Version: 1.0 Received: by 10.68.204.169 with SMTP id kz9mr31938973pbc.39.1348439566794; Sun, 23 Sep 2012 15:32:46 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.36.106 with HTTP; Sun, 23 Sep 2012 15:32:46 -0700 (PDT) In-Reply-To: References: Date: Sun, 23 Sep 2012 15:32:46 -0700 X-Google-Sender-Auth: mEjNYzpvipsTt6sG5x9wHIUFt9k Message-ID: From: Adrian Chadd To: Berislav Purgar Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: broken TX in HEAD (AR5212) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Sep 2012 22:32:47 -0000 Hiya, Ok. Please keep me posted. I've found some annoying behaviours this weekend. * The rx proc tasklet gets called slightly too often- if an RX interrupt comes in whilst ath_rx_proc is running, the kernel will preempt that thread, run ath_intr(), which will reschedule ath_rx_proc to run. The next time it runs (which will be immediatley after the previous one finishes), it'll discover there's nothing left in the RX queue. That's not too scary; just slightly wasteful. But the annoying one: * I'm getting TXEOL interrupts appearing (which is by design, so that's OK) - but then when the descriptor is checked, the first descriptor in the list shows up as HAL_EINPROGRESS - and sure enough, the contents of that descriptor are not yet initialised. Now on my MIPS boards the descriptors are in KSEG1 - which is supposed to be unmapped, uncached memory. A subsequent TXEOL (from another descriptor being pushed into the queue) or TXOK (from that descriptor completing TX successfully) will kick the queue along. Now I don't _think_ this is the core problem. I thought it was a problem before but it's very likely just something that I've noticed going slightly "odd" when I began digging into it. (Yes, I may have spent a chunk of yesterday chasing a red herring. Sigh.) What actually does happen is that hostapd actually boots my station off because it fails to re-synchronise the group key. When hostapd decides its time, it regenerates a group key and pushes it out to each STA. It's done STA-at-a-time - ie, the STA has to ACK the new group key. I'm seeing hostapd not "see" an ACK and it's thus getting angry and leaving. I'm just adding some debugging code to my tree now to see if I can pinpoint what's going on - whether the frame is going out, whether it's being successfully transmitted, whether the other end hears it, whether the receive path is working .. heck, since it's all done via raw BPF sockets, it may be some BPF related hilarity. :( Adrian