ath9k: Enable MCI for AR9565
PATCH v2 1/1 ath9k: Enable MCI for AR9565
Signed-off-by Bala Shanmugam <[email protected]>
--- drivers/net/wireless/ath/ath9k/btcoex.c | 19 +++++++++++++++---- drivers/net/wireless/ath/ath9k/gpio.c | 2 +- drivers/net/wireless/ath/ath9k/wow.c | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath9k/btcoex.c +15 -4
@@ -51,6 +51,14 @@ static const u32 ar9462_wlan_weights[ATH_BTCOEX_STOMP_MAX] { 0x01017d01, 0x013b0101, 0x3b3b0101, 0x3b3b013b }, /* STOMP_LOW_FTP */ }; +static const u32 ar9565_wlan_weights[ATH_BTCOEX_STOMP_MAX ] + [AR9300_NUM_WLAN_WEIGHTS ] = { + {0x01017d01 ,0x7d7d7d01 ,0x7d7d7d01 ,0x7d7d7d7d },/* STOMP_ALL */ + {0x01017d01 ,0x3b3b3b01 ,0x3b3b3b01 ,0x3b3b3b3b },/* STOMP_LOW */ + {0x01017d01 ,0x01010101 ,0x01010101 ,0x01010101 },/* STOMP_NONE */ + {0x01017d01 ,0x013b0101 ,0x3b3b0101 ,0x3b3b013b },/* STOMP_LOW_FTP */ +}; +void ath9k_hw_init_btcoex_hw (struct ath_hw *ah,int qnum) {struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
@@ -282,7 +290,7 @@ void ath9k_hw_btcoex_enable(struct ath_hw *ah)ath9k_hw_btcoex_enable_2wire (ah);break ;case ATH_BTCOEX_CFG_3WIRE : -if (AR_SREV_9462 (ah)) { +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah)) {ath9k_hw_btcoex_enable_mci (ah);return ; }
@@ -304,7 +312,7 @@ void ath9k_hw_btcoex_disable(struct ath_hw *ah)int i; btcoex_hw->enabled = false; -if (AR_SREV_9462 (ah)) { +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah)) {ath9k_hw_btcoex_bt_stomp (ah,ATH_BTCOEX_STOMP_NONE );for (i =0 ; i <AR9300_NUM_BT_WEIGHTS ; i++) REG_WRITE(ah, AR_MCI_COEX_WL_WEIGHTS(i),
@@ -339,11 +347,14 @@ static void ar9003_btcoex_bt_stomp(struct ath_hw *ah,const u32 *weight = ar9003_wlan_weights[stomp_type];int i; -if (AR_SREV_9462 (ah)) { +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah)) {if ((stomp_type ==ATH_BTCOEX_STOMP_LOW ) && btcoex->mci.stomp_ftp) stomp_type =ATH_BTCOEX_STOMP_LOW_FTP ; - weight = ar9462_wlan_weights[stomp_type]; +if (AR_SREV_9565 (ah)) + weight = ar9565_wlan_weights[stomp_type]; +else + weight = ar9462_wlan_weights[stomp_type]; }for (i =0 ; i <AR9300_NUM_WLAN_WEIGHTS ; i++) {
drivers/net/wireless/ath/ath9k/gpio.c +1 -1
@@ -402,7 +402,7 @@ void ath9k_stop_btcoex(struct ath_softc *sc)if (ath9k_hw_get_btcoex_scheme (ah) ==ATH_BTCOEX_CFG_3WIRE )ath9k_btcoex_timer_pause (sc);ath9k_hw_btcoex_disable (ah); -if (AR_SREV_9462 (ah)) +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah))ath_mci_flush_profile (&sc->btcoex.mci); } }
drivers/net/wireless/ath/ath9k/wow.c +1 -1
@@ -497,7 +497,7 @@ void ath9k_hw_wow_enable(struct ath_hw *ah, u32 pattern_enable)REG_RMW (ah,AR_PCIE_PM_CTRL , set, clr); -if (AR_SREV_9462 (ah)) { +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah)) {/* * this is needed to prevent the chip waking up * the host within 3-4 seconds with certain
Signature · 1 line
1.7.4.1
Quoted 13 lines · Bala Shanmugam
Signed-off-by Bala Shanmugam <[email protected]>--- drivers/net/wireless/ath/ath9k/btcoex.c | 19 +++++++++++++++---- drivers/net/wireless/ath/ath9k/gpio.c | 2 +- drivers/net/wireless/ath/ath9k/wow.c | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-)drivers/net/wireless/ath/ath9k/btcoex.c +0
-0@@ -51,6 +51,14 @@ static const u32 ar9462_wlan_weights[ATH_BTCOEX_STOMP_MAX] { 0x01017d01, 0x013b0101, 0x3b3b0101, 0x3b3b013b }, /* STOMP_LOW_FTP */
drivers/net/wireless/ath/ath9k/btcoex.c static const u32 ar9462_wlan_weights[ATH_BTCOEX_STOMP_MAX] · line 61
Quoted 10 lines
drivers/net/wireless/ath/ath9k/btcoex.c +8
-0}; +static const u32 ar9565_wlan_weights[ATH_BTCOEX_STOMP_MAX ] + [AR9300_NUM_WLAN_WEIGHTS ] = { + {0x01017d01 ,0x7d7d7d01 ,0x7d7d7d01 ,0x7d7d7d7d },/* STOMP_ALL */ + {0x01017d01 ,0x3b3b3b01 ,0x3b3b3b01 ,0x3b3b3b3b },/* STOMP_LOW */ + {0x01017d01 ,0x01010101 ,0x01010101 ,0x01010101 },/* STOMP_NONE */ + {0x01017d01 ,0x013b0101 ,0x3b3b0101 ,0x3b3b013b },/* STOMP_LOW_FTP */ +}; +
Can you please confirm STOMP_ALL weights are correct? I assume you are using STOMP_ALL_FORCE weights which we don't support. I think we can reuse 9462 weight table.
-Rajkumar
Quoted 71 lines
drivers/net/wireless/ath/ath9k/btcoex.c +7
-4void ath9k_hw_init_btcoex_hw (struct ath_hw *ah,int qnum) {struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;@@ -282,7 +290,7 @@ void ath9k_hw_btcoex_enable(struct ath_hw *ah)ath9k_hw_btcoex_enable_2wire (ah);break ;case ATH_BTCOEX_CFG_3WIRE : -if (AR_SREV_9462 (ah)) { +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah)) {ath9k_hw_btcoex_enable_mci (ah);return ; }@@ -304,7 +312,7 @@ void ath9k_hw_btcoex_disable(struct ath_hw *ah)int i; btcoex_hw->enabled = false; -if (AR_SREV_9462 (ah)) { +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah)) {ath9k_hw_btcoex_bt_stomp (ah,ATH_BTCOEX_STOMP_NONE );for (i =0 ; i <AR9300_NUM_BT_WEIGHTS ; i++) REG_WRITE(ah, AR_MCI_COEX_WL_WEIGHTS(i),@@ -339,11 +347,14 @@ static void ar9003_btcoex_bt_stomp(struct ath_hw *ah,const u32 *weight = ar9003_wlan_weights[stomp_type];int i; -if (AR_SREV_9462 (ah)) { +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah)) {if ((stomp_type ==ATH_BTCOEX_STOMP_LOW ) && btcoex->mci.stomp_ftp) stomp_type =ATH_BTCOEX_STOMP_LOW_FTP ; - weight = ar9462_wlan_weights[stomp_type]; +if (AR_SREV_9565 (ah)) + weight = ar9565_wlan_weights[stomp_type]; +else + weight = ar9462_wlan_weights[stomp_type]; }for (i =0 ; i <AR9300_NUM_WLAN_WEIGHTS ; i++) {drivers/net/wireless/ath/ath9k/gpio.c +1
-1@@ -402,7 +402,7 @@ void ath9k_stop_btcoex(struct ath_softc *sc)if (ath9k_hw_get_btcoex_scheme (ah) ==ATH_BTCOEX_CFG_3WIRE )ath9k_btcoex_timer_pause (sc);ath9k_hw_btcoex_disable (ah); -if (AR_SREV_9462 (ah)) +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah))ath_mci_flush_profile (&sc->btcoex.mci); } }drivers/net/wireless/ath/ath9k/wow.c +1
-1@@ -497,7 +497,7 @@ void ath9k_hw_wow_enable(struct ath_hw *ah, u32 pattern_enable)REG_RMW (ah,AR_PCIE_PM_CTRL , set, clr); -if (AR_SREV_9462 (ah)) { +if (AR_SREV_9462 (ah) ||AR_SREV_9565 (ah)) {/* * this is needed to prevent the chip waking up * the host within 3-4 seconds with certain Signature · 6 lines
1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html