Lines Matching full:eeprom

11 #include "iwl-eeprom-parse.h"
13 /* EEPROM offset definitions */
28 /* corresponding link offsets in EEPROM */
64 /* SKU Capabilities (actual values from EEPROM definition) */
73 /* radio config bits (actual values from EEPROM definition) */
83 * EEPROM bands
85 * that they are stored in the EEPROM band information. Note
86 * that EEPROM bands aren't the same as mac80211 bands, and
87 * there are even special "ht40 bands" in the EEPROM.
146 /* EEPROM reading functions */
148 static u16 iwl_eeprom_query16(const u8 *eeprom, size_t eeprom_size, int offset) in iwl_eeprom_query16() argument
152 return le16_to_cpup((__le16 *)(eeprom + offset)); in iwl_eeprom_query16()
155 static u32 eeprom_indirect_address(const u8 *eeprom, size_t eeprom_size, in eeprom_indirect_address() argument
165 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
169 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
173 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
177 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
181 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
185 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
189 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
193 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
205 static const u8 *iwl_eeprom_query_addr(const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_query_addr() argument
208 u32 address = eeprom_indirect_address(eeprom, eeprom_size, offset); in iwl_eeprom_query_addr()
213 return &eeprom[address]; in iwl_eeprom_query_addr()
216 static int iwl_eeprom_read_calib(const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_read_calib() argument
221 hdr = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_read_calib()
232 * enum iwl_eeprom_channel_flags - channel flags in EEPROM
250 * struct iwl_eeprom_channel - EEPROM channel data
283 * in an EEPROM image.
359 const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_enhanced_txpower() argument
370 txp_len = (__le16 *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_enhanced_txpower()
374 txp_array = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_enhanced_txpower()
419 const u8 *eeprom, size_t eeprom_size, in iwl_init_band_reference() argument
428 *ch_info = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, offset); in iwl_init_band_reference()
514 const u8 *eeprom, size_t eeprom_size) in iwl_init_channel_map() argument
523 * Loop through the 5 EEPROM bands and add them to the parse list in iwl_init_channel_map()
528 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, in iwl_init_channel_map()
595 * EEPROM contain enhanced tx power information in iwl_init_channel_map()
599 iwl_eeprom_enhanced_txpower(dev, data, eeprom, eeprom_size, in iwl_init_channel_map()
620 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ in iwl_init_channel_map()
624 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, in iwl_init_channel_map()
628 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ in iwl_init_channel_map()
755 const u8 *eeprom, size_t eeprom_size) in iwl_init_sbands() argument
759 eeprom, eeprom_size); in iwl_init_sbands()
782 IWL_ERR_DEV(dev, "EEPROM: used only %d of %d channels\n", in iwl_init_sbands()
786 /* EEPROM data functions */
790 const u8 *eeprom, size_t eeprom_size) in iwl_parse_eeprom_data() argument
806 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_MAC_ADDRESS); in iwl_parse_eeprom_data()
810 data->n_hw_addrs = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
813 if (iwl_eeprom_read_calib(eeprom, eeprom_size, data)) in iwl_parse_eeprom_data()
816 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_XTAL); in iwl_parse_eeprom_data()
821 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_parse_eeprom_data()
827 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_parse_eeprom_data()
834 radio_cfg = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
843 sku = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
853 data->nvm_version = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
856 /* check overrides (some devices have wrong EEPROM) */ in iwl_parse_eeprom_data()
868 iwl_init_sbands(trans, cfg, data, eeprom, eeprom_size); in iwl_parse_eeprom_data()