Skip to content

Commit

Permalink
ath9k: now move ath9k_hw_btcoex_set_weight() to btcoex.c
Browse files Browse the repository at this point in the history
After some necessary cleanups we now move ath9k_hw_btcoex_set_weight()
to where it belongs.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Oct 7, 2009
1 parent 269ad81 commit 5e19729
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
10 changes: 10 additions & 0 deletions drivers/net/wireless/ath/ath9k/btcoex.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ static void ath9k_hw_btcoex_enable_2wire(struct ath_hw *ah)
AR_GPIO_OUTPUT_MUX_AS_TX_FRAME);
}

void ath9k_hw_btcoex_set_weight(struct ath_hw *ah,
u32 bt_weight,
u32 wlan_weight)
{
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;

btcoex_hw->bt_coex_weights = SM(bt_weight, AR_BTCOEX_BT_WGHT) |
SM(wlan_weight, AR_BTCOEX_WL_WGHT);
}

static void ath9k_hw_btcoex_enable_3wire(struct ath_hw *ah)
{
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath9k/btcoex.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ bool ath_btcoex_supported(u16 subsysid);
void ath9k_hw_btcoex_init_2wire(struct ath_hw *ah);
void ath9k_hw_btcoex_init_3wire(struct ath_hw *ah);
void ath9k_hw_init_btcoex_hw(struct ath_hw *ah, int qnum);
void ath9k_hw_btcoex_set_weight(struct ath_hw *ah,
u32 bt_weight,
u32 wlan_weight);
void ath9k_hw_btcoex_enable(struct ath_hw *ah);
void ath9k_hw_btcoex_disable(struct ath_hw *ah);

Expand Down
18 changes: 2 additions & 16 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,21 +1332,6 @@ static void ath_detect_bt_priority(struct ath_softc *sc)
}
}

static void ath9k_hw_btcoex_set_weight(struct ath_hw *ah,
u32 bt_weight,
u32 wlan_weight)
{
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;

btcoex_hw->bt_coex_weights = SM(bt_weight, AR_BTCOEX_BT_WGHT) |
SM(wlan_weight, AR_BTCOEX_WL_WGHT);
}

static void ath9k_hw_btcoex_init_weight(struct ath_hw *ah)
{
ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT, AR_STOMP_LOW_WLAN_WGHT);
}

/*
* Configures appropriate weight based on stomp type.
*/
Expand Down Expand Up @@ -2200,7 +2185,8 @@ static int ath9k_start(struct ieee80211_hw *hw)

if ((ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) &&
!ah->btcoex_hw.enabled) {
ath9k_hw_btcoex_init_weight(ah);
ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
AR_STOMP_LOW_WLAN_WGHT);
ath9k_hw_btcoex_enable(ah);

ath_pcie_aspm_disable(sc);
Expand Down

0 comments on commit 5e19729

Please sign in to comment.