Skip to content

Commit 91f4aa9

Browse files
dvnpStefan Schmidt
authored andcommitted
mac802154: replace hardcoded value with macro
Use IEEE802154_SCF_SECLEVEL_NONE macro defined at ieee802154.h file. Signed-off-by: Diogenes Pereira <dvnp@cesar.org.br> Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
1 parent 8ca712c commit 91f4aa9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mac802154/llsec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,8 @@ int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb)
713713
if (hlen < 0 || hdr.fc.type != IEEE802154_FC_TYPE_DATA)
714714
return -EINVAL;
715715

716-
if (!hdr.fc.security_enabled || hdr.sec.level == 0) {
716+
if (!hdr.fc.security_enabled ||
717+
(hdr.sec.level == IEEE802154_SCF_SECLEVEL_NONE)) {
717718
skb_push(skb, hlen);
718719
return 0;
719720
}

0 commit comments

Comments
 (0)