From owner-freebsd-wireless@FreeBSD.ORG Tue Aug 23 11:40:51 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0F461065686; Tue, 23 Aug 2011 11:40:51 +0000 (UTC) (envelope-from paradyse@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 411B48FC26; Tue, 23 Aug 2011 11:40:50 +0000 (UTC) Received: by vxh11 with SMTP id 11so11951vxh.13 for ; Tue, 23 Aug 2011 04:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=GDu/unf4hrq4HOaZcp4+p/BFXUJHggIHF8wzGb1CEcQ=; b=P6dzSEF4E+dvhRl99kpI0hyhuKvR+5D/5lggGASAwo4PZo5rYSE3mN4cVViANZs4By roZgMCYONHq6HHTT/LHwakFmVOm7sQ2MqQbSKEnKzX3HdhCG/5V3GahX9UFmOlkI0MfM d24B8//aLmOQUfnUtgOKOcmUotm3XuWqB8FR8= Received: by 10.52.172.199 with SMTP id be7mr3713810vdc.134.1314099650472; Tue, 23 Aug 2011 04:40:50 -0700 (PDT) MIME-Version: 1.0 Sender: paradyse@gmail.com Received: by 10.52.167.233 with HTTP; Tue, 23 Aug 2011 04:40:30 -0700 (PDT) In-Reply-To: References: From: Kang Yin Su Date: Tue, 23 Aug 2011 19:40:30 +0800 X-Google-Sender-Auth: 0mRaPwJTx9vkbRqs5yy9PFrrsGI Message-ID: To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-wireless@freebsd.org Subject: Re: AR5416 beacon issue. 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: Tue, 23 Aug 2011 11:40:51 -0000 Please commit my fix, if everything is fine :) On Tue, Aug 23, 2011 at 7:27 PM, Adrian Chadd wrote: > Yes, generation of sequence numbers has to be done in software for 11n > aggregation to work correctly. > > > Adrian > > On 23 August 2011 19:24, Kang Yin Su wrote: > > My AR9220 datasheet said that "Stops PCU from replacing the sequence > number; > > _must_ be set to 1". > > There is the register in AR5212, but the datasheet did not say it must be > > set to 1. > > Maybe sequence number generated in software is a must for 11n? > > -Yin > > On Tue, Aug 23, 2011 at 7:12 PM, Adrian Chadd > wrote: > >> > >> Oh, I just wanted to ensure that was the root cause! > >> > >> So the real question is: should the drivers assume for now that > >> sequence numbers should be generated in software? > >> Does all the hardware even support that? > >> > >> > >> Adrian > >> > >> On 23 August 2011 18:54, Kang Yin Su wrote: > >> > Tried disable that, it works also. However the sequence number in > packet > >> > is > >> > less controllable. There are some packets like QoS need to fill the > >> > sequence > >> > number from the TID sequence space. > >> > > >> > -Yin > >> > On Tue, Aug 23, 2011 at 6:29 PM, Adrian Chadd > >> > wrote: > >> >> > >> >> That's a great catch. So from memory: > >> >> > >> >> * there are bits that control whether the MAC generates sequence > >> >> numbers > >> >> or not; > >> >> * the frame type in the TX descriptor can also modify that. > >> >> > >> >> AR5416: > >> >> > >> >> * D_MISC for each DCU, bit 20: Sequence number increment disable; > >> >> resets > >> >> to 0x0. > >> >> * MAC_PCU_STA_ADDR_U16 - (0x8004) bit 29: REG_PRESERVE_SEQNUM: Stops > >> >> PCU from replacing the sequence number > >> >> > >> >> AR5212: > >> >> > >> >> * D_MISC: same deal: bit 20 - SEQNUMINCDIS > >> >> * same deal with MAC_PCU_STA_ADDR_U16 above: bit 29 > >> >> > >> >> 30 seconds with the HAL has shown what's going on: > >> >> > >> >> ar5416Reset(): > >> >> > >> >> /* > >> >> * disable seq number generation in hw > >> >> */ > >> >> OS_REG_WRITE(ah, AR_STA_ID1, > >> >> OS_REG_READ(ah, AR_STA_ID1) | > AR_STA_ID1_PRESERVE_SEQNUM); > >> >> > >> >> That bit isn't set for the AR5212. > >> >> > >> >> Try disabling that, see if it works on the AR5416. > >> >> > >> >> If it does, then we should (all) have a brief discussion what the > >> >> "correct" behaviour is moving forward. > >> >> > >> >> > >> >> Adrian > >> >> > >> >> > >> >> On 23 August 2011 17:37, Kang Yin Su wrote: > >> >> > Hi all, > >> >> > OK, this patch fix the beacons sequence number from AR5416 chips. > >> >> > With > >> >> > this > >> >> > code added, both beacons send from AR5212 and AR5416 chips are > fine, > >> >> > the > >> >> > sequence numbers are increase by 1. I have no idea why the AR5212 > >> >> > chips > >> >> > do > >> >> > not this require this. The AR5212 hardware probably ignore this > field > >> >> > and > >> >> > added the seq no. by itself? > >> >> > Thanks, > >> >> > Yin > >> >> > On Tue, Aug 23, 2011 at 3:50 PM, Kang Yin Su > >> >> > wrote: > >> >> >> > >> >> >> Hi All, > >> >> >> Using FreeBSD HEAD create a AP, found that the beacon frames have > no > >> >> >> sequence number on AR5416 WiFi card, however there is sequence > >> >> >> number > >> >> >> on > >> >> >> AR5212 WiFi card. Attached is the WiFi capture on both card. > >> >> >> 00:1b:b1:59:ab:4d is AR5416 and 00:0b:6b:2d:f2:cc is AR5212. > >> >> >> Thanks, > >> >> >> Yin > >> >> > > >> > > >> > > > > > >