From owner-freebsd-wireless@FreeBSD.ORG Tue Aug 9 13:12:17 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 234B2106564A; Tue, 9 Aug 2011 13:12:17 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8878FC13; Tue, 9 Aug 2011 13:12:16 +0000 (UTC) Received: by eye4 with SMTP id 4so3616475eye.31 for ; Tue, 09 Aug 2011 06:12:15 -0700 (PDT) Received: by 10.14.187.14 with SMTP id x14mr1917141eem.69.1312895535310; Tue, 09 Aug 2011 06:12:15 -0700 (PDT) Received: from jessie.localnet (p5B2EC9BC.dip0.t-ipconnect.de [91.46.201.188]) by mx.google.com with ESMTPS id p49sm3041736eef.24.2011.08.09.06.12.13 (version=SSLv3 cipher=OTHER); Tue, 09 Aug 2011 06:12:14 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: Lev Serebryakov Date: Tue, 9 Aug 2011 15:11:38 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.38-10-generic; KDE/4.6.2; i686; ; ) References: <1151152206.20110808220720@serebryakov.spb.ru> <201108091332.16269.bschmidt@freebsd.org> <845369356.20110809163402@serebryakov.spb.ru> In-Reply-To: <845369356.20110809163402@serebryakov.spb.ru> X-KMail-Markup: true MIME-Version: 1.0 Message-Id: <201108091511.39031.bschmidt@freebsd.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-wireless@freebsd.org Subject: Re: Bad host-vased AP performace -- and qouple of questions about FreeBSD WiFi stack tuning X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bschmidt@freebsd.org List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2011 13:12:17 -0000 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 metric 0 mtu = 1500 > > txpower 30 scanvalid 60 protmode CTS wme burst dtimperiod 1 -dfs > gateway# ifconfig wlan0 txpower 20.5 > gateway# ifconfig wlan0 > wlan0: flags=3D8843 metric 0 mtu = 1500 > > txpower 20.5 scanvalid 60 protmode CTS wme burst dtimperiod 1 -dfs > gateway# ifconfig wlan0 txpower 30 > gateway# ifconfig wlan0 > wlan0: flags=3D8843 metric 0 mtu = 1500 > > 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 =3D * 2 or =3D * 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