From: navin patidar Date: Sun, 22 Jun 2014 08:36:33 +0000 (+0530) Subject: staging: rtl8188eu: Use cpu_to_be32() instead of RTW_PUT_BE32() X-Git-Tag: firefly_0821_release~176^2~3491^2~1408 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=02b1c00d50d4bde996868e024b5d08d4ec19b181;p=firefly-linux-kernel-4.4.55.git staging: rtl8188eu: Use cpu_to_be32() instead of RTW_PUT_BE32() Signed-off-by: navin patidar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_p2p.c b/drivers/staging/rtl8188eu/core/rtw_p2p.c index 08404704257a..5bc1937f3d50 100644 --- a/drivers/staging/rtl8188eu/core/rtw_p2p.c +++ b/drivers/staging/rtl8188eu/core/rtw_p2p.c @@ -310,7 +310,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr, wpsielen = 0; /* WPS OUI */ - RTW_PUT_BE32(wpsie, WPSOUI); + *((u32 *)(wpsie+wpsielen)) = cpu_to_be32(WPSOUI); wpsielen += 4; /* Config Method */ @@ -569,8 +569,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) p2pielen += 2; /* OUI */ - /* u32*) (p2pie + p2pielen) = cpu_to_be32(WPSOUI); */ - RTW_PUT_BE32(p2pie + p2pielen, WPSOUI); + *((u32 *)(p2pie + p2pielen)) = cpu_to_be32(WPSOUI); p2pielen += 4; /* Sub Category ID */ @@ -683,8 +682,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 p2pielen += 2; /* OUI */ - /* u32*) (p2pie + p2pielen) = cpu_to_be32(WPSOUI); */ - RTW_PUT_BE32(p2pie + p2pielen, WPSOUI); + *((u32 *)(p2pie + p2pielen)) = cpu_to_be32(WPSOUI); p2pielen += 4; /* Sub Category ID */ diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 64ef9bdafc2d..30613fc8b44c 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -155,9 +155,7 @@ extern int RTW_STATUS_CODE(int error_code); #define rtw_update_mem_stat(flag, sz) do {} while (0) u8 *_rtw_malloc(u32 sz); -void _rtw_mfree(u8 *pbuf, u32 sz); #define rtw_malloc(sz) _rtw_malloc((sz)) -#define rtw_mfree(pbuf, sz) _rtw_mfree((pbuf), (sz)) void *rtw_malloc2d(int h, int w, int size); @@ -271,14 +269,6 @@ u64 rtw_modular64(u64 x, u64 y); #define RTW_GET_BE24(a) ((((u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \ ((u32) (a)[2])) -#define RTW_PUT_BE32(a, val) \ - do { \ - (a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \ - (a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \ - (a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \ - (a)[3] = (u8) (((u32) (val)) & 0xff); \ - } while (0) - void rtw_buf_free(u8 **buf, u32 *buf_len); void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len);