9961920199
Add a second set of global states, "rfkill_default_states", to track the state that will be used when the first rfkill class of a given type is registered, and also to save "undo" information when rfkill_epo is called. Add a new exported function, rfkill_set_default(), which can be used by platform drivers to restore radio state saved by the platform across reboots or shutdown. Also, fix rfkill_epo to properly update rfkill_states, but still preserve a copy of the state so that we can undo the effect of rfkill_epo later if we want to. Add rfkill_restore_states() to restore rfkill_states from the copy. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
18 lines
450 B
C
18 lines
450 B
C
/*
|
|
* Copyright (C) 2007 Ivo van Doorn
|
|
*/
|
|
|
|
/*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 as published
|
|
* by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef __RFKILL_INPUT_H
|
|
#define __RFKILL_INPUT_H
|
|
|
|
void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state);
|
|
void rfkill_epo(void);
|
|
void rfkill_restore_states(void);
|
|
|
|
#endif /* __RFKILL_INPUT_H */
|