diff options
author | Alan Jenkins <alan-jenkins@tuffmail.co.uk> | 2009-07-12 18:03:13 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-21 18:07:38 +0200 |
commit | 48ab3578a65c5168ecaaa3b21292b643b7bcc2d5 (patch) | |
tree | ab99e6ee3e1f27b7457809cafba3b9fb38c35cdb /net | |
parent | mac80211: fix injection in monitor mode (diff) | |
download | linux-48ab3578a65c5168ecaaa3b21292b643b7bcc2d5.tar.xz linux-48ab3578a65c5168ecaaa3b21292b643b7bcc2d5.zip |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/rfkill/core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 6896c0b45b4a..2fc4a1724eb8 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -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); |