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:
Liu Shixin
2020-09-16 11:04:05 +02:00
committed by Felix Fietkau
parent 5b78e52927
commit ec84891a4d
+2 -2
View File
@@ -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;
}