Search Linux Wireless

Re: [PATCH] wireless: remove RFKILL_STATE_HARD_BLOCKED warnings

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

 



On Friday 27 June 2008 17:12:34 John W. Linville wrote:
>   CC [M]  drivers/net/wireless/b43/rfkill.o
> drivers/net/wireless/b43/rfkill.c: In function ‘b43_rfkill_soft_toggle’:
> drivers/net/wireless/b43/rfkill.c:90: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch
> 
>   CC [M]  drivers/net/wireless/b43legacy/rfkill.o
> drivers/net/wireless/b43legacy/rfkill.c: In function ‘b43legacy_rfkill_soft_toggle’:
> drivers/net/wireless/b43legacy/rfkill.c:92: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch
> 
>   CC [M]  drivers/net/wireless/iwlwifi/iwl-rfkill.o
> drivers/net/wireless/iwlwifi/iwl-rfkill.c: In function ‘iwl_rfkill_soft_rf_kill’:
> drivers/net/wireless/iwlwifi/iwl-rfkill.c:56: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch
> 
> Also handle RFKILL_STATE_{ON,OFF} -> RFKILL_STATE_{UNBLOCKED,SOFT_BLOCKED}
> conversion since I'm already here...
> 
> Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>

ACK for b43 and b43legacy changes.

> diff --git a/drivers/net/wireless/iwlwifi/iwl-rfkill.c b/drivers/net/wireless/iwlwifi/iwl-rfkill.c
> index 4624ac7..ffefbb4 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-rfkill.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-rfkill.c
> @@ -54,17 +54,20 @@ static int iwl_rfkill_soft_rf_kill(void *data, enum rfkill_state state)
>  	mutex_lock(&priv->mutex);
>  
>  	switch (state) {
> -	case RFKILL_STATE_ON:
> +	case RFKILL_STATE_UNBLOCKED:
>  		iwl_radio_kill_sw_enable_radio(priv);
>  		/* if HW rf-kill is set dont allow ON state */
>  		if (iwl_is_rfkill(priv))
>  			err = -EBUSY;
>  		break;
> -	case RFKILL_STATE_OFF:
> +	case RFKILL_STATE_SOFT_BLOCKED:
>  		iwl_radio_kill_sw_disable_radio(priv);
>  		if (!iwl_is_rfkill(priv))
>  			err = -EBUSY;
>  		break;
> +	default:
> +		IWL_WARNING("we recieved unexpected RFKILL state %d\n", state);

"recieved" typo.

-- 
Greetings Michael.
--
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