Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 May 2010 12:56:22 -0700
From:      Weongyo Jeong <weongyo.jeong@gmail.com>
To:        Gustavo Perez Querol <gperez@entel.upc.edu>
Cc:        Ian FREISLICH <ianf@clue.co.za>, current@freebsd.org
Subject:   Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver
Message-ID:  <20100510195622.GA1295@weongyo>
In-Reply-To: <58220.88.15.97.205.1273248485.squirrel@webmail.entel.upc.edu>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100510195622.GA1295>