Search Linux Wireless

Re: [PATCH 4/5] rfkill: honour EPO state when resuming a rfkill controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 09 October 2008, Henrique de Moraes Holschuh wrote:
> rfkill_resume() would always restore the rfkill controller state to its
> pre-suspend state.
> 
> Now that we know when we are under EPO, kick the rfkill controller to
> SOFT_BLOCKED state instead of to its pre-suspend state when it is resumed
> while EPO mode is active.
> 
> Signed-off-by: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
> Cc: Ivo van Doorn <IvDoorn@xxxxxxxxx>

Acked-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>

> ---
>  net/rfkill/rfkill.c |   13 +++++++++++--
>  1 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
> index e348eab..c9180c8 100644
> --- a/net/rfkill/rfkill.c
> +++ b/net/rfkill/rfkill.c
> @@ -581,8 +581,17 @@ static int rfkill_resume(struct device *dev)
>  
>  		dev->power.power_state.event = PM_EVENT_ON;
>  
> -		/* restore radio state AND notify everybody */
> -		rfkill_toggle_radio(rfkill, rfkill->state, 1);
> +		/*
> +		 * If we are under EPO, kick transmitter offline,
> +		 * otherwise restore to pre-suspend state.
> +		 *
> +		 * Issue a notification in any case
> +		 */
> +		rfkill_toggle_radio(rfkill,
> +				rfkill_epo_lock_active ?
> +					RFKILL_STATE_SOFT_BLOCKED :
> +					rfkill->state,
> +				1);
>  
>  		mutex_unlock(&rfkill->mutex);
>  	}


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux