From owner-freebsd-usb@FreeBSD.ORG Mon Jul 16 02:12:39 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 601CB16A400 for ; Mon, 16 Jul 2007 02:12:39 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD9913C46B for ; Mon, 16 Jul 2007 02:12:38 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so239473anc for ; Sun, 15 Jul 2007 19:12:38 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=poLOScThnNEuYyjsotvebxYnWLg6tIsONKnJIABN7EPavmVUZdZE2uEZ94PoSA2cNdRPS3A5ku22iIkEt+5vwcBYNp0AS8gi7wkzPrYvQbUEluEgNANF2ab9WInNPMtws9H9RoTDwMesLr2kjnc6PLH4M/bwrWdHDJnRE9WZng8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XERtVTyz1Z7Q4WQJZZzAV2/ek5iGaqlIPqWMI6mSb8UJyrUIlDoLP8RK3JAFnyZJAYxO2ulOWLJQtUhU3Yq4u1GDoRA1PDU58uxnBiD3mlxmTGN4h/bMNpOfBmFaqxZatHzu8Awlg4/8DLUoXB3Y1AWk6tz2wLX/rd3ivwaJHkw= Received: by 10.100.37.4 with SMTP id k4mr2061932ank.1184550254527; Sun, 15 Jul 2007 18:44:14 -0700 (PDT) Received: by 10.100.47.20 with HTTP; Sun, 15 Jul 2007 18:44:14 -0700 (PDT) Message-ID: Date: Mon, 16 Jul 2007 09:44:14 +0800 From: "Sepherosa Ziehau" To: "Hans Petter Selasky" In-Reply-To: <200707151839.02907.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707151839.02907.hselasky@c2i.net> Cc: Sam Leffler , freebsd-usb@freebsd.org Subject: Re: if_ural.c in FreeBSD 7-current X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2007 02:12:39 -0000 On 7/16/07, Hans Petter Selasky wrote: > Hi, > > Can someone answer me quick on this one: > > In FreeBSD 7-current, I think I see some mistakes in "if_ural.c". > > For example: > > > #define URAL_RSSI(rssi) \ > > ((rssi) > (RAL_NOISE_FLOOR + RAL_RSSI_CORR) ? \ > > ((rssi) - RAL_NOISE_FLOOR + RAL_RSSI_CORR) : 0) > > > Should there be a parenthesis here ?? Ah, yes, you are correct. My fault. > > > #define URAL_RSSI(rssi) \ > > ((rssi) > (RAL_NOISE_FLOOR + RAL_RSSI_CORR) ? \ > > ((rssi) - (RAL_NOISE_FLOOR + RAL_RSSI_CORR)) : 0) > > Also I see that the basic rate set is set multiple times: > > By "set_chan" and when the RUN state is entered! This does not make sense! This does make sense: 1) It is actually "ack rate set", as according to Ralink's sample driver. 2) Even if it is "basic rate set", the value is not necessarily the same when probing BSS or when joining a BSS. The BSS that the STA has joined (before ->RUN) may have different basic rate set than STA used to do BSS probing. Best Regards, sephe -- Live Free or Die