FreeBSD Bugzilla – Attachment 239455 Details for
Bug 247528
rtwn(4) RTL8192EU usb wifi dongle can't connect to AP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Same for rtl8188eu
rtl8188eu.diff (text/plain), 3.20 KB, created by
Cy Schubert
on 2023-01-13 19:40:58 UTC
(
hide
)
Description:
Same for rtl8188eu
Filename:
MIME Type:
Creator:
Cy Schubert
Created:
2023-01-13 19:40:58 UTC
Size:
3.20 KB
patch
obsolete
>diff --git a/sys/dev/rtwn/rtl8188e/r88e_reg.h b/sys/dev/rtwn/rtl8188e/r88e_reg.h >index d578373f7551..b8c14c668feb 100644 >--- a/sys/dev/rtwn/rtl8188e/r88e_reg.h >+++ b/sys/dev/rtwn/rtl8188e/r88e_reg.h >@@ -122,5 +122,6 @@ > > /* Bits for R88E_XCK_OUT_CTRL. */ > #define R88E_XCK_OUT_CTRL_EN 1 >+#define R88E_USB_DELAY_US_DEF 1000 > > #endif /* R88E_REG_H */ >diff --git a/sys/dev/rtwn/rtl8188e/usb/r88eu_init.c b/sys/dev/rtwn/rtl8188e/usb/r88eu_init.c >index 156f6ea79cdf..0ea33c2d5302 100644 >--- a/sys/dev/rtwn/rtl8188e/usb/r88eu_init.c >+++ b/sys/dev/rtwn/rtl8188e/usb/r88eu_init.c >@@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); > #include <dev/rtwn/rtl8192c/r92c.h> > #include <dev/rtwn/rtl8192c/r92c_var.h> > >+#include <dev/rtwn/usb/rtwn_usb_var.h> >+ > #include <dev/rtwn/rtl8188e/usb/r88eu.h> > #include <dev/rtwn/rtl8188e/usb/r88eu_reg.h> > >@@ -78,8 +80,15 @@ r88eu_power_on(struct rtwn_softc *sc) > if (res != 0) \ > return (EIO); \ > } while(0) >+ struct rtwn_usb_softc *uc; > int ntries; > >+ if ((uc = RTWN_USB_SOFTC(sc)) != NULL) { >+ RTWN_LOCK(sc); >+ uc->uc_write_delay = 1; >+ RTWN_UNLOCK(sc); >+ } >+ > /* Wait for power ready bit. */ > for (ntries = 0; ntries < 5000; ntries++) { > if (rtwn_read_4(sc, R92C_APS_FSMCO) & R92C_APS_FSMCO_SUS_HOST) >@@ -87,6 +96,11 @@ r88eu_power_on(struct rtwn_softc *sc) > rtwn_delay(sc, 10); > } > if (ntries == 5000) { >+ if (uc != NULL) { >+ RTWN_LOCK(sc); >+ uc->uc_write_delay = 0; >+ RTWN_UNLOCK(sc); >+ } > device_printf(sc->sc_dev, > "timeout waiting for chip power up\n"); > return (ETIMEDOUT); >@@ -114,7 +128,13 @@ r88eu_power_on(struct rtwn_softc *sc) > break; > rtwn_delay(sc, 10); > } >- if (ntries == 5000) >+ if (ntries == 5000) { >+ if (uc != NULL) { >+ RTWN_LOCK(sc); >+ uc->uc_write_delay = 0; >+ RTWN_UNLOCK(sc); >+ } >+ } > return (ETIMEDOUT); > > /* Enable LDO normal mode. */ >@@ -130,6 +150,11 @@ r88eu_power_on(struct rtwn_softc *sc) > ((sc->sc_hwcrypto != RTWN_CRYPTO_SW) ? R92C_CR_ENSEC : 0) | > R92C_CR_CALTMR_EN)); > >+ if (uc != NULL) { >+ RTWN_LOCK(sc); >+ uc->uc_write_delay = 0; >+ RTWN_UNLOCK(sc); >+ } > return (0); > #undef RTWN_CHK > } >diff --git a/sys/dev/rtwn/rtl8192c/r92c_chan.c b/sys/dev/rtwn/rtl8192c/r92c_chan.c >index 01e0cfb629f1..281baa857f7d 100644 >--- a/sys/dev/rtwn/rtl8192c/r92c_chan.c >+++ b/sys/dev/rtwn/rtl8192c/r92c_chan.c >@@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); > #include <dev/rtwn/rtl8192c/r92c_priv.h> > #include <dev/rtwn/rtl8192c/r92c_reg.h> > #include <dev/rtwn/rtl8192c/r92c_var.h> >+#include <dev/rtwn/usb/rtwn_usb_var.h> > > static int > r92c_get_power_group(struct rtwn_softc *sc, struct ieee80211_channel *c) >@@ -293,9 +294,16 @@ void > r92c_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c) > { > struct r92c_softc *rs = sc->sc_priv; >+ struct rtwn_usb_softc *uc; > u_int chan; > int i; > >+ if ((uc = RTWN_USB_SOFTC(sc)) != NULL) { >+ RTWN_LOCK(sc); >+ uc->uc_write_delay = 1; >+ RTWN_UNLOCK(sc); >+ } >+ > chan = rtwn_chan2centieee(c); > > /* Set Tx power for this new channel. */ >@@ -309,6 +317,12 @@ r92c_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c) > r92c_set_bw40(sc, chan, IEEE80211_IS_CHAN_HT40U(c)); > else > rtwn_r92c_set_bw20(sc, chan); >+ >+ if (uc != NULL) { >+ RTWN_LOCK(sc); >+ uc->uc_write_delay = 0; >+ RTWN_UNLOCK(sc); >+ } > } > > void
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 247528
:
239366
|
239399
|
239429
|
239455
|
240612
|
253233
|
253264
|
253301
|
253303
|
253304