Page MenuHomeFreeBSD

D60073.diff
No OneTemporary

D60073.diff

diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -2003,6 +2003,11 @@
}
}
+/* TODO: HT20 */
+/* TODO: HT40 */
+/* TODO: VHT20 */
+/* TODO: VHT40, VHT80 */
+
static void
iwm_init_channel_map(struct ieee80211com *ic, int maxchans, int *nchans,
struct ieee80211_channel chans[])
@@ -2036,6 +2041,23 @@
}
}
+static int
+iwm_mimo_enabled(struct iwm_softc *sc)
+{
+ return (!sc->nvm_data->sku_cap_mimo_disable);
+}
+
+static void
+iwm_setup_ht_rates(struct iwm_softc *sc)
+{
+ /* XXX TODO MCS0..7 */
+
+ if (!iwm_mimo_enabled(sc))
+ return;
+
+ /* XXX TODO: MCS8..15 if >1 antenna and mimo enabled */
+}
+
static void
iwm_set_hw_address_family_8000(struct iwm_softc *sc, struct iwm_nvm_data *data,
const uint16_t *mac_override, const uint16_t *nvm_hw)
@@ -4671,7 +4693,7 @@
int n_channels;
uint16_t mcc;
#endif
- int resp_v2 = iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V2);
+ int resp_v3 = iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V3);
if (!iwm_is_lar_supported(sc)) {
IWM_DPRINTF(sc, IWM_DEBUG_LAR, "%s: no LAR support\n",
@@ -4686,7 +4708,7 @@
else
mcc_cmd.source_id = IWM_MCC_SOURCE_OLD_FW;
- if (resp_v2)
+ if (resp_v3)
hcmd.len[0] = sizeof(struct iwm_mcc_update_cmd);
else
hcmd.len[0] = sizeof(struct iwm_mcc_update_cmd_v1);
@@ -4703,7 +4725,7 @@
pkt = hcmd.resp_pkt;
/* Extract MCC response */
- if (resp_v2) {
+ if (resp_v3) {
mcc_resp = (void *)pkt->data;
mcc = mcc_resp->mcc;
n_channels = le32toh(mcc_resp->n_channels);
@@ -4904,6 +4926,9 @@
return;
}
+ if (sc->nvm_data->sku_cap_11n_enable)
+ iwm_setup_ht_rates(sc);
+
/*
* Ok, firmware loaded and we are jogging
*/
@@ -6189,6 +6214,11 @@
IWM_DPRINTF(sc, IWM_DEBUG_RESET | IWM_DEBUG_TRACE,
"<-%s\n", __func__);
+ device_printf(dev, "%s: TX ant=0x%x, RX ant=0x%x\n",
+ __func__,
+ iwm_get_valid_tx_ant(sc),
+ iwm_get_valid_rx_ant(sc));
+
return 0;
/* Free allocated memory if something failed during attachment. */
@@ -6285,6 +6315,9 @@
sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK,
sc->sc_fwver, ether_sprintf(sc->nvm_data->hw_addr));
+ if (sc->nvm_data->sku_cap_11n_enable)
+ iwm_setup_ht_rates(sc);
+
/* not all hardware can do 5GHz band */
if (!sc->nvm_data->sku_cap_band_52GHz_enable)
memset(&ic->ic_sup_rates[IEEE80211_MODE_11A], 0,
diff --git a/sys/dev/iwm/if_iwm_phy_ctxt.c b/sys/dev/iwm/if_iwm_phy_ctxt.c
--- a/sys/dev/iwm/if_iwm_phy_ctxt.c
+++ b/sys/dev/iwm/if_iwm_phy_ctxt.c
@@ -209,6 +209,9 @@
IWM_PHY_BAND_24 : IWM_PHY_BAND_5;
cmd->ci.channel = ieee80211_chan2ieee(ic, chan);
+
+ /* TODO: HT40 */
+ /* TODO: VHT40/VHT80 */
cmd->ci.width = IWM_PHY_VHT_CHANNEL_MODE20;
cmd->ci.ctrl_pos = IWM_PHY_VHT_CTRL_POS_1_BELOW;
diff --git a/sys/dev/iwm/if_iwmreg.h b/sys/dev/iwm/if_iwmreg.h
--- a/sys/dev/iwm/if_iwmreg.h
+++ b/sys/dev/iwm/if_iwmreg.h
@@ -954,7 +954,7 @@
#define IWM_UCODE_TLV_CAPA_MULTI_QUEUE_RX_SUPPORT 68
#define IWM_UCODE_TLV_CAPA_BEACON_ANT_SELECTION 71
#define IWM_UCODE_TLV_CAPA_BEACON_STORING 72
-#define IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V2 73
+#define IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V3 73
#define IWM_UCODE_TLV_CAPA_CT_KILL_BY_FW 74
#define IWM_UCODE_TLV_CAPA_TEMP_THS_REPORT_SUPPORT 75
#define IWM_UCODE_TLV_CAPA_CTDP_SUPPORT 76

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 29, 1:23 AM (5 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39839413
Default Alt Text
D60073.diff (3 KB)

Event Timeline