0001
0002
0003
0004
0005
0006 #ifndef __iwl_eeprom_parse_h__
0007 #define __iwl_eeprom_parse_h__
0008
0009 #include <linux/types.h>
0010 #include <linux/if_ether.h>
0011 #include <net/cfg80211.h>
0012 #include "iwl-trans.h"
0013
0014 struct iwl_nvm_data {
0015 int n_hw_addrs;
0016 u8 hw_addr[ETH_ALEN];
0017
0018 u8 calib_version;
0019 __le16 calib_voltage;
0020
0021 __le16 raw_temperature;
0022 __le16 kelvin_temperature;
0023 __le16 kelvin_voltage;
0024 __le16 xtal_calib[2];
0025
0026 bool sku_cap_band_24ghz_enable;
0027 bool sku_cap_band_52ghz_enable;
0028 bool sku_cap_11n_enable;
0029 bool sku_cap_11ac_enable;
0030 bool sku_cap_11ax_enable;
0031 bool sku_cap_amt_enable;
0032 bool sku_cap_ipan_enable;
0033 bool sku_cap_mimo_disabled;
0034
0035 u16 radio_cfg_type;
0036 u8 radio_cfg_step;
0037 u8 radio_cfg_dash;
0038 u8 radio_cfg_pnum;
0039 u8 valid_tx_ant, valid_rx_ant;
0040
0041 u32 nvm_version;
0042 s8 max_tx_pwr_half_dbm;
0043
0044 bool lar_enabled;
0045 bool vht160_supported;
0046 struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
0047
0048
0049
0050
0051
0052
0053 struct {
0054 struct ieee80211_sband_iftype_data low[2];
0055 struct ieee80211_sband_iftype_data high[2];
0056 } iftd;
0057
0058 struct ieee80211_channel channels[];
0059 };
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074 struct iwl_nvm_data *
0075 iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
0076 const u8 *eeprom, size_t eeprom_size);
0077
0078 int iwl_init_sband_channels(struct iwl_nvm_data *data,
0079 struct ieee80211_supported_band *sband,
0080 int n_channels, enum nl80211_band band);
0081
0082 void iwl_init_ht_hw_capab(struct iwl_trans *trans,
0083 struct iwl_nvm_data *data,
0084 struct ieee80211_sta_ht_cap *ht_info,
0085 enum nl80211_band band,
0086 u8 tx_chains, u8 rx_chains);
0087
0088 #endif