diff options
author | Diogenes Pereira <dvnp@cesar.org.br> | 2017-08-09 13:19:24 -0300 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2017-09-20 13:37:16 +0200 |
commit | 91f4aa977947f046dc144fa9e3b06f0ffb53be79 (patch) | |
tree | a727250f6cbaa96a0144faa9fb322d169e0dd8ae /net/mac802154 | |
parent | 8ca712c373a462cfa1b62272870b6c2c74aa83f9 (diff) |
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>
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/llsec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index 1e1c9b20bab7..edec2f9919d0 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; } |