iwlwifi: define the non shared antenna per hardware
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 10 Sep 2014 08:00:16 +0000 (11:00 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 14 Sep 2014 09:56:39 +0000 (12:56 +0300)
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>
drivers/net/wireless/iwlwifi/iwl-7000.c
drivers/net/wireless/iwlwifi/iwl-8000.c
drivers/net/wireless/iwlwifi/iwl-config.h
drivers/net/wireless/iwlwifi/mvm/coex.c
drivers/net/wireless/iwlwifi/mvm/tx.c

index 79c8f74685d555609a7f5b75932ddb07c585a58d..b04b8858c6905ae700ac4081e57f56f59668eaf8 100644 (file)
@@ -131,7 +131,8 @@ static const struct iwl_ht_params iwl7000_ht_params = {
        .max_data_size = IWL60_RTC_DATA_SIZE,                   \
        .base_params = &iwl7000_base_params,                    \
        .led_mode = IWL_LED_RF_STATE,                           \
-       .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_7000
+       .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_7000,   \
+       .non_shared_ant = ANT_A
 
 
 const struct iwl_cfg iwl7260_2ac_cfg = {
index db67631e935a7f1e26ee27356925e8666f50065b..4ae8ba6ccfffd3142ea6aeb7c8e3586919b686b4 100644 (file)
@@ -116,7 +116,8 @@ static const struct iwl_ht_params iwl8000_ht_params = {
        .max_data_size = IWL60_RTC_DATA_SIZE,                   \
        .base_params = &iwl8000_base_params,                    \
        .led_mode = IWL_LED_RF_STATE,                           \
-       .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_8000
+       .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_8000,   \
+       .non_shared_ant = ANT_A
 
 const struct iwl_cfg iwl8260_2n_cfg = {
        .name = "Intel(R) Dual Band Wireless N 8260",
index 687e9e1adbdad5295ab8dcfec4b5ff9b745b5013..2ef83a39ff10bb877f9ff15430a10b9ac2b3b836 100644 (file)
@@ -230,6 +230,7 @@ struct iwl_pwr_tx_backoff {
  * @max_data_size: The maximal length of the fw data section
  * @valid_tx_ant: valid transmit antenna
  * @valid_rx_ant: valid receive antenna
+ * @non_shared_ant: the antenna that is for WiFi only
  * @nvm_ver: NVM version
  * @nvm_calib_ver: NVM calibration version
  * @lib: pointer to the lib ops
@@ -262,6 +263,7 @@ struct iwl_cfg {
        const u32 max_inst_size;
        u8   valid_tx_ant;
        u8   valid_rx_ant;
+       u8   non_shared_ant;
        bool bt_shared_single_ant;
        u16  nvm_ver;
        u16  nvm_calib_ver;
index 6e8f3e2aef74386b8ccb1aaf74e39eda73f57075..8df2021f9856365b2bec8465bb4ddbb02e907586 100644 (file)
@@ -1146,6 +1146,10 @@ bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm,
 
 bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm)
 {
+       /* there is no other antenna, shared antenna is always available */
+       if (mvm->cfg->bt_shared_single_ant)
+               return true;
+
        if (!(mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BT_COEX_SPLIT))
                return iwl_mvm_bt_coex_is_shared_ant_avail_old(mvm);
 
index ed0919465e0e555d0422d98abfc9158515c2fa27..c67296efa04db97b3936b60234f8a3b7650ea439 100644 (file)
@@ -213,7 +213,7 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
 
        if (info->band == IEEE80211_BAND_2GHZ &&
            !iwl_mvm_bt_coex_is_shared_ant_avail(mvm))
-               rate_flags = BIT(ANT_A) << RATE_MCS_ANT_POS;
+               rate_flags = BIT(mvm->cfg->non_shared_ant) << RATE_MCS_ANT_POS;
        else
                rate_flags =
                        BIT(mvm->mgmt_last_antenna_idx) << RATE_MCS_ANT_POS;