From owner-freebsd-wireless@FreeBSD.ORG Mon Dec 10 08:22:30 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AC25925 for ; Mon, 10 Dec 2012 08:22:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by mx1.freebsd.org (Postfix) with ESMTP id 9DAF58FC15 for ; Mon, 10 Dec 2012 08:22:29 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id hq7so946679wib.1 for ; Mon, 10 Dec 2012 00:22:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=esFy/K3pwhGdJlNjvYIynnvIVywH5j2O1w4CKvt49X4=; b=uir31a9vcAZ++PIlf10U/yuP7wyEzDdYwtNDrXU6BDhi9xf/tnWG2XNJz6YzR8RWE8 UWvqG8OGjMgJ41pfjj3zkup6sJTG52v+DtnmFGM37EeDsgaFHlP0TDTVhFvvG/ZdBNiY BFBfvWa/ZLJ4uL2zzbqwFrvZNMDLq0UKIpZTA5gcC33Xi1lriT3opl2ptVz/90NEBOud 9+fKAcCQvf6Rv6tPz+kRzO1E1zob2/0Yv6EUQQ5YjDVrvqQRj/Wt3m1CPnx/7gioO0xF nzDCPPJuCK5n476lxMLTMPQVwJhDDprLaFVtzUjvxZsKZX+dS4JVrwUzqrfidkLZAftq cacQ== MIME-Version: 1.0 Received: by 10.180.102.234 with SMTP id fr10mr9180972wib.17.1355127742779; Mon, 10 Dec 2012 00:22:22 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Mon, 10 Dec 2012 00:22:22 -0800 (PST) In-Reply-To: <201210180934.48741.jhugo@meraka.csir.co.za> References: <201210180934.48741.jhugo@meraka.csir.co.za> Date: Mon, 10 Dec 2012 00:22:22 -0800 X-Google-Sender-Auth: WKkpQjgnMTjABbt6vY8q8MSmSpU Message-ID: Subject: Re: 11n in adhoc mode From: Adrian Chadd To: Johann Hugo Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list 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: Mon, 10 Dec 2012 08:22:30 -0000 Ok, I've started digging into this a bit more. I need to get 11n adhoc working so I can get 11n ahdemo working, so we can actually do 11n TDMA at some point in the near future. There's a whole lot of missing stuff: * ieee80211_add_neighbor() and ieee80211_init_neighbor() don't know about HT at all; they don't populate the HT IEs or 11n rates; * when scanning and choosing a channel to create a BSS on, there are two things: + if it doesn't find an IBSS, it creates one + if it doesn't find an IBSS, it joins that IBSS initially, via whatever is in the scan cache, using the scan cache channel results. Now, I fixed the primary so it does correctly populate the HTINFO/HTCAP IEs; so now the IBSS 11n beaconing does indeed include the TX/RX MCS configuration necessary to do HT/MCS. But the second is the problem - namely, it looks in the scan cache, selects the matched entry (that used a legacy channel, as scanning is done using legacy channels!) then it just calls ieee80211_sta_join() using that. So it always creates a non-HT channel configuration and associates as a non-HT node. Now, if I change adhoc_pick_bss() to adjust the channel to be a HT channel before it goes off and calls ieee80211_sta_join(), it will successfully setup the channel to be an 11n channel and it'll do MCS rates with an 11n peer fine. (traffic throughput sucks and panics though; so it's not all smooth sailing here.) But that raises a big problem: If the first node that a new IBSS device sees is non-11n, will it just assume the BSS is legacy, or will it magically promote itself to 11n/ht20 or 11n/ht40 and continue along merrily? It'd be nice to figure out what the behaviour there should be. Anyway. I'm making a little progress. I'll see if I can figure out why I'm getting panics and crappy throughput when doing traffic tests - I bet the adhoc RX and TX data path doesn't have some 11n related fixes in there and it's messing things up. Adrian