Lines Matching full:eeprom

11 #include "iwl-eeprom-parse.h"
14 /* EEPROM offset definitions */
29 /* corresponding link offsets in EEPROM */
65 /* SKU Capabilities (actual values from EEPROM definition) */
74 /* radio config bits (actual values from EEPROM definition) */
84 * EEPROM bands
86 * that they are stored in the EEPROM band information. Note
87 * that EEPROM bands aren't the same as mac80211 bands, and
88 * there are even special "ht40 bands" in the EEPROM.
147 /* EEPROM reading functions */
149 static u16 iwl_eeprom_query16(const u8 *eeprom, size_t eeprom_size, int offset) in iwl_eeprom_query16() argument
153 return le16_to_cpup((__le16 *)(eeprom + offset)); in iwl_eeprom_query16()
156 static u32 eeprom_indirect_address(const u8 *eeprom, size_t eeprom_size, in eeprom_indirect_address() argument
166 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
170 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
174 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
178 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
182 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
186 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
190 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
194 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
206 static const u8 *iwl_eeprom_query_addr(const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_query_addr() argument
209 u32 address = eeprom_indirect_address(eeprom, eeprom_size, offset); in iwl_eeprom_query_addr()
214 return &eeprom[address]; in iwl_eeprom_query_addr()
217 static int iwl_eeprom_read_calib(const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_read_calib() argument
222 hdr = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_read_calib()
233 * enum iwl_eeprom_channel_flags - channel flags in EEPROM
251 * struct iwl_eeprom_channel - EEPROM channel data
284 * in an EEPROM image.
360 const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_enhanced_txpower() argument
371 txp_len = (__le16 *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_enhanced_txpower()
375 txp_array = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_enhanced_txpower()
420 const u8 *eeprom, size_t eeprom_size, in iwl_init_band_reference() argument
429 *ch_info = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, offset); in iwl_init_band_reference()
515 const u8 *eeprom, size_t eeprom_size) in iwl_init_channel_map() argument
524 * Loop through the 5 EEPROM bands and add them to the parse list in iwl_init_channel_map()
529 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, in iwl_init_channel_map()
596 * EEPROM contain enhanced tx power information in iwl_init_channel_map()
600 iwl_eeprom_enhanced_txpower(dev, data, eeprom, eeprom_size, in iwl_init_channel_map()
621 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ in iwl_init_channel_map()
625 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, in iwl_init_channel_map()
629 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ in iwl_init_channel_map()
758 const u8 *eeprom, size_t eeprom_size) in iwl_init_sbands() argument
762 eeprom, eeprom_size); in iwl_init_sbands()
785 IWL_ERR_DEV(dev, "EEPROM: used only %d of %d channels\n", in iwl_init_sbands()
789 /* EEPROM data functions */
793 const u8 *eeprom, size_t eeprom_size) in iwl_parse_eeprom_data() argument
809 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_MAC_ADDRESS); in iwl_parse_eeprom_data()
813 data->n_hw_addrs = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
816 if (iwl_eeprom_read_calib(eeprom, eeprom_size, data)) in iwl_parse_eeprom_data()
819 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_XTAL); in iwl_parse_eeprom_data()
824 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_parse_eeprom_data()
830 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_parse_eeprom_data()
837 radio_cfg = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
846 sku = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
856 data->nvm_version = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
859 /* check overrides (some devices have wrong EEPROM) */ in iwl_parse_eeprom_data()
871 iwl_init_sbands(trans, cfg, data, eeprom, eeprom_size); in iwl_parse_eeprom_data()