diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-09 17:26:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:21 -0400 |
commit | e08a6ace7db089dc111c6d0abe9278226c39b7b0 (patch) | |
tree | c9fae51a9ba0dbf88544768e7f1e6b84eff5b1da | |
parent | 8c1b39547e2562f9aa0cc00b1a7d4cc325a46a4c (diff) |
ath9k: move bt_stomp_type to driver core
The bt_stomp_type defines the bt coex weight, it has a one-to-one
mapping. In the future we may want to just use the weight directly.
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/ath9k.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/btcoex.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/btcoex.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 7 |
4 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 891e71b10e5c..d99c92d7b949 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -450,12 +450,21 @@ struct ath_ani { | |||
450 | struct timer_list timer; | 450 | struct timer_list timer; |
451 | }; | 451 | }; |
452 | 452 | ||
453 | /* Defines the BT AR_BT_COEX_WGHT used */ | ||
454 | enum ath_stomp_type { | ||
455 | ATH_BTCOEX_NO_STOMP, | ||
456 | ATH_BTCOEX_STOMP_ALL, | ||
457 | ATH_BTCOEX_STOMP_LOW, | ||
458 | ATH_BTCOEX_STOMP_NONE | ||
459 | }; | ||
460 | |||
453 | struct ath_btcoex { | 461 | struct ath_btcoex { |
454 | bool hw_timer_enabled; | 462 | bool hw_timer_enabled; |
455 | spinlock_t btcoex_lock; | 463 | spinlock_t btcoex_lock; |
456 | struct timer_list period_timer; /* Timer for BT period */ | 464 | struct timer_list period_timer; /* Timer for BT period */ |
457 | u32 bt_priority_cnt; | 465 | u32 bt_priority_cnt; |
458 | unsigned long bt_priority_time; | 466 | unsigned long bt_priority_time; |
467 | int bt_stomp_type; /* Types of BT stomping */ | ||
459 | u32 btcoex_no_stomp; /* in usec */ | 468 | u32 btcoex_no_stomp; /* in usec */ |
460 | u32 btcoex_period; /* in usec */ | 469 | u32 btcoex_period; /* in usec */ |
461 | struct ath_gen_timer *no_stomp_timer; /* Timer for no BT stomping */ | 470 | struct ath_gen_timer *no_stomp_timer; /* Timer for no BT stomping */ |
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c index 91befc78a15b..ab19072493cb 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.c +++ b/drivers/net/wireless/ath/ath9k/btcoex.c | |||
@@ -65,8 +65,6 @@ void ath9k_hw_init_btcoex_hw_info(struct ath_hw *ah, int qnum) | |||
65 | SM(ATH_BTCOEX_BMISS_THRESH, AR_BT_BCN_MISS_THRESH) | | 65 | SM(ATH_BTCOEX_BMISS_THRESH, AR_BT_BCN_MISS_THRESH) | |
66 | AR_BT_DISABLE_BT_ANT; | 66 | AR_BT_DISABLE_BT_ANT; |
67 | 67 | ||
68 | btcoex_info->bt_stomp_type = ATH_BTCOEX_STOMP_LOW; | ||
69 | |||
70 | for (i = 0; i < 32; i++) | 68 | for (i = 0; i < 32; i++) |
71 | ah->hw_gen_timers.gen_timer_index[(debruijn32 << i) >> 27] = i; | 69 | ah->hw_gen_timers.gen_timer_index[(debruijn32 << i) >> 27] = i; |
72 | } | 70 | } |
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.h b/drivers/net/wireless/ath/ath9k/btcoex.h index b2c3f7669852..d932f01f7731 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.h +++ b/drivers/net/wireless/ath/ath9k/btcoex.h | |||
@@ -36,13 +36,6 @@ enum ath_btcoex_scheme { | |||
36 | ATH_BTCOEX_CFG_3WIRE, | 36 | ATH_BTCOEX_CFG_3WIRE, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | enum ath_stomp_type { | ||
40 | ATH_BTCOEX_NO_STOMP, | ||
41 | ATH_BTCOEX_STOMP_ALL, | ||
42 | ATH_BTCOEX_STOMP_LOW, | ||
43 | ATH_BTCOEX_STOMP_NONE | ||
44 | }; | ||
45 | |||
46 | enum ath_bt_mode { | 39 | enum ath_bt_mode { |
47 | ATH_BT_COEX_MODE_LEGACY, /* legacy rx_clear mode */ | 40 | ATH_BT_COEX_MODE_LEGACY, /* legacy rx_clear mode */ |
48 | ATH_BT_COEX_MODE_UNSLOTTED, /* untimed/unslotted mode */ | 41 | ATH_BT_COEX_MODE_UNSLOTTED, /* untimed/unslotted mode */ |
@@ -69,7 +62,6 @@ struct ath_btcoex_info { | |||
69 | u8 btactive_gpio; | 62 | u8 btactive_gpio; |
70 | u8 btpriority_gpio; | 63 | u8 btpriority_gpio; |
71 | u8 bt_duty_cycle; /* BT duty cycle in percentage */ | 64 | u8 bt_duty_cycle; /* BT duty cycle in percentage */ |
72 | int bt_stomp_type; /* Types of BT stomping */ | ||
73 | u32 bt_coex_mode; /* Register setting for AR_BT_COEX_MODE */ | 65 | u32 bt_coex_mode; /* Register setting for AR_BT_COEX_MODE */ |
74 | u32 bt_coex_weights; /* Register setting for AR_BT_COEX_WEIGHT */ | 66 | u32 bt_coex_weights; /* Register setting for AR_BT_COEX_WEIGHT */ |
75 | u32 bt_coex_mode2; /* Register setting for AR_BT_COEX_MODE2 */ | 67 | u32 bt_coex_mode2; /* Register setting for AR_BT_COEX_MODE2 */ |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index cd1bc9c27527..7ca6e3aa7bc4 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1391,7 +1391,7 @@ static void ath_btcoex_period_timer(unsigned long data) | |||
1391 | 1391 | ||
1392 | spin_lock_bh(&btcoex->btcoex_lock); | 1392 | spin_lock_bh(&btcoex->btcoex_lock); |
1393 | 1393 | ||
1394 | ath_btcoex_bt_stomp(sc, btinfo, btinfo->bt_stomp_type); | 1394 | ath_btcoex_bt_stomp(sc, btinfo, btcoex->bt_stomp_type); |
1395 | 1395 | ||
1396 | spin_unlock_bh(&btcoex->btcoex_lock); | 1396 | spin_unlock_bh(&btcoex->btcoex_lock); |
1397 | 1397 | ||
@@ -1426,9 +1426,9 @@ static void ath_btcoex_no_stomp_timer(void *arg) | |||
1426 | 1426 | ||
1427 | spin_lock_bh(&btcoex->btcoex_lock); | 1427 | spin_lock_bh(&btcoex->btcoex_lock); |
1428 | 1428 | ||
1429 | if (btinfo->bt_stomp_type == ATH_BTCOEX_STOMP_LOW) | 1429 | if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW) |
1430 | ath_btcoex_bt_stomp(sc, btinfo, ATH_BTCOEX_STOMP_NONE); | 1430 | ath_btcoex_bt_stomp(sc, btinfo, ATH_BTCOEX_STOMP_NONE); |
1431 | else if (btinfo->bt_stomp_type == ATH_BTCOEX_STOMP_ALL) | 1431 | else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL) |
1432 | ath_btcoex_bt_stomp(sc, btinfo, ATH_BTCOEX_STOMP_LOW); | 1432 | ath_btcoex_bt_stomp(sc, btinfo, ATH_BTCOEX_STOMP_LOW); |
1433 | 1433 | ||
1434 | spin_unlock_bh(&btcoex->btcoex_lock); | 1434 | spin_unlock_bh(&btcoex->btcoex_lock); |
@@ -1687,6 +1687,7 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid) | |||
1687 | goto bad2; | 1687 | goto bad2; |
1688 | qnum = ath_tx_get_qnum(sc, ATH9K_TX_QUEUE_DATA, ATH9K_WME_AC_BE); | 1688 | qnum = ath_tx_get_qnum(sc, ATH9K_TX_QUEUE_DATA, ATH9K_WME_AC_BE); |
1689 | ath9k_hw_init_btcoex_hw_info(ah, qnum); | 1689 | ath9k_hw_init_btcoex_hw_info(ah, qnum); |
1690 | sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; | ||
1690 | break; | 1691 | break; |
1691 | default: | 1692 | default: |
1692 | WARN_ON(1); | 1693 | WARN_ON(1); |