urtwn and hostap

Matthew Grooms mgrooms at shrew.net
Mon Sep 21 14:06:23 UTC 2015


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


More information about the freebsd-wireless mailing list