diff --git a/core/rtw_efuse.c b/core/rtw_efuse.c index a7ed43e..097708d 100644 --- a/core/rtw_efuse.c +++ b/core/rtw_efuse.c @@ -1406,9 +1406,9 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size) goto exit; } - file_data = rtw_vmalloc(file_size); + file_data = vmalloc(file_size); if (!file_data) { - RTW_ERR("%s rtw_vmalloc(%d) fail\n", __func__, file_size); + RTW_ERR("%s vmalloc(%d) fail\n", __func__, file_size); goto exit; } @@ -1418,9 +1418,9 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size) goto exit; } - map = rtw_vmalloc(map_size); + map = vmalloc(map_size); if (!map) { - RTW_ERR("%s rtw_vmalloc(%d) fail\n", __func__, map_size); + RTW_ERR("%s vmalloc(%d) fail\n", __func__, map_size); goto exit; } memset(map, 0xff, map_size); diff --git a/include/osdep_service.h b/include/osdep_service.h index efde90c..6e119f1 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -184,7 +184,6 @@ void dbg_rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dm #else /* DBG_MEM_ALLOC */ #define rtw_mstat_update(flag, status, sz) do {} while (0) #define rtw_mstat_dump(sel) do {} while (0) -u8 *_rtw_vmalloc(u32 sz); u8 *_rtw_zvmalloc(u32 sz); void _rtw_vmfree(u8 *pbuf, u32 sz); u8 *_rtw_zmalloc(u32 sz); @@ -208,14 +207,12 @@ void *_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_addr_t dma); #ifdef CONFIG_USE_VMALLOC -#define rtw_vmalloc(sz) _rtw_vmalloc((sz)) #define rtw_zvmalloc(sz) _rtw_zvmalloc((sz)) #define rtw_vmfree(pbuf, sz) _rtw_vmfree((pbuf), (sz)) #define rtw_vmalloc_f(sz, mstat_f) _rtw_vmalloc((sz)) #define rtw_zvmalloc_f(sz, mstat_f) _rtw_zvmalloc((sz)) #define rtw_vmfree_f(pbuf, sz, mstat_f) _rtw_vmfree((pbuf), (sz)) #else /* CONFIG_USE_VMALLOC */ -#define rtw_vmalloc(sz) _rtw_malloc((sz)) #define rtw_zvmalloc(sz) _rtw_zmalloc((sz)) #define rtw_vmfree(pbuf, sz) _rtw_mfree((pbuf), (sz)) #define rtw_vmalloc_f(sz, mstat_f) _rtw_malloc((sz)) diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 1d64fbc..15d8910 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -7738,7 +7738,7 @@ static int rtw_wx_set_priv(struct net_device *dev, return -EFAULT; len = dwrq->length; - ext = rtw_vmalloc(len); + ext = vmalloc(len); if (!ext) return -ENOMEM; @@ -7750,7 +7750,7 @@ static int rtw_wx_set_priv(struct net_device *dev, #ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV - ext_dbg = rtw_vmalloc(len); + ext_dbg = vmalloc(len); if (!ext_dbg) { rtw_vmfree(ext, len); return -ENOMEM; diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index f1740b1..b0fa7b2 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -62,15 +62,10 @@ u32 rtw_atoi(u8 *s) } -inline u8 *_rtw_vmalloc(u32 sz) -{ - return vmalloc(sz); -} - inline u8 *_rtw_zvmalloc(u32 sz) { u8 *pbuf; - pbuf = _rtw_vmalloc(sz); + pbuf = vmalloc(sz); if (pbuf != NULL) memset(pbuf, 0, sz); return pbuf; @@ -360,7 +355,7 @@ inline u8 *dbg_rtw_vmalloc(u32 sz, const enum mstat_f flags, const char *func, c if (match_mstat_sniff_rules(flags, sz)) RTW_INFO("DBG_MEM_ALLOC %s:%d %s(%d)\n", func, line, __func__, (sz)); - p = _rtw_vmalloc((sz)); + p = vmalloc((sz)); rtw_mstat_update( flags