linux/net
Henrique de Moraes Holschuh fd4484af7c rfkill: ignore errors from rfkill_toggle_radio in rfkill_add_switch
rfkill_add_switch() calls rfkill_toggle_radio() to set the state of a
recently registered rfkill class to the current global state [for that
rfkill->type].

The rfkill_toggle_radio() call is going to error out if the hardware is
RFKILL_STATE_HARD_BLOCKED, and the global state is RFKILL_STATE_UNBLOCKED.

That is a quite normal situation which I missed to account for.  As things
stand, the error return from rfkill_toggle_radio ends up causing
rfkill_register to bail out with an error (de-registering the new switch in
the process), which is Not Nice.

Change rfkill_add_switch() to not return errors because of a failed call to
rfkill_toggle_radio().  We can go back to returning errors again (if that's
indeed the right thing to do) if we define the exact error codes the
rfkill->toggle_radio callbacks are to return in each situation, so that we
can ignore the right ones only.

Bug reported by "kionez <kionez@anche.no>".

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: kionez <kionez@anche.no>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-08 14:16:03 -04:00
..
9p
802 net: Add GARP applicant-only participant 2008-07-05 21:26:13 -07:00
8021q vlan: TCI related type and naming cleanups 2008-07-08 03:24:44 -07:00
appletalk
atm atm: use const where reasonable 2008-06-17 16:20:06 -07:00
ax25 ax25: Fix std timer socket destroy handling. 2008-06-17 21:26:37 -07:00
bluetooth net: remove CVS keywords 2008-06-11 21:00:38 -07:00
bridge netfilter: ebt_nflog: fix Kconfig typo 2008-07-08 02:37:07 -07:00
can
core net: fix dev_set_promiscuity() breakage 2008-07-06 15:49:08 -07:00
dccp net: change proto destroy method to return void 2008-06-14 17:04:49 -07:00
decnet net: add fib_rules_ops to flush_cache method 2008-07-05 19:01:28 -07:00
econet econet: Use sock_orphan() instead of open-coded (and buggy) variant. 2008-06-17 03:01:47 -07:00
ethernet
ieee80211 wext: Emit event stream entries correctly when compat. 2008-06-16 18:50:49 -07:00
ipv4 ipv4: remove flush_mutex from ipv4_sysctl_rtcache_flush 2008-07-08 03:05:28 -07:00
ipv6 netfilter: ip6table_filter in netns for real 2008-07-08 02:36:18 -07:00
ipx
irda Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-10 02:22:26 -07:00
iucv af_iucv: exploit target message class support of IUCV 2008-06-09 15:51:03 -07:00
key Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-13 20:52:39 -07:00
lapb
llc llc: Use sock_graft() instead of by-hand version. 2008-06-17 01:21:03 -07:00
mac80211 mac80211: add support for iwconfig wlanX frag auto 2008-07-08 14:16:02 -04:00
netfilter netfilter: fix string extension for case insensitive pattern matching 2008-07-08 02:38:56 -07:00
netlabel netlabel: Fix a problem when dumping the default IPv6 static labels 2008-06-27 20:12:32 -07:00
netlink Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-05 23:08:07 -07:00
netrom netrom: Kill spurious NULL'ing of sk->sk_socket. 2008-06-17 03:19:58 -07:00
packet net: remove CVS keywords 2008-06-11 21:00:38 -07:00
rfkill rfkill: ignore errors from rfkill_toggle_radio in rfkill_add_switch 2008-07-08 14:16:03 -04:00
rose rose: improving AX25 routing frames via ROSE network 2008-06-17 17:08:32 -07:00
rxrpc MIB: add struct net to UDP_INC_STATS_BH 2008-07-05 21:18:48 -07:00
sched net-sched: consolidate default fifo qdisc setup 2008-07-05 23:40:21 -07:00
sctp sctp: Mark GET_PEER|LOCAL_ADDR_OLD deprecated. 2008-07-01 20:06:22 -07:00
sunrpc net: remove CVS keywords 2008-06-11 21:00:38 -07:00
tipc tipc: Message rejection rework preparatory changes 2008-06-04 17:54:48 -07:00
unix Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-28 01:19:40 -07:00
wanrouter
wireless mac80211: implement EU regulatory domain 2008-06-25 10:31:29 -04:00
x25 x25: Use sock_orphan() instead of open-coded (and buggy) variant. 2008-06-17 03:05:13 -07:00
xfrm xfrm: xfrm_algo: correct usage of RIPEMD-160 2008-06-04 12:04:55 -07:00
Kconfig net: Add STP demux layer 2008-07-05 21:25:39 -07:00
Makefile vlan: uninline __vlan_hwaccel_rx 2008-07-08 03:23:36 -07:00
TUNABLE
compat.c
nonet.c
socket.c wext: Dispatch and handle compat ioctls entirely in net/wireless/wext.c 2008-06-16 18:32:46 -07:00
sysctl_net.c net: remove CVS keywords 2008-06-11 21:00:38 -07:00