Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2014 17:26:36 +0800
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        Miguel Clara <miguelmclara@gmail.com>
Cc:        freebsd-wireless@freebsd.org
Subject:   Re: FreeBSD current RT3071 can't connect to 5G network
Message-ID:  <20140805092636.GA41308@ns.kevlo.org>
In-Reply-To: <53DE4FD2.8050309@FreeBSD.org>
References:  <CADGo8CVjUexyen__6=ZB-ARxU-vie0zKfAqfx9sknfXN5hHRAw@mail.gmail.com> <53DE4FD2.8050309@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>          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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140805092636.GA41308>