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/334a6cfa04ac
branches:  trunk
changeset: 952038:334a6cfa04ac
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 41cc82c1035f -r 334a6cfa04ac 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
@@ -531,10 +531,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;
@@ -1682,6 +1684,7 @@
        if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
            (IFF_UP | IFF_RUNNING)) {
                urtwn_init(ifp);
+               ieee80211_init(ifp);
        }
        return 0;
 }
@@ -2301,7 +2304,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
@@ -3820,6 +3823,7 @@
                        break;
                case IFF_UP:
                        urtwn_init(ifp);
+                       ieee80211_init(ifp);
                        break;
                case IFF_RUNNING:
                        urtwn_stop(ifp, 1);
@@ -3863,6 +3867,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;
        }
@@ -5793,7 +5798,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