← Documents Documentation/ABI/stable/sysfs-class-rfkill GitHub 원문 ↗

Linux 6.18.37 · ABI / stable

rfkill class stable sysfs ABI

RF kill switch의 driver name·type, persistent soft state, legacy combined state와 독립 hard·soft block 상태를 설명합니다.

Source pathDocumentation/ABI/stable/sysfs-class-rfkill
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

rfkill class와 identity

sysfs-class-rfkill:1-30

등록 driver별 rfkillX directory와 arbitrary name, wlan·bluetooth 등의 type을 제공합니다.

Persistent, legacy와 분리된 block state

sysfs-class-rfkill:33-93

Non-volatile soft state 초기화 여부, 구형 combined state와 권장 hard·soft interface의 0·1 값을 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 rfkill - radio frequency (RF) connector kill switch support
2
3 For details to this subsystem look at Documentation/driver-api/rfkill.rst.
4
5 For the deprecated ``/sys/class/rfkill/*/claim`` knobs of this interface look in
6 Documentation/ABI/removed/sysfs-class-rfkill.
7
8 What: /sys/class/rfkill
9 Date: 09-Jul-2007
10 KernelVersion: v2.6.22
12 Description: The rfkill class subsystem folder.
13 Each registered rfkill driver is represented by an rfkillX
14 subfolder (X being an integer >= 0).
15
16
17 What: /sys/class/rfkill/rfkill[0-9]+/name
18 Date: 09-Jul-2007
19 KernelVersion: v2.6.22
21 Description: Name assigned by driver to this key (interface or driver name).
22 Values: arbitrary string.
23
24
25 What: /sys/class/rfkill/rfkill[0-9]+/type
26 Date: 09-Jul-2007
27 KernelVersion: v2.6.22
29 Description: Driver type string ("wlan", "bluetooth", etc).
30 Values: See include/linux/rfkill.h.
31
32
33 What: /sys/class/rfkill/rfkill[0-9]+/persistent
34 Date: 09-Jul-2007
35 KernelVersion: v2.6.22
37 Description: Whether the soft blocked state is initialised from non-volatile
38 storage at startup.
39 Values: A numeric value:
40
41 - 0: false
42 - 1: true
43
44
45 What: /sys/class/rfkill/rfkill[0-9]+/state
46 Date: 09-Jul-2007
47 KernelVersion: v2.6.22
49 Description: Current state of the transmitter.
50 This file was scheduled to be removed in 2014, but due to its
51 large number of users it will be sticking around for a bit
52 longer. Despite it being marked as stable, the newer "hard" and
53 "soft" interfaces should be preferred, since it is not possible
54 to express the 'soft and hard block' state of the rfkill driver
55 through this interface. There will likely be another attempt to
56 remove it in the future.
57 Values: A numeric value.
58
59 0: RFKILL_STATE_SOFT_BLOCKED
60 transmitter is turned off by software
61 1: RFKILL_STATE_UNBLOCKED
62 transmitter is (potentially) active
63 2: RFKILL_STATE_HARD_BLOCKED
64 transmitter is forced off by something outside of
65 the driver's control.
66
67
68 What: /sys/class/rfkill/rfkill[0-9]+/hard
69 Date: 12-March-2010
70 KernelVersion: v2.6.34
72 Description: Current hardblock state. This file is read only.
73 Values: A numeric value.
74
75 0: inactive
76 The transmitter is (potentially) active.
77 1: active
78 The transmitter is forced off by something outside of
79 the driver's control.
80
81
82 What: /sys/class/rfkill/rfkill[0-9]+/soft
83 Date: 12-March-2010
84 KernelVersion: v2.6.34
86 Description: Current softblock state. This file is read and write.
87 Values: A numeric value.
88
89 0: inactive
90 The transmitter is (potentially) active.
91
92 1: active
93 The transmitter is turned off by software.
94

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

rfkill class와 device identity

1-30

rfkill은 radio frequency(RF) connector kill switch를 지원한다. 자세한 subsystem 설명은 Documentation/driver-api/rfkill.rst를, 제거된 claim knob는 Documentation/ABI/removed/sysfs-class-rfkill을 참조한다.

아래 interface는 2007년 7월 9일 kernel 2.6.22에 도입됐고 contact는 [email protected]다.

경로의미·값
/sys/class/rfkillrfkill class subsystem directory다. 등록된 rfkill driver마다 0 이상의 정수 X를 사용한 rfkillX subdirectory가 하나 생긴다.
/sys/class/rfkill/rfkill[0-9]+/nameDriver가 이 key에 붙인 interface 또는 driver 이름이다. 임의 문자열이다.
/sys/class/rfkill/rfkill[0-9]+/typewlan, bluetooth 등 driver type 문자열이다. 가능한 값은 include/linux/rfkill.h를 참조한다.

Persistent와 legacy combined state

33-65

/sys/class/rfkill/rfkill[0-9]+/persistent는 startup 때 non-volatile storage에서 soft-blocked state를 초기화하는지 나타낸다. 0은 false, 1은 true다.

state는 transmitter의 현재 상태를 표시하는 구형 interface다. 2014년 제거 예정이었지만 사용자가 많아 더 오래 유지됐다. Stable 표시가 있어도 hard와 soft interface를 선호해야 한다. state 하나로 soft와 hard가 동시에 block된 상태를 표현할 수 없기 때문이다. 향후 다시 제거를 시도할 수 있다.

state 값상태의미
0RFKILL_STATE_SOFT_BLOCKEDSoftware가 transmitter를 껐다.
1RFKILL_STATE_UNBLOCKEDTransmitter가 잠재적으로 active다.
2RFKILL_STATE_HARD_BLOCKEDDriver가 제어할 수 없는 외부 요인으로 transmitter가 강제로 꺼졌다.

분리된 hard·soft block

68-93

hard와 soft attribute는 2010년 3월 12일 kernel 2.6.34에 도입됐다.

경로접근
/sys/class/rfkill/rfkill[0-9]+/hardread-only0은 inactive로 transmitter가 잠재적으로 active다. 1은 active로 driver 제어 밖의 요인 때문에 transmitter가 강제로 꺼졌다.
/sys/class/rfkill/rfkill[0-9]+/softread/write0은 inactive로 transmitter가 잠재적으로 active다. 1은 active로 software가 transmitter를 껐다.