[PATCH v0 2/2] mac802154: replace hardcoded value with macro

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

 



Use IEEE802154_SCF_SECLEVEL_NONE macro defined at ieee802154.h file.

Signed-off-by: Diogenes Pereira <dvnp@xxxxxxxxxxxx>
---
 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 3c8ae3f..f51093e 100644
--- a/net/mac802154/llsec.c
+++ b/net/mac802154/llsec.c
@@ -718,7 +718,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;
 	}
-- 
2.7.4

--
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