From owner-freebsd-wireless@freebsd.org Tue Sep 8 23:24:46 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 E0274A00331 for ; Tue, 8 Sep 2015 23:24:46 +0000 (UTC) (envelope-from vidwer@gmail.com) Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com [IPv6:2607:f8b0:400d:c04::22a]) (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 A28711C64 for ; Tue, 8 Sep 2015 23:24:46 +0000 (UTC) (envelope-from vidwer@gmail.com) Received: by qgez77 with SMTP id z77so97257411qge.1 for ; Tue, 08 Sep 2015 16:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=EQfc6jEa8AxfaKgiZsKES7ZWHRz+ObGDaQH+NCEKHK0=; b=uR9jexxwm+d3aWFfoQzARoR744ahw8QCr854jUsAcCeiaAyjVbE37/kCiTO+eEQY5m VOTOoZYo4QALP/sMoF4LiJiTp1WNc8RDY2og8xGkYGcwXcWhHYkAUXc0bXA+p8uq3mTA W7R7k4730+rzpypWWrzvU7yy3+z0VGbizbWTs7iqw/x3bSBnuKqIbzcVxg3dRVznjo4F 7ofOTJw9x/PrGI6NFUpqu7It2Y3y97O6WUvWfhak0rXct2zolZ3Txqiid95WzFj+pVdS YVjpRFqlMM5T/fFKxueDYkxtai6p4gqwBJdtT2krpPbS9a6FdLhoZQwJ6uqjEexrJgnk sX1w== MIME-Version: 1.0 X-Received: by 10.140.234.216 with SMTP id f207mr41929286qhc.39.1441754685893; Tue, 08 Sep 2015 16:24:45 -0700 (PDT) Received: by 10.55.214.2 with HTTP; Tue, 8 Sep 2015 16:24:45 -0700 (PDT) Date: Wed, 9 Sep 2015 01:24:45 +0200 Message-ID: Subject: RFC: remove NDIS code from rsu From: Idwer Vollering To: 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:24:47 -0000 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;