RFC: remove NDIS code from rsu
Idwer Vollering
vidwer at gmail.com
Tue Sep 8 23:50:54 UTC 2015
2015-09-09 1:36 GMT+02:00 Adrian Chadd <adrian.chadd at gmail.com>:
> hi,
>
> nope - we can't assume the IEEE80211_M_* bits at all line up with what
> the firmware requires.
> You also changed the endian-ness of things - it may now not work on
> non-intel platforms.
Does it? Other drivers don't use htole*():
# grep htole * | grep -c IEEE80211
0
Then again, this chipset could be odd enough to indeed require byte
order conversion.
>
> Did this /fix/ things for you?
No, which wasn't expected either.
>
>
>
> -adrian
>
>
> On 8 September 2015 at 16:24, Idwer Vollering <vidwer at gmail.com> wrote:
>> The driver is able to bring up a connection on linux and openbsd just fine.
>>
>> I would start with this, then fix the structs. This could use another
>> pair of eyes.
>>
>> Partial draft (yes, it builds):
>>
>> Index: sys/dev/usb/wlan/if_rsu.c
>> ===================================================================
>> --- sys/dev/usb/wlan/if_rsu.c (revision 287538)
>> +++ sys/dev/usb/wlan/if_rsu.c (working copy)
>> @@ -1066,11 +1066,11 @@
>> if (ic->ic_curmode == IEEE80211_MODE_11B)
>> bss->networktype = htole32(NDIS802_11DS);
>> else
>> - bss->networktype = htole32(NDIS802_11OFDM24);
>> + bss->networktype = IEEE80211_MODE_11G;
>> bss->config.len = htole32(sizeof(bss->config));
>> bss->config.bintval = htole32(ni->ni_intval);
>> bss->config.dsconfig = htole32(ieee80211_chan2ieee(ic, ni->ni_chan));
>> - bss->inframode = htole32(NDIS802_11INFRASTRUCTURE);
>> + bss->inframode = IEEE80211_M_STA;
>> memcpy(bss->supprates, ni->ni_rates.rs_rates,
>> ni->ni_rates.rs_nrates);
>> /* Write the fixed fields of the beacon frame. */
>> Index: sys/dev/usb/wlan/if_rsureg.h
>> ===================================================================
>> --- sys/dev/usb/wlan/if_rsureg.h (revision 287538)
>> +++ sys/dev/usb/wlan/if_rsureg.h (working copy)
>> @@ -414,19 +414,11 @@
>> uint32_t privacy;
>> int32_t rssi;
>> uint32_t networktype;
>> -#define NDIS802_11FH 0
>> #define NDIS802_11DS 1
>> -#define NDIS802_11OFDM5 2
>> -#define NDIS802_11OFDM24 3
>> -#define NDIS802_11AUTOMODE 4
>>
>> struct ndis_802_11_configuration config;
>> uint32_t inframode;
>> -#define NDIS802_11IBSS 0
>> -#define NDIS802_11INFRASTRUCTURE 1
>> #define NDIS802_11AUTOUNKNOWN 2
>> -#define NDIS802_11MONITOR 3
>> -#define NDIS802_11APMODE 4
>>
>> uint8_t supprates[16];
>> uint32_t ieslen;
>> _______________________________________________
>> freebsd-wireless at freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
>> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe at freebsd.org"
More information about the freebsd-wireless
mailing list