diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-28 00:59:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-09-28 13:54:10 -0400 |
commit | 5570a914f28f58de6839a4d532e98eb8167bd57d (patch) | |
tree | 75a4bf5c05e406fe38222f9625a2b3da65c9baf8 /drivers/net/wireless/mwifiex/scan.c | |
parent | 2db96c3d0a1f716fc90451cc2ed13842471f4658 (diff) |
mwifiex: convert to use le16_add_cpu()
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>
Diffstat (limited to 'drivers/net/wireless/mwifiex/scan.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 9e077e5fc64a..e36a75988f87 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -614,9 +614,8 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv, | |||
614 | 614 | ||
615 | /* Increment the TLV header length by the size | 615 | /* Increment the TLV header length by the size |
616 | appended */ | 616 | appended */ |
617 | chan_tlv_out->header.len = | 617 | le16_add_cpu(&chan_tlv_out->header.len, |
618 | cpu_to_le16(le16_to_cpu(chan_tlv_out->header.len) + | 618 | sizeof(chan_tlv_out->chan_scan_param)); |
619 | (sizeof(chan_tlv_out->chan_scan_param))); | ||
620 | 619 | ||
621 | /* | 620 | /* |
622 | * The tlv buffer length is set to the number of bytes | 621 | * The tlv buffer length is set to the number of bytes |