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/e97f5ef492ae
branches:  trunk
changeset: 362639:e97f5ef492ae
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 b035ece82b30 -r e97f5ef492ae 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
@@ -532,10 +532,12 @@
            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;
@@ -1683,6 +1685,7 @@
        if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
            (IFF_UP | IFF_RUNNING)) {
                urtwn_init(ifp);
+               ieee80211_init(ifp);
        }
        return 0;
 }
@@ -2302,7 +2305,7 @@
                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
@@ -3826,6 +3829,7 @@
                        break;
                case IFF_UP:
                        urtwn_init(ifp);
+                       ieee80211_init(ifp);
                        break;
                case IFF_RUNNING:
                        urtwn_stop(ifp, 1);
@@ -3869,6 +3873,7 @@
                    (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;
        }
@@ -5799,7 +5804,7 @@
        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