From owner-freebsd-current@FreeBSD.ORG Thu May 6 19:06:55 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15A291065679 for ; Thu, 6 May 2010 19:06:55 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from mail-pz0-f174.google.com (mail-pz0-f174.google.com [209.85.222.174]) by mx1.freebsd.org (Postfix) with ESMTP id CF3258FC20 for ; Thu, 6 May 2010 19:06:54 +0000 (UTC) Received: by pzk4 with SMTP id 4so132435pzk.7 for ; Thu, 06 May 2010 12:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:organization:x-operation-sytem; bh=Rm54k2FTvzvdHri5ilohSwnqnfhJ9xQM8JuD1bXN7Ug=; b=E2PENdVLj1WZTob8fG5kocJKlZnmFa8z5e0Vi2C8nGyLJ9KfCdqvgiBY0+T7WZEtUk 6s44B2J6Hl8c6dOPGBoplEkOM/MJMvHsTapNlaagsTM5DXu0ZwK1fNu2NlYxKlE0ZjJk 7bkH1NOMYarSumiUVZ8XTnQaGfCpP0KFsl19I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:organization:x-operation-sytem; b=FvAY4oFFK2R2uQGUhJGT/zM4Fbo92W/ExwTvLyugliG2Y1tHY3jCERolIlfXhq+RHm Opzek0q0Z3ZfQbFKNdLykhWLJ9V7LsgMzLq/WNQGr4xFnFTMfwYgIebQ5l91jlpSvyDz 2JJdlH9YzYCB/eTDJQKD4W0q/u7rYEOSH8YH4= Received: by 10.140.57.7 with SMTP id f7mr6953456rva.201.1273172810095; Thu, 06 May 2010 12:06:50 -0700 (PDT) Received: from weongyo ([174.35.1.224]) by mx.google.com with ESMTPS id t10sm579375rvl.10.2010.05.06.12.06.47 (version=SSLv3 cipher=RC4-MD5); Thu, 06 May 2010 12:06:48 -0700 (PDT) Received: by weongyo (sSMTP sendmail emulation); Thu, 6 May 2010 12:06:53 -0700 From: Weongyo Jeong Date: Thu, 6 May 2010 12:06:53 -0700 To: Gustau P?rez Message-ID: <20100506190653.GA31100@weongyo> Mail-Followup-To: Gustau P?rez , current@freebsd.org References: <20100226005115.GP14937@weongyo> <20100227011535.ed3f2486.ray@ddteam.net> <20100228095259.GB3536@weongyo> <20100301103240.3a4aac8a.ray@dlink.ua> <20100303082833.GB22865@weongyo> <20100303111014.6564ea1e.ray@dlink.ua> <20100312231333.GZ1295@weongyo> <4BD2201E.3090409@entel.upc.edu> <20100424231755.GI65380@weongyo> <4BD4A928.8020901@entel.upc.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <4BD4A928.8020901@entel.upc.edu> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: current@freebsd.org Subject: Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 19:06:55 -0000 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Apr 25, 2010 at 10:42:16PM +0200, Gustau P?rez wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > >> I've been testing the driver for a few time with AMD64/CURRENT. A > >> few time ago I started to see messages like : > >> > >> bwn0: unsupported rate 0 > >> > >> I've checked the code and I found it seems to fail when trying to > >> check the TX rate at if_bw.c:9561 (in bwn_ieeerate2hwrate > >> routine the rate parameter is 0). I checked where bwn_ieeerate2hwrate > >> is called, to see how 'rate' is calculated. This is where I got lost :( > >> > >> My AP is FreeBSD 8.0 box with an atheros card. My hostapd works > >> with both WPA2-PSK and WPA2-EAP (although > >> I thinks this is not the problem) but with default values for rates > >> and friends. I then forced my hostapd to use only a subset of transmit > >> rates (with supported_rates and basic_rates) with no luck. > >> > >> My laptop is a DELL D630 with a BCM4310 UART adapter. > >> > >> Any need info will be provided and any help will be appreciated. > > > > First I think we need to know that where rate == 0 comes from. Rate > > information on TX could be got from the following points: > > > > tp->mgmtrate > > tp->mcastrate > > tp->ucastrate > > ni->ni_txrate > > > Added some device_printf to test those values. This is what I got : > > bwn0: tp->mgmtrate : 2 > bwn0: tp->mcastrate : 2 > bwn0: tp->ucastrate : 255 > bwn0: ni->ni_txrate : 0 > > I didn't have time to follow the code to find out why it has a 0 > value. If you need > more info let me know. Hello Gustau, I'm so sorry for belated response that I had no time to read and work email and wireless stuffs. Could you please test this symptom with attached patch? It looks in CURRENT it missed to initialize a ratectl when it associates with AP. regards, Weongyo Jeong --KsGdsel6WgEHnImy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch_bwn_20100506.diff" Index: if_bwn.c =================================================================== --- if_bwn.c (revision 207481) +++ if_bwn.c (working copy) @@ -8329,6 +8329,7 @@ static int bwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { + const struct ieee80211_txparam *tp; struct bwn_vap *bvp = BWN_VAP(vap); struct ieee80211com *ic= vap->iv_ic; struct ifnet *ifp = ic->ic_ifp; @@ -8377,6 +8378,11 @@ bwn_set_pretbtt(mac); bwn_spu_setdelay(mac, 0); bwn_set_macaddr(mac); + + /* Initializes ratectl for a node. */ + tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; + if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) + ieee80211_ratectl_node_init(vap->iv_bss); } BWN_UNLOCK(sc); --KsGdsel6WgEHnImy--