mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00: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 <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
5b78e52927
commit
ec84891a4d
+2
-2
@@ -720,8 +720,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user