Skip to content

Commit

Permalink
mt7603: improve reliability of the PSE reset
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Mar 21, 2017
1 parent d1769e3 commit 38bae1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mt7603_mac.c
Expand Up @@ -1013,9 +1013,13 @@ void mt7603_mac_reset(struct mt7603_dev *dev)
u32 addr = mt7603_reg_map(dev, MT_CLIENT_BASE_PHYS_ADDR);

/* Reset PSE */
mt76_clear(dev, MT_PSE_RESET, MT_PSE_RESET_SW_S);
mt76_set(dev, MT_PSE_RESET, MT_PSE_RESET_SW);
mt76_poll_msec(dev, MT_PSE_RESET, MT_PSE_RESET_SW_S,
MT_PSE_RESET_SW_S, 500);
if (!mt76_poll_msec(dev, MT_PSE_RESET, MT_PSE_RESET_SW_S,
MT_PSE_RESET_SW_S, 500)) {
mt76_clear(dev, MT_PSE_RESET, MT_PSE_RESET_SW);
return;
}
mt76_clear(dev, MT_PSE_RESET, MT_PSE_RESET_SW_S);

mt76_set(dev, addr + MT_CLIENT_RESET_TX, MT_CLIENT_RESET_TX_R_E_1);
Expand Down

0 comments on commit 38bae1d

Please sign in to comment.