aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-10-30 04:19:38 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-05-10 04:44:42 -0400
commit5f0d98f278f943cb6115b6fe4441f11a7015bb50 (patch)
treecacb7a8eaca59397ec4b19da6be31f9014561129 /drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
parente7afe89fd67d40a7f5fff8130c5f925d99a94b1f (diff)
iwlwifi: mvm: forbid MIMO on devices that don't support it
There are devices that forbid MIMO by the mean of the NVM. Detect thoses devices and forbid MIMO otherwise the firmware would crash. STBC is still allowed on these devices. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-nvm-parse.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-nvm-parse.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
index 83903a5025c2..cf86f3cdbb8e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
@@ -6,7 +6,7 @@
6 * GPL LICENSE SUMMARY 6 * GPL LICENSE SUMMARY
7 * 7 *
8 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 8 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
9 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH 9 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of version 2 of the GNU General Public License as 12 * it under the terms of version 2 of the GNU General Public License as
@@ -32,7 +32,7 @@
32 * BSD LICENSE 32 * BSD LICENSE
33 * 33 *
34 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. 34 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
35 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH 35 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
36 * All rights reserved. 36 * All rights reserved.
37 * 37 *
38 * Redistribution and use in source and binary forms, with or without 38 * Redistribution and use in source and binary forms, with or without
@@ -116,10 +116,11 @@ enum family_8000_nvm_offsets {
116 116
117/* SKU Capabilities (actual values from NVM definition) */ 117/* SKU Capabilities (actual values from NVM definition) */
118enum nvm_sku_bits { 118enum nvm_sku_bits {
119 NVM_SKU_CAP_BAND_24GHZ = BIT(0), 119 NVM_SKU_CAP_BAND_24GHZ = BIT(0),
120 NVM_SKU_CAP_BAND_52GHZ = BIT(1), 120 NVM_SKU_CAP_BAND_52GHZ = BIT(1),
121 NVM_SKU_CAP_11N_ENABLE = BIT(2), 121 NVM_SKU_CAP_11N_ENABLE = BIT(2),
122 NVM_SKU_CAP_11AC_ENABLE = BIT(3), 122 NVM_SKU_CAP_11AC_ENABLE = BIT(3),
123 NVM_SKU_CAP_MIMO_DISABLE = BIT(5),
123}; 124};
124 125
125/* 126/*
@@ -368,6 +369,11 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg,
368 if (cfg->ht_params->ldpc) 369 if (cfg->ht_params->ldpc)
369 vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC; 370 vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;
370 371
372 if (data->sku_cap_mimo_disabled) {
373 num_rx_ants = 1;
374 num_tx_ants = 1;
375 }
376
371 if (num_tx_ants > 1) 377 if (num_tx_ants > 1)
372 vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC; 378 vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC;
373 else 379 else
@@ -610,6 +616,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg,
610 data->sku_cap_11n_enable = false; 616 data->sku_cap_11n_enable = false;
611 data->sku_cap_11ac_enable = data->sku_cap_11n_enable && 617 data->sku_cap_11ac_enable = data->sku_cap_11n_enable &&
612 (sku & NVM_SKU_CAP_11AC_ENABLE); 618 (sku & NVM_SKU_CAP_11AC_ENABLE);
619 data->sku_cap_mimo_disabled = sku & NVM_SKU_CAP_MIMO_DISABLE;
613 620
614 data->n_hw_addrs = iwl_get_n_hw_addrs(cfg, nvm_sw); 621 data->n_hw_addrs = iwl_get_n_hw_addrs(cfg, nvm_sw);
615 622