Return-path: Received: from mail-we0-f182.google.com ([74.125.82.182]:56344 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753131Ab3CZRdt (ORCPT ); Tue, 26 Mar 2013 13:33:49 -0400 Received: by mail-we0-f182.google.com with SMTP id k14so3747103wer.27 for ; Tue, 26 Mar 2013 10:33:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5151DA98.7030903@candelatech.com> References: <201303251712.19808.chunkeey@googlemail.com> <5151D752.3080303@candelatech.com> <5151DA98.7030903@candelatech.com> Date: Tue, 26 Mar 2013 10:33:47 -0700 Message-ID: (sfid-20130326_183353_794835_DA2621CD) Subject: Re: [ath9k-devel] Auth Packet TX Delay From: Adrian Chadd To: Ben Greear Cc: Robert Shade , Christian Lamparter , ath9k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org, Marco Fonseca Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: Right. Well, when you reset the FIFO chances are you should walk said FIFO queue in the TXQ (not the pending frames, the "hw" frames) and requeue each to the hardware. What I am doing in my EDMA restart routine in FreeBSD: * (assume TX is stopped, chip is reset, the completed frames are already removed from the FIFO queue in the TXQ); * save the old FIFO count * blank the FIFO count * walk the FIFO list (NOT the pending list), pushing head pointers back into the FIFO - and this will bump the FIFO counter by one each time; * when I've finished that, compare the FIFO count to the old FIFO count - they should match. I've not looked at the ath9k code in too much depth lately as I've been more interested in getting FreeBSD's EDMA code finished (and I think it is, woo!); so if you give me an hour or two I'll go do another code review and see what pops up. Adrian