FILE
5000.c
File preview with syntax highlighting.
linux-6.19.14/drivers/net/wireless/intel/iwlwifi/cfg/5000.c
1// SPDX-License-Identifier: GPL-2.0-only 2/****************************************************************************** 3 * 4 * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. 5 * Copyright(c) 2018 - 2020, 2023, 2025 Intel Corporation 6 *****************************************************************************/ 7 8#include <linux/module.h> 9#include <linux/stringify.h> 10#include "iwl-config.h" 11#include "iwl-agn-hw.h" 12 13/* Highest firmware API version supported */ 14#define IWL5000_UCODE_API_MAX 5 15#define IWL5150_UCODE_API_MAX 2 16 17/* Lowest firmware API version supported */ 18#define IWL5000_UCODE_API_MIN 1 19#define IWL5150_UCODE_API_MIN 1 20 21/* EEPROM versions */ 22#define EEPROM_5000_TX_POWER_VERSION (4) 23#define EEPROM_5000_EEPROM_VERSION (0x11A) 24#define EEPROM_5050_TX_POWER_VERSION (4) 25#define EEPROM_5050_EEPROM_VERSION (0x21E) 26 27#define IWL5000_FW_PRE "iwlwifi-5000" 28#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE "-" __stringify(api) ".ucode" 29 30#define IWL5150_FW_PRE "iwlwifi-5150" 31#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE "-" __stringify(api) ".ucode" 32 33static const struct iwl_family_base_params iwl5000_base = { 34 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, 35 .num_of_queues = IWLAGN_NUM_QUEUES, 36 .max_tfd_queue_size = 256, 37 .pll_cfg = true, 38 .led_compensation = 51, 39 .wd_timeout = IWL_WATCHDOG_DISABLED, 40 .max_event_log_size = 512, 41 .scd_chain_ext_wa = true, 42}; 43 44static const struct iwl_eeprom_params iwl5000_eeprom_params = { 45 .regulatory_bands = { 46 EEPROM_REG_BAND_1_CHANNELS, 47 EEPROM_REG_BAND_2_CHANNELS, 48 EEPROM_REG_BAND_3_CHANNELS, 49 EEPROM_REG_BAND_4_CHANNELS, 50 EEPROM_REG_BAND_5_CHANNELS, 51 EEPROM_REG_BAND_24_HT40_CHANNELS, 52 EEPROM_REG_BAND_52_HT40_CHANNELS 53 }, 54}; 55 56const struct iwl_mac_cfg iwl5000_mac_cfg = { 57 .device_family = IWL_DEVICE_FAMILY_5000, 58 .base = &iwl5000_base, 59}; 60 61#define IWL_DEVICE_5000 \ 62 .fw_name_pre = IWL5000_FW_PRE, \ 63 .ucode_api_max = IWL5000_UCODE_API_MAX, \ 64 .ucode_api_min = IWL5000_UCODE_API_MIN, \ 65 .max_inst_size = IWLAGN_RTC_INST_SIZE, \ 66 .max_data_size = IWLAGN_RTC_DATA_SIZE, \ 67 .nvm_ver = EEPROM_5000_EEPROM_VERSION, \ 68 .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ 69 .eeprom_params = &iwl5000_eeprom_params, \ 70 .led_mode = IWL_LED_BLINK 71 72const struct iwl_rf_cfg iwl5300_agn_cfg = { 73 IWL_DEVICE_5000, 74 /* at least EEPROM 0x11A has wrong info */ 75 .valid_tx_ant = ANT_ABC, /* .cfg overwrite */ 76 .valid_rx_ant = ANT_ABC, /* .cfg overwrite */ 77 .ht_params = { 78 .ht_greenfield_support = true, 79 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), 80 }, 81}; 82 83const char iwl5300_agn_name[] = "Intel(R) Ultimate N WiFi Link 5300 AGN"; 84 85const struct iwl_rf_cfg iwl5100_n_cfg = { 86 IWL_DEVICE_5000, 87 .valid_tx_ant = ANT_B, /* .cfg overwrite */ 88 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ 89 .ht_params = { 90 .ht_greenfield_support = true, 91 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), 92 }, 93}; 94 95const char iwl5100_bgn_name[] = "Intel(R) WiFi Link 5100 BGN"; 96 97const struct iwl_rf_cfg iwl5100_abg_cfg = { 98 IWL_DEVICE_5000, 99 .valid_tx_ant = ANT_B, /* .cfg overwrite */ 100 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ 101}; 102 103const char iwl5100_abg_name[] = "Intel(R) WiFi Link 5100 ABG"; 104const char iwl5100_agn_name[] = "Intel(R) WiFi Link 5100 AGN"; 105 106const struct iwl_rf_cfg iwl5350_agn_cfg = { 107 .fw_name_pre = IWL5000_FW_PRE, 108 .ucode_api_max = IWL5000_UCODE_API_MAX, 109 .ucode_api_min = IWL5000_UCODE_API_MIN, 110 .max_inst_size = IWLAGN_RTC_INST_SIZE, 111 .max_data_size = IWLAGN_RTC_DATA_SIZE, 112 .nvm_ver = EEPROM_5050_EEPROM_VERSION, 113 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, 114 .eeprom_params = &iwl5000_eeprom_params, 115 .ht_params = { 116 .ht_greenfield_support = true, 117 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), 118 }, 119 .led_mode = IWL_LED_BLINK, 120 .internal_wimax_coex = true, 121}; 122 123const char iwl5350_agn_name[] = "Intel(R) WiMAX/WiFi Link 5350 AGN"; 124 125const struct iwl_mac_cfg iwl5150_mac_cfg = { 126 .device_family = IWL_DEVICE_FAMILY_5150, 127 .base = &iwl5000_base, 128}; 129 130#define IWL_DEVICE_5150 \ 131 .fw_name_pre = IWL5150_FW_PRE, \ 132 .ucode_api_max = IWL5150_UCODE_API_MAX, \ 133 .ucode_api_min = IWL5150_UCODE_API_MIN, \ 134 .max_inst_size = IWLAGN_RTC_INST_SIZE, \ 135 .max_data_size = IWLAGN_RTC_DATA_SIZE, \ 136 .nvm_ver = EEPROM_5050_EEPROM_VERSION, \ 137 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ 138 .eeprom_params = &iwl5000_eeprom_params, \ 139 .led_mode = IWL_LED_BLINK, \ 140 .internal_wimax_coex = true 141 142const struct iwl_rf_cfg iwl5150_agn_cfg = { 143 IWL_DEVICE_5150, 144 .ht_params = { 145 .ht_greenfield_support = true, 146 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), 147 }, 148}; 149 150const char iwl5150_agn_name[] = "Intel(R) WiMAX/WiFi Link 5150 AGN"; 151 152const struct iwl_rf_cfg iwl5150_abg_cfg = { 153 IWL_DEVICE_5150, 154}; 155 156const char iwl5150_abg_name[] = "Intel(R) WiMAX/WiFi Link 5150 ABG"; 157 158MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); 159MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
~/
Read-only file preview.