3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2026-03-04 11:37:56 +01:00

7 Commits

Author SHA1 Message Date
Marcel Holtmann
13253a4aed rfkill: Fix build issue with missing _GNU_SOURCE
CC       src/rfkill.o
In file included from ./ell/ell.h:1,
                 from src/rfkill.c:35:
src/rfkill.c: In function ‘rfkill_init’:
src/rfkill.c:282:49: error: ‘O_CLOEXEC’ undeclared (first use in this function); did you mean ‘FD_CLOEXEC’?
  282 |         fd = L_TFR(open("/dev/rfkill", O_RDWR | O_CLOEXEC));
      |                                                 ^~~~~~~~~
./ell/util.h:348:34: note: in definition of macro ‘L_TFR’
  348 |        do __result = (long int) (expression);      \
      |                                  ^~~~~~~~~~
src/rfkill.c:282:49: note: each undeclared identifier is reported only once for each function it appears in
  282 |         fd = L_TFR(open("/dev/rfkill", O_RDWR | O_CLOEXEC));
      |                                                 ^~~~~~~~~
./ell/util.h:348:34: note: in definition of macro ‘L_TFR’
  348 |        do __result = (long int) (expression);      \
      |                                  ^~~~~~~~~~
2026-02-10 09:12:37 +01:00
Marcel Holtmann
ab5742bb32 module: Move declarations into separate header file 2019-11-07 23:40:13 +01:00
Marcel Holtmann
152b56a12a treewide: Move the Intel copyright forward to 2019 2019-10-25 00:43:08 +02:00
Denis Kenzior
3b040f5c27 main: Make rfkill an IWD_MODULE 2019-09-24 10:07:40 -05:00
Denis Kenzior
57748347b0 treewide: Use L_TFR macro 2019-05-24 11:52:40 -05:00
Andrew Zaborowski
f316614f59 rfkill: Fix wiphy ID lookup
map_wiphy made the assumption that phy names follow the "phyN" pattern
but phys created or renamed by the "iw" command can have arbitrary
names.  It seems that /sys/class/rfkill/rfkill%u/name is not updated on
a phy rename, so we can't use it to subsequently read
/sys/class/ieee80211/<name>/index but both
/sys/class/rfkill/rfkill%u/../index and
/sys/class/rfkill/rfkill%u/device/index point to that file.
2016-07-20 15:29:39 -05:00
Andrew Zaborowski
377df7662c Add rfkill enable/disable and watch support
Add rfkill.c/rfkill.h to be used for watching per-wiphy RFkill state.
It uses both /dev/rfkill and /sys because /dev/rfkill is the recommended
way of interfacing with rfkill but at the same time it doesn't provide
the information on mapping to wiphy IDs.
2016-07-07 13:21:08 -05:00