diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_phy.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw-ops.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 5 |
5 files changed, 30 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.c b/drivers/net/wireless/ath/ath9k/ar9002_phy.c index 456d8b917396..1fc1fa955d44 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c | |||
@@ -555,6 +555,8 @@ static void ar9002_hw_antdiv_comb_conf_set(struct ath_hw *ah, | |||
555 | REG_WRITE(ah, AR_PHY_MULTICHAIN_GAIN_CTL, regval); | 555 | REG_WRITE(ah, AR_PHY_MULTICHAIN_GAIN_CTL, regval); |
556 | } | 556 | } |
557 | 557 | ||
558 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
559 | |||
558 | static void ar9002_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) | 560 | static void ar9002_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) |
559 | { | 561 | { |
560 | struct ath_btcoex_hw *btcoex = &ah->btcoex_hw; | 562 | struct ath_btcoex_hw *btcoex = &ah->btcoex_hw; |
@@ -614,6 +616,8 @@ static void ar9002_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) | |||
614 | REG_WRITE(ah, AR_PHY_CCK_DETECT, regval); | 616 | REG_WRITE(ah, AR_PHY_CCK_DETECT, regval); |
615 | } | 617 | } |
616 | 618 | ||
619 | #endif | ||
620 | |||
617 | static void ar9002_hw_spectral_scan_config(struct ath_hw *ah, | 621 | static void ar9002_hw_spectral_scan_config(struct ath_hw *ah, |
618 | struct ath_spec_scan *param) | 622 | struct ath_spec_scan *param) |
619 | { | 623 | { |
@@ -689,10 +693,13 @@ void ar9002_hw_attach_phy_ops(struct ath_hw *ah) | |||
689 | 693 | ||
690 | ops->antdiv_comb_conf_get = ar9002_hw_antdiv_comb_conf_get; | 694 | ops->antdiv_comb_conf_get = ar9002_hw_antdiv_comb_conf_get; |
691 | ops->antdiv_comb_conf_set = ar9002_hw_antdiv_comb_conf_set; | 695 | ops->antdiv_comb_conf_set = ar9002_hw_antdiv_comb_conf_set; |
692 | ops->set_bt_ant_diversity = ar9002_hw_set_bt_ant_diversity; | ||
693 | ops->spectral_scan_config = ar9002_hw_spectral_scan_config; | 696 | ops->spectral_scan_config = ar9002_hw_spectral_scan_config; |
694 | ops->spectral_scan_trigger = ar9002_hw_spectral_scan_trigger; | 697 | ops->spectral_scan_trigger = ar9002_hw_spectral_scan_trigger; |
695 | ops->spectral_scan_wait = ar9002_hw_spectral_scan_wait; | 698 | ops->spectral_scan_wait = ar9002_hw_spectral_scan_wait; |
696 | 699 | ||
700 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
701 | ops->set_bt_ant_diversity = ar9002_hw_set_bt_ant_diversity; | ||
702 | #endif | ||
703 | |||
697 | ar9002_hw_set_nf_limits(ah); | 704 | ar9002_hw_set_nf_limits(ah); |
698 | } | 705 | } |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index 4898829e6549..39c37309f39e 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -1412,6 +1412,8 @@ static void ar9003_hw_antdiv_comb_conf_set(struct ath_hw *ah, | |||
1412 | REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval); | 1412 | REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval); |
1413 | } | 1413 | } |
1414 | 1414 | ||
1415 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
1416 | |||
1415 | static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) | 1417 | static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) |
1416 | { | 1418 | { |
1417 | struct ath9k_hw_capabilities *pCap = &ah->caps; | 1419 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
@@ -1513,6 +1515,8 @@ static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) | |||
1513 | } | 1515 | } |
1514 | } | 1516 | } |
1515 | 1517 | ||
1518 | #endif | ||
1519 | |||
1516 | static int ar9003_hw_fast_chan_change(struct ath_hw *ah, | 1520 | static int ar9003_hw_fast_chan_change(struct ath_hw *ah, |
1517 | struct ath9k_channel *chan, | 1521 | struct ath9k_channel *chan, |
1518 | u8 *ini_reloaded) | 1522 | u8 *ini_reloaded) |
@@ -1688,11 +1692,14 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah) | |||
1688 | 1692 | ||
1689 | ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get; | 1693 | ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get; |
1690 | ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set; | 1694 | ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set; |
1691 | ops->set_bt_ant_diversity = ar9003_hw_set_bt_ant_diversity; | ||
1692 | ops->spectral_scan_config = ar9003_hw_spectral_scan_config; | 1695 | ops->spectral_scan_config = ar9003_hw_spectral_scan_config; |
1693 | ops->spectral_scan_trigger = ar9003_hw_spectral_scan_trigger; | 1696 | ops->spectral_scan_trigger = ar9003_hw_spectral_scan_trigger; |
1694 | ops->spectral_scan_wait = ar9003_hw_spectral_scan_wait; | 1697 | ops->spectral_scan_wait = ar9003_hw_spectral_scan_wait; |
1695 | 1698 | ||
1699 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
1700 | ops->set_bt_ant_diversity = ar9003_hw_set_bt_ant_diversity; | ||
1701 | #endif | ||
1702 | |||
1696 | ar9003_hw_set_nf_limits(ah); | 1703 | ar9003_hw_set_nf_limits(ah); |
1697 | ar9003_hw_set_radar_conf(ah); | 1704 | ar9003_hw_set_radar_conf(ah); |
1698 | memcpy(ah->nf_regs, ar9300_cca_regs, sizeof(ah->nf_regs)); | 1705 | memcpy(ah->nf_regs, ar9300_cca_regs, sizeof(ah->nf_regs)); |
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index a155190e2c84..414584ed3f54 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -270,6 +270,8 @@ static const struct file_operations fops_ani = { | |||
270 | .llseek = default_llseek, | 270 | .llseek = default_llseek, |
271 | }; | 271 | }; |
272 | 272 | ||
273 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
274 | |||
273 | static ssize_t read_file_bt_ant_diversity(struct file *file, | 275 | static ssize_t read_file_bt_ant_diversity(struct file *file, |
274 | char __user *user_buf, | 276 | char __user *user_buf, |
275 | size_t count, loff_t *ppos) | 277 | size_t count, loff_t *ppos) |
@@ -323,6 +325,8 @@ static const struct file_operations fops_bt_ant_diversity = { | |||
323 | .llseek = default_llseek, | 325 | .llseek = default_llseek, |
324 | }; | 326 | }; |
325 | 327 | ||
328 | #endif | ||
329 | |||
326 | void ath9k_debug_stat_ant(struct ath_softc *sc, | 330 | void ath9k_debug_stat_ant(struct ath_softc *sc, |
327 | struct ath_hw_antcomb_conf *div_ant_conf, | 331 | struct ath_hw_antcomb_conf *div_ant_conf, |
328 | int main_rssi_avg, int alt_rssi_avg) | 332 | int main_rssi_avg, int alt_rssi_avg) |
@@ -1935,11 +1939,11 @@ int ath9k_init_debug(struct ath_hw *ah) | |||
1935 | sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask); | 1939 | sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask); |
1936 | debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR, | 1940 | debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR, |
1937 | sc->debug.debugfs_phy, &sc->sc_ah->gpio_val); | 1941 | sc->debug.debugfs_phy, &sc->sc_ah->gpio_val); |
1938 | debugfs_create_file("bt_ant_diversity", S_IRUSR | S_IWUSR, | ||
1939 | sc->debug.debugfs_phy, sc, &fops_bt_ant_diversity); | ||
1940 | debugfs_create_file("antenna_diversity", S_IRUSR, | 1942 | debugfs_create_file("antenna_diversity", S_IRUSR, |
1941 | sc->debug.debugfs_phy, sc, &fops_antenna_diversity); | 1943 | sc->debug.debugfs_phy, sc, &fops_antenna_diversity); |
1942 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | 1944 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT |
1945 | debugfs_create_file("bt_ant_diversity", S_IRUSR | S_IWUSR, | ||
1946 | sc->debug.debugfs_phy, sc, &fops_bt_ant_diversity); | ||
1943 | debugfs_create_file("btcoex", S_IRUSR, sc->debug.debugfs_phy, sc, | 1947 | debugfs_create_file("btcoex", S_IRUSR, sc->debug.debugfs_phy, sc, |
1944 | &fops_btcoex); | 1948 | &fops_btcoex); |
1945 | #endif | 1949 | #endif |
diff --git a/drivers/net/wireless/ath/ath9k/hw-ops.h b/drivers/net/wireless/ath/ath9k/hw-ops.h index a78d48c3ad21..83f4927aeaca 100644 --- a/drivers/net/wireless/ath/ath9k/hw-ops.h +++ b/drivers/net/wireless/ath/ath9k/hw-ops.h | |||
@@ -78,12 +78,16 @@ static inline void ath9k_hw_antdiv_comb_conf_set(struct ath_hw *ah, | |||
78 | ath9k_hw_ops(ah)->antdiv_comb_conf_set(ah, antconf); | 78 | ath9k_hw_ops(ah)->antdiv_comb_conf_set(ah, antconf); |
79 | } | 79 | } |
80 | 80 | ||
81 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
82 | |||
81 | static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) | 83 | static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) |
82 | { | 84 | { |
83 | if (ath9k_hw_ops(ah)->set_bt_ant_diversity) | 85 | if (ath9k_hw_ops(ah)->set_bt_ant_diversity) |
84 | ath9k_hw_ops(ah)->set_bt_ant_diversity(ah, enable); | 86 | ath9k_hw_ops(ah)->set_bt_ant_diversity(ah, enable); |
85 | } | 87 | } |
86 | 88 | ||
89 | #endif | ||
90 | |||
87 | /* Private hardware call ops */ | 91 | /* Private hardware call ops */ |
88 | 92 | ||
89 | /* PHY ops */ | 93 | /* PHY ops */ |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 38f461c11c33..64ff8e61c243 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -719,11 +719,14 @@ struct ath_hw_ops { | |||
719 | struct ath_hw_antcomb_conf *antconf); | 719 | struct ath_hw_antcomb_conf *antconf); |
720 | void (*antdiv_comb_conf_set)(struct ath_hw *ah, | 720 | void (*antdiv_comb_conf_set)(struct ath_hw *ah, |
721 | struct ath_hw_antcomb_conf *antconf); | 721 | struct ath_hw_antcomb_conf *antconf); |
722 | void (*set_bt_ant_diversity)(struct ath_hw *hw, bool enable); | ||
723 | void (*spectral_scan_config)(struct ath_hw *ah, | 722 | void (*spectral_scan_config)(struct ath_hw *ah, |
724 | struct ath_spec_scan *param); | 723 | struct ath_spec_scan *param); |
725 | void (*spectral_scan_trigger)(struct ath_hw *ah); | 724 | void (*spectral_scan_trigger)(struct ath_hw *ah); |
726 | void (*spectral_scan_wait)(struct ath_hw *ah); | 725 | void (*spectral_scan_wait)(struct ath_hw *ah); |
726 | |||
727 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | ||
728 | void (*set_bt_ant_diversity)(struct ath_hw *hw, bool enable); | ||
729 | #endif | ||
727 | }; | 730 | }; |
728 | 731 | ||
729 | struct ath_nf_limits { | 732 | struct ath_nf_limits { |