Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aefa441b authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-for-kalle-2015-05-21' of...

Merge tag 'iwlwifi-for-kalle-2015-05-21' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

* fix firmware name and other things to enable 3165
* fix bad APMG configuration for 8000 (no AMPG on these devices)
* fix MAC address assignment for 8000
* fix firmware debugging triggers (MLME)
* fix several bugs in low power states code (net-detect,
  d0i3)
parents c411ead9 29220891
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ config IWLWIFI
		Intel 7260 Wi-Fi Adapter
		Intel 7260 Wi-Fi Adapter
		Intel 3160 Wi-Fi Adapter
		Intel 3160 Wi-Fi Adapter
		Intel 7265 Wi-Fi Adapter
		Intel 7265 Wi-Fi Adapter
		Intel 3165 Wi-Fi Adapter




	  This driver uses the kernel's mac80211 subsystem.
	  This driver uses the kernel's mac80211 subsystem.
+8 −8
Original line number Original line Diff line number Diff line
@@ -70,15 +70,14 @@


/* Highest firmware API version supported */
/* Highest firmware API version supported */
#define IWL7260_UCODE_API_MAX	13
#define IWL7260_UCODE_API_MAX	13
#define IWL3160_UCODE_API_MAX	13


/* Oldest version we won't warn about */
/* Oldest version we won't warn about */
#define IWL7260_UCODE_API_OK	12
#define IWL7260_UCODE_API_OK	12
#define IWL3160_UCODE_API_OK	12
#define IWL3165_UCODE_API_OK	13


/* Lowest firmware API version supported */
/* Lowest firmware API version supported */
#define IWL7260_UCODE_API_MIN	10
#define IWL7260_UCODE_API_MIN	10
#define IWL3160_UCODE_API_MIN	10
#define IWL3165_UCODE_API_MIN	13


/* NVM versions */
/* NVM versions */
#define IWL7260_NVM_VERSION		0x0a1d
#define IWL7260_NVM_VERSION		0x0a1d
@@ -104,9 +103,6 @@
#define IWL3160_FW_PRE "iwlwifi-3160-"
#define IWL3160_FW_PRE "iwlwifi-3160-"
#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"
#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"


#define IWL3165_FW_PRE "iwlwifi-3165-"
#define IWL3165_MODULE_FIRMWARE(api) IWL3165_FW_PRE __stringify(api) ".ucode"

#define IWL7265_FW_PRE "iwlwifi-7265-"
#define IWL7265_FW_PRE "iwlwifi-7265-"
#define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode"
#define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode"


@@ -248,8 +244,13 @@ static const struct iwl_ht_params iwl7265_ht_params = {


const struct iwl_cfg iwl3165_2ac_cfg = {
const struct iwl_cfg iwl3165_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 3165",
	.name = "Intel(R) Dual Band Wireless AC 3165",
	.fw_name_pre = IWL3165_FW_PRE,
	.fw_name_pre = IWL7265D_FW_PRE,
	IWL_DEVICE_7000,
	IWL_DEVICE_7000,
	/* sparse doens't like the re-assignment but it is safe */
#ifndef __CHECKER__
	.ucode_api_ok = IWL3165_UCODE_API_OK,
	.ucode_api_min = IWL3165_UCODE_API_MIN,
#endif
	.ht_params = &iwl7000_ht_params,
	.ht_params = &iwl7000_ht_params,
	.nvm_ver = IWL3165_NVM_VERSION,
	.nvm_ver = IWL3165_NVM_VERSION,
	.nvm_calib_ver = IWL3165_TX_POWER_VERSION,
	.nvm_calib_ver = IWL3165_TX_POWER_VERSION,
@@ -325,6 +326,5 @@ const struct iwl_cfg iwl7265d_n_cfg = {


MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));
MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));
MODULE_FIRMWARE(IWL3165_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));
MODULE_FIRMWARE(IWL7265_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
MODULE_FIRMWARE(IWL7265_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
MODULE_FIRMWARE(IWL7265D_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
MODULE_FIRMWARE(IWL7265D_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
+5 −0
Original line number Original line Diff line number Diff line
@@ -6,6 +6,7 @@
 * GPL LICENSE SUMMARY
 * GPL LICENSE SUMMARY
 *
 *
 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2015 Intel Mobile Communications GmbH
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * it under the terms of version 2 of the GNU General Public License as
@@ -31,6 +32,7 @@
 * BSD LICENSE
 * BSD LICENSE
 *
 *
 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2015 Intel Mobile Communications GmbH
 * All rights reserved.
 * All rights reserved.
 *
 *
 * Redistribution and use in source and binary forms, with or without
 * Redistribution and use in source and binary forms, with or without
@@ -748,6 +750,9 @@ void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
		return;
		return;
	}
	}


	if (data->sku_cap_mimo_disabled)
		rx_chains = 1;

	ht_info->ht_supported = true;
	ht_info->ht_supported = true;
	ht_info->cap = IEEE80211_HT_CAP_DSSSCCK40;
	ht_info->cap = IEEE80211_HT_CAP_DSSSCCK40;


+3 −0
Original line number Original line Diff line number Diff line
@@ -6,6 +6,7 @@
 * GPL LICENSE SUMMARY
 * GPL LICENSE SUMMARY
 *
 *
 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2015 Intel Mobile Communications GmbH
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * it under the terms of version 2 of the GNU General Public License as
@@ -31,6 +32,7 @@
 * BSD LICENSE
 * BSD LICENSE
 *
 *
 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2015 Intel Mobile Communications GmbH
 * All rights reserved.
 * All rights reserved.
 *
 *
 * Redistribution and use in source and binary forms, with or without
 * Redistribution and use in source and binary forms, with or without
@@ -84,6 +86,7 @@ struct iwl_nvm_data {
	bool sku_cap_11ac_enable;
	bool sku_cap_11ac_enable;
	bool sku_cap_amt_enable;
	bool sku_cap_amt_enable;
	bool sku_cap_ipan_enable;
	bool sku_cap_ipan_enable;
	bool sku_cap_mimo_disabled;


	u16 radio_cfg_type;
	u16 radio_cfg_type;
	u8 radio_cfg_step;
	u8 radio_cfg_step;
+23 −7
Original line number Original line Diff line number Diff line
@@ -6,7 +6,7 @@
 * GPL LICENSE SUMMARY
 * GPL LICENSE SUMMARY
 *
 *
 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * it under the terms of version 2 of the GNU General Public License as
@@ -32,7 +32,7 @@
 * BSD LICENSE
 * BSD LICENSE
 *
 *
 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
 * All rights reserved.
 * All rights reserved.
 *
 *
 * Redistribution and use in source and binary forms, with or without
 * Redistribution and use in source and binary forms, with or without
@@ -120,6 +120,7 @@ enum nvm_sku_bits {
	NVM_SKU_CAP_BAND_52GHZ		= BIT(1),
	NVM_SKU_CAP_BAND_52GHZ		= BIT(1),
	NVM_SKU_CAP_11N_ENABLE		= BIT(2),
	NVM_SKU_CAP_11N_ENABLE		= BIT(2),
	NVM_SKU_CAP_11AC_ENABLE		= BIT(3),
	NVM_SKU_CAP_11AC_ENABLE		= BIT(3),
	NVM_SKU_CAP_MIMO_DISABLE	= BIT(5),
};
};


/*
/*
@@ -368,6 +369,11 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
	if (cfg->ht_params->ldpc)
	if (cfg->ht_params->ldpc)
		vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;
		vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;


	if (data->sku_cap_mimo_disabled) {
		num_rx_ants = 1;
		num_tx_ants = 1;
	}

	if (num_tx_ants > 1)
	if (num_tx_ants > 1)
		vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC;
		vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC;
	else
	else
@@ -527,6 +533,10 @@ static void iwl_set_hw_address_family_8000(struct device *dev,
	const u8 *hw_addr;
	const u8 *hw_addr;


	if (mac_override) {
	if (mac_override) {
		static const u8 reserved_mac[] = {
			0x02, 0xcc, 0xaa, 0xff, 0xee, 0x00
		};

		hw_addr = (const u8 *)(mac_override +
		hw_addr = (const u8 *)(mac_override +
				 MAC_ADDRESS_OVERRIDE_FAMILY_8000);
				 MAC_ADDRESS_OVERRIDE_FAMILY_8000);


@@ -538,7 +548,12 @@ static void iwl_set_hw_address_family_8000(struct device *dev,
		data->hw_addr[4] = hw_addr[5];
		data->hw_addr[4] = hw_addr[5];
		data->hw_addr[5] = hw_addr[4];
		data->hw_addr[5] = hw_addr[4];


		if (is_valid_ether_addr(data->hw_addr))
		/*
		 * Force the use of the OTP MAC address in case of reserved MAC
		 * address in the NVM, or if address is given but invalid.
		 */
		if (is_valid_ether_addr(data->hw_addr) &&
		    memcmp(reserved_mac, hw_addr, ETH_ALEN) != 0)
			return;
			return;


		IWL_ERR_DEV(dev,
		IWL_ERR_DEV(dev,
@@ -610,6 +625,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg,
		data->sku_cap_11n_enable = false;
		data->sku_cap_11n_enable = false;
	data->sku_cap_11ac_enable = data->sku_cap_11n_enable &&
	data->sku_cap_11ac_enable = data->sku_cap_11n_enable &&
				    (sku & NVM_SKU_CAP_11AC_ENABLE);
				    (sku & NVM_SKU_CAP_11AC_ENABLE);
	data->sku_cap_mimo_disabled = sku & NVM_SKU_CAP_MIMO_DISABLE;


	data->n_hw_addrs = iwl_get_n_hw_addrs(cfg, nvm_sw);
	data->n_hw_addrs = iwl_get_n_hw_addrs(cfg, nvm_sw);


Loading