Date: Mon, 30 Nov 2015 00:23:57 +0200 From: "Andriy Voskoboinyk" <avos@freebsd.org> To: "Steve Wills" <swills@freebsd.org> Cc: "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org> Subject: Re: urtwn broken at r291262 Message-ID: <op.x8vu57oe4dikkl@localhost> In-Reply-To: <565B2E60.8010302@FreeBSD.org> References: <5659ED1D.70003@FreeBSD.org> <op.x8tqbkpw4dikkl@localhost> <565A271C.6070107@FreeBSD.org> <565A5BB2.3020908@FreeBSD.org> <565A8883.7040100@FreeBSD.org> <op.x8u5q8yo4dikkl@localhost> <565B2E60.8010302@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Sun, 29 Nov 2015 18:57:04 +0200 було написано Steve Wills
<swills@freebsd.org>:
Hi,
I split previous patch into smaller pieces. If you wish, you can test
them and say, which helps (if any).
To speed up the process, you can use the following procedure
(will work only if urtwn(4) is not compiled into the kernel):
1) before patching:
mv /boot/kernel/if_urtwn.ko /boot/kernel/if_urtwn.ko.bak && cd /usr/src
2) svn patch --reverse-diff <old-diff>
3) svn patch <new-diff>
4) make buildkernel KERNFAST=yes
5) ifconfig wlan0 down
6) ifconfig wlan0 destroy
7) kldunload if_urtwn
8) kldload `find /usr/obj/usr/src/sys -name if_urtwn.ko`
9) <check if everything works. if no, goto 2)>
10) at the end:
mv /boot/kernel/if_urtwn.ko.bak /boot/kernel/if_urtwn.ko
[-- Attachment #2 --]
--- sys/dev/usb/wlan/if_urtwn.c 2015-11-29 13:40:53.947793000 +0200
+++ sys/dev/usb/wlan/if_urtwn.c 2015-11-29 23:27:27.108308000 +0200
@@ -1864,6 +1864,10 @@
qsel = R92C_TXDW1_QSEL_MGNT;
}
+ if (ismcast || type != IEEE80211_FC0_TYPE_DATA ||
+ (m->m_flags & M_EAPOL))
+ txd->txdw4 |= htole32(R92C_TXDW4_DRVRATE);
+
txd->txdw1 |= htole32(
SM(R92C_TXDW1_QSEL, qsel) |
SM(R92C_TXDW1_RAID, raid));
@@ -1874,9 +1878,6 @@
txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, macid));
txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE, ridx));
- /* not sure here */
- if (ridx <= URTWN_RIDX_CCK11)
- txd->txdw4 |= htole32(R92C_TXDW4_DRVRATE);
if (!IEEE80211_QOS_HAS_SEQ(wh)) {
/* Use HW sequence numbering for non-QoS frames. */
[-- Attachment #3 --]
--- sys/dev/usb/wlan/if_urtwn.c 2015-11-29 13:40:53.947793000 +0200
+++ sys/dev/usb/wlan/if_urtwn.c 2015-11-29 23:18:21.318455000 +0200
@@ -1825,13 +1825,11 @@
if (type == IEEE80211_FC0_TYPE_DATA) {
qsel = R92C_TXDW1_QSEL_BE;
- if (!(m->m_flags & M_EAPOL)) {
if (ic->ic_curmode != IEEE80211_MODE_11B) {
raid = R92C_RAID_11BG;
ridx = URTWN_RIDX_OFDM54;
} else
ridx = URTWN_RIDX_CCK11;
- }
if (sc->chip & URTWN_CHIP_88E)
txd->txdw2 |= htole32(R88E_TXDW2_AGGBK);
[-- Attachment #4 --]
--- sys/dev/usb/wlan/if_urtwn.c 2015-11-29 13:40:53.947793000 +0200
+++ sys/dev/usb/wlan/if_urtwn.c 2015-11-29 23:16:50.170684000 +0200
@@ -1881,6 +1881,7 @@
if (!IEEE80211_QOS_HAS_SEQ(wh)) {
/* Use HW sequence numbering for non-QoS frames. */
txd->txdseq = htole16(R92C_TXDSEQ_HWSEQ_EN);
+ txd->txdw4 |= htole32(0x80);
} else {
/* Set sequence number. */
txd->txdseq = htole16(M_SEQNO_GET(m) % IEEE80211_SEQ_RANGE);
[-- Attachment #5 --]
--- sys/dev/usb/wlan/if_urtwn.c 2015-11-29 13:40:53.947793000 +0200
+++ sys/dev/usb/wlan/if_urtwn.c 2015-11-29 23:16:07.183212000 +0200
@@ -1831,6 +1831,7 @@
ridx = URTWN_RIDX_OFDM54;
} else
ridx = URTWN_RIDX_CCK11;
+ ridx = URTWN_RIDX_OFDM54;
}
if (sc->chip & URTWN_CHIP_88E)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.x8vu57oe4dikkl>
