xref: /netbsd-src/external/bsd/wpa/dist/src/drivers/rfkill.h (revision e604d8611dacba7ab12396e19398c8a39b20a815)
1111b9fd8Schristos /*
2111b9fd8Schristos  * Linux rfkill helper functions for driver wrappers
3111b9fd8Schristos  * Copyright (c) 2010, Jouni Malinen <j@w1.fi>
4111b9fd8Schristos  *
5*e604d861Schristos  * This software may be distributed under the terms of the BSD license.
6*e604d861Schristos  * See README for more details.
7111b9fd8Schristos  */
8111b9fd8Schristos 
9111b9fd8Schristos #ifndef RFKILL_H
10111b9fd8Schristos #define RFKILL_H
11111b9fd8Schristos 
12111b9fd8Schristos struct rfkill_data;
13111b9fd8Schristos 
14111b9fd8Schristos struct rfkill_config {
15111b9fd8Schristos 	void *ctx;
16111b9fd8Schristos 	char ifname[IFNAMSIZ];
17111b9fd8Schristos 	void (*blocked_cb)(void *ctx);
18111b9fd8Schristos 	void (*unblocked_cb)(void *ctx);
19111b9fd8Schristos };
20111b9fd8Schristos 
21111b9fd8Schristos struct rfkill_data * rfkill_init(struct rfkill_config *cfg);
22111b9fd8Schristos void rfkill_deinit(struct rfkill_data *rfkill);
23111b9fd8Schristos int rfkill_is_blocked(struct rfkill_data *rfkill);
24111b9fd8Schristos 
25111b9fd8Schristos #endif /* RFKILL_H */
26