Skip to content

Commit 4b200b4

Browse files
arndbdvhart
authored andcommitted
ideapad: fix software rfkill setting
This fixes a several year old regression that I found while trying to get the Yoga 3 11 to work. The ideapad_rfk_set function is meant to send a command to the embedded controller through ACPI, but as of c1f7365, it sends the index of the rfkill device instead of the command, and ignores the opcode field. This changes it back to the original behavior, which indeed flips the rfkill state as seen in the debugfs interface. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: c1f7365 ("ideapad: pass ideapad_priv as argument (part 2)") Cc: [email protected] # v2.6.38+ Signed-off-by: Darren Hart <[email protected]>
1 parent f835857 commit 4b200b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/platform/x86/ideapad-laptop.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,9 @@ static const struct ideapad_rfk_data ideapad_rfk_data[] = {
464464
static int ideapad_rfk_set(void *data, bool blocked)
465465
{
466466
struct ideapad_rfk_priv *priv = data;
467+
int opcode = ideapad_rfk_data[priv->dev].opcode;
467468

468-
return write_ec_cmd(priv->priv->adev->handle, priv->dev, !blocked);
469+
return write_ec_cmd(priv->priv->adev->handle, opcode, !blocked);
469470
}
470471

471472
static struct rfkill_ops ideapad_rfk_ops = {

0 commit comments

Comments
 (0)