aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-02-22 02:10:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-27 14:06:33 -0500
commitd3c83ac12338509f37e95bffb19097a361a089a2 (patch)
tree7ccbd4dd31ebf354de7b5bb6259c94b7909729eb /drivers/net
parentea510e4bdd672b72d0350198538e697e471fafd4 (diff)
ath9k: Initialize MCI params using a helper
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/btcoex.c24
-rw-r--r--drivers/net/wireless/ath/ath9k/btcoex.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c23
3 files changed, 27 insertions, 21 deletions
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c
index a6712a95d76a..6566952b08cc 100644
--- a/drivers/net/wireless/ath/ath9k/btcoex.c
+++ b/drivers/net/wireless/ath/ath9k/btcoex.c
@@ -152,6 +152,30 @@ void ath9k_hw_btcoex_init_3wire(struct ath_hw *ah)
152} 152}
153EXPORT_SYMBOL(ath9k_hw_btcoex_init_3wire); 153EXPORT_SYMBOL(ath9k_hw_btcoex_init_3wire);
154 154
155void ath9k_hw_btcoex_init_mci(struct ath_hw *ah)
156{
157 ah->btcoex_hw.mci.ready = false;
158 ah->btcoex_hw.mci.bt_state = 0;
159 ah->btcoex_hw.mci.bt_ver_major = 3;
160 ah->btcoex_hw.mci.bt_ver_minor = 0;
161 ah->btcoex_hw.mci.bt_version_known = false;
162 ah->btcoex_hw.mci.update_2g5g = true;
163 ah->btcoex_hw.mci.is_2g = true;
164 ah->btcoex_hw.mci.wlan_channels_update = false;
165 ah->btcoex_hw.mci.wlan_channels[0] = 0x00000000;
166 ah->btcoex_hw.mci.wlan_channels[1] = 0xffffffff;
167 ah->btcoex_hw.mci.wlan_channels[2] = 0xffffffff;
168 ah->btcoex_hw.mci.wlan_channels[3] = 0x7fffffff;
169 ah->btcoex_hw.mci.query_bt = true;
170 ah->btcoex_hw.mci.unhalt_bt_gpm = true;
171 ah->btcoex_hw.mci.halted_bt_gpm = false;
172 ah->btcoex_hw.mci.need_flush_btinfo = false;
173 ah->btcoex_hw.mci.wlan_cal_seq = 0;
174 ah->btcoex_hw.mci.wlan_cal_done = 0;
175 ah->btcoex_hw.mci.config = 0x2201;
176}
177EXPORT_SYMBOL(ath9k_hw_btcoex_init_mci);
178
155static void ath9k_hw_btcoex_enable_2wire(struct ath_hw *ah) 179static void ath9k_hw_btcoex_enable_2wire(struct ath_hw *ah)
156{ 180{
157 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; 181 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.h b/drivers/net/wireless/ath/ath9k/btcoex.h
index 0cb7ce98394b..0cb15cd85e92 100644
--- a/drivers/net/wireless/ath/ath9k/btcoex.h
+++ b/drivers/net/wireless/ath/ath9k/btcoex.h
@@ -99,6 +99,7 @@ struct ath_btcoex_hw {
99 99
100void ath9k_hw_btcoex_init_2wire(struct ath_hw *ah); 100void ath9k_hw_btcoex_init_2wire(struct ath_hw *ah);
101void ath9k_hw_btcoex_init_3wire(struct ath_hw *ah); 101void ath9k_hw_btcoex_init_3wire(struct ath_hw *ah);
102void ath9k_hw_btcoex_init_mci(struct ath_hw *ah);
102void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum); 103void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum);
103void ath9k_hw_btcoex_set_weight(struct ath_hw *ah, 104void ath9k_hw_btcoex_set_weight(struct ath_hw *ah,
104 u32 bt_weight, 105 u32 bt_weight,
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 53a005d288aa..a944fc95f69f 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -449,27 +449,8 @@ static int ath9k_init_btcoex(struct ath_softc *sc)
449 if (r) 449 if (r)
450 return r; 450 return r;
451 451
452 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI) { 452 ath9k_hw_btcoex_init_mci(ah);
453 ah->btcoex_hw.mci.ready = false; 453
454 ah->btcoex_hw.mci.bt_state = 0;
455 ah->btcoex_hw.mci.bt_ver_major = 3;
456 ah->btcoex_hw.mci.bt_ver_minor = 0;
457 ah->btcoex_hw.mci.bt_version_known = false;
458 ah->btcoex_hw.mci.update_2g5g = true;
459 ah->btcoex_hw.mci.is_2g = true;
460 ah->btcoex_hw.mci.wlan_channels_update = false;
461 ah->btcoex_hw.mci.wlan_channels[0] = 0x00000000;
462 ah->btcoex_hw.mci.wlan_channels[1] = 0xffffffff;
463 ah->btcoex_hw.mci.wlan_channels[2] = 0xffffffff;
464 ah->btcoex_hw.mci.wlan_channels[3] = 0x7fffffff;
465 ah->btcoex_hw.mci.query_bt = true;
466 ah->btcoex_hw.mci.unhalt_bt_gpm = true;
467 ah->btcoex_hw.mci.halted_bt_gpm = false;
468 ah->btcoex_hw.mci.need_flush_btinfo = false;
469 ah->btcoex_hw.mci.wlan_cal_seq = 0;
470 ah->btcoex_hw.mci.wlan_cal_done = 0;
471 ah->btcoex_hw.mci.config = 0x2201;
472 }
473 break; 454 break;
474 default: 455 default:
475 WARN_ON(1); 456 WARN_ON(1);