From owner-freebsd-net@FreeBSD.ORG Thu Mar 31 16:15:59 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07916106564A; Thu, 31 Mar 2011 16:15:58 +0000 (UTC) (envelope-from kungfujesus06@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 632758FC13; Thu, 31 Mar 2011 16:15:58 +0000 (UTC) Received: by gxk28 with SMTP id 28so1197382gxk.13 for ; Thu, 31 Mar 2011 09:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=n1nUyKIP7PpXexPL3BOvLPRmIcpI1HaGY7Mnj/hj8eU=; b=nyhLg0oV8TTAEC88cRh3XhfeXWFUJX5Ud07HaPxA6iHZ2Zt3+PlmMqKIOWn8Mtaydp gbQObhlDhKWDdWTUqGtZYRLGxwbfAqzxYqid+hWemnXRBJIMqfe15RkmLKNrdvCGxhzg LQPzlGHd0uYQ8rWLvOAMQnX3YotaKAqSo2MLE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=e9zmmDZaXybfIZ6cAfJGrVYGLwKKdzBa2JS+HkWp4yR8h1oFQTiENq4zpYfh/dWlcF hYWi7PXjF4MzNHhshDGtYyTB1glni44AZ8nvbFwh7MOMSHSv7OTCDMV5EfwDdfQQahVo rL3bkJpzI65uBgMQ/wXZd4dY9PNdZaV8lLq1g= Received: by 10.236.185.1 with SMTP id t1mr3942268yhm.88.1301588157564; Thu, 31 Mar 2011 09:15:57 -0700 (PDT) Received: from ossumpossum.geop.uc.edu ([129.137.163.184]) by mx.google.com with ESMTPS id y5sm634080yhc.83.2011.03.31.09.15.55 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 31 Mar 2011 09:15:56 -0700 (PDT) Date: Thu, 31 Mar 2011 12:15:53 -0400 From: Adam Stylinski To: Bernhard Schmidt Message-ID: <20110331161553.GB3263@ossumpossum.geop.uc.edu> References: <201103311507.16263.bschmidt@freebsd.org> <20110331151421.GA3263@ossumpossum.geop.uc.edu> <201103311735.40634.bschmidt@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0ntfKIWw70PvrIHh" Content-Disposition: inline In-Reply-To: <201103311735.40634.bschmidt@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@freebsd.org Subject: Re: net80211 and interface requests X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2011 16:15:59 -0000 --0ntfKIWw70PvrIHh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 31, 2011 at 05:35:40PM +0200, Bernhard Schmidt wrote: > On Thursday, March 31, 2011 17:14:21 Adam Stylinski wrote: > > On Thu, Mar 31, 2011 at 03:07:15PM +0200, Bernhard Schmidt wrote: > > > On Thursday, March 31, 2011 14:20:33 Adam Stylinski wrote: > > > > On Thu, Mar 31, 2011 at 09:02:45AM +0200, Bernhard Schmidt wrote: > > > > > On Wednesday, March 30, 2011 23:17:53 Adam Stylinski wrote: > > > > > > Hello, > > > > > >=20 > > > > > > This list has helped me before so I'll email again with the hop= es that > > > > > > somebody has an answer. All is working well with my project, h= owever for > > > > > > the life of me I cannot get the interface to inject the raw fra= mes faster > > > > > > than 11mbps. I'm following the example given in > > > > > > /usr/src/tools/tools/net80211/wlaninject.c, and manually specif= ying > > > > > > parameters such as ucastrate, mcastrate, and mgmtrate within if= config. I'm > > > > > > putting the card into pureg mode, and yet I still can't inject = any faster. > > > > > > I've even gone so far as to specify an ieee802211_txparam stru= ct giving > > > > > > values of 255 both mcast and ucast rates within the struct (and= of course > > > > > > anding them by 0xff). I then used the ioctl call to set the fl= ags within > > > > > > the interface request. Any help would be greatly appreciated. > > > > >=20 > > > > > You've set the ibp_rate0 parameter right? This one is in half-mbp= s, so > > > > > a value of 108 should give you 54m. The only thing I can think of= right > > > > > now is that the device (or channel) is actually configured for 11= b not > > > > > 11g mode. Can we rule that out? Which device are you using? > > > > >=20 > > > > > > I am doing nanosleeps in between transmissions as if I don't th= e bpf clone > > > > > > can't inject due to the buffer being too full. There's probabl= y a better > > > > > > way of doing this, but I doubt the nanosleeps are the issue (af= terall, I get > > > > > > almost exactly 11mbps). I should probably note I'm not doing a= ny ACKs, this > > > > > > is pure transmits. > > > > > >=20 > > > > > > If anybody cares enough to look at my unpolished code to get a = better idea, > > > > > > look here: > > > > > >=20 > > > > > > http://projhinternet.svn.sourceforge.net/ > > > > > >=20 > > > > > > The idea is to allow unidirectional traffic so that with an FCC= amateur > > > > > > license (yes I know I'm not currently broadcasting the call sig= n as of yet) > > > > > > you can broadcast unencrypted transmissions for miles (with a l= inear > > > > > > amplifier spec'd to 2.4ghz). With the license FCC part15 no lo= nger applies > > > > > > and you can operate just like in any other amateur band. > > > > > > _______________________________________________ > > > > > > freebsd-net@freebsd.org mailing list > > > > > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > > > > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freeb= sd.org" > > > > > >=20 > > > > >=20 > > > >=20 > > > > I'm using an atheros AR2413 chipset, running in pure g mode, with a= lso the card put into "mode 11g" and ucast, mcast, and mgmt rates set to 54= =2E I think the parameter for ibp_rate0 is just for setting it in the head= er (but I could be wrong). Regardless I am doing this, let me give you the= exact source files I'm doing this in. > > >=20 > > > Well, the ath_rate_* modules afaik do not honor the fixed rate > > > settings. At least I've heard something about those being broken. The > > > ibp_rate0 parameter set to 108 seems to be correct though. > > >=20 > > > No clue why that doesn't work, you may have to debug ath_tx_findrix(). > > > Adding a printf of the passed over rate and ridx should shed some lig= ht > > > on this I guess. > > >=20 > > > > Line 38 in this file: > > > > http://projhinternet.svn.sourceforge.net/viewvc/projhinternet/src/c= allbacks.c?revision=3D69&view=3Dmarkup=20 > > > >=20 > > > > And the setup_if function in this: > > > > http://projhinternet.svn.sourceforge.net/viewvc/projhinternet/src/l= ibinject.c?revision=3D69&view=3Dmarkup > > > >=20 > > >=20 > >=20 > > It turns out strange coincidences can happen. I decided to busy loop, = thinking maybe it was my nanosleep call. And what do you know, 52Mb/sec. = Is there some sort of call I can use to probe the fd to see if the buffer h= as been sent yet? =20 >=20 > Honestly, no clue. The bpf transmit path is a bunch of ugly hacks.. > What you can try though is to enable various debug options for > net80211 and ath to figure out what's going on, especially the bits > for xmit. >=20 > On a unrelated side note, how is the ath/wlan0 interface configured? > I mean, is it in sta mode or ahdemo? I guess most tests have been done > in ahdemo mode. Also I'm sure that all frames are simply discarded if > the device is currently scanning. >=20 > --=20 > Bernhard I'm running in ahdemo mode. Hmm, I really don't want to busyloop the CPU, = but around ~90,000 for loop assignment and comparisons for my 2.8GHz CPU yi= elds the correct time. If we disregard any piplining that could be occurri= ng it would come out to around (2*90,000)/(2800*10^6) seconds. This is abo= ut 64ish microseconds. Now realistically FreeBSD is not a real-time OS by = any means but is there some better way I can use other than spin locking th= e process? --0ntfKIWw70PvrIHh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQIcBAEBAgAGBQJNlKi4AAoJED6sRHE6TvmncMYP/3ALSiT9tqwvXNaeVdT33OZA X5Mk17zi+fo9jcT4ay0DcHszwfSozeZnWvOVaNsmYzvvxC3LCe2ICw6VAyEet8rd ID6e6i+hRd7wRKww9hBWoUoXlTtF0LI4EZaQWhf3+KNpHJ+x8PFhrRv6xOYRVZ03 ixoq1/wm7T6RfpEg4V5QcbxPw7JKAbcQJlBWKnNOUfnu/XGSe90Gf/mIGHVC5ps3 5foa18JVvuX9M/E/IvC6ols0vW/N76/Vne4Wpvq5ziW22fQlGD0qzxos4O8vlrle CTq6jTipdM6o/jo5PqsW/B7L0GIVPPhPxHTejzUADpnqQFAaFbY2sKGAQL1sH4ir zD4SCI9KXhr9hf/ecttxwpyRQ+z66ScxGEPRLuEJ23atNKdiNpPC47vpo1UJh8LJ H5uqcV/UNhIoZ7zsr+M0yRA0hjbpbapfbMxiWz2kRlLOgGkoHRMqxgIlJI5sYgsQ /2mbI5Sb0/6YkKNEAzKL4A6HGduEcHqD1cVqUda0OIAYUVmRBA19jog3cmSboKWO r0reW40Bre8ROXIKx/cIESB7TRuwTwpAkAjEHHjq4Wj8qt7ISImVrYCz/RdQqPem NMdhh5YHhuXHS25s8lLaAQN3lrzK8LOCATlZTNYT8vbdpDhANBi4ku12SdT5kuMv IsD5QBTdMlVQDKutMHUq =xrwE -----END PGP SIGNATURE----- --0ntfKIWw70PvrIHh--