Commit b98ccec0 authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville

ath9k_hw: remove p_data argument from ar9003_mci_state

As p_data is unuse, lets remove it from ar9003_mci_state.
Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d02ca07e
...@@ -321,7 +321,7 @@ void ar9003_mci_set_full_sleep(struct ath_hw *ah) ...@@ -321,7 +321,7 @@ void ar9003_mci_set_full_sleep(struct ath_hw *ah)
{ {
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) && if (ar9003_mci_state(ah, MCI_STATE_ENABLE) &&
(mci->bt_state != MCI_BT_SLEEP) && (mci->bt_state != MCI_BT_SLEEP) &&
!mci->halted_bt_gpm) { !mci->halted_bt_gpm) {
ar9003_mci_send_coex_halt_bt_gpm(ah, true, true); ar9003_mci_send_coex_halt_bt_gpm(ah, true, true);
...@@ -484,7 +484,7 @@ static void ar9003_mci_sync_bt_state(struct ath_hw *ah) ...@@ -484,7 +484,7 @@ static void ar9003_mci_sync_bt_state(struct ath_hw *ah)
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
u32 cur_bt_state; u32 cur_bt_state;
cur_bt_state = ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP, NULL); cur_bt_state = ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP);
if (mci->bt_state != cur_bt_state) if (mci->bt_state != cur_bt_state)
mci->bt_state = cur_bt_state; mci->bt_state = cur_bt_state;
...@@ -1164,7 +1164,7 @@ void ar9003_mci_cleanup(struct ath_hw *ah) ...@@ -1164,7 +1164,7 @@ void ar9003_mci_cleanup(struct ath_hw *ah)
} }
EXPORT_SYMBOL(ar9003_mci_cleanup); EXPORT_SYMBOL(ar9003_mci_cleanup);
u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type, u32 *p_data) u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
{ {
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
u32 value = 0; u32 value = 0;
......
...@@ -253,7 +253,7 @@ enum mci_gpm_coex_opcode { ...@@ -253,7 +253,7 @@ enum mci_gpm_coex_opcode {
bool ar9003_mci_send_message(struct ath_hw *ah, u8 header, u32 flag, bool ar9003_mci_send_message(struct ath_hw *ah, u8 header, u32 flag,
u32 *payload, u8 len, bool wait_done, u32 *payload, u8 len, bool wait_done,
bool check_bt); bool check_bt);
u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type, u32 *p_data); u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type);
void ar9003_mci_setup(struct ath_hw *ah, u32 gpm_addr, void *gpm_buf, void ar9003_mci_setup(struct ath_hw *ah, u32 gpm_addr, void *gpm_buf,
u16 len, u32 sched_addr); u16 len, u32 sched_addr);
void ar9003_mci_cleanup(struct ath_hw *ah); void ar9003_mci_cleanup(struct ath_hw *ah);
......
...@@ -202,7 +202,7 @@ static void ath_btcoex_period_timer(unsigned long data) ...@@ -202,7 +202,7 @@ static void ath_btcoex_period_timer(unsigned long data)
btcoex->bt_wait_time += btcoex->btcoex_period; btcoex->bt_wait_time += btcoex->btcoex_period;
if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) { if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) {
if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP, NULL) && if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP) &&
(mci->num_pan || mci->num_other_acl)) (mci->num_pan || mci->num_other_acl))
ah->btcoex_hw.mci.stomp_ftp = ah->btcoex_hw.mci.stomp_ftp =
(sc->rx.num_pkts < ATH_BTCOEX_STOMP_FTP_THRESH); (sc->rx.num_pkts < ATH_BTCOEX_STOMP_FTP_THRESH);
......
...@@ -199,16 +199,16 @@ static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload) ...@@ -199,16 +199,16 @@ static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
switch (opcode) { switch (opcode) {
case MCI_GPM_BT_CAL_REQ: case MCI_GPM_BT_CAL_REQ:
if (ar9003_mci_state(ah, MCI_STATE_BT, NULL) == MCI_BT_AWAKE) { if (ar9003_mci_state(ah, MCI_STATE_BT) == MCI_BT_AWAKE) {
ar9003_mci_state(ah, MCI_STATE_SET_BT_CAL_START, NULL); ar9003_mci_state(ah, MCI_STATE_SET_BT_CAL_START);
ieee80211_queue_work(sc->hw, &sc->hw_reset_work); ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
} else { } else {
ath_dbg(common, MCI, "MCI State mismatch: %d\n", ath_dbg(common, MCI, "MCI State mismatch: %d\n",
ar9003_mci_state(ah, MCI_STATE_BT, NULL)); ar9003_mci_state(ah, MCI_STATE_BT));
} }
break; break;
case MCI_GPM_BT_CAL_DONE: case MCI_GPM_BT_CAL_DONE:
ar9003_mci_state(ah, MCI_STATE_BT, NULL); ar9003_mci_state(ah, MCI_STATE_BT);
break; break;
case MCI_GPM_BT_CAL_GRANT: case MCI_GPM_BT_CAL_GRANT:
MCI_GPM_SET_CAL_TYPE(payload, MCI_GPM_WLAN_CAL_DONE); MCI_GPM_SET_CAL_TYPE(payload, MCI_GPM_WLAN_CAL_DONE);
...@@ -304,7 +304,7 @@ static void ath_mci_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload) ...@@ -304,7 +304,7 @@ static void ath_mci_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
switch (opcode) { switch (opcode) {
case MCI_GPM_COEX_VERSION_QUERY: case MCI_GPM_COEX_VERSION_QUERY:
ar9003_mci_state(ah, MCI_STATE_SEND_WLAN_COEX_VERSION, NULL); ar9003_mci_state(ah, MCI_STATE_SEND_WLAN_COEX_VERSION);
break; break;
case MCI_GPM_COEX_VERSION_RESPONSE: case MCI_GPM_COEX_VERSION_RESPONSE:
major = *(rx_payload + MCI_GPM_COEX_B_MAJOR_VERSION); major = *(rx_payload + MCI_GPM_COEX_B_MAJOR_VERSION);
...@@ -415,7 +415,7 @@ void ath_mci_intr(struct ath_softc *sc) ...@@ -415,7 +415,7 @@ void ath_mci_intr(struct ath_softc *sc)
ar9003_mci_get_interrupt(sc->sc_ah, &mci_int, &mci_int_rxmsg); ar9003_mci_get_interrupt(sc->sc_ah, &mci_int, &mci_int_rxmsg);
if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) == 0) { if (ar9003_mci_state(ah, MCI_STATE_ENABLE) == 0) {
ar9003_mci_get_next_gpm_offset(ah, true, NULL); ar9003_mci_get_next_gpm_offset(ah, true, NULL);
return; return;
} }
...@@ -435,46 +435,41 @@ void ath_mci_intr(struct ath_softc *sc) ...@@ -435,46 +435,41 @@ void ath_mci_intr(struct ath_softc *sc)
NULL, 0, true, false); NULL, 0, true, false);
mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE; mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE;
ar9003_mci_state(ah, MCI_STATE_RESET_REQ_WAKE, NULL); ar9003_mci_state(ah, MCI_STATE_RESET_REQ_WAKE);
/* /*
* always do this for recovery and 2G/5G toggling and LNA_TRANS * always do this for recovery and 2G/5G toggling and LNA_TRANS
*/ */
ar9003_mci_state(ah, MCI_STATE_SET_BT_AWAKE, NULL); ar9003_mci_state(ah, MCI_STATE_SET_BT_AWAKE);
} }
if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING) { if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING) {
mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING; mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING;
if (ar9003_mci_state(ah, MCI_STATE_BT, NULL) == MCI_BT_SLEEP) { if ((ar9003_mci_state(ah, MCI_STATE_BT) == MCI_BT_SLEEP) &&
if (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP, NULL) != (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP) !=
MCI_BT_SLEEP) MCI_BT_SLEEP))
ar9003_mci_state(ah, MCI_STATE_SET_BT_AWAKE, ar9003_mci_state(ah, MCI_STATE_SET_BT_AWAKE);
NULL);
}
} }
if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING) { if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING) {
mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING; mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING;
if (ar9003_mci_state(ah, MCI_STATE_BT, NULL) == MCI_BT_AWAKE) { if ((ar9003_mci_state(ah, MCI_STATE_BT) == MCI_BT_AWAKE) &&
if (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP, NULL) != (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP) !=
MCI_BT_AWAKE) MCI_BT_AWAKE))
ar9003_mci_state(ah, MCI_STATE_SET_BT_SLEEP, ar9003_mci_state(ah, MCI_STATE_SET_BT_SLEEP);
NULL);
}
} }
if ((mci_int & AR_MCI_INTERRUPT_RX_INVALID_HDR) || if ((mci_int & AR_MCI_INTERRUPT_RX_INVALID_HDR) ||
(mci_int & AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT)) { (mci_int & AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT)) {
ar9003_mci_state(ah, MCI_STATE_RECOVER_RX, NULL); ar9003_mci_state(ah, MCI_STATE_RECOVER_RX);
skip_gpm = true; skip_gpm = true;
} }
if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SCHD_INFO) { if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SCHD_INFO) {
mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SCHD_INFO; mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SCHD_INFO;
offset = ar9003_mci_state(ah, MCI_STATE_LAST_SCHD_MSG_OFFSET, offset = ar9003_mci_state(ah, MCI_STATE_LAST_SCHD_MSG_OFFSET);
NULL);
} }
if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_GPM) { if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_GPM) {
...@@ -526,21 +521,21 @@ void ath_mci_intr(struct ath_softc *sc) ...@@ -526,21 +521,21 @@ void ath_mci_intr(struct ath_softc *sc)
if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_CONT_INFO) { if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_CONT_INFO) {
int value_dbm = ar9003_mci_state(ah, int value_dbm = ar9003_mci_state(ah,
MCI_STATE_CONT_RSSI_POWER, NULL); MCI_STATE_CONT_RSSI_POWER);
mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_CONT_INFO; mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_CONT_INFO;
if (ar9003_mci_state(ah, MCI_STATE_CONT_TXRX, NULL)) if (ar9003_mci_state(ah, MCI_STATE_CONT_TXRX))
ath_dbg(common, MCI, ath_dbg(common, MCI,
"MCI CONT_INFO: (tx) pri = %d, pwr = %d dBm\n", "MCI CONT_INFO: (tx) pri = %d, pwr = %d dBm\n",
ar9003_mci_state(ah, ar9003_mci_state(ah,
MCI_STATE_CONT_PRIORITY, NULL), MCI_STATE_CONT_PRIORITY),
value_dbm); value_dbm);
else else
ath_dbg(common, MCI, ath_dbg(common, MCI,
"MCI CONT_INFO: (rx) pri = %d,pwr = %d dBm\n", "MCI CONT_INFO: (rx) pri = %d,pwr = %d dBm\n",
ar9003_mci_state(ah, ar9003_mci_state(ah,
MCI_STATE_CONT_PRIORITY, NULL), MCI_STATE_CONT_PRIORITY),
value_dbm); value_dbm);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment