Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1312338 > unrolled thread
| Started by | "João Paulo Rechi Vita" <jprvita@gmail.com> |
|---|---|
| First post | 2016-01-19 16:50 +0100 |
| Last post | 2016-01-19 21:50 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 5/8] rfkill: Remove obsolete "state" sysfs interface "João Paulo Rechi Vita" <jprvita@gmail.com> - 2016-01-19 16:50 +0100
Re: [PATCH 5/8] rfkill: Remove obsolete "state" sysfs interface Johannes Berg <johannes@sipsolutions.net> - 2016-01-19 21:20 +0100
Re: [PATCH 5/8] rfkill: Remove obsolete "state" sysfs interface João Paulo Rechi Vita <jprvita@gmail.com> - 2016-01-19 21:40 +0100
Re: [PATCH 5/8] rfkill: Remove obsolete "state" sysfs interface Johannes Berg <johannes@sipsolutions.net> - 2016-01-19 21:50 +0100
| From | "João Paulo Rechi Vita" <jprvita@gmail.com> |
|---|---|
| Date | 2016-01-19 16:50 +0100 |
| Subject | [PATCH 5/8] rfkill: Remove obsolete "state" sysfs interface |
| Message-ID | <qSGHE-1px-3@gated-at.bofh.it> |
This was schedule to be removed in 2014 by:
commit 69c86373c6ea1149aa559e6088362d58d8ec8835
Author: florian@mickler.org <florian@mickler.org>
Date: Wed Feb 24 12:05:16 2010 +0100
Document the rfkill sysfs ABI
This moves sysfs ABI info from Documentation/rfkill.txt to the
ABI subfolder and reformats it.
This also schedules the deprecated sysfs parts to be removed in
2012 (claim file) and 2014 (state file).
Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
---
Documentation/ABI/obsolete/sysfs-class-rfkill | 20 ---------------
Documentation/ABI/removed/sysfs-class-rfkill | 17 +++++++++++++
net/rfkill/core.c | 35 ---------------------------
3 files changed, 17 insertions(+), 55 deletions(-)
delete mode 100644 Documentation/ABI/obsolete/sysfs-class-rfkill
diff --git a/Documentation/ABI/obsolete/sysfs-class-rfkill b/Documentation/ABI/obsolete/sysfs-class-rfkill
deleted file mode 100644
index e736d14..0000000
--- a/Documentation/ABI/obsolete/sysfs-class-rfkill
+++ /dev/null
@@ -1,20 +0,0 @@
-rfkill - radio frequency (RF) connector kill switch support
-
-For details to this subsystem look at Documentation/rfkill.txt.
-
-What: /sys/class/rfkill/rfkill[0-9]+/state
-Date: 09-Jul-2007
-KernelVersion v2.6.22
-Contact: linux-wireless@vger.kernel.org
-Description: Current state of the transmitter.
- This file is deprecated and scheduled to be removed in 2014,
- because its not possible to express the 'soft and hard block'
- state of the rfkill driver.
-Values: A numeric value.
- 0: RFKILL_STATE_SOFT_BLOCKED
- transmitter is turned off by software
- 1: RFKILL_STATE_UNBLOCKED
- transmitter is (potentially) active
- 2: RFKILL_STATE_HARD_BLOCKED
- transmitter is forced off by something outside of
- the driver's control.
diff --git a/Documentation/ABI/removed/sysfs-class-rfkill b/Documentation/ABI/removed/sysfs-class-rfkill
index 3ce6231..1b93139 100644
--- a/Documentation/ABI/removed/sysfs-class-rfkill
+++ b/Documentation/ABI/removed/sysfs-class-rfkill
@@ -11,3 +11,20 @@ Description: This file was deprecated because there no longer was a way to
This file was scheduled to be removed in 2012, and was removed
in 2016.
Values: 0: Kernel handles events
+
+What: /sys/class/rfkill/rfkill[0-9]+/state
+Date: 09-Jul-2007
+KernelVersion v2.6.22
+Contact: linux-wireless@vger.kernel.org
+Description: Current state of the transmitter.
+ This file was deprecated and scheduled to be removed in 2014,
+ because it was not possible to express the 'soft and hard block'
+ state of the rfkill driver. It was removed in 2016.
+Values: A numeric value.
+ 0: RFKILL_STATE_SOFT_BLOCKED
+ transmitter is turned off by software
+ 1: RFKILL_STATE_UNBLOCKED
+ transmitter is (potentially) active
+ 2: RFKILL_STATE_HARD_BLOCKED
+ transmitter is forced off by something outside of
+ the driver's control.
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index a05d1f1..26da4f0 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -683,46 +683,11 @@ static u8 user_state_from_blocked(unsigned long state)
return RFKILL_USER_STATE_UNBLOCKED;
}
-static ssize_t state_show(struct device *dev, struct device_attribute *attr,
- char *buf)
-{
- struct rfkill *rfkill = to_rfkill(dev);
-
- return sprintf(buf, "%d\n", user_state_from_blocked(rfkill->state));
-}
-
-static ssize_t state_store(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count)
-{
- struct rfkill *rfkill = to_rfkill(dev);
- unsigned long state;
- int err;
-
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
-
- err = kstrtoul(buf, 0, &state);
- if (err)
- return err;
-
- if (state != RFKILL_USER_STATE_SOFT_BLOCKED &&
- state != RFKILL_USER_STATE_UNBLOCKED)
- return -EINVAL;
-
- mutex_lock(&rfkill_global_mutex);
- rfkill_set_block(rfkill, state == RFKILL_USER_STATE_SOFT_BLOCKED);
- mutex_unlock(&rfkill_global_mutex);
-
- return count;
-}
-static DEVICE_ATTR_RW(state);
-
static struct attribute *rfkill_dev_attrs[] = {
&dev_attr_name.attr,
&dev_attr_type.attr,
&dev_attr_index.attr,
&dev_attr_persistent.attr,
- &dev_attr_state.attr,
&dev_attr_soft.attr,
&dev_attr_hard.attr,
NULL,
--
2.5.0
[toc] | [next] | [standalone]
| From | Johannes Berg <johannes@sipsolutions.net> |
|---|---|
| Date | 2016-01-19 21:20 +0100 |
| Message-ID | <qSKUW-4lv-13@gated-at.bofh.it> |
| In reply to | #1312338 |
On Tue, 2016-01-19 at 10:42 -0500, João Paulo Rechi Vita wrote: > This was schedule to be removed in 2014 by: > -For details to this subsystem look at Documentation/rfkill.txt. > - > -What: /sys/class/rfkill/rfkill[0-9]+/state > -Date: 09-Jul-2007 > -KernelVersion v2.6.22 > -Contact: linux-wireless@vger.kernel.org > -Description: Current state of the transmitter. > - This file is deprecated and scheduled to be removed > in 2014, > - because its not possible to express the 'soft and > hard block' > - state of the rfkill driver. > -Values: A numeric value. > - 0: RFKILL_STATE_SOFT_BLOCKED > - transmitter is turned off by software > - 1: RFKILL_STATE_UNBLOCKED > - transmitter is (potentially) active > - 2: RFKILL_STATE_HARD_BLOCKED > - transmitter is forced off by something > outside of > - the driver's control. I suspect that nevertheless, we can't just remove it - Googling around shows quite a bit of (e.g. Android) code using it. johannes
[toc] | [prev] | [next] | [standalone]
| From | João Paulo Rechi Vita <jprvita@gmail.com> |
|---|---|
| Date | 2016-01-19 21:40 +0100 |
| Message-ID | <qSLej-4ue-45@gated-at.bofh.it> |
| In reply to | #1312483 |
On 19 January 2016 at 15:15, Johannes Berg <johannes@sipsolutions.net> wrote: > On Tue, 2016-01-19 at 10:42 -0500, João Paulo Rechi Vita wrote: >> This was schedule to be removed in 2014 by: > >> -For details to this subsystem look at Documentation/rfkill.txt. >> - >> -What: /sys/class/rfkill/rfkill[0-9]+/state >> -Date: 09-Jul-2007 >> -KernelVersion v2.6.22 >> -Contact: linux-wireless@vger.kernel.org >> -Description: Current state of the transmitter. >> - This file is deprecated and scheduled to be removed >> in 2014, >> - because its not possible to express the 'soft and >> hard block' >> - state of the rfkill driver. >> -Values: A numeric value. >> - 0: RFKILL_STATE_SOFT_BLOCKED >> - transmitter is turned off by software >> - 1: RFKILL_STATE_UNBLOCKED >> - transmitter is (potentially) active >> - 2: RFKILL_STATE_HARD_BLOCKED >> - transmitter is forced off by something >> outside of >> - the driver's control. > > I suspect that nevertheless, we can't just remove it - Googling around > shows quite a bit of (e.g. Android) code using it. > Should I update the expected removal date to 2018, or some other time in the future? Or if this is not going to be removed at all, shouldn't it be moved back to stable? -- João Paulo Rechi Vita http://about.me/jprvita
[toc] | [prev] | [next] | [standalone]
| From | Johannes Berg <johannes@sipsolutions.net> |
|---|---|
| Date | 2016-01-19 21:50 +0100 |
| Message-ID | <qSLnY-4xA-11@gated-at.bofh.it> |
| In reply to | #1312500 |
On Tue, 2016-01-19 at 15:36 -0500, João Paulo Rechi Vita wrote: > > > I suspect that nevertheless, we can't just remove it - Googling > > around shows quite a bit of (e.g. Android) code using it. > > > > Should I update the expected removal date to 2018, or some other time > in the future? Or if this is not going to be removed at all, > shouldn't it be moved back to stable? > Yeah, maybe we should just move it back. The problem with it is that it doesn't fully reflect the state (both sw+hw blocked can't be reflected) but if the current users are happy with it then that's not really a problem. johannes
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web