Skip to content
  • Henrique de Moraes Holschuh's avatar
    rfkill: add default global states (v2) · 99619201
    Henrique de Moraes Holschuh authored
    
    
    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: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
    Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    99619201