Re: [PATCH v1] mac802154: replace hardcoded value with macro

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

 



Hello.

On 08/09/2017 06:19 PM, Diogenes Pereira wrote:
> Use IEEE802154_SCF_SECLEVEL_NONE macro defined at ieee802154.h file.
> 
> Signed-off-by: Diogenes Pereira <dvnp@xxxxxxxxxxxx>
> Acked-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxx>
> ---
>  net/mac802154/llsec.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c
> index 1e1c9b2..edec2f9 100644
> --- a/net/mac802154/llsec.c
> +++ b/net/mac802154/llsec.c
> @@ -713,7 +713,8 @@ int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb)
>  	if (hlen < 0 || hdr.fc.type != IEEE802154_FC_TYPE_DATA)
>  		return -EINVAL;
>  
> -	if (!hdr.fc.security_enabled || hdr.sec.level == 0) {
> +	if (!hdr.fc.security_enabled ||
> +	    (hdr.sec.level == IEEE802154_SCF_SECLEVEL_NONE)) {
>  		skb_push(skb, hlen);
>  		return 0;
>  	}
> 

Thanks! This patch has been applied to the wpan-next tree and will be part of the next pull request.

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



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux