요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Persistent, legacy와 분리된 block state
sysfs-class-rfkill:33-93Non-volatile soft state 초기화 여부, 구형 combined state와 권장 hard·soft interface의 0·1 값을 설명합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
rfkill - radio frequency (RF) connector kill switch support
For details to this subsystem look at Documentation/driver-api/rfkill.rst.
For the deprecated ``/sys/class/rfkill/*/claim`` knobs of this interface look in
Documentation/ABI/removed/sysfs-class-rfkill.
What: /sys/class/rfkill
Date: 09-Jul-2007
KernelVersion: v2.6.22
Contact: [email protected],
Description: The rfkill class subsystem folder.
Each registered rfkill driver is represented by an rfkillX
subfolder (X being an integer >= 0).
What: /sys/class/rfkill/rfkill[0-9]+/name
Date: 09-Jul-2007
KernelVersion: v2.6.22
Contact: [email protected]
Description: Name assigned by driver to this key (interface or driver name).
Values: arbitrary string.
What: /sys/class/rfkill/rfkill[0-9]+/type
Date: 09-Jul-2007
KernelVersion: v2.6.22
Contact: [email protected]
Description: Driver type string ("wlan", "bluetooth", etc).
Values: See include/linux/rfkill.h.
What: /sys/class/rfkill/rfkill[0-9]+/persistent
Date: 09-Jul-2007
KernelVersion: v2.6.22
Contact: [email protected]
Description: Whether the soft blocked state is initialised from non-volatile
storage at startup.
Values: A numeric value:
- 0: false
- 1: true
What: /sys/class/rfkill/rfkill[0-9]+/state
Date: 09-Jul-2007
KernelVersion: v2.6.22
Contact: [email protected]
Description: Current state of the transmitter.
This file was scheduled to be removed in 2014, but due to its
large number of users it will be sticking around for a bit
longer. Despite it being marked as stable, the newer "hard" and
"soft" interfaces should be preferred, since it is not possible
to express the 'soft and hard block' state of the rfkill driver
through this interface. There will likely be another attempt to
remove it in the future.
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.
What: /sys/class/rfkill/rfkill[0-9]+/hard
Date: 12-March-2010
KernelVersion: v2.6.34
Contact: [email protected]
Description: Current hardblock state. This file is read only.
Values: A numeric value.
0: inactive
The transmitter is (potentially) active.
1: active
The transmitter is forced off by something outside of
the driver's control.
What: /sys/class/rfkill/rfkill[0-9]+/soft
Date: 12-March-2010
KernelVersion: v2.6.34
Contact: [email protected]
Description: Current softblock state. This file is read and write.
Values: A numeric value.
0: inactive
The transmitter is (potentially) active.
1: active
The transmitter is turned off by software.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
rfkill class와 device identity
1-30rfkill은 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/rfkill | rfkill class subsystem directory다. 등록된 rfkill driver마다 0 이상의 정수 X를 사용한 rfkillX subdirectory가 하나 생긴다. |
| /sys/class/rfkill/rfkill[0-9]+/name | Driver가 이 key에 붙인 interface 또는 driver 이름이다. 임의 문자열이다. |
| /sys/class/rfkill/rfkill[0-9]+/type | wlan, 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 값 | 상태 | 의미 |
|---|---|---|
| 0 | RFKILL_STATE_SOFT_BLOCKED | Software가 transmitter를 껐다. |
| 1 | RFKILL_STATE_UNBLOCKED | Transmitter가 잠재적으로 active다. |
| 2 | RFKILL_STATE_HARD_BLOCKED | Driver가 제어할 수 없는 외부 요인으로 transmitter가 강제로 꺼졌다. |
분리된 hard·soft block
68-93hard와 soft attribute는 2010년 3월 12일 kernel 2.6.34에 도입됐다.
| 경로 | 접근 | 값 |
|---|---|---|
| /sys/class/rfkill/rfkill[0-9]+/hard | read-only | 0은 inactive로 transmitter가 잠재적으로 active다. 1은 active로 driver 제어 밖의 요인 때문에 transmitter가 강제로 꺼졌다. |
| /sys/class/rfkill/rfkill[0-9]+/soft | read/write | 0은 inactive로 transmitter가 잠재적으로 active다. 1은 active로 software가 transmitter를 껐다. |
rfkill class와 identity
sysfs-class-rfkill:1-30등록 driver별 rfkillX directory와 arbitrary name, wlan·bluetooth 등의 type을 제공합니다.