staging: rtl8192u: ieee80211: ieee80211_crypt_tkip.c: Replace bit shifting with BIT macro
Challenge suggested by coccinelle. Prefer using BIT and replace bit shifting with the BIT(x) macro. Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9f383969ae
commit
37b299c7c4
@ -331,7 +331,7 @@ static int ieee80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
|
||||
*pos++ = rc4key[2];
|
||||
}
|
||||
|
||||
*pos++ = (tkey->key_idx << 6) | (1 << 5) /* Ext IV included */;
|
||||
*pos++ = (tkey->key_idx << 6) | BIT(5) /* Ext IV included */;
|
||||
*pos++ = tkey->tx_iv32 & 0xff;
|
||||
*pos++ = (tkey->tx_iv32 >> 8) & 0xff;
|
||||
*pos++ = (tkey->tx_iv32 >> 16) & 0xff;
|
||||
@ -390,7 +390,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
|
||||
hdr = (struct rtl_80211_hdr_4addr *) skb->data;
|
||||
pos = skb->data + hdr_len;
|
||||
keyidx = pos[3];
|
||||
if (!(keyidx & (1 << 5))) {
|
||||
if (!(keyidx & BIT(5))) {
|
||||
if (net_ratelimit()) {
|
||||
printk(KERN_DEBUG "TKIP: received packet without ExtIV"
|
||||
" flag from %pM\n", hdr->addr2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user