]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/ath/ath9k/ar9003_phy.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux...
[~andy/linux] / drivers / net / wireless / ath / ath9k / ar9003_phy.c
index 4898829e65498fa3ef92248a23ed9678f7005530..e897648d32335dd1800df489916afa80fca81a2b 100644 (file)
@@ -1172,6 +1172,10 @@ skip_ws_det:
                 * is_on == 0 means MRC CCK is OFF (more noise imm)
                 */
                bool is_on = param ? 1 : 0;
+
+               if (ah->caps.rx_chainmask == 1)
+                       break;
+
                REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
                              AR_PHY_MRC_CCK_ENABLE, is_on);
                REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
@@ -1189,8 +1193,6 @@ skip_ws_det:
                }
        break;
        }
-       case ATH9K_ANI_PRESENT:
-               break;
        default:
                ath_dbg(common, ANI, "invalid cmd %u\n", cmd);
                return false;
@@ -1412,6 +1414,8 @@ static void ar9003_hw_antdiv_comb_conf_set(struct ath_hw *ah,
        REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval);
 }
 
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+
 static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
 {
        struct ath9k_hw_capabilities *pCap = &ah->caps;
@@ -1443,7 +1447,7 @@ static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
        regval |= (ant_div_ctl1 & 0x3f) << AR_ANT_DIV_CTRL_ALL_S;
        REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval);
 
-       if (AR_SREV_9485_11(ah)) {
+       if (AR_SREV_9485_11_OR_LATER(ah)) {
                /*
                 * Enable LNA diversity.
                 */
@@ -1513,6 +1517,8 @@ static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
        }
 }
 
+#endif
+
 static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
                                      struct ath9k_channel *chan,
                                      u8 *ini_reloaded)
@@ -1688,11 +1694,14 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
 
        ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get;
        ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;
-       ops->set_bt_ant_diversity = ar9003_hw_set_bt_ant_diversity;
        ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
        ops->spectral_scan_trigger = ar9003_hw_spectral_scan_trigger;
        ops->spectral_scan_wait = ar9003_hw_spectral_scan_wait;
 
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+       ops->set_bt_ant_diversity = ar9003_hw_set_bt_ant_diversity;
+#endif
+
        ar9003_hw_set_nf_limits(ah);
        ar9003_hw_set_radar_conf(ah);
        memcpy(ah->nf_regs, ar9300_cca_regs, sizeof(ah->nf_regs));