From cf52bbe053a1e82fd26cbc43936dac78f645d544 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sun, 13 Sep 2015 19:17:26 +0000 Subject: [PATCH] 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. --- sys/dev/usb/wlan/if_rsu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index 86b7fce9e0b..353d538c314 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -298,6 +298,13 @@ rsu_match(device_t self) return (usbd_lookup_id_by_uaa(rsu_devs, sizeof(rsu_devs), uaa)); } +static int +rsu_send_mgmt(struct ieee80211_node *ni, int type, int arg) +{ + + return (ENOTSUP); +} + static int rsu_attach(device_t 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,