aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-09-09 18:24:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:23 -0400
commit8b4fc5ba896cd1b73c598d07fc51224abbfe8cdb (patch)
tree989377f2b3ff5f9d71f5d8004568b884b378fd16
parent5e1972929532bfc3a26b1782c8551d3c56306ffd (diff)
ath9k: move ath_btcoex_config and ath_bt_mode to btcoex.c
These are only used by btcoex.c on one routine, so stuff them into that file. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/btcoex.c31
-rw-r--r--drivers/net/wireless/ath/ath9k/btcoex.h20
2 files changed, 29 insertions, 22 deletions
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c
index 4cca023647fd..ee2a83491235 100644
--- a/drivers/net/wireless/ath/ath9k/btcoex.c
+++ b/drivers/net/wireless/ath/ath9k/btcoex.c
@@ -16,8 +16,24 @@
16 16
17#include "ath9k.h" 17#include "ath9k.h"
18 18
19static const struct ath_btcoex_config ath_bt_config = { 0, true, true, 19enum ath_bt_mode {
20 ATH_BT_COEX_MODE_SLOTTED, true, true, 2, 5, true }; 20 ATH_BT_COEX_MODE_LEGACY, /* legacy rx_clear mode */
21 ATH_BT_COEX_MODE_UNSLOTTED, /* untimed/unslotted mode */
22 ATH_BT_COEX_MODE_SLOTTED, /* slotted mode */
23 ATH_BT_COEX_MODE_DISALBED, /* coexistence disabled */
24};
25
26struct ath_btcoex_config {
27 u8 bt_time_extend;
28 bool bt_txstate_extend;
29 bool bt_txframe_extend;
30 enum ath_bt_mode bt_mode; /* coexistence mode */
31 bool bt_quiet_collision;
32 bool bt_rxclear_polarity; /* invert rx_clear as WLAN_ACTIVE*/
33 u8 bt_priority_time;
34 u8 bt_first_slot_time;
35 bool bt_hold_rx_clear;
36};
21 37
22static const u16 ath_subsysid_tbl[] = { 38static const u16 ath_subsysid_tbl[] = {
23 AR9280_COEX2WIRE_SUBSYSID, 39 AR9280_COEX2WIRE_SUBSYSID,
@@ -46,6 +62,17 @@ bool ath_btcoex_supported(u16 subsysid)
46void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum) 62void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum)
47{ 63{
48 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; 64 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
65 const struct ath_btcoex_config ath_bt_config = {
66 .bt_time_extend = 0,
67 .bt_txstate_extend = true,
68 .bt_txframe_extend = true,
69 .bt_mode = ATH_BT_COEX_MODE_SLOTTED,
70 .bt_quiet_collision = true,
71 .bt_rxclear_polarity = true,
72 .bt_priority_time = 2,
73 .bt_first_slot_time = 5,
74 .bt_hold_rx_clear = true,
75 };
49 u32 i; 76 u32 i;
50 77
51 btcoex_hw->bt_coex_mode = 78 btcoex_hw->bt_coex_mode =
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.h b/drivers/net/wireless/ath/ath9k/btcoex.h
index 971d20065b45..0dc51202d451 100644
--- a/drivers/net/wireless/ath/ath9k/btcoex.h
+++ b/drivers/net/wireless/ath/ath9k/btcoex.h
@@ -36,25 +36,6 @@ enum ath_btcoex_scheme {
36 ATH_BTCOEX_CFG_3WIRE, 36 ATH_BTCOEX_CFG_3WIRE,
37}; 37};
38 38
39enum ath_bt_mode {
40 ATH_BT_COEX_MODE_LEGACY, /* legacy rx_clear mode */
41 ATH_BT_COEX_MODE_UNSLOTTED, /* untimed/unslotted mode */
42 ATH_BT_COEX_MODE_SLOTTED, /* slotted mode */
43 ATH_BT_COEX_MODE_DISALBED, /* coexistence disabled */
44};
45
46struct ath_btcoex_config {
47 u8 bt_time_extend;
48 bool bt_txstate_extend;
49 bool bt_txframe_extend;
50 enum ath_bt_mode bt_mode; /* coexistence mode */
51 bool bt_quiet_collision;
52 bool bt_rxclear_polarity; /* invert rx_clear as WLAN_ACTIVE*/
53 u8 bt_priority_time;
54 u8 bt_first_slot_time;
55 bool bt_hold_rx_clear;
56};
57
58struct ath_btcoex_hw { 39struct ath_btcoex_hw {
59 enum ath_btcoex_scheme scheme; 40 enum ath_btcoex_scheme scheme;
60 bool enabled; 41 bool enabled;
@@ -76,5 +57,4 @@ void ath9k_hw_btcoex_set_weight(struct ath_hw *ah,
76void ath9k_hw_btcoex_enable(struct ath_hw *ah); 57void ath9k_hw_btcoex_enable(struct ath_hw *ah);
77void ath9k_hw_btcoex_disable(struct ath_hw *ah); 58void ath9k_hw_btcoex_disable(struct ath_hw *ah);
78 59
79
80#endif 60#endif