From f2a6a16817b3f0e0697b8be84536199913088b48 Mon Sep 17 00:00:00 2001 From: stsp Date: Mon, 22 Jun 2020 16:25:55 +0000 Subject: Remove unused code for parsing non-volatile memory (NVM) from iwx(4). --- sys/dev/pci/if_iwx.c | 339 +----------------------------------------------- sys/dev/pci/if_iwxreg.h | 114 +--------------- sys/dev/pci/if_iwxvar.h | 17 +-- 3 files changed, 5 insertions(+), 465 deletions(-) diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 33b0fc431db..7f6831b4324 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.35 2020/06/22 08:05:52 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.36 2020/06/22 16:25:55 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -231,11 +231,6 @@ const int iwx_mcs2ridx[] = { IWX_RATE_MCS_15_INDEX, }; -struct iwx_nvm_section { - uint16_t length; - uint8_t *data; -}; - uint8_t iwx_lookup_cmd_ver(struct iwx_softc *, uint8_t, uint8_t); int iwx_is_mimo_ht_plcp(uint8_t); int iwx_is_mimo_mcs(int); @@ -301,10 +296,6 @@ void iwx_post_alive(struct iwx_softc *); void iwx_protect_session(struct iwx_softc *, struct iwx_node *, uint32_t, uint32_t); void iwx_unprotect_session(struct iwx_softc *, struct iwx_node *); -int iwx_nvm_read_chunk(struct iwx_softc *, uint16_t, uint16_t, uint16_t, - uint8_t *, uint16_t *); -int iwx_nvm_read_section(struct iwx_softc *, uint16_t, uint8_t *, - uint16_t *, size_t); void iwx_init_channel_map(struct iwx_softc *, uint16_t *, uint32_t *, int); void iwx_setup_ht_rates(struct iwx_softc *); int iwx_mimo_enabled(struct iwx_softc *); @@ -324,17 +315,9 @@ void iwx_ampdu_tx_stop(struct ieee80211com *, struct ieee80211_node *, #endif void iwx_ba_task(void *); -int iwx_parse_nvm_data(struct iwx_softc *, const uint16_t *, - const uint16_t *, const uint16_t *, - const uint16_t *, const uint16_t *, - const uint16_t *, int); int iwx_set_mac_addr_from_csr(struct iwx_softc *, struct iwx_nvm_data *); int iwx_is_valid_mac_addr(const uint8_t *); int iwx_nvm_get(struct iwx_softc *); -void iwx_set_hw_address_8000(struct iwx_softc *, struct iwx_nvm_data *, - const uint16_t *, const uint16_t *); -int iwx_parse_nvm_sections(struct iwx_softc *, struct iwx_nvm_section *); -int iwx_nvm_init(struct iwx_softc *); int iwx_load_firmware(struct iwx_softc *); int iwx_start_fw(struct iwx_softc *); int iwx_send_tx_ant_cfg(struct iwx_softc *, uint8_t); @@ -2550,120 +2533,6 @@ iwx_unprotect_session(struct iwx_softc *sc, struct iwx_node *in) * external NVM or writing NVM. */ -/* list of NVM sections we are allowed/need to read */ -const int iwx_nvm_to_read[] = { - IWX_NVM_SECTION_TYPE_SW, - IWX_NVM_SECTION_TYPE_REGULATORY, - IWX_NVM_SECTION_TYPE_CALIBRATION, - IWX_NVM_SECTION_TYPE_PRODUCTION, - IWX_NVM_SECTION_TYPE_REGULATORY_SDP, - IWX_NVM_SECTION_TYPE_HW_8000, - IWX_NVM_SECTION_TYPE_MAC_OVERRIDE, - IWX_NVM_SECTION_TYPE_PHY_SKU, -}; - -#define IWX_NVM_DEFAULT_CHUNK_SIZE (2*1024) - -#define IWX_NVM_WRITE_OPCODE 1 -#define IWX_NVM_READ_OPCODE 0 - -int -iwx_nvm_read_chunk(struct iwx_softc *sc, uint16_t section, uint16_t offset, - uint16_t length, uint8_t *data, uint16_t *len) -{ - offset = 0; - struct iwx_nvm_access_cmd nvm_access_cmd = { - .offset = htole16(offset), - .length = htole16(length), - .type = htole16(section), - .op_code = IWX_NVM_READ_OPCODE, - }; - struct iwx_nvm_access_resp *nvm_resp; - struct iwx_rx_packet *pkt; - struct iwx_host_cmd cmd = { - .id = IWX_NVM_ACCESS_CMD, - .flags = (IWX_CMD_WANT_RESP | IWX_CMD_SEND_IN_RFKILL), - .resp_pkt_len = IWX_CMD_RESP_MAX, - .data = { &nvm_access_cmd, }, - }; - int err, offset_read; - size_t bytes_read; - uint8_t *resp_data; - - cmd.len[0] = sizeof(struct iwx_nvm_access_cmd); - - err = iwx_send_cmd(sc, &cmd); - if (err) - return err; - - pkt = cmd.resp_pkt; - if (pkt->hdr.flags & IWX_CMD_FAILED_MSK) { - err = EIO; - goto exit; - } - - /* Extract NVM response */ - nvm_resp = (void *)pkt->data; - if (nvm_resp == NULL) - return EIO; - - err = le16toh(nvm_resp->status); - bytes_read = le16toh(nvm_resp->length); - offset_read = le16toh(nvm_resp->offset); - resp_data = nvm_resp->data; - if (err) { - err = EINVAL; - goto exit; - } - - if (offset_read != offset) { - err = EINVAL; - goto exit; - } - - if (bytes_read > length) { - err = EINVAL; - goto exit; - } - - memcpy(data + offset, resp_data, bytes_read); - *len = bytes_read; - - exit: - iwx_free_resp(sc, &cmd); - return err; -} - -/* - * Reads an NVM section completely. - * NICs prior to 7000 family doesn't have a real NVM, but just read - * section 0 which is the EEPROM. Because the EEPROM reading is unlimited - * by uCode, we need to manually check in this case that we don't - * overflow and try to read more than the EEPROM size. - */ -int -iwx_nvm_read_section(struct iwx_softc *sc, uint16_t section, uint8_t *data, - uint16_t *len, size_t max_len) -{ - uint16_t chunklen, seglen; - int err = 0; - - chunklen = seglen = IWX_NVM_DEFAULT_CHUNK_SIZE; - *len = 0; - - /* Read NVM chunks until exhausted (reading less than requested) */ - while (seglen == chunklen && *len < max_len) { - err = iwx_nvm_read_chunk(sc, - section, *len, chunklen, data, &seglen); - if (err) - return err; - - *len += seglen; - } - - return err; -} - uint8_t iwx_fw_valid_tx_ant(struct iwx_softc *sc) { @@ -3062,205 +2931,6 @@ out: return err; } -#if 0 -void -iwx_set_hw_address_8000(struct iwx_softc *sc, struct iwx_nvm_data *data, - const uint16_t *mac_override, const uint16_t *nvm_hw) -{ - const uint8_t *hw_addr; - - if (mac_override) { - static const uint8_t reserved_mac[] = { - 0x02, 0xcc, 0xaa, 0xff, 0xee, 0x00 - }; - - hw_addr = (const uint8_t *)(mac_override + - IWX_MAC_ADDRESS_OVERRIDE_8000); - - /* - * Store the MAC address from MAO section. - * No byte swapping is required in MAO section - */ - memcpy(data->hw_addr, hw_addr, ETHER_ADDR_LEN); - - /* - * Force the use of the OTP MAC address in case of reserved MAC - * address in the NVM, or if address is given but invalid. - */ - if (memcmp(reserved_mac, hw_addr, ETHER_ADDR_LEN) != 0 && - (memcmp(etherbroadcastaddr, data->hw_addr, - sizeof(etherbroadcastaddr)) != 0) && - (memcmp(etheranyaddr, data->hw_addr, - sizeof(etheranyaddr)) != 0) && - !ETHER_IS_MULTICAST(data->hw_addr)) - return; - } - - if (nvm_hw) { - /* Read the mac address from WFMP registers. */ - uint32_t mac_addr0, mac_addr1; - - if (!iwx_nic_lock(sc)) - goto out; - mac_addr0 = htole32(iwx_read_prph(sc, IWX_WFMP_MAC_ADDR_0)); - mac_addr1 = htole32(iwx_read_prph(sc, IWX_WFMP_MAC_ADDR_1)); - iwx_nic_unlock(sc); - - hw_addr = (const uint8_t *)&mac_addr0; - data->hw_addr[0] = hw_addr[3]; - data->hw_addr[1] = hw_addr[2]; - data->hw_addr[2] = hw_addr[1]; - data->hw_addr[3] = hw_addr[0]; - - hw_addr = (const uint8_t *)&mac_addr1; - data->hw_addr[4] = hw_addr[1]; - data->hw_addr[5] = hw_addr[0]; - - return; - } -out: - printf("%s: mac address not found\n", DEVNAME(sc)); - memset(data->hw_addr, 0, sizeof(data->hw_addr)); -} - -int -iwx_parse_nvm_data(struct iwx_softc *sc, const uint16_t *nvm_hw, - const uint16_t *nvm_sw, const uint16_t *nvm_calib, - const uint16_t *mac_override, const uint16_t *phy_sku, - const uint16_t *regulatory, int n_regulatory) -{ - struct iwx_nvm_data *data = &sc->sc_nvm; - uint32_t sku, radio_cfg; - uint16_t lar_config, lar_offset; - - data->nvm_version = le16_to_cpup(nvm_sw + IWX_NVM_VERSION); - - radio_cfg = le32_to_cpup((uint32_t *)(phy_sku + IWX_RADIO_CFG_8000)); - data->radio_cfg_type = IWX_NVM_RF_CFG_TYPE_MSK_8000(radio_cfg); - data->radio_cfg_step = IWX_NVM_RF_CFG_STEP_MSK_8000(radio_cfg); - data->radio_cfg_dash = IWX_NVM_RF_CFG_DASH_MSK_8000(radio_cfg); - data->radio_cfg_pnum = IWX_NVM_RF_CFG_PNUM_MSK_8000(radio_cfg); - data->valid_tx_ant = IWX_NVM_RF_CFG_TX_ANT_MSK_8000(radio_cfg); - data->valid_rx_ant = IWX_NVM_RF_CFG_RX_ANT_MSK_8000(radio_cfg); - - sku = le32_to_cpup((uint32_t *)(phy_sku + IWX_SKU_8000)); - data->sku_cap_band_24GHz_enable = sku & IWX_NVM_SKU_CAP_BAND_24GHZ; - data->sku_cap_band_52GHz_enable = sku & IWX_NVM_SKU_CAP_BAND_52GHZ; - data->sku_cap_11n_enable = sku & IWX_NVM_SKU_CAP_11N_ENABLE; - data->sku_cap_mimo_disable = sku & IWX_NVM_SKU_CAP_MIMO_DISABLE; - - lar_offset = data->nvm_version < 0xE39 ? - IWX_NVM_LAR_OFFSET_8000_OLD : - IWX_NVM_LAR_OFFSET_8000; - - lar_config = le16_to_cpup(regulatory + lar_offset); - data->n_hw_addrs = le16_to_cpup(nvm_sw + IWX_N_HW_ADDRS_8000); - iwx_set_hw_address_8000(sc, data, mac_override, nvm_hw); - - iwx_init_channel_map(sc, ®ulatory[IWX_NVM_CHANNELS_8000], - iwx_nvm_channels_8000, - MIN(n_regulatory, nitems(iwx_nvm_channels_8000))); - - data->calib_version = 255; /* TODO: - this value will prevent some checks from - failing, we need to check if this - field is still needed, and if it does, - where is it in the NVM */ - - return 0; -} - -int -iwx_parse_nvm_sections(struct iwx_softc *sc, struct iwx_nvm_section *sections) -{ - const uint16_t *hw, *sw, *calib, *mac_override = NULL, *phy_sku = NULL; - const uint16_t *regulatory = NULL; - int n_regulatory = 0; - - /* Checking for required sections */ - - /* SW and REGULATORY sections are mandatory */ - if (!sections[IWX_NVM_SECTION_TYPE_SW].data || - !sections[IWX_NVM_SECTION_TYPE_REGULATORY].data) { - return ENOENT; - } - /* MAC_OVERRIDE or at least HW section must exist */ - if (!sections[IWX_NVM_SECTION_TYPE_HW_8000].data && - !sections[IWX_NVM_SECTION_TYPE_MAC_OVERRIDE].data) { - return ENOENT; - } - - /* PHY_SKU section is mandatory in B0 */ - if (!sections[IWX_NVM_SECTION_TYPE_PHY_SKU].data) { - return ENOENT; - } - - regulatory = (const uint16_t *) - sections[IWX_NVM_SECTION_TYPE_REGULATORY].data; - n_regulatory = sections[IWX_NVM_SECTION_TYPE_REGULATORY].length; - hw = (const uint16_t *) - sections[IWX_NVM_SECTION_TYPE_HW_8000].data; - mac_override = - (const uint16_t *) - sections[IWX_NVM_SECTION_TYPE_MAC_OVERRIDE].data; - phy_sku = (const uint16_t *) - sections[IWX_NVM_SECTION_TYPE_PHY_SKU].data; - - sw = (const uint16_t *)sections[IWX_NVM_SECTION_TYPE_SW].data; - calib = (const uint16_t *) - sections[IWX_NVM_SECTION_TYPE_CALIBRATION].data; - - /* XXX should pass in the length of every section */ - return iwx_parse_nvm_data(sc, hw, sw, calib, mac_override, - phy_sku, regulatory, n_regulatory); -} - -int -iwx_nvm_init(struct iwx_softc *sc) -{ - struct iwx_nvm_section nvm_sections[IWX_NVM_NUM_OF_SECTIONS]; - int i, section, err; - uint16_t len; - uint8_t *buf; - const size_t bufsz = sc->sc_nvm_max_section_size; - - memset(nvm_sections, 0, sizeof(nvm_sections)); - - buf = malloc(bufsz, M_DEVBUF, M_WAIT); - if (buf == NULL) - return ENOMEM; - - for (i = 0; i < nitems(iwx_nvm_to_read); i++) { - section = iwx_nvm_to_read[i]; - KASSERT(section <= nitems(nvm_sections)); - - err = iwx_nvm_read_section(sc, section, buf, &len, bufsz); - if (err) { - err = 0; - continue; - } - nvm_sections[section].data = malloc(len, M_DEVBUF, M_WAIT); - if (nvm_sections[section].data == NULL) { - err = ENOMEM; - break; - } - memcpy(nvm_sections[section].data, buf, len); - nvm_sections[section].length = len; - } - free(buf, M_DEVBUF, bufsz); - if (err == 0) - err = iwx_parse_nvm_sections(sc, nvm_sections); - - for (i = 0; i < IWX_NVM_NUM_OF_SECTIONS; i++) { - if (nvm_sections[i].data != NULL) - free(nvm_sections[i].data, M_DEVBUF, - nvm_sections[i].length); - } - - return err; -} -#endif - int iwx_load_firmware(struct iwx_softc *sc) { @@ -4374,9 +4044,8 @@ iwx_cmd_done(struct iwx_softc *sc, int qid, int idx, int code) DPRINTF(("%s: command 0x%x done\n", __func__, code)); if (ring->queued == 0) { - if (code != IWX_NVM_ACCESS_CMD) - DPRINTF(("%s: unexpected firmware response to command 0x%x\n", - DEVNAME(sc), code)); + DPRINTF(("%s: unexpected firmware response to command 0x%x\n", + DEVNAME(sc), code)); } else if (ring->queued > 0) ring->queued--; } @@ -7704,7 +7373,6 @@ iwx_rx_pkt(struct iwx_softc *sc, struct iwx_rx_data *data, struct mbuf_list *ml) case IWX_REMOVE_STA: case IWX_TXPATH_FLUSH: case IWX_BT_CONFIG: - case IWX_NVM_ACCESS_CMD: case IWX_MCC_UPDATE_CMD: case IWX_TIME_EVENT_CMD: case IWX_STATISTICS_CMD: @@ -8279,7 +7947,6 @@ iwx_attach(struct device *parent, struct device *self, void *aux) sc->sc_fwname = "iwx-cc-a0-46"; sc->sc_device_family = IWX_DEVICE_FAMILY_22000; sc->sc_fwdmasegsz = IWX_FWDMASEGSZ_8000; - sc->sc_nvm_max_section_size = 32768; sc->sc_integrated = 1; sc->sc_ltr_delay = IWX_SOC_FLAGS_LTR_APPLY_DELAY_NONE; sc->sc_low_latency_xtal = 0; diff --git a/sys/dev/pci/if_iwxreg.h b/sys/dev/pci/if_iwxreg.h index 1457a0c2a5e..bae735764f7 100644 --- a/sys/dev/pci/if_iwxreg.h +++ b/sys/dev/pci/if_iwxreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwxreg.h,v 1.14 2020/06/22 08:21:51 stsp Exp $ */ +/* $OpenBSD: if_iwxreg.h,v 1.15 2020/06/22 16:25:55 stsp Exp $ */ /*- * Based on BSD-licensed source modules in the Linux iwlwifi driver, @@ -1710,54 +1710,6 @@ struct iwx_temp_report_ths_cmd { uint16_t thresholds[IWX_MAX_DTS_TRIPS]; } __packed; /* GRP_PHY_TEMP_REPORTING_THRESHOLDS_CMD */ -#define IWX_NVM_VERSION 0 - -/* 8k family NVM HW-Section offset (in words) definitions */ -#define IWX_HW_ADDR0_WFPM_8000 0x12 -#define IWX_HW_ADDR1_WFPM_8000 0x16 -#define IWX_HW_ADDR0_PCIE_8000 0x8A -#define IWX_HW_ADDR1_PCIE_8000 0x8E -#define IWX_MAC_ADDRESS_OVERRIDE_8000 1 - -/* 8k family NVM SW-Section offset (in words) definitions */ -#define IWX_NVM_SW_SECTION_8000 0x1C0 -#define IWX_NVM_VERSION_8000 0 -#define IWX_RADIO_CFG_8000 0 -#define IWX_SKU_8000 2 -#define IWX_N_HW_ADDRS_8000 3 - -/* 8k family NVM REGULATORY -Section offset (in words) definitions */ -#define IWX_NVM_CHANNELS_8000 0 -#define IWX_NVM_LAR_OFFSET_8000_OLD 0x4C7 -#define IWX_NVM_LAR_OFFSET_8000 0x507 -#define IWX_NVM_LAR_ENABLED_8000 0x7 - -/* 8k family NVM calibration section offset (in words) definitions */ -#define IWX_NVM_CALIB_SECTION_8000 0x2B8 -#define IWX_XTAL_CALIB_8000 (0x316 - IWX_NVM_CALIB_SECTION_8000) - -/* SKU Capabilities (actual values from NVM definition) */ -#define IWX_NVM_SKU_CAP_BAND_24GHZ (1 << 0) -#define IWX_NVM_SKU_CAP_BAND_52GHZ (1 << 1) -#define IWX_NVM_SKU_CAP_11N_ENABLE (1 << 2) -#define IWX_NVM_SKU_CAP_11AC_ENABLE (1 << 3) -#define IWX_NVM_SKU_CAP_MIMO_DISABLE (1 << 5) - -/* radio config bits (actual values from NVM definition) */ -#define IWX_NVM_RF_CFG_DASH_MSK(x) (x & 0x3) /* bits 0-1 */ -#define IWX_NVM_RF_CFG_STEP_MSK(x) ((x >> 2) & 0x3) /* bits 2-3 */ -#define IWX_NVM_RF_CFG_TYPE_MSK(x) ((x >> 4) & 0x3) /* bits 4-5 */ -#define IWX_NVM_RF_CFG_PNUM_MSK(x) ((x >> 6) & 0x3) /* bits 6-7 */ -#define IWX_NVM_RF_CFG_TX_ANT_MSK(x) ((x >> 8) & 0xF) /* bits 8-11 */ -#define IWX_NVM_RF_CFG_RX_ANT_MSK(x) ((x >> 12) & 0xF) /* bits 12-15 */ - -#define IWX_NVM_RF_CFG_PNUM_MSK_8000(x) (x & 0xF) -#define IWX_NVM_RF_CFG_DASH_MSK_8000(x) ((x >> 4) & 0xF) -#define IWX_NVM_RF_CFG_STEP_MSK_8000(x) ((x >> 8) & 0xF) -#define IWX_NVM_RF_CFG_TYPE_MSK_8000(x) ((x >> 12) & 0xFFF) -#define IWX_NVM_RF_CFG_TX_ANT_MSK_8000(x) ((x >> 24) & 0xF) -#define IWX_NVM_RF_CFG_RX_ANT_MSK_8000(x) ((x >> 28) & 0xF) - /* * channel flags in NVM * @IWX_NVM_CHANNEL_VALID: channel is usable for this SKU/geo @@ -1787,54 +1739,6 @@ struct iwx_temp_report_ths_cmd { #define IWX_NVM_CHANNEL_160MHZ (1 << 11) #define IWX_NVM_CHANNEL_DC_HIGH (1 << 12) -/* Target of the IWX_NVM_ACCESS_CMD */ -#define IWX_NVM_ACCESS_TARGET_CACHE 0 -#define IWX_NVM_ACCESS_TARGET_OTP 1 -#define IWX_NVM_ACCESS_TARGET_EEPROM 2 - -/* Section types for IWX_NVM_ACCESS_CMD */ -#define IWX_NVM_SECTION_TYPE_SW 1 -#define IWX_NVM_SECTION_TYPE_PAPD 2 -#define IWX_NVM_SECTION_TYPE_REGULATORY 3 -#define IWX_NVM_SECTION_TYPE_CALIBRATION 4 -#define IWX_NVM_SECTION_TYPE_PRODUCTION 5 -#define IWX_NVM_SECTION_TYPE_POST_FCS_CALIB 6 -/* 7 unknown */ -#define IWX_NVM_SECTION_TYPE_REGULATORY_SDP 8 -/* 9 unknown */ -#define IWX_NVM_SECTION_TYPE_HW_8000 10 -#define IWX_NVM_SECTION_TYPE_MAC_OVERRIDE 11 -#define IWX_NVM_SECTION_TYPE_PHY_SKU 12 -#define IWX_NVM_NUM_OF_SECTIONS 13 - -/** - * enum iwx_nvm_type - nvm formats - * @IWX_NVM: the regular format - * @IWX_NVM_EXT: extended NVM format - */ -enum iwx_nvm_type { - IWX_NVM, - IWX_NVM_EXT, -}; - -/** - * struct iwx_nvm_access_cmd_ver2 - Request the device to send an NVM section - * @op_code: 0 - read, 1 - write - * @target: IWX_NVM_ACCESS_TARGET_* - * @type: IWX_NVM_SECTION_TYPE_* - * @offset: offset in bytes into the section - * @length: in bytes, to read/write - * @data: if write operation, the data to write. On read its empty - */ -struct iwx_nvm_access_cmd { - uint8_t op_code; - uint8_t target; - uint16_t type; - uint16_t offset; - uint16_t length; - uint8_t data[]; -} __packed; /* IWX_NVM_ACCESS_CMD_API_S_VER_2 */ - /** * struct iwx_nvm_access_complete_cmd - NVM_ACCESS commands are completed * @reserved: reserved @@ -1843,22 +1747,6 @@ struct iwx_nvm_access_complete_cmd { uint32_t reserved; } __packed; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */ -/** - * struct iwx_nvm_access_resp_ver2 - response to IWX_NVM_ACCESS_CMD - * @offset: offset in bytes into the section - * @length: in bytes, either how much was written or read - * @type: IWX_NVM_SECTION_TYPE_* - * @status: 0 for success, fail otherwise - * @data: if read operation, the data returned. Empty on write. - */ -struct iwx_nvm_access_resp { - uint16_t offset; - uint16_t length; - uint16_t type; - uint16_t status; - uint8_t data[]; -} __packed; /* IWX_NVM_ACCESS_CMD_RESP_API_S_VER_2 */ - /* * struct iwx_nvm_get_info - request to get NVM data */ diff --git a/sys/dev/pci/if_iwxvar.h b/sys/dev/pci/if_iwxvar.h index 5a2d48912b4..03bc252ef67 100644 --- a/sys/dev/pci/if_iwxvar.h +++ b/sys/dev/pci/if_iwxvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwxvar.h,v 1.8 2020/06/11 08:17:32 stsp Exp $ */ +/* $OpenBSD: if_iwxvar.h,v 1.9 2020/06/22 16:25:55 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh @@ -181,14 +181,6 @@ struct iwx_nvm_data { int n_hw_addrs; uint8_t hw_addr[ETHER_ADDR_LEN]; - uint8_t calib_version; - uint16_t calib_voltage; - - uint16_t raw_temperature; - uint16_t kelvin_temperature; - uint16_t kelvin_voltage; - uint16_t xtal_calib[2]; - int sku_cap_band_24GHz_enable; int sku_cap_band_52GHz_enable; int sku_cap_11n_enable; @@ -199,14 +191,9 @@ struct iwx_nvm_data { int sku_cap_mimo_disable; int lar_enabled; - uint8_t radio_cfg_type; - uint8_t radio_cfg_step; - uint8_t radio_cfg_dash; - uint8_t radio_cfg_pnum; uint8_t valid_tx_ant, valid_rx_ant; uint16_t nvm_version; - uint8_t max_tx_pwr_half_dbm; }; /* max bufs per tfd the driver will use */ @@ -459,7 +446,6 @@ struct iwx_softc { const char *sc_fwname; bus_size_t sc_fwdmasegsz; - size_t sc_nvm_max_section_size; struct iwx_fw_info sc_fw; struct iwx_dma_info fw_mon; int sc_fw_phy_config; @@ -496,7 +482,6 @@ struct iwx_softc { int sc_noise; int sc_ltr_enabled; - enum iwx_nvm_type nvm_type; int sc_integrated; int sc_tx_with_siso_diversity; -- cgit v1.2.3-59-g8ed1b