Search Linux Wireless

Re: hal, rfkill and compat-wireless (Re: [RFC/RFT] rtl8187: Implement rfkill support)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 27, 2009 at 12:45 AM, Luis R. Rodriguez<mcgrof@xxxxxxxxx> wrote:
> Johannes, did kernels < 2.6.31 have /sys/class/rfkill ?

2.6.30 has /sys/class/rfkill (it is exposed by the vendor as-shipped
rfkill.ko). But I just tried something like this, and it seems to work
- the patch is simple enough and just 3 hunks - what it does:
1) 'make unload' should unload rfkill also,
2) remove the compat-wireless class renaming hunk (so it advertise
itself as 'rfkill' rather than 'rfkill_backport')
3) remove the compat-wireless input hander renaming hunk.

I am not sure what the input handle->name (3) is for, somebody care to
explain? Is there any reason why I should do something like outlined
here in the patch?

Hin-Tak
diff --git a/compat/patches/03-rfkill.patch b/compat/patches/03-rfkill.patch
index 61eb762..368767f 100644
--- a/compat/patches/03-rfkill.patch
+++ b/compat/patches/03-rfkill.patch
@@ -34,15 +34,6 @@ just keep /dev/rfkill and not /dev/rfkill_backport.
  #include <linux/sched.h>
  
  #include "rfkill.h"
-@@ -229,7 +233,7 @@ static int rfkill_connect(struct input_h
- 
- 	handle->dev = dev;
- 	handle->handler = handler;
--	handle->name = "rfkill";
-+	handle->name = "rfkill_backport";
- 
- 	/* causes rfkill_start() to be called */
- 	error = input_register_handle(handle);
 --- a/net/rfkill/core.c	2009-08-20 13:48:36.083267397 -0700
 +++ b/net/rfkill/core.c	2009-08-20 13:48:37.051267098 -0700
 @@ -26,7 +26,7 @@
@@ -81,15 +72,6 @@ just keep /dev/rfkill and not /dev/rfkill_backport.
  static atomic_t rfkill_input_disabled = ATOMIC_INIT(0);
  
  /**
-@@ -776,7 +776,7 @@
- }
- 
- static struct class rfkill_class = {
--	.name		= "rfkill",
-+	.name		= "rfkill_backport",
- 	.dev_release	= rfkill_release,
- 	.dev_attrs	= rfkill_dev_attrs,
- 	.dev_uevent	= rfkill_dev_uevent,
 @@ -922,7 +922,7 @@
  	if (!rfkill->persistent || rfkill_epo_lock_active) {
  		schedule_work(&rfkill->sync_work);
diff --git a/scripts/unload.sh b/scripts/unload.sh
index 75bbfc9..0537056 100755
--- a/scripts/unload.sh
+++ b/scripts/unload.sh
@@ -25,6 +25,7 @@ MODULES="$MODULES rndis_wlan rndis_host cdc_ether usbnet"
 # eeprom_93cx6 is used by rt2x00 (rt61pci, rt2500pci, rt2400pci) 
 # and Realtek drivers ( rtl8187, rtl8180)
 MODULES="$MODULES eeprom_93cx6"
+MODULES="$MODULES rfkill"
 MODULES="$MODULES lib80211_crypt_ccmp lib80211_crypt_tkip lib80211_crypt_wep"
 MODULES="$MODULES mac80211 cfg80211 lib80211"
 MADWIFI_MODULES="ath_pci ath_rate_sample wlan_scan_sta wlan ath_hal"

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux