iwlwifi: make configuration structs smaller
[cascardo/linux.git] / drivers / net / wireless / intel / iwlwifi / iwl-8000.c
index 97be104..8bf11c9 100644 (file)
 #define IWL8000_UCODE_API_MAX  21
 #define IWL8265_UCODE_API_MAX  21
 
-/* Oldest version we won't warn about */
-#define IWL8000_UCODE_API_OK   13
-#define IWL8265_UCODE_API_OK   20
-
 /* Lowest firmware API version supported */
-#define IWL8000_UCODE_API_MIN  13
+#define IWL8000_UCODE_API_MIN  16
 #define IWL8265_UCODE_API_MIN  20
 
 /* NVM versions */
@@ -93,7 +89,7 @@
 #define IWL8260_SMEM_OFFSET            0x400000
 #define IWL8260_SMEM_LEN               0x68000
 
-#define IWL8000_FW_PRE "iwlwifi-8000"
+#define IWL8000_FW_PRE "iwlwifi-8000C-"
 #define IWL8000_MODULE_FIRMWARE(api) \
        IWL8000_FW_PRE "-" __stringify(api) ".ucode"
 
 static const struct iwl_base_params iwl8000_base_params = {
        .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_8000,
        .num_of_queues = 31,
-       .pll_cfg_val = 0,
        .shadow_ram_support = true,
        .led_compensation = 57,
        .wd_timeout = IWL_LONG_WD_TIMEOUT,
@@ -128,7 +123,7 @@ static const struct iwl_base_params iwl8000_base_params = {
 static const struct iwl_ht_params iwl8000_ht_params = {
        .stbc = true,
        .ldpc = true,
-       .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
+       .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
 };
 
 static const struct iwl_tt_params iwl8000_tt_params = {
@@ -175,19 +170,16 @@ static const struct iwl_tt_params iwl8000_tt_params = {
 #define IWL_DEVICE_8000                                                        \
        IWL_DEVICE_8000_COMMON,                                         \
        .ucode_api_max = IWL8000_UCODE_API_MAX,                         \
-       .ucode_api_ok = IWL8000_UCODE_API_OK,                           \
        .ucode_api_min = IWL8000_UCODE_API_MIN                          \
 
 #define IWL_DEVICE_8260                                                        \
        IWL_DEVICE_8000_COMMON,                                         \
        .ucode_api_max = IWL8000_UCODE_API_MAX,                         \
-       .ucode_api_ok = IWL8000_UCODE_API_OK,                           \
        .ucode_api_min = IWL8000_UCODE_API_MIN                          \
 
 #define IWL_DEVICE_8265                                                        \
        IWL_DEVICE_8000_COMMON,                                         \
        .ucode_api_max = IWL8265_UCODE_API_MAX,                         \
-       .ucode_api_ok = IWL8265_UCODE_API_OK,                           \
        .ucode_api_min = IWL8265_UCODE_API_MIN                          \
 
 const struct iwl_cfg iwl8260_2n_cfg = {
@@ -244,6 +236,20 @@ const struct iwl_cfg iwl8260_2ac_sdio_cfg = {
        .max_vht_ampdu_exponent = MAX_VHT_AMPDU_EXPONENT_8260_SDIO,
 };
 
+const struct iwl_cfg iwl8265_2ac_sdio_cfg = {
+       .name = "Intel(R) Dual Band Wireless-AC 8265",
+       .fw_name_pre = IWL8265_FW_PRE,
+       IWL_DEVICE_8265,
+       .ht_params = &iwl8000_ht_params,
+       .nvm_ver = IWL8000_NVM_VERSION,
+       .nvm_calib_ver = IWL8000_TX_POWER_VERSION,
+       .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
+       .max_tx_agg_size = MAX_TX_AGG_SIZE_8260_SDIO,
+       .disable_dummy_notification = true,
+       .max_ht_ampdu_exponent  = MAX_HT_AMPDU_EXPONENT_8260_SDIO,
+       .max_vht_ampdu_exponent = MAX_VHT_AMPDU_EXPONENT_8260_SDIO,
+};
+
 const struct iwl_cfg iwl4165_2ac_sdio_cfg = {
        .name = "Intel(R) Dual Band Wireless-AC 4165",
        .fw_name_pre = IWL8000_FW_PRE,
@@ -259,5 +265,5 @@ const struct iwl_cfg iwl4165_2ac_sdio_cfg = {
        .max_vht_ampdu_exponent = MAX_VHT_AMPDU_EXPONENT_8260_SDIO,
 };
 
-MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_OK));
-MODULE_FIRMWARE(IWL8265_MODULE_FIRMWARE(IWL8265_UCODE_API_OK));
+MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_MAX));
+MODULE_FIRMWARE(IWL8265_MODULE_FIRMWARE(IWL8265_UCODE_API_MAX));