s3erios / rtwn

Merged rtwn(4), urtwn(4) and urtwm FreeBSD drivers
8 stars 7 forks source link

Test result with EP-DB1607: fail to set hwaddr and fail to scan #2

Closed wheelcomplex closed 7 years ago

wheelcomplex commented 7 years ago

Just FYI:

references: https://lists.freebsd.org/pipermail/freebsd-wireless/2016-September/006998.html https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196063

lsusb: Bus /dev/usb Device /dev/ugen0.8: ID 0bda:0811 Realtek Semiconductor Corp.

plugin: ugen0.8: <Realtek 802.11ac WLAN Adapter> at usbus0

kldload if_rtwn_usb: rtwn0 on uhub3 rtwn0: <802.11ac WLAN Adapter > on usbus0 rtwn0: MAC/BB RTL8812AU, RF 6052 2T2R ---- note: should be 1T1R

ifconfig wlan0 create wlandev rtwn0 wlanmode sta: wlan0: Ethernet address: ff:ff:ff:ff:ff:ff ---- note: should not be ff:ff:ff:ff:ff:ff rtwn0: r12a_power_off: failed to block Tx queues --- note: rtwn0: r12a_power_off: could not turn off MAC rtwn0: r12a_power_off: failed to block Tx queues rtwn0: r12a_power_off: could not turn off MAC rtwn0: r12a_power_off: failed to block Tx queues rtwn0: r12a_power_off: could not turn off MAC rtwn0: r12a_power_off: failed to block Tx queues rtwn0: r12a_power_off: could not turn off MAC rtwn0: r12a_power_off: failed to block Tx queues rtwn0: r12a_power_off: could not turn off MAC

ifconfig wlan0 up ifconfig wlan0 scan --- note: no ssid found -------------- the modifycation to compile in 12-CURRENT (no from this repository) ----

--- /usr/src/.git/.gitk-tmp.HsnWwA/4/[5e1b6f03e43126197455d1f1e5d4297f12937e2b] rtwn_usb_attach.h
+++ /usr/src/.git/.gitk-tmp.HsnWwA/4/[a8de361b63feaff699e89c187c4e49687fb5db6e] rtwn_usb_attach.h
@@ -139,6 +139,7 @@
    RTWN_RTL8812AU_DEV(TPLINK,      T4U),
    RTWN_RTL8812AU_DEV(TRENDNET,        TEW805UB),
    RTWN_RTL8812AU_DEV(ZYXEL,       NWD6605),
+   RTWN_RTL8812AU_DEV(REALTEK,     RTL8812AU),
 #undef RTWN_RTL8812AU_DEV

    /* RTL8821AU */
--- /usr/src/.git/.gitk-tmp.HsnWwA/5/[5e1b6f03e43126197455d1f1e5d4297f12937e2b] usbdevs
+++ /usr/src/.git/.gitk-tmp.HsnWwA/5/[a8de361b63feaff699e89c187c4e49687fb5db6e] usbdevs
@@ -3878,6 +3878,8 @@
 product REALTEK RTL8188CU_COMBO    0x8754  RTL8188CU
 product REALTEK RTL8723BU  0xb720  RTL8723BU
 product REALTEK RTL8192SU  0xc512  RTL8192SU
+/* from http://elinux.org/Jetson/Network_Adapters */
+product REALTEK RTL8812AU  0x0811  RTL8812AU

 /* RedOctane products */
 product REDOCTANE DUMMY        0x0000  Dummy product
@@ -4529,6 +4531,12 @@
 product TPLINK WN822NV4        0x0108  TL-WN822N v4
 product TPLINK WN823NV2        0x0109  TL-WN823N v2

+/* TP-Link products */
+product TPLINK T4U     0x0101  Archer T4U
+
+/* TP-Link products */
+product TPLINK T4U     0x0101  Archer T4U
+
 /* Trek Technology products */
 product TREK THUMBDRIVE        0x1111  ThumbDrive
 product TREK MEMKEY        0x8888  IBM USB Memory Key
@@ -4783,3 +4791,6 @@
 product ZYXEL RTL8192CU        0x341f  RTL8192CU
 product ZYXEL NWD2705      0x3421  NWD2705
 product ZYXEL NWD6605      0x3426  NWD6605
+product ZYXEL NWD6605      0x3426  NWD6605
+product ZYXEL NWD6605      0x3426  NWD6605
+product ZYXEL NWD6605      0x3426  NWD6605

--- /usr/src/.git/.gitk-tmp.HsnWwA/1/[a8de361b63feaff699e89c187c4e49687fb5db6e] Makefile
+++ /usr/src/.git/.gitk-tmp.HsnWwA/1/[43c411d602f2b519f7efe8fa8e94b0fcf9055377] Makefile
@@ -18,7 +18,7 @@

 .PATH: ${SRCTOP}/sys/dev/rtwn/rtl8192c/usb
 SRCS   += r92cu_attach.c r92cu_init.c r92cu_led.c r92cu_rx.c r92cu_tx.c \
-      r92cu.h r92cu_priv.h r92cu_reg.h r92cu_tx_desc.h
+      r92cu.h r92cu_priv.h r92cu_reg.h r92cu_tx_desc.h ../r92c.h

 .PATH: ${SRCTOP}/sys/dev/rtwn/rtl8192e/usb
 SRCS   += r92eu_attach.c r92eu_init.c r92eu.h r92eu_reg.h
--- /usr/src/.git/.gitk-tmp.HsnWwA/2/[a8de361b63feaff699e89c187c4e49687fb5db6e] r12a_init.c
+++ /usr/src/.git/.gitk-tmp.HsnWwA/2/[43c411d602f2b519f7efe8fa8e94b0fcf9055377] r12a_init.c
@@ -347,7 +347,8 @@
    if (ntries == 10) {
        device_printf(sc->sc_dev, "%s: failed to block Tx queues\n",
            __func__);
-       return;
+       // not return for debug
+       // return;
    }

    /* Turn off 3-wire. */
@@ -414,7 +415,8 @@
    if (ntries == 10) {
        device_printf(sc->sc_dev, "%s: could not turn off MAC\n",
            __func__);
-       return;
+       // not return for debug
+       // return;
    }

    /* Reset 8051. */
--- /usr/src/.git/.gitk-tmp.HsnWwA/3/[a8de361b63feaff699e89c187c4e49687fb5db6e] r21a_init.c
+++ /usr/src/.git/.gitk-tmp.HsnWwA/3/[43c411d602f2b519f7efe8fa8e94b0fcf9055377] r21a_init.c
@@ -205,7 +205,8 @@
    if (ntries == 10) {
        device_printf(sc->sc_dev, "%s: failed to block Tx queues\n",
            __func__);
-       return;
+       // not return for debug
+       // return;
    }

    /* CCK and OFDM are disabled, and clock are gated. */
@@ -264,7 +265,8 @@
    if (ntries == 10) {
        device_printf(sc->sc_dev, "%s: could not turn off MAC\n",
            __func__);
-       return;
+       // not return for debug
+       // return;
    }

    /* Analog Ips to digital isolation. */

s3erios commented 7 years ago

Hi, https://wikidevi.com/wiki/Manhattan_525602 says that this is RTL8811AU (== RTL8821AU); you should add this ID to the next section.

wheelcomplex commented 7 years ago

Thank you very much! Put in next section and it works!