From owner-freebsd-wireless@freebsd.org Mon Sep 21 14:06:22 2015 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEB8BA06E3E for ; Mon, 21 Sep 2015 14:06:22 +0000 (UTC) (envelope-from mgrooms@shrew.net) Received: from mx2.shrew.net (mx2.shrew.net [38.97.5.132]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72FDA14EC; Mon, 21 Sep 2015 14:06:22 +0000 (UTC) (envelope-from mgrooms@shrew.net) Received: from mail.shrew.net (mail.shrew.prv [10.24.10.20]) by mx2.shrew.net (8.14.7/8.14.7) with ESMTP id t8LE4IH2088064; Mon, 21 Sep 2015 09:04:18 -0500 (CDT) (envelope-from mgrooms@shrew.net) Received: from [10.22.200.30] (cpe-72-179-24-154.austin.res.rr.com [72.179.24.154]) by mail.shrew.net (Postfix) with ESMTPSA id D2EEA18BEBA; Mon, 21 Sep 2015 09:04:07 -0500 (CDT) Subject: Re: urtwn and hostap To: Andriy Voskoboinyk References: <55F90187.10809@shrew.net> <55F906CB.9030007@shrew.net> <55F996FD.5060804@shrew.net> <55FA6022.8090609@shrew.net> <20150917151249.GA68201@ns.kevlo.org> <55FAEA82.3060602@shrew.net> <55FFA1B9.8040005@shrew.net> Cc: Kevin Lo , Adrian Chadd , freebsd-wireless@freebsd.org From: Matthew Grooms Message-ID: <56000EE5.30209@shrew.net> Date: Mon, 21 Sep 2015 09:06:29 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mx2.shrew.net [10.24.10.11]); Mon, 21 Sep 2015 09:04:18 -0500 (CDT) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 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, 21 Sep 2015 14:06:23 -0000 On 9/21/2015 7:19 AM, Andriy Voskoboinyk wrote: >> Here is a new patch for the urtwn driver. I basically brought over the >> changes committed to NetBSD that enabled hostap mode by merging in what >> appeared to be the relevant differences. I also merged in two changes >> that looked like they would make monitor mode more useful. > >> The only >> change I added was to revert the beacon config register back to it's >> original value when the adapter is switched back to station mode. There >> are no comments around that particular call in the NetBSD driver so I'm >> not sure if what I did was correct, it just seemed logical. > > I think too. > >> This patch doesn't manually generate a beacon frame using >> ieee80211_beacon_alloc so I assume that setting the MSR register using >> the appropriate value instructs the chip to handle that in hardware. I >> tested this on both my ESXi VM using USB passthru and my raspberry pi 2. >> Both appear to work as expected but the connection seemed less stable on >> the latter. > > Can you check this with tcpdump(1) or dumpcap(1) on the sta side? > (I have seen configurations, where STA's were associated with an AP > without beaconing). > I'll give that a try and report back. > About patch: > >> + if (vap->iv_opmode ==IEEE80211_M_HOSTAP) { >> ... >> + /* Allow Rx from any BSSID. */ >> + urtwn_write_4(sc, R92C_RCR, >> + urtwn_read_4(sc, R92C_RCR) & >> + ~(R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN)); > > Is there any reason for that? (can be useful in ad-hoc mode, > but I'm not sure about hostap). > I'll try it without and report back. This came from the NetBSD patch. >> + /* Set appropriate MSR bits */ >> + msr |= R92C_MSR_INFRA; > > Probably, R92C_MSR_AP should be used here instead. > Definitely. I must have fat fingered something when I was cleaning up comments post testing. How embarrassing :/ I'll retest ( just to be sure ) and then post a new patch. Thanks! -Matthew