mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
mt76: mt7915: convert to use le16_add_cpu()
Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
00257508a2
commit
59283d0987
|
|
@ -717,8 +717,8 @@ mt7915_mcu_add_nested_subtlv(struct sk_buff *skb, int sub_tag, int sub_len,
|
|||
ptlv = skb_put(skb, sub_len);
|
||||
memcpy(ptlv, &tlv, sizeof(tlv));
|
||||
|
||||
*sub_ntlv = cpu_to_le16(le16_to_cpu(*sub_ntlv) + 1);
|
||||
*len = cpu_to_le16(le16_to_cpu(*len) + sub_len);
|
||||
le16_add_cpu(sub_ntlv, 1);
|
||||
le16_add_cpu(len, sub_len);
|
||||
|
||||
return ptlv;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user