Lines Matching full:eeprom

66 #include "iwl-eeprom-parse.h"
68 /* EEPROM offset definitions */
83 /* corresponding link offsets in EEPROM */
119 /* SKU Capabilities (actual values from EEPROM definition) */
128 /* radio config bits (actual values from EEPROM definition) */
138 * EEPROM bands
140 * that they are stored in the EEPROM band information. Note
141 * that EEPROM bands aren't the same as mac80211 bands, and
142 * there are even special "ht40 bands" in the EEPROM.
201 /* EEPROM reading functions */
203 static u16 iwl_eeprom_query16(const u8 *eeprom, size_t eeprom_size, int offset) in iwl_eeprom_query16() argument
207 return le16_to_cpup((__le16 *)(eeprom + offset)); in iwl_eeprom_query16()
210 static u32 eeprom_indirect_address(const u8 *eeprom, size_t eeprom_size, in eeprom_indirect_address() argument
220 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
224 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
228 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
232 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
236 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
240 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
244 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
248 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
260 static const u8 *iwl_eeprom_query_addr(const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_query_addr() argument
263 u32 address = eeprom_indirect_address(eeprom, eeprom_size, offset); in iwl_eeprom_query_addr()
268 return &eeprom[address]; in iwl_eeprom_query_addr()
271 static int iwl_eeprom_read_calib(const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_read_calib() argument
276 hdr = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_read_calib()
287 * enum iwl_eeprom_channel_flags - channel flags in EEPROM
305 * struct iwl_eeprom_channel - EEPROM channel data
338 * in an EEPROM image.
414 const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_enhanced_txpower() argument
425 txp_len = (__le16 *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_enhanced_txpower()
429 txp_array = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_enhanced_txpower()
474 const u8 *eeprom, size_t eeprom_size, in iwl_init_band_reference() argument
483 *ch_info = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, offset); in iwl_init_band_reference()
569 const u8 *eeprom, size_t eeprom_size) in iwl_init_channel_map() argument
578 * Loop through the 5 EEPROM bands and add them to the parse list in iwl_init_channel_map()
583 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, in iwl_init_channel_map()
650 * EEPROM contain enhanced tx power information in iwl_init_channel_map()
654 iwl_eeprom_enhanced_txpower(dev, data, eeprom, eeprom_size, in iwl_init_channel_map()
675 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ in iwl_init_channel_map()
679 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, in iwl_init_channel_map()
683 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ in iwl_init_channel_map()
811 const u8 *eeprom, size_t eeprom_size) in iwl_init_sbands() argument
815 eeprom, eeprom_size); in iwl_init_sbands()
838 IWL_ERR_DEV(dev, "EEPROM: used only %d of %d channels\n", in iwl_init_sbands()
842 /* EEPROM data functions */
846 const u8 *eeprom, size_t eeprom_size) in iwl_parse_eeprom_data() argument
862 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_MAC_ADDRESS); in iwl_parse_eeprom_data()
866 data->n_hw_addrs = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
869 if (iwl_eeprom_read_calib(eeprom, eeprom_size, data)) in iwl_parse_eeprom_data()
872 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_XTAL); in iwl_parse_eeprom_data()
877 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_parse_eeprom_data()
883 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_parse_eeprom_data()
890 radio_cfg = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
899 sku = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
909 data->nvm_version = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
912 /* check overrides (some devices have wrong EEPROM) */ in iwl_parse_eeprom_data()
924 iwl_init_sbands(trans, cfg, data, eeprom, eeprom_size); in iwl_parse_eeprom_data()