Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 65c71efe authored by Wei-Ning Huang's avatar Wei-Ning Huang Committed by Kalle Valo
Browse files

mwifiex: fix racing condition when downloading firmware



The action 'check for winner' and 'download firmware' should be an
atomic action. This is true for btmrvl driver but not mwmfiex, which
cause firmware download to fail when the following senerio happens:

1) mwifiex check winner status: true
2) btmrvl check winner status: true, and start downloading firmware
3) mwfieix tries to download firmware, but failed because btmrvl is
already downloading.

This won't happen if 1) and 3) is an atomic action. This patch adds
sdio_claim/release_host call around those two actions to make sure it's
atomic.

Signed-off-by: default avatarWei-Ning Huang <wnhuang@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 6b128a01
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment