Skip to content

Commit

Permalink
mwifiex: 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().

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Wei Yongjun authored and John W. Linville committed Sep 28, 2012
1 parent 2db96c3 commit 5570a91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,8 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv,

/* Increment the TLV header length by the size
appended */
chan_tlv_out->header.len =
cpu_to_le16(le16_to_cpu(chan_tlv_out->header.len) +
(sizeof(chan_tlv_out->chan_scan_param)));
le16_add_cpu(&chan_tlv_out->header.len,
sizeof(chan_tlv_out->chan_scan_param));

/*
* The tlv buffer length is set to the number of bytes
Expand Down

0 comments on commit 5570a91

Please sign in to comment.