Skip to content

Commit

Permalink
rfkill: fix rfkill_set_states() to set the hw state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Jenkins authored and John W. Linville committed Jul 21, 2009
1 parent 8ef86c7 commit 48ab357
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/rfkill/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw)
swprev = !!(rfkill->state & RFKILL_BLOCK_SW);
hwprev = !!(rfkill->state & RFKILL_BLOCK_HW);
__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);

Expand Down

0 comments on commit 48ab357

Please sign in to comment.