Skip to content

Commit

Permalink
mt76: mt7915: convert to use le16_add_cpu()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Shixin authored and Felix Fietkau committed Sep 24, 2020
1 parent 0025750 commit 59283d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 59283d0

Please sign in to comment.