1 // SPDX-License-Identifier: GPL-2.0-only 2 /****************************************************************************** 3 * 4 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 5 * Copyright(c) 2018 Intel Corporation 6 * 7 * Contact Information: 8 * Intel Linux Wireless <linuxwifi@intel.com> 9 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 10 * 11 *****************************************************************************/ 12 13 #include <linux/module.h> 14 #include <linux/stringify.h> 15 #include "iwl-config.h" 16 #include "iwl-agn-hw.h" 17 18 /* Highest firmware API version supported */ 19 #define IWL1000_UCODE_API_MAX 5 20 #define IWL100_UCODE_API_MAX 5 21 22 /* Lowest firmware API version supported */ 23 #define IWL1000_UCODE_API_MIN 1 24 #define IWL100_UCODE_API_MIN 5 25 26 /* EEPROM version */ 27 #define EEPROM_1000_TX_POWER_VERSION (4) 28 #define EEPROM_1000_EEPROM_VERSION (0x15C) 29 30 #define IWL1000_FW_PRE "iwlwifi-1000-" 31 #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode" 32 33 #define IWL100_FW_PRE "iwlwifi-100-" 34 #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode" 35 36 37 static const struct iwl_base_params iwl1000_base_params = { 38 .num_of_queues = IWLAGN_NUM_QUEUES, 39 .max_tfd_queue_size = 256, 40 .eeprom_size = OTP_LOW_IMAGE_SIZE_2K, 41 .pll_cfg = true, 42 .max_ll_items = OTP_MAX_LL_ITEMS_1000, 43 .shadow_ram_support = false, 44 .led_compensation = 51, 45 .wd_timeout = IWL_WATCHDOG_DISABLED, 46 .max_event_log_size = 128, 47 .scd_chain_ext_wa = true, 48 }; 49 50 static const struct iwl_ht_params iwl1000_ht_params = { 51 .ht_greenfield_support = true, 52 .use_rts_for_aggregation = true, /* use rts/cts protection */ 53 .ht40_bands = BIT(NL80211_BAND_2GHZ), 54 }; 55 56 static const struct iwl_eeprom_params iwl1000_eeprom_params = { 57 .regulatory_bands = { 58 EEPROM_REG_BAND_1_CHANNELS, 59 EEPROM_REG_BAND_2_CHANNELS, 60 EEPROM_REG_BAND_3_CHANNELS, 61 EEPROM_REG_BAND_4_CHANNELS, 62 EEPROM_REG_BAND_5_CHANNELS, 63 EEPROM_REG_BAND_24_HT40_CHANNELS, 64 EEPROM_REGULATORY_BAND_NO_HT40, 65 } 66 }; 67 68 #define IWL_DEVICE_1000 \ 69 .fw_name_pre = IWL1000_FW_PRE, \ 70 .ucode_api_max = IWL1000_UCODE_API_MAX, \ 71 .ucode_api_min = IWL1000_UCODE_API_MIN, \ 72 .device_family = IWL_DEVICE_FAMILY_1000, \ 73 .max_inst_size = IWLAGN_RTC_INST_SIZE, \ 74 .max_data_size = IWLAGN_RTC_DATA_SIZE, \ 75 .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ 76 .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ 77 .base_params = &iwl1000_base_params, \ 78 .eeprom_params = &iwl1000_eeprom_params, \ 79 .led_mode = IWL_LED_BLINK, \ 80 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ 81 .csr = &iwl_csr_v1 82 83 const struct iwl_cfg iwl1000_bgn_cfg = { 84 .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", 85 IWL_DEVICE_1000, 86 .ht_params = &iwl1000_ht_params, 87 }; 88 89 const struct iwl_cfg iwl1000_bg_cfg = { 90 .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", 91 IWL_DEVICE_1000, 92 }; 93 94 #define IWL_DEVICE_100 \ 95 .fw_name_pre = IWL100_FW_PRE, \ 96 .ucode_api_max = IWL100_UCODE_API_MAX, \ 97 .ucode_api_min = IWL100_UCODE_API_MIN, \ 98 .device_family = IWL_DEVICE_FAMILY_100, \ 99 .max_inst_size = IWLAGN_RTC_INST_SIZE, \ 100 .max_data_size = IWLAGN_RTC_DATA_SIZE, \ 101 .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ 102 .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ 103 .base_params = &iwl1000_base_params, \ 104 .eeprom_params = &iwl1000_eeprom_params, \ 105 .led_mode = IWL_LED_RF_STATE, \ 106 .rx_with_siso_diversity = true, \ 107 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \ 108 .csr = &iwl_csr_v1 109 110 const struct iwl_cfg iwl100_bgn_cfg = { 111 .name = "Intel(R) Centrino(R) Wireless-N 100 BGN", 112 IWL_DEVICE_100, 113 .ht_params = &iwl1000_ht_params, 114 }; 115 116 const struct iwl_cfg iwl100_bg_cfg = { 117 .name = "Intel(R) Centrino(R) Wireless-N 100 BG", 118 IWL_DEVICE_100, 119 }; 120 121 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 122 MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX)); 123