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

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);
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to