Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/usb Handle hw_init and ieee80211_init differntly.



details:   https://anonhg.NetBSD.org/src-all/rev/6d96488b6d46
branches:  trunk
changeset: 375426:6d96488b6d46
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Fri May 08 07:12:59 2020 +1000

description:
Handle hw_init and ieee80211_init differntly.
Disable reporting of crypto capabilities as hw enc. is not yet
supported.

diffstat:

 sys/dev/usb/if_urtwn.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (58 lines):

diff -r f8f2d64ef9bc -r 6d96488b6d46 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Fri May 08 07:10:48 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c    Fri May 08 07:12:59 2020 +1000
@@ -533,10 +533,12 @@ urtwn_attach(device_t parent, device_t s
            IEEE80211_HTCAP_SHORTGI40;          /* short GI in 40MHz */
 #endif
 
+#if 0
        ic->ic_cryptocaps =
                IEEE80211_CRYPTO_WEP |
                IEEE80211_CRYPTO_TKIP |
                IEEE80211_CRYPTO_AES_CCM;
+#endif
 
        ic->ic_txstream = sc->ntxchains;
        ic->ic_rxstream = sc->nrxchains;
@@ -1684,6 +1686,7 @@ urtwn_media_change(struct ifnet *ifp)
        if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
            (IFF_UP | IFF_RUNNING)) {
                urtwn_init(ifp);
+               ieee80211_init(ifp);
        }
        return 0;
 }
@@ -2303,7 +2306,7 @@ urtwn_newstate_cb(struct urtwn_softc *sc
                urtwn_write_1(sc, R92C_T2T_SIFS + 1, sifs_time);
 
                /* Initialize rate adaptation. */
-               if (1 || ISSET(sc->chip, URTWN_CHIP_88E) ||
+               if (ISSET(sc->chip, URTWN_CHIP_88E) ||
                    ISSET(sc->chip, URTWN_CHIP_92EU))
                        ni->ni_txrate = ni->ni_rates.rs_nrates - 1;
                else
@@ -3828,6 +3831,7 @@ urtwn_ioctl(struct ifnet *ifp, u_long cm
                        break;
                case IFF_UP:
                        urtwn_init(ifp);
+                       ieee80211_init(ifp);
                        break;
                case IFF_RUNNING:
                        urtwn_stop(ifp, 1);
@@ -3871,6 +3875,7 @@ urtwn_ioctl(struct ifnet *ifp, u_long cm
                    (IFF_UP | IFF_RUNNING) /* && NNN need a vap for next line
                    ic->ic_roaming != IEEE80211_ROAMING_MANUAL*/) {
                        urtwn_init(ifp);
+                       ieee80211_init(ifp);
                }
                error = 0;
        }
@@ -5801,7 +5806,7 @@ urtwn_init(struct ifnet *ifp)
        ifmedia_set(&vap->iv_media, imr.ifm_active);
 
        /* Init the rest of the 802.11 stuff */
-       ieee80211_init(ifp);
+       //ieee80211_init(ifp);
 
        return 0;
 



Home | Main Index | Thread Index | Old Index