aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-10 04:00:16 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-14 05:56:39 -0400
commitbbab758279a14556e6ccb17b1f98935634eeb8d5 (patch)
treee4afd83630868f8dab769998348added120d2df7
parent5d4185ae0c68eeff26d0390a4e99b6e7359a8b83 (diff)
iwlwifi: define the non shared antenna per hardware
The sharing model will differ in new hardware. Define the non shared antenna based on the device so that different devices can have different names for the non shared antenna. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-7000.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-8000.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-config.h2
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/coex.c4
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/tx.c2
5 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c
index 79c8f74685d5..b04b8858c690 100644
--- a/drivers/net/wireless/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-7000.c
@@ -131,7 +131,8 @@ static const struct iwl_ht_params iwl7000_ht_params = {
131 .max_data_size = IWL60_RTC_DATA_SIZE, \ 131 .max_data_size = IWL60_RTC_DATA_SIZE, \
132 .base_params = &iwl7000_base_params, \ 132 .base_params = &iwl7000_base_params, \
133 .led_mode = IWL_LED_RF_STATE, \ 133 .led_mode = IWL_LED_RF_STATE, \
134 .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_7000 134 .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_7000, \
135 .non_shared_ant = ANT_A
135 136
136 137
137const struct iwl_cfg iwl7260_2ac_cfg = { 138const struct iwl_cfg iwl7260_2ac_cfg = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-8000.c b/drivers/net/wireless/iwlwifi/iwl-8000.c
index db67631e935a..4ae8ba6ccfff 100644
--- a/drivers/net/wireless/iwlwifi/iwl-8000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-8000.c
@@ -116,7 +116,8 @@ static const struct iwl_ht_params iwl8000_ht_params = {
116 .max_data_size = IWL60_RTC_DATA_SIZE, \ 116 .max_data_size = IWL60_RTC_DATA_SIZE, \
117 .base_params = &iwl8000_base_params, \ 117 .base_params = &iwl8000_base_params, \
118 .led_mode = IWL_LED_RF_STATE, \ 118 .led_mode = IWL_LED_RF_STATE, \
119 .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_8000 119 .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_8000, \
120 .non_shared_ant = ANT_A
120 121
121const struct iwl_cfg iwl8260_2n_cfg = { 122const struct iwl_cfg iwl8260_2n_cfg = {
122 .name = "Intel(R) Dual Band Wireless N 8260", 123 .name = "Intel(R) Dual Band Wireless N 8260",
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h
index 687e9e1adbda..2ef83a39ff10 100644
--- a/drivers/net/wireless/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/iwlwifi/iwl-config.h
@@ -230,6 +230,7 @@ struct iwl_pwr_tx_backoff {
230 * @max_data_size: The maximal length of the fw data section 230 * @max_data_size: The maximal length of the fw data section
231 * @valid_tx_ant: valid transmit antenna 231 * @valid_tx_ant: valid transmit antenna
232 * @valid_rx_ant: valid receive antenna 232 * @valid_rx_ant: valid receive antenna
233 * @non_shared_ant: the antenna that is for WiFi only
233 * @nvm_ver: NVM version 234 * @nvm_ver: NVM version
234 * @nvm_calib_ver: NVM calibration version 235 * @nvm_calib_ver: NVM calibration version
235 * @lib: pointer to the lib ops 236 * @lib: pointer to the lib ops
@@ -262,6 +263,7 @@ struct iwl_cfg {
262 const u32 max_inst_size; 263 const u32 max_inst_size;
263 u8 valid_tx_ant; 264 u8 valid_tx_ant;
264 u8 valid_rx_ant; 265 u8 valid_rx_ant;
266 u8 non_shared_ant;
265 bool bt_shared_single_ant; 267 bool bt_shared_single_ant;
266 u16 nvm_ver; 268 u16 nvm_ver;
267 u16 nvm_calib_ver; 269 u16 nvm_calib_ver;
diff --git a/drivers/net/wireless/iwlwifi/mvm/coex.c b/drivers/net/wireless/iwlwifi/mvm/coex.c
index 6e8f3e2aef74..8df2021f9856 100644
--- a/drivers/net/wireless/iwlwifi/mvm/coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/coex.c
@@ -1146,6 +1146,10 @@ bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm,
1146 1146
1147bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm) 1147bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm)
1148{ 1148{
1149 /* there is no other antenna, shared antenna is always available */
1150 if (mvm->cfg->bt_shared_single_ant)
1151 return true;
1152
1149 if (!(mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BT_COEX_SPLIT)) 1153 if (!(mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BT_COEX_SPLIT))
1150 return iwl_mvm_bt_coex_is_shared_ant_avail_old(mvm); 1154 return iwl_mvm_bt_coex_is_shared_ant_avail_old(mvm);
1151 1155
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index ed0919465e0e..c67296efa04d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -213,7 +213,7 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
213 213
214 if (info->band == IEEE80211_BAND_2GHZ && 214 if (info->band == IEEE80211_BAND_2GHZ &&
215 !iwl_mvm_bt_coex_is_shared_ant_avail(mvm)) 215 !iwl_mvm_bt_coex_is_shared_ant_avail(mvm))
216 rate_flags = BIT(ANT_A) << RATE_MCS_ANT_POS; 216 rate_flags = BIT(mvm->cfg->non_shared_ant) << RATE_MCS_ANT_POS;
217 else 217 else
218 rate_flags = 218 rate_flags =
219 BIT(mvm->mgmt_last_antenna_idx) << RATE_MCS_ANT_POS; 219 BIT(mvm->mgmt_last_antenna_idx) << RATE_MCS_ANT_POS;