Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /******************************************************************************
0003  *
0004  * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
0005  * Copyright(c) 2018 - 2020 Intel Corporation
0006  *****************************************************************************/
0007 
0008 #include <linux/module.h>
0009 #include <linux/stringify.h>
0010 #include "iwl-config.h"
0011 #include "iwl-agn-hw.h"
0012 
0013 /* Highest firmware API version supported */
0014 #define IWL5000_UCODE_API_MAX 5
0015 #define IWL5150_UCODE_API_MAX 2
0016 
0017 /* Lowest firmware API version supported */
0018 #define IWL5000_UCODE_API_MIN 1
0019 #define IWL5150_UCODE_API_MIN 1
0020 
0021 /* EEPROM versions */
0022 #define EEPROM_5000_TX_POWER_VERSION    (4)
0023 #define EEPROM_5000_EEPROM_VERSION  (0x11A)
0024 #define EEPROM_5050_TX_POWER_VERSION    (4)
0025 #define EEPROM_5050_EEPROM_VERSION  (0x21E)
0026 
0027 #define IWL5000_FW_PRE "iwlwifi-5000-"
0028 #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
0029 
0030 #define IWL5150_FW_PRE "iwlwifi-5150-"
0031 #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
0032 
0033 static const struct iwl_base_params iwl5000_base_params = {
0034     .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
0035     .num_of_queues = IWLAGN_NUM_QUEUES,
0036     .max_tfd_queue_size = 256,
0037     .pll_cfg = true,
0038     .led_compensation = 51,
0039     .wd_timeout = IWL_WATCHDOG_DISABLED,
0040     .max_event_log_size = 512,
0041     .scd_chain_ext_wa = true,
0042 };
0043 
0044 static const struct iwl_ht_params iwl5000_ht_params = {
0045     .ht_greenfield_support = true,
0046     .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
0047 };
0048 
0049 static const struct iwl_eeprom_params iwl5000_eeprom_params = {
0050     .regulatory_bands = {
0051         EEPROM_REG_BAND_1_CHANNELS,
0052         EEPROM_REG_BAND_2_CHANNELS,
0053         EEPROM_REG_BAND_3_CHANNELS,
0054         EEPROM_REG_BAND_4_CHANNELS,
0055         EEPROM_REG_BAND_5_CHANNELS,
0056         EEPROM_REG_BAND_24_HT40_CHANNELS,
0057         EEPROM_REG_BAND_52_HT40_CHANNELS
0058     },
0059 };
0060 
0061 #define IWL_DEVICE_5000                     \
0062     .fw_name_pre = IWL5000_FW_PRE,              \
0063     .ucode_api_max = IWL5000_UCODE_API_MAX,         \
0064     .ucode_api_min = IWL5000_UCODE_API_MIN,         \
0065     .trans.device_family = IWL_DEVICE_FAMILY_5000,      \
0066     .max_inst_size = IWLAGN_RTC_INST_SIZE,          \
0067     .max_data_size = IWLAGN_RTC_DATA_SIZE,          \
0068     .nvm_ver = EEPROM_5000_EEPROM_VERSION,      \
0069     .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION,  \
0070     .trans.base_params = &iwl5000_base_params,      \
0071     .eeprom_params = &iwl5000_eeprom_params,        \
0072     .led_mode = IWL_LED_BLINK
0073 
0074 const struct iwl_cfg iwl5300_agn_cfg = {
0075     .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
0076     IWL_DEVICE_5000,
0077     /* at least EEPROM 0x11A has wrong info */
0078     .valid_tx_ant = ANT_ABC,    /* .cfg overwrite */
0079     .valid_rx_ant = ANT_ABC,    /* .cfg overwrite */
0080     .ht_params = &iwl5000_ht_params,
0081 };
0082 
0083 const struct iwl_cfg iwl5100_bgn_cfg = {
0084     .name = "Intel(R) WiFi Link 5100 BGN",
0085     IWL_DEVICE_5000,
0086     .valid_tx_ant = ANT_B,      /* .cfg overwrite */
0087     .valid_rx_ant = ANT_AB,     /* .cfg overwrite */
0088     .ht_params = &iwl5000_ht_params,
0089 };
0090 
0091 const struct iwl_cfg iwl5100_abg_cfg = {
0092     .name = "Intel(R) WiFi Link 5100 ABG",
0093     IWL_DEVICE_5000,
0094     .valid_tx_ant = ANT_B,      /* .cfg overwrite */
0095     .valid_rx_ant = ANT_AB,     /* .cfg overwrite */
0096 };
0097 
0098 const struct iwl_cfg iwl5100_agn_cfg = {
0099     .name = "Intel(R) WiFi Link 5100 AGN",
0100     IWL_DEVICE_5000,
0101     .valid_tx_ant = ANT_B,      /* .cfg overwrite */
0102     .valid_rx_ant = ANT_AB,     /* .cfg overwrite */
0103     .ht_params = &iwl5000_ht_params,
0104 };
0105 
0106 const struct iwl_cfg iwl5350_agn_cfg = {
0107     .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
0108     .fw_name_pre = IWL5000_FW_PRE,
0109     .ucode_api_max = IWL5000_UCODE_API_MAX,
0110     .ucode_api_min = IWL5000_UCODE_API_MIN,
0111     .trans.device_family = IWL_DEVICE_FAMILY_5000,
0112     .max_inst_size = IWLAGN_RTC_INST_SIZE,
0113     .max_data_size = IWLAGN_RTC_DATA_SIZE,
0114     .nvm_ver = EEPROM_5050_EEPROM_VERSION,
0115     .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
0116     .trans.base_params = &iwl5000_base_params,
0117     .eeprom_params = &iwl5000_eeprom_params,
0118     .ht_params = &iwl5000_ht_params,
0119     .led_mode = IWL_LED_BLINK,
0120     .internal_wimax_coex = true,
0121 };
0122 
0123 #define IWL_DEVICE_5150                     \
0124     .fw_name_pre = IWL5150_FW_PRE,              \
0125     .ucode_api_max = IWL5150_UCODE_API_MAX,         \
0126     .ucode_api_min = IWL5150_UCODE_API_MIN,         \
0127     .trans.device_family = IWL_DEVICE_FAMILY_5150,      \
0128     .max_inst_size = IWLAGN_RTC_INST_SIZE,          \
0129     .max_data_size = IWLAGN_RTC_DATA_SIZE,          \
0130     .nvm_ver = EEPROM_5050_EEPROM_VERSION,      \
0131     .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,  \
0132     .trans.base_params = &iwl5000_base_params,      \
0133     .eeprom_params = &iwl5000_eeprom_params,        \
0134     .led_mode = IWL_LED_BLINK,              \
0135     .internal_wimax_coex = true
0136 
0137 const struct iwl_cfg iwl5150_agn_cfg = {
0138     .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
0139     IWL_DEVICE_5150,
0140     .ht_params = &iwl5000_ht_params,
0141 
0142 };
0143 
0144 const struct iwl_cfg iwl5150_abg_cfg = {
0145     .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
0146     IWL_DEVICE_5150,
0147 };
0148 
0149 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
0150 MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));