Index: if_run.c =================================================================== --- if_run.c +++ if_run.c @@ -863,8 +863,8 @@ * For now, just do 1 stream. Later on we'll figure out * how many tx/rx streams a particular NIC supports. */ - ic->ic_rxstream = 1; - ic->ic_txstream = 1; + ic->ic_rxstream = sc->nrxchains; + ic->ic_txstream = sc->ntxchains; } ic->ic_cryptocaps = @@ -3390,7 +3390,7 @@ mcs |= RT2860_PHY_OFDM; } else if (rt2860_rates[ridx].phy == IEEE80211_T_HT) { /* XXX TODO: [adrian] set short preamble for MCS? */ - mcs |= RT2860_PHY_HT; /* Mixed, not greenfield */ + mcs |= RT2860_PHY_HT_MIX; /* Mixed, not greenfield */ } txwi->phy = htole16(mcs); @@ -6433,6 +6433,10 @@ DRIVER_MODULE(run, uhub, run_driver, run_devclass, run_driver_loaded, NULL); MODULE_DEPEND(run, wlan, 1, 1, 1); +MODULE_DEPEND(run, wlan_tkip, 1, 1, 1); +MODULE_DEPEND(run, wlan_ccmp, 1, 1, 1); +MODULE_DEPEND(run, wlan_amrr, 1, 1, 1); +MODULE_DEPEND(run, wlan_wep, 1, 1, 1); MODULE_DEPEND(run, usb, 1, 1, 1); MODULE_DEPEND(run, firmware, 1, 1, 1); MODULE_VERSION(run, 1); Index: if_runreg.h =================================================================== --- if_runreg.h +++ if_runreg.h @@ -761,6 +761,13 @@ uint8_t flags; } __packed; +/* The TXWI and TXD have stayed exactly the same for several chips by the same +manufacturer, see a datasheet for more details, for example pg. 209 in this +datasheet: https://cdn.sparkfun.com/datasheets/Wireless/WiFi/RT5350.pdf +The meaning of most hardware registers is also intact, and the datasheet +can be consulted when developing this for better understanding. +*/ + /* TX Wireless Information */ struct rt2860_txwi { uint8_t flags; @@ -781,7 +788,7 @@ #define RT2860_PHY_MODE 0xc000 #define RT2860_PHY_CCK (0 << 14) #define RT2860_PHY_OFDM (1 << 14) -#define RT2860_PHY_HT (2 << 14) +#define RT2860_PHY_HT_MIX (2 << 14) #define RT2860_PHY_HT_GF (3 << 14) #define RT2860_PHY_SGI (1 << 8) #define RT2860_PHY_BW40 (1 << 7)