mt76: connac: rely on le16_add_cpu in mt76_connac_mcu_add_nested_tlv

Rely on le16_add_cpu() in mt76_connac_mcu_add_nested_tlv routine.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2021-12-15 21:24:12 +01:00
committed by Felix Fietkau
parent b851a3e783
commit 266c7a9f29
+2 -5
View File
@@ -258,11 +258,8 @@ mt76_connac_mcu_add_nested_tlv(struct sk_buff *skb, int tag, int len,
ntlv = le16_to_cpu(ntlv_hdr->tlv_num);
ntlv_hdr->tlv_num = cpu_to_le16(ntlv + 1);
if (sta_hdr) {
u16 size = le16_to_cpu(sta_hdr->len);
sta_hdr->len = cpu_to_le16(size + len);
}
if (sta_hdr)
le16_add_cpu(&sta_hdr->len, len);
return ptlv;
}