Date: Tue, 8 Sep 2015 16:36:50 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Idwer Vollering <vidwer@gmail.com> Cc: "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org> Subject: Re: RFC: remove NDIS code from rsu Message-ID: <CAJ-VmonYmiXhZt5mkj%2Bjc_NhoK5p67Zgy5_aToqRP2z_%2BqYm3Q@mail.gmail.com> In-Reply-To: <CAPp9OrkzK456mmV-TbJzx-vRjaD1HAc3NeKXXNR2s_5fWsZgrw@mail.gmail.com> References: <CAPp9OrkzK456mmV-TbJzx-vRjaD1HAc3NeKXXNR2s_5fWsZgrw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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. Did this /fix/ things for you? -adrian On 8 September 2015 at 16:24, Idwer Vollering <vidwer@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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonYmiXhZt5mkj%2Bjc_NhoK5p67Zgy5_aToqRP2z_%2BqYm3Q>