summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJianzheng Zhou <jianzheng.zhou@freescale.com>2012-12-27 12:26:39 +0800
committerJianzheng Zhou <jianzheng.zhou@freescale.com>2012-12-27 12:42:07 +0800
commit60daab290bbab00c73cc057ff868f658ec73d304 (patch)
treed43157af417fc4f837113d343522448647155584 /net
parentfeef0cac5217efe8093df89511e55c53e6aa1e9d (diff)
ENGR00238276: rfkill:change rfkill node permission
Use CONFIG_ANDROID_PARANOID_NETWORK to change the rfkill's attr permission (state and type) to fix android upper has no right to access and write issue when use dongle devices. Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Diffstat (limited to 'net')
-rw-r--r--net/rfkill/core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index df2dae6b2723..9a2d2a0d227a 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -2,6 +2,7 @@
* Copyright (C) 2006 - 2007 Ivo van Doorn
* Copyright (C) 2007 Dmitry Torokhov
* Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
+ * Copyright (C) 2012 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -719,10 +720,18 @@ static ssize_t rfkill_claim_store(struct device *dev,
static struct device_attribute rfkill_dev_attrs[] = {
__ATTR(name, S_IRUGO, rfkill_name_show, NULL),
+#ifdef CONFIG_ANDROID_PARANOID_NETWORK
+ __ATTR(type, S_IRUGO|S_IWUGO, rfkill_type_show, NULL),
+#else
__ATTR(type, S_IRUGO, rfkill_type_show, NULL),
+#endif
__ATTR(index, S_IRUGO, rfkill_idx_show, NULL),
__ATTR(persistent, S_IRUGO, rfkill_persistent_show, NULL),
+#ifdef CONFIG_ANDROID_PARANOID_NETWORK
+ __ATTR(state, S_IRUGO|S_IWUGO, rfkill_state_show, rfkill_state_store),
+#else
__ATTR(state, S_IRUGO|S_IWUSR, rfkill_state_show, rfkill_state_store),
+#endif
__ATTR(claim, S_IRUGO|S_IWUSR, rfkill_claim_show, rfkill_claim_store),
__ATTR(soft, S_IRUGO|S_IWUSR, rfkill_soft_show, rfkill_soft_store),
__ATTR(hard, S_IRUGO, rfkill_hard_show, NULL),