From owner-svn-src-head@freebsd.org Sun Sep 13 19:17:27 2015 Return-Path: Delivered-To: svn-src-head@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 97423A039D4; Sun, 13 Sep 2015 19:17:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87AC11DDF; Sun, 13 Sep 2015 19:17:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DJHRwT021603; Sun, 13 Sep 2015 19:17:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DJHRxP021602; Sun, 13 Sep 2015 19:17:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509131917.t8DJHRxP021602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 13 Sep 2015 19:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287763 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 19:17:27 -0000 Author: adrian Date: Sun Sep 13 19:17:26 2015 New Revision: 287763 URL: https://svnweb.freebsd.org/changeset/base/287763 Log: Disable mgmt frame sending in if_rsu. The firmware in this NIC sends management frames. So far I'm not sure which ones it handles and which ones it doesn't handle - but this is what openbsd does. The association messages are handled by the firmware; the key negotiation for 802.1x and WPA are done as raw frames, not management frames. This successfully allows it to associate to my home networks whereas it didn't work beforehand. Tested: * RTL8712, cut 3, STA mode TODO: * The firmware does send a join response with a status code; that should be logged in a more obvious way to assist with debugging. Ie, the firmware is the thing that is saying "couldn't join, sorry!", not net80211. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 18:26:05 2015 (r287762) +++ head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 19:17:26 2015 (r287763) @@ -299,6 +299,13 @@ rsu_match(device_t self) } static int +rsu_send_mgmt(struct ieee80211_node *ni, int type, int arg) +{ + + return (ENOTSUP); +} + +static int rsu_attach(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); @@ -398,6 +405,7 @@ rsu_attach(device_t self) ic->ic_update_mcast = rsu_update_mcast; ic->ic_parent = rsu_parent; ic->ic_transmit = rsu_transmit; + ic->ic_send_mgmt = rsu_send_mgmt; ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), RSU_TX_RADIOTAP_PRESENT,