mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
rfkill: fix rfkill_set_states() to set the hw state
The point of this function is to set the software and hardware state at the same time. When I tried to use it, I found it was only setting the software state. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
8ef86c7bfa
commit
48ab3578a6
1 changed files with 4 additions and 0 deletions
|
@ -549,6 +549,10 @@ void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw)
|
||||||
swprev = !!(rfkill->state & RFKILL_BLOCK_SW);
|
swprev = !!(rfkill->state & RFKILL_BLOCK_SW);
|
||||||
hwprev = !!(rfkill->state & RFKILL_BLOCK_HW);
|
hwprev = !!(rfkill->state & RFKILL_BLOCK_HW);
|
||||||
__rfkill_set_sw_state(rfkill, sw);
|
__rfkill_set_sw_state(rfkill, sw);
|
||||||
|
if (hw)
|
||||||
|
rfkill->state |= RFKILL_BLOCK_HW;
|
||||||
|
else
|
||||||
|
rfkill->state &= ~RFKILL_BLOCK_HW;
|
||||||
|
|
||||||
spin_unlock_irqrestore(&rfkill->lock, flags);
|
spin_unlock_irqrestore(&rfkill->lock, flags);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue