ath9k: Fix race in reset-work usage
Using work_pending() to defer certain operations when a HW-reset work has been queued is racy since the check would return false when the work item is actually in execution. Use SC_OP_HW_RESET instead to fix this race. Also, unify the reset debug statistics maintenance. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

szülő
6dcc344469
commit
124b979bae
@@ -202,7 +202,7 @@ static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
|
||||
case MCI_GPM_BT_CAL_REQ:
|
||||
if (mci_hw->bt_state == MCI_BT_AWAKE) {
|
||||
ar9003_mci_state(ah, MCI_STATE_SET_BT_CAL_START);
|
||||
ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
|
||||
ath9k_queue_reset(sc, RESET_TYPE_MCI);
|
||||
}
|
||||
ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user