Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233531
b: refs/heads/master
c: a3d7741
h: refs/heads/master
i:
  233529: 31d42ca
  233527: ef5912f
v: v3
  • Loading branch information
Keng-Yu Lin authored and Matthew Garrett committed Feb 21, 2011
1 parent 5654637 commit eb5b1a1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 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: 5ffba7e696510c90e8327a2041764b2a60e56c6e
refs/heads/master: a3d77411e8b2ad661958c1fbee65beb476ec6d70
24 changes: 22 additions & 2 deletions trunk/drivers/platform/x86/dell-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,12 @@ static int dell_rfkill_set(void *data, bool blocked)
dell_send_request(buffer, 17, 11);

/* If the hardware switch controls this radio, and the hardware
switch is disabled, don't allow changing the software state */
switch is disabled, don't allow changing the software state.
If the hardware switch is reported as not supported, always
fire the SMI to toggle the killswitch. */
if ((hwswitch_state & BIT(hwswitch_bit)) &&
!(buffer->output[1] & BIT(16))) {
!(buffer->output[1] & BIT(16)) &&
(buffer->output[1] & BIT(0))) {
ret = -EINVAL;
goto out;
}
Expand Down Expand Up @@ -398,6 +401,23 @@ static const struct file_operations dell_debugfs_fops = {

static void dell_update_rfkill(struct work_struct *ignored)
{
int status;

get_buffer();
dell_send_request(buffer, 17, 11);
status = buffer->output[1];
release_buffer();

/* if hardware rfkill is not supported, set it explicitly */
if (!(status & BIT(0))) {
if (wifi_rfkill)
dell_rfkill_set((void *)1, !((status & BIT(17)) >> 17));
if (bluetooth_rfkill)
dell_rfkill_set((void *)2, !((status & BIT(18)) >> 18));
if (wwan_rfkill)
dell_rfkill_set((void *)3, !((status & BIT(19)) >> 19));
}

if (wifi_rfkill)
dell_rfkill_query(wifi_rfkill, (void *)1);
if (bluetooth_rfkill)
Expand Down

0 comments on commit eb5b1a1

Please sign in to comment.