mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
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>
This commit is contained in:
parent
8ca712c373
commit
91f4aa9779
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user