lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1309268154-6872-2-git-send-email-kengyu@canonical.com>
Date:	Tue, 28 Jun 2011 14:35:54 +0100
From:	Keng-Yu Lin <kengyu@...onical.com>
To:	Matthew Garrett <mjg@...hat.com>,
	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	ike.pan@...onical.com, vanhoof@...onical.com,
	kent.lin@...onical.com, sylee@...onical.com,
	Keng-Yu Lin <kengyu@...onical.com>
Subject: [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event

Notification with VPC2 bit 5 set is generated when the wireless
hotkey is pressed. BIOS fires this to notify a Windows
application to handle the RF switch.

On Linux, there is no such application. This patch implements
a toggle for all RF devices through accessing the EC I/O ports.

Without the explicit EC commands, the wifi LED is always on.

Signed-off-by: Keng-Yu Lin <kengyu@...onical.com>
---
 drivers/platform/x86/ideapad-laptop.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 820f013..5e1e971 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -461,7 +461,11 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
 		if (test_bit(vpc_bit, &vpc1)) {
 			if (vpc_bit == 9)
 				ideapad_sync_rfk_state(adevice);
-			else if (vpc_bit == 4)
+			else if (vpc_bit == 13) {
+				read_ec_data(handle, 0x23, &vpc2);
+				write_ec_cmd(handle, 0x24, !vpc2);
+				ideapad_sync_rfk_state(adevice);
+			} else if (vpc_bit == 4)
 				read_ec_data(handle, 0x12, &vpc2);
 			else if (vpc_bit == 1) {
 			} else
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ