blob: e27565375bf5ac1fee548f712fa617e960a24104 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/*
2 * Linux rfkill helper functions for driver wrappers
3 * Copyright (c) 2010, Jouni Malinen <j@w1.fi>
4 *
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
7 */
8
9#ifndef RFKILL_H
10#define RFKILL_H
11
12struct rfkill_data;
13
14struct rfkill_config {
15 void *ctx;
16 char ifname[IFNAMSIZ];
17 void (*blocked_cb)(void *ctx);
18 void (*unblocked_cb)(void *ctx);
19};
20
21#ifdef CONFIG_RFKILL
22struct rfkill_data * rfkill_init(struct rfkill_config *cfg);
23void rfkill_deinit(struct rfkill_data *rfkill);
24int rfkill_is_blocked(struct rfkill_data *rfkill);
25#else
26static inline struct rfkill_data * rfkill_init(struct rfkill_config *cfg)
27{
28 return (void *) 1;
29}
30
31static inline void rfkill_deinit(struct rfkill_data *rfkill)
32{
33}
34
35static inline int rfkill_is_blocked(struct rfkill_data *rfkill)
36{
37 return 0;
38}
39#endif
40
41#endif /* RFKILL_H */