[Lugro-mesh] Stuck beacon

Gustavo Lindberg lugro-mesh@lugro.org.ar
Tue, 17 Jul 2007 15:47:52 +0000


------=_Part_87977_3530325.1184687272118
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Claves interesantes, sobre todo la primera que tira sysctl

dev.ath.hal.dma_beacon_response_time =3D 2
dev.ath.hal.sw_beacon_response_time =3D 10
dev.ath.hal.swba_backoff =3D 0
dev.ath.countrycode =3D 0
dev.ath.outdoor =3D 0
dev.ath.xchanmode =3D 1
dev.ath.calibrate =3D 1
dev.wifi0.slottime =3D 9
dev.wifi0.acktimeout =3D 48
dev.wifi0.ctstimeout =3D 48
dev.wifi0.softled =3D 0
dev.wifi0.ledpin =3D 0
dev.wifi0.countrycode =3D 0
dev.wifi0.regdomain =3D 16
dev.wifi0.txantenna =3D 0
dev.wifi0.rxantenna =3D 2
dev.wifi0.diversity =3D 1
dev.wifi0.txintrperiod =3D 5
dev.wifi0.fftxqmin =3D 3
dev.wifi0.xrpollperiod =3D 100
dev.wifi0.xrpollcount =3D 32
dev.wifi0.ackrate =3D 0


Saludos

El d=EDa 17/07/07, Sebasti=E1n D. Criado <scriado@ciudad.com.ar> escribi=F3=
:
>
> El Lunes 16 Julio 2007 16:04, Gustavo Lindberg escribi=F3:
> > http://lists.soekris.com/pipermail/soekris-tech/2005-April/008016.html
> >
> >
> > Seba, bajate el resto del codigo Meraki y fijate que version de madwifi
> > usan ellos. Tal ves tengamos que usar el mismo driver de los meraki.
>
> Lo que pude ver en el trunk que tenemos nosotros es que hay un parche
> dentro
> del madwifi por el tema de los beacon llamado:
>
> 306-bstuck_calibrate.patch
>
> para el if_ath.c
>
> para que quede as=ED:
>
> ath_bstuck_tasklet(TQUEUE_ARG data)
> {
>         struct net_device *dev =3D (struct net_device *)data;
>         struct ath_softc *sc =3D dev->priv;
>         /*
>          * XXX:if the bmisscount is cleared while the
>          *     tasklet execution is pending, the following
>          *     check will be true, in which case return
>          *     without resetting the driver.
>          */
>         if (sc->sc_bmisscount <=3D BSTUCK_CALIBR_THR)
>                 return;
>
>         if (sc->sc_bmisscount <=3D BSTUCK_RESET_THR) {
>                 ATH_LOCK(sc);
>                 ath_do_calibrate(dev);
>                 mod_timer(&sc->sc_cal_ch, jiffies + (ath_calinterval *
> HZ));
>                 ATH_UNLOCK(sc);
>                 return;
>         }
>
>         printk("%s: stuck beacon; resetting (bmiss count %u)\n",
>                 DEV_NAME(dev), sc->sc_bmisscount);
>         ath_reset(dev);
> }
>
>
> Como se puede ver, si ninguno de los 2 if da true, tira el error y resete=
a
> el
> driver.
>
> Los valores que compara se encuentran definidos en if_athvar.h de la
> siguiente
> manera:
>
> #define BSTUCK_CALIBR_THR       3       /* # of stuck beacons before
> restarting calibration */
> #define BSTUCK_RESET_THR        10      /* # of stuck beacons before
> resetting
> NB: this is a guess*/
>
> No me puse a seguir lo que como se setea sc_bmisscount ni por que,  pero
> puede
> ser una punta.
>
> Saludos.-
>
>
>
>
> --
> Sebasti=E1n D. Criado - scriado{en}ciudad.com.ar
> NO A LA MATRICULACI=D3N OBLIGATORIA -
> http://noalamatricula.wordpress.com/about/
> L.U.G.Ro - http://www.lugro.org.ar
> GNU/Linux Registered User # 146768
> -------------------------------------------------------------------
> "Si el Universo fuera un programa estar=EDa hecho en C, y correr=EDa sobr=
e
> un sistema UNIX"
>                                                         An=F3nimo.
>
>

------=_Part_87977_3530325.1184687272118
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Claves interesantes, sobre todo la primera que tira sysctl<br><br>dev.ath.h=
al.dma_beacon_response_time =3D 2<br>dev.ath.hal.sw_beacon_response_time =
=3D 10<br>dev.ath.hal.swba_backoff =3D 0<br>dev.ath.countrycode =3D 0<br>de=
v.ath.outdoor
 =3D 0<br>dev.ath.xchanmode =3D 1<br>dev.ath.calibrate =3D 1<br>dev.wifi0.s=
lottime =3D 9<br>dev.wifi0.acktimeout =3D 48<br>dev.wifi0.ctstimeout =3D 48=
<br>dev.wifi0.softled =3D 0<br>dev.wifi0.ledpin =3D 0<br>dev.wifi0.countryc=
ode =3D 0<br>dev.wifi0.regdomain
 =3D 16<br>dev.wifi0.txantenna =3D 0<br>dev.wifi0.rxantenna =3D 2<br>dev.wi=
fi0.diversity =3D 1<br>dev.wifi0.txintrperiod =3D 5<br>dev.wifi0.fftxqmin =
=3D 3<br>dev.wifi0.xrpollperiod =3D 100<br>dev.wifi0.xrpollcount =3D 32<br>=
dev.wifi0.ackrate
 =3D 0<br><br><br>Saludos<br><br><div><span class=3D"gmail_quote">El d=EDa =
17/07/07, <b class=3D"gmail_sendername">Sebasti=E1n D. Criado</b> &lt;<a hr=
ef=3D"mailto:scriado@ciudad.com.ar">scriado@ciudad.com.ar</a>&gt; escribi=
=F3:</span><blockquote class=3D"gmail_quote" style=3D"border-left: 1px soli=
d rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
El Lunes 16 Julio 2007 16:04, Gustavo Lindberg escribi=F3:<br>&gt; <a href=
=3D"http://lists.soekris.com/pipermail/soekris-tech/2005-April/008016.html"=
>http://lists.soekris.com/pipermail/soekris-tech/2005-April/008016.html</a>=
<br>
&gt;<br>&gt;<br>&gt; Seba, bajate el resto del codigo Meraki y fijate que v=
ersion de madwifi<br>&gt; usan ellos. Tal ves tengamos que usar el mismo dr=
iver de los meraki.<br><br>Lo que pude ver en el trunk que tenemos nosotros=
 es que hay un parche dentro
<br>del madwifi por el tema de los beacon llamado:<br><br>306-bstuck_calibr=
ate.patch<br><br>para el if_ath.c<br><br>para que quede as=ED:<br><br>ath_b=
stuck_tasklet(TQUEUE_ARG data)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;struct net_device *dev =3D (struct net_device *)data;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;struct ath_softc *sc =
=3D dev-&gt;priv;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*<br>=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * XXX:if the bmisscount is=
 cleared while the<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nb=
sp;&nbsp;&nbsp;&nbsp; tasklet execution is pending, the following<br>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; check =
will be true, in which case return
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nb=
sp; without resetting the driver.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (sc-&gt=
;sc_bmisscount &lt;=3D BSTUCK_CALIBR_THR)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<b=
r><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (sc-&gt;sc_bmissco=
unt &lt;=3D BSTUCK_RESET_THR) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;ATH_LOCK(sc);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ath_do_calibrate=
(dev);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mod_timer(&amp;sc-&gt;sc_cal_ch, jiffies + (=
ath_calinterval * HZ));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ATH_UNLOCK(sc);<br>&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;return;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printk(&quot;%s: stuck beacon; resetting (bmi=
ss count %u)\n&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DEV_NAME(dev), sc-&gt;sc_bmis=
scount);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ath_reset(dev);=
<br>}<br><br><br>Como se puede ver, si ninguno de los 2 if da true, tira el=
 error y resetea el
<br>driver.<br><br>Los valores que compara se encuentran definidos en if_at=
hvar.h de la siguiente<br>manera:<br><br>#define BSTUCK_CALIBR_THR&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* # of s=
tuck beacons before<br>restarting calibration */<br>#define BSTUCK_RESET_TH=
R&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;/* # of stuck beacons before resetting
<br>NB: this is a guess*/<br><br>No me puse a seguir lo que como se setea s=
c_bmisscount ni por que,&nbsp;&nbsp;pero puede<br>ser una punta.<br><br>Sal=
udos.-<br><br><br><br><br>--<br>Sebasti=E1n D. Criado - scriado{en}ciudad.c=
om.ar<br>
NO A LA MATRICULACI=D3N OBLIGATORIA - <a href=3D"http://noalamatricula.word=
press.com/about/">http://noalamatricula.wordpress.com/about/</a><br><a href=
=3D"http://L.U.G.Ro">L.U.G.Ro</a> - <a href=3D"http://www.lugro.org.ar">htt=
p://www.lugro.org.ar
</a><br>GNU/Linux Registered User # 146768<br>-----------------------------=
--------------------------------------<br>&quot;Si el Universo fuera un pro=
grama estar=EDa hecho en C, y correr=EDa sobre<br>un sistema UNIX&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An=F3nimo.<br><br></blockquote></div><b=
r>

------=_Part_87977_3530325.1184687272118--