Date: Tue, 9 Aug 2011 15:11:38 +0200 From: Bernhard Schmidt <bschmidt@freebsd.org> To: Lev Serebryakov <lev@serebryakov.spb.ru> Cc: freebsd-wireless@freebsd.org Subject: Re: Bad host-vased AP performace -- and qouple of questions about FreeBSD WiFi stack tuning Message-ID: <201108091511.39031.bschmidt@freebsd.org> In-Reply-To: <845369356.20110809163402@serebryakov.spb.ru> References: <1151152206.20110808220720@serebryakov.spb.ru> <201108091332.16269.bschmidt@freebsd.org> <845369356.20110809163402@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, August 09, 2011 14:34:02 Lev Serebryakov wrote: > Hello, Bernhard. > You wrote 9 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2011 =D0=B3., 15:3= 2:15: >=20 > > On Tuesday, August 09, 2011 12:20:33 Lev Serebryakov wrote: > >> Hello, Adrian. > >> You wrote 9 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2011 =D0=B3., 1= 4:14:19: > >>=20 > >> > txpower 15 is actually 15dBm. Ie, try "ifconfig wlan0 txpower 1.5" = =20 > >> Bernhard Schmidt says, that iwn(4) uses half-dBm units and "txpower > >> 30" on iwn(4) means 15dBm physically. >=20 > > The ifconfig txpower command gets its argument in 0.5 dBm steps. That > > means if you want to set 15dBm you have to use 30, as 30 * 0.5 =3D 15. > > This is because someone might want to set eg 7.5 dBm but we still > > want use an integer to store that value. > It is in contradiction to what Adrian wrote, that "ifconfig" takes > TRUE dBm as argument, and that "15.5" is allowed. Even more, it is in > contradiction with ifconfig source code (ifieee80211.c:978 on > 8-STABLE) and with practice: >=20 > gateway# ifconfig wlan0 > wlan0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu = 1500 > <SKIPPED> > txpower 30 scanvalid 60 protmode CTS wme burst dtimperiod 1 -dfs > gateway# ifconfig wlan0 txpower 20.5 > gateway# ifconfig wlan0 > wlan0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu = 1500 > <SKIPPED> > txpower 20.5 scanvalid 60 protmode CTS wme burst dtimperiod 1 -dfs > gateway# ifconfig wlan0 txpower 30 > gateway# ifconfig wlan0 > wlan0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu = 1500 > <SKIPPED> > txpower 30 scanvalid 60 protmode CTS wme burst dtimperiod 1 -dfs > gateway# ifconfig wlan0 txpower 20.6 > ifconfig: invalid tx power (must be .5 dBm units) > gateway# >=20 > So, at COMMAND LINE it seems, that "txpower" is TRUE dBm, 1 unit of > txpower =3D=3D 1dBm. >=20 > Yes, INTERNAL representation is integer with "1 unit =3D 0.5 dBm", but > command line and output txpower seems to be true dBms Yeah, sorry, my fault. I got the formula wrong, it is <internal stored limit> =3D <what you set> * 2 or <what you set> =3D <internal stored limit> * 0.5 > > The 30 you are seeing is probably coming somewhere else, I assume > > it is the regulatory limit allowed by that channel. Try playing > > with different regdomains/countries. > 30 is a max in regdomains.xml That is what I expected, basically ifconfig restricts what you can set based on the regulatory limit, the driver then applies its restrictions ontop of that. Point is, the driver limits aren't exported to user space (ifconfig). =2D-=20 Bernhard
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108091511.39031.bschmidt>