Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310140
b: refs/heads/master
c: bc7ab49
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Drake authored and Matthew Garrett committed May 31, 2012
1 parent 401a97b commit 4ffcbfa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14b234b10544046544a81095c9ab372842f80eea
refs/heads/master: bc7ab495c7532f06bc03021c0d78ac384fb13c14
13 changes: 12 additions & 1 deletion trunk/drivers/platform/x86/xo1-rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,26 @@

#include <asm/olpc.h>

static bool card_blocked;

static int rfkill_set_block(void *data, bool blocked)
{
unsigned char cmd;
int r;

if (blocked == card_blocked)
return 0;

if (blocked)
cmd = EC_WLAN_ENTER_RESET;
else
cmd = EC_WLAN_LEAVE_RESET;

return olpc_ec_cmd(cmd, NULL, 0, NULL, 0);
r = olpc_ec_cmd(cmd, NULL, 0, NULL, 0);
if (r == 0)
card_blocked = blocked;

return r;
}

static const struct rfkill_ops rfkill_ops = {
Expand Down

0 comments on commit 4ffcbfa

Please sign in to comment.