From owner-freebsd-wireless@freebsd.org Tue Sep 8 23:36:51 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 42176A00A0B for ; Tue, 8 Sep 2015 23:36:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 102F1144F for ; Tue, 8 Sep 2015 23:36:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iofh134 with SMTP id h134so3246837iof.0 for ; Tue, 08 Sep 2015 16:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VRYHzVYbuzeEW8ojGrcbVFx/K48h4RQOj6UMEuaAYgg=; b=EQtffjVpkiULfCbfzNHZbPbN236vVUrmdV8KVTNqll7sYxIhDWAOvuDhbLDghkXiMY GdoY+69P0rDMQx/6GkKu0uOLq8UJcLnnFgYgPitekfsXAcysjEPVejistOmQRt2Tf3HQ LeHxgy0MbjglMeMcnGDADGkctsqLsYX5g9XW6D3piVgDYBtJO2CjdM2lMNAKHzJ2pW7Z rTN+SV02Cq6rSDjcuL9U8PWP8FgKKDzrqoStrMgneMzDLpmdMenJCJP684X0ucDANi1d 82VbCPj2BWfZzVY+vjmrbTUidMPoQzSYJ/NTRIRZJ5SNmm8IBJLI+nWZX2dJTZWWFhYW yiBw== MIME-Version: 1.0 X-Received: by 10.107.13.75 with SMTP id 72mr43388026ion.75.1441755410543; Tue, 08 Sep 2015 16:36:50 -0700 (PDT) Received: by 10.36.28.208 with HTTP; Tue, 8 Sep 2015 16:36:50 -0700 (PDT) In-Reply-To: References: Date: Tue, 8 Sep 2015 16:36:50 -0700 Message-ID: Subject: Re: RFC: remove NDIS code from rsu From: Adrian Chadd To: Idwer Vollering Cc: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 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: Tue, 08 Sep 2015 23:36:51 -0000 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 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"