linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rfkill: fix rfkill_set_states() to set the hw state
@ 2009-07-12 16:03 Alan Jenkins
  2009-07-13 11:30 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Jenkins @ 2009-07-12 16:03 UTC (permalink / raw)
  To: alan-jenkins, johannes; +Cc: linux-wireless

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>
---
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 79693fe..db9948e 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);

-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-13 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-12 16:03 [PATCH] rfkill: fix rfkill_set_states() to set the hw state Alan Jenkins
2009-07-13 11:30 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).