Date: Tue, 1 Jan 2013 13:41:21 +0800 From: Jov <zhao6014@gmail.com> To: PseudoCylon <moonlightakkiy@yahoo.ca> Cc: freebsd-questions@freebsd.org Subject: Re: buffalo wli-uc-gn wireless card sometimes unusable and emit "run0: wcid=xx out of range" Message-ID: <CADyrUxPZKRhaT-1y9%2BqWYG9N1O7o6SB4rsfAcm-A18LibxsD=Q@mail.gmail.com> In-Reply-To: <CAFZ_MY%2BBBqVFvzSMpCHAXr6ysxo9UEEeLmeqW0YCnozxZkBecA@mail.gmail.com> References: <CAFZ_MY%2BBBqVFvzSMpCHAXr6ysxo9UEEeLmeqW0YCnozxZkBecA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
thanks very much=A3=ACi will try the patch.
jov
=D4=DA 2013-1-1 =CF=C2=CE=E71:19=A3=AC"PseudoCylon" <moonlightakkiy@yahoo.c=
a>=D0=B4=B5=C0=A3=BA
> > Message: 13
> > Date: Mon, 31 Dec 2012 18:11:04 +0800
> > From: Jov <zhao6014@gmail.com>
> > To: freebsd-questions@freebsd.org
> > Subject: buffalo wli-uc-gn wireless card sometimes unusable and emit
> > "run0: wcid=3Dxx out of range"
> > Message-ID:
> > <
> CADyrUxPrP6OS2mpK51yiwoG-jKwTQ+XpOP48uZQ+Y15_oUr9Sg@mail.gmail.com>
> > Content-Type: text/plain; charset=3DISO-8859-1
> >
> > hi experts:
> > I think the hardware is ok because I can use it in Win7. And in Freebsd
> > 9.1,it works for sometime,but sometimes after system reboot or I plug
> out &
> > plug in the card it my unusable.on the console it emmit:
> > "run0: wcid=3Dxx out of range" where xx is 91,87 and etc.
>
> Please try attached patch.
>
> Reboot or re-plug-in shouldn't be a cause of the problem. Receiving an
> association ID larger than device's max (64) is the problem. You must
> be using a high-end AP. Reboot or re-plug-in initiate re-association
> and just happen to receive a large association ID.
>
>
> AK
>
>
> --begin patch--
>
> diff --git a/dev/usb/wlan/if_run.c b/dev/usb/wlan/if_run.c
> index 3d2577f..ed11d97 100644
> --- a/dev/usb/wlan/if_run.c
> +++ b/dev/usb/wlan/if_run.c
> @@ -2019,7 +2019,8 @@ run_key_set_cb(void *arg)
> wcid =3D 0; /* NB: update WCID0 for group keys */
> base =3D RT2860_SKEY(RUN_VAP(vap)->rvp_id, k->wk_keyix);
> } else {
> - wcid =3D RUN_AID2WCID(associd);
> + wcid =3D (vap->iv_opmode =3D=3D IEEE80211_M_STA) ?
> + 1 : RUN_AID2WCID(associd);
> base =3D RT2860_PKEY(wcid);
> }
>
> @@ -2374,9 +2375,12 @@ run_newassoc(struct ieee80211_node *ni, int isnew)
> struct run_softc *sc =3D ic->ic_ifp->if_softc;
> uint8_t rate;
> uint8_t ridx;
> - uint8_t wcid =3D RUN_AID2WCID(ni->ni_associd);
> + uint8_t wcid;
> int i, j;
>
> + wcid =3D (vap->iv_opmode =3D=3D IEEE80211_M_STA) ?
> + 1 : RUN_AID2WCID(ni->ni_associd);
> +
> if (wcid > RT2870_WCID_MAX) {
> device_printf(sc->sc_dev, "wcid=3D%d out of range\n", wci=
d);
> return;
> @@ -3044,8 +3048,12 @@ run_tx(struct run_softc *sc, struct mbuf *m,
> struct ieee80211_node *ni)
> txd->flags =3D qflags;
> txwi =3D (struct rt2860_txwi *)(txd + 1);
> txwi->xflags =3D xflags;
> - txwi->wcid =3D IEEE80211_IS_MULTICAST(wh->i_addr1) ?
> - 0 : RUN_AID2WCID(ni->ni_associd);
> + if (IEEE80211_IS_MULTICAST(wh->i_addr1))
> + txwi->wcid =3D 0;
> + else {
> + txwi->wcid =3D (vap->iv_opmode =3D=3D IEEE80211_M_STA) ?
> + 1 : RUN_AID2WCID(ni->ni_associd);
> + }
> /* clear leftover garbage bits */
> txwi->flags =3D 0;
> txwi->txop =3D 0;
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADyrUxPZKRhaT-1y9%2BqWYG9N1O7o6SB4rsfAcm-A18LibxsD=Q>
