From owner-freebsd-wireless@FreeBSD.ORG Tue Aug 5 09:26:47 2014 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C2A6ECA for ; Tue, 5 Aug 2014 09:26:47 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B7AEC2A94 for ; Tue, 5 Aug 2014 09:26:46 +0000 (UTC) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.8/8.14.8) with ESMTP id s759QaQK041328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Aug 2014 17:26:37 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.8/8.14.8/Submit) id s759Qa5K041327; Tue, 5 Aug 2014 17:26:36 +0800 (CST) (envelope-from kevlo) Date: Tue, 5 Aug 2014 17:26:36 +0800 From: Kevin Lo To: Miguel Clara Subject: Re: FreeBSD current RT3071 can't connect to 5G network Message-ID: <20140805092636.GA41308@ns.kevlo.org> References: <53DE4FD2.8050309@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53DE4FD2.8050309@FreeBSD.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18 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, 05 Aug 2014 09:26:47 -0000 On Sun, Aug 03, 2014 at 11:05:54PM +0800, Kevin Lo wrote: > > On Tue, Jul 29, 2014 at 11:35:00PM +0100, Miguel Clara wrote: > > Hi, > > Hi Miguel, > > > > > I just brought a TP-Link N600 Wireless Dual Band USB Adpater (model > > TL-WDN3200) and its correctly recognized in FreeBSD as a ranlink. > > > > Dmesg shows: > > wlan0: Ethernet address: e8:94:f6:12:98:9d > > run0: firmware RT3071 ver. 0.33 loaded > > > > > > So the module and firmware seem to be loaded fine and I'm able to connect > > to my 2.4g wireless fine. > > > > However I'm having no luck connecting to the 5G network, I've pasted the > > scans and wpa_supplicant log, and I see: > > "wlan0: Authentication with 60:a4:4c:28:13:c4 timed out. > > Added BSSID 60:a4:4c:28:13:c4 into blacklist" > > which I'm guessing means that for some reason the auth time-out, but I > > don't really know why, all other 5G devices connect fine! > > > > (Also if its important the router is a RT-N66U running the latest > > Asus-Merlin firmware) > > > > > > First Scan: > > > > ~% ifconfig wlan0 scan > > SSID/MESH ID BSSID CHAN RATE S:N INT CAPS > > ****** a4:b1:e9:ef:1c:68 1 54M -36:-68 100 EP RSN HTCAP > > WPS WPA WME > > ****** 9c:97:26:34:b7:cd 11 54M -41:-78 100 EP RSN HTCAP > > WPS WPA WME > > ****** 24:ec:99:39:4a:12 11 54M -33:-62 100 EP RSN HTCAP > > WPS WPA WME > > ****** 26:ec:99:39:4a:13 11 54M -31:-60 100 ES HTCAP WME > > ****** 10:fe:ed:c3:77:51 7 54M -40:-76 100 EPS RSN HTCAP > > WPA WME ATH WPS > > Mynetwork5G 60:a4:4c:28:13:c4 44 54M -12:-20 100 EP RSN HTCAP WME > > > > Second Scan > > > > % ifconfig wlan0 scan > > SSID/MESH ID BSSID CHAN RATE S:N INT CAPS > > ****** a4:b1:e9:ef:1c:68 1 54M -36:-68 100 EP RSN HTCAP > > WPS WPA WME > > ****** 9c:97:26:34:b7:cd 11 54M -41:-78 100 EP RSN HTCAP > > WPS WPA WME > > ****** 24:ec:99:39:4a:12 11 54M -33:-62 100 EP RSN HTCAP > > WPS WPA WME > > ****** 26:ec:99:39:4a:13 11 54M -31:-60 100 ES HTCAP WME > > ****** 10:fe:ed:c3:77:51 7 54M -40:-76 100 EPS RSN HTCAP > > WPA WME ATH WPS > > Mynetwork5G 60:a4:4c:28:13:c4 44 54M -12:-20 100 EP RSN HTCAP WME > > Mynetwork 60:a4:4c:28:13:c0 3 54M -18:-32 100 EP RSN HTCAP WME > > > > > > log from --> wpa_supplicant -i wlano -c /etc/wpa_supplicant.conf -d > > NOTE: while doing this in wpa_supplicant.conf I only have my 5g network! > > I have the same wlan dongle as yours but I have no problems connecting to > the TL-WDR4300 on the 5 GHz band. This email is sent over the 5 GHz. > I'll investigate further, thanks. > > # dmesg | grep run0 > run0: <1.0> on usbus0 > run0: MAC/BBP RT5592 (rev 0x0222), RF RT5592 (MIMO 2T2R), address > f8:1a:67:2a:df:3f > run0: firmware RT3071 ver. 0.33 loaded > > # ifconfig wlan0 > wlan0: flags=8843 metric 0 mtu 1500 > ether f8:1a:67:2a:df:3f > inet 192.168.0.101 netmask 0xffffff00 broadcast 192.168.0.255 > nd6 options=29 > media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a > status: associated > ssid wng_5g channel 149 (5745 MHz 11a) bssid 64:66:b3:c2:3b:d4 > country US authmode WPA2/802.11i privacy ON deftxkey UNDEF > TKIP 2:128-bit txpower 0 bmiss 7 mcastrate 6 mgmtrate 6 > scanvalid 60 > wme roaming MANUAL Please try Akinori Furukoshi's patch, thanks. Index: sys/dev/usb/wlan/if_run.c =================================================================== --- sys/dev/usb/wlan/if_run.c (revision 269566) +++ sys/dev/usb/wlan/if_run.c (working copy) @@ -3255,13 +3255,13 @@ run_set_tx_desc(struct run_softc *sc, struct run_t txwi = (struct rt2860_txwi *)(txd + 1); txwi->len = htole16(m->m_pkthdr.len - pad); if (rt2860_rates[ridx].phy == IEEE80211_T_DS) { - txwi->phy = htole16(RT2860_PHY_CCK); + mcs |= RT2860_PHY_CCK; if (ridx != RT2860_RIDX_CCK1 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) mcs |= RT2860_PHY_SHPRE; } else - txwi->phy = htole16(RT2860_PHY_OFDM); - txwi->phy |= htole16(mcs); + mcs |= RT2860_PHY_OFDM; + txwi->phy = htole16(mcs); /* check if RTS/CTS or CTS-to-self protection is required */ if (!IEEE80211_IS_MULTICAST(wh->i_addr1) && @@ -3338,7 +3338,7 @@ run_tx(struct run_softc *sc, struct mbuf *m, struc /* pickup a rate index */ if (IEEE80211_IS_MULTICAST(wh->i_addr1) || - type != IEEE80211_FC0_TYPE_DATA) { + type != IEEE80211_FC0_TYPE_DATA || m->m_flags & M_EAPOL) { ridx = (ic->ic_curmode == IEEE80211_MODE_11A) ? RT2860_RIDX_OFDM6 : RT2860_RIDX_CCK1; ctl_ridx = rt2860_rates[ridx].ctl_ridx; @@ -4998,7 +4998,7 @@ run_updateprot_cb(void *arg) tmp = RT2860_RTSTH_EN | RT2860_PROT_NAV_SHORT | RT2860_TXOP_ALLOW_ALL; /* setup protection frame rate (MCS code) */ tmp |= (ic->ic_curmode == IEEE80211_MODE_11A) ? - rt2860_rates[RT2860_RIDX_OFDM6].mcs : + rt2860_rates[RT2860_RIDX_OFDM6].mcs | RT2860_PHY_OFDM : rt2860_rates[RT2860_RIDX_CCK11].mcs; /* CCK frames don't require protection */