From owner-freebsd-current@FreeBSD.ORG Mon May 10 19:56:33 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 0B22D1065677 for ; Mon, 10 May 2010 19:56:33 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 7EC948FC14 for ; Mon, 10 May 2010 19:56:32 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id d26so208861eyd.9 for ; Mon, 10 May 2010 12:56:31 -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=khvWE0gdb/dzS5ntgB14APS9Uk4Hp7g1Kci6Aqft4U8=; b=ezn6Sj7GUobYTtq0kkn4nQSJg+4zBgQqwNL6bMdYlhYlgjhchvfqHMpIN50Nl+aXIf rcXiRf8JhBn67IF8aejN5VHeRyMNWfq4xHe0IKi92zeOKTgtrbxykU7DfIAJDWieDUb8 kwEeBv3pSIg8IV/CYjpBUsA7uJ0dBqLjnJlMI= 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=psMocNG5Aym0ijlCqDSk8uqqbsvJk6URi18+4F/GEu9p0dIn2ccIIhpMwNgX021hDI hfVNzOqtK/V7Axc5bEMXFGhxgY+0utYmXiZxi0HkqdCFEnBkGUDRD9ITK+LUGKQogwTw Bh7NFmp0ci66WINvqSrpGCiA0YOETyjmBD7vM= Received: by 10.213.51.138 with SMTP id d10mr1491565ebg.75.1273521391086; Mon, 10 May 2010 12:56:31 -0700 (PDT) Received: from weongyo ([174.35.1.224]) by mx.google.com with ESMTPS id 13sm2681713ewy.13.2010.05.10.12.56.26 (version=SSLv3 cipher=RC4-MD5); Mon, 10 May 2010 12:56:27 -0700 (PDT) Received: by weongyo (sSMTP sendmail emulation); Mon, 10 May 2010 12:56:22 -0700 From: Weongyo Jeong Date: Mon, 10 May 2010 12:56:22 -0700 To: Gustavo Perez Querol Message-ID: <20100510195622.GA1295@weongyo> Mail-Followup-To: Gustavo Perez Querol , current@freebsd.org, Ian FREISLICH References: <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> <20100506190653.GA31100@weongyo> <58220.88.15.97.205.1273248485.squirrel@webmail.entel.upc.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline In-Reply-To: <58220.88.15.97.205.1273248485.squirrel@webmail.entel.upc.edu> User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: Ian FREISLICH , 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: Mon, 10 May 2010 19:56:33 -0000 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 07, 2010 at 06:08:05PM +0200, Gustavo Perez Querol wrote: > > > > > 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. > > > > The patch made the machine to panic. I think it happened when launching > the supplicant. In fact, right now it works by putting the RF switch to > OFF. As soon as I change it to ON the machine panics. > > It get a trap 12, with two reasons : page fault and "bufwrite, buffer is > not busy?" > > I'm running 9.0/AMD64 from 1 of May (don't know exact svn revision). > > Do you want me to test anything else ? OK. The patch is ready to test. Could you please test it with attached patch? regards, Weongyo Jeong --rJwd6BRFiFCcLxzm Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch_bwn_20100510.diff" Index: if_bwn.c =================================================================== --- if_bwn.c (revision 207881) +++ 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); @@ -8994,7 +9000,7 @@ struct bwn_stats *stats = &mac->mac_stats; struct ieee80211_node *ni; struct ieee80211vap *vap; - int slot; + int retrycnt = 0, slot; BWN_ASSERT_LOCKED(mac->mac_sc); @@ -9027,7 +9033,7 @@ status->ack ? IEEE80211_RATECTL_TX_SUCCESS : IEEE80211_RATECTL_TX_FAILURE, - NULL, 0); + &retrycnt, 0); break; } slot = bwn_dma_nextslot(dr, slot); @@ -9048,7 +9054,7 @@ status->ack ? IEEE80211_RATECTL_TX_SUCCESS : IEEE80211_RATECTL_TX_FAILURE, - NULL, 0); + &retrycnt, 0); } bwn_pio_handle_txeof(mac, status); } --rJwd6BRFiFCcLxzm--