Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /******************************************************************************
0003  *
0004  * Copyright(c) 2008 - 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 IWL1000_UCODE_API_MAX 5
0015 #define IWL100_UCODE_API_MAX 5
0016 
0017 /* Lowest firmware API version supported */
0018 #define IWL1000_UCODE_API_MIN 1
0019 #define IWL100_UCODE_API_MIN 5
0020 
0021 /* EEPROM version */
0022 #define EEPROM_1000_TX_POWER_VERSION    (4)
0023 #define EEPROM_1000_EEPROM_VERSION  (0x15C)
0024 
0025 #define IWL1000_FW_PRE "iwlwifi-1000-"
0026 #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
0027 
0028 #define IWL100_FW_PRE "iwlwifi-100-"
0029 #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
0030 
0031 
0032 static const struct iwl_base_params iwl1000_base_params = {
0033     .num_of_queues = IWLAGN_NUM_QUEUES,
0034     .max_tfd_queue_size = 256,
0035     .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
0036     .pll_cfg = true,
0037     .max_ll_items = OTP_MAX_LL_ITEMS_1000,
0038     .shadow_ram_support = false,
0039     .led_compensation = 51,
0040     .wd_timeout = IWL_WATCHDOG_DISABLED,
0041     .max_event_log_size = 128,
0042     .scd_chain_ext_wa = true,
0043 };
0044 
0045 static const struct iwl_ht_params iwl1000_ht_params = {
0046     .ht_greenfield_support = true,
0047     .use_rts_for_aggregation = true, /* use rts/cts protection */
0048     .ht40_bands = BIT(NL80211_BAND_2GHZ),
0049 };
0050 
0051 static const struct iwl_eeprom_params iwl1000_eeprom_params = {
0052     .regulatory_bands = {
0053         EEPROM_REG_BAND_1_CHANNELS,
0054         EEPROM_REG_BAND_2_CHANNELS,
0055         EEPROM_REG_BAND_3_CHANNELS,
0056         EEPROM_REG_BAND_4_CHANNELS,
0057         EEPROM_REG_BAND_5_CHANNELS,
0058         EEPROM_REG_BAND_24_HT40_CHANNELS,
0059         EEPROM_REGULATORY_BAND_NO_HT40,
0060     }
0061 };
0062 
0063 #define IWL_DEVICE_1000                     \
0064     .fw_name_pre = IWL1000_FW_PRE,              \
0065     .ucode_api_max = IWL1000_UCODE_API_MAX,         \
0066     .ucode_api_min = IWL1000_UCODE_API_MIN,         \
0067     .trans.device_family = IWL_DEVICE_FAMILY_1000,      \
0068     .max_inst_size = IWLAGN_RTC_INST_SIZE,          \
0069     .max_data_size = IWLAGN_RTC_DATA_SIZE,          \
0070     .nvm_ver = EEPROM_1000_EEPROM_VERSION,      \
0071     .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,  \
0072     .trans.base_params = &iwl1000_base_params,      \
0073     .eeprom_params = &iwl1000_eeprom_params,        \
0074     .led_mode = IWL_LED_BLINK
0075 
0076 const struct iwl_cfg iwl1000_bgn_cfg = {
0077     .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
0078     IWL_DEVICE_1000,
0079     .ht_params = &iwl1000_ht_params,
0080 };
0081 
0082 const struct iwl_cfg iwl1000_bg_cfg = {
0083     .name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
0084     IWL_DEVICE_1000,
0085 };
0086 
0087 #define IWL_DEVICE_100                      \
0088     .fw_name_pre = IWL100_FW_PRE,               \
0089     .ucode_api_max = IWL100_UCODE_API_MAX,          \
0090     .ucode_api_min = IWL100_UCODE_API_MIN,          \
0091     .trans.device_family = IWL_DEVICE_FAMILY_100,       \
0092     .max_inst_size = IWLAGN_RTC_INST_SIZE,          \
0093     .max_data_size = IWLAGN_RTC_DATA_SIZE,          \
0094     .nvm_ver = EEPROM_1000_EEPROM_VERSION,      \
0095     .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,  \
0096     .trans.base_params = &iwl1000_base_params,      \
0097     .eeprom_params = &iwl1000_eeprom_params,        \
0098     .led_mode = IWL_LED_RF_STATE,               \
0099     .rx_with_siso_diversity = true
0100 
0101 const struct iwl_cfg iwl100_bgn_cfg = {
0102     .name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
0103     IWL_DEVICE_100,
0104     .ht_params = &iwl1000_ht_params,
0105 };
0106 
0107 const struct iwl_cfg iwl100_bg_cfg = {
0108     .name = "Intel(R) Centrino(R) Wireless-N 100 BG",
0109     IWL_DEVICE_100,
0110 };
0111 
0112 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
0113 MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));