if (pmlmepriv) {
rtw_mfree_mlme_priv_lock (pmlmepriv);
- if (pmlmepriv->free_bss_buf) {
- rtw_vmfree(pmlmepriv->free_bss_buf, MAX_BSS_CNT * sizeof(struct wlan_network));
- }
+ vfree(pmlmepriv->free_bss_buf);
}
}
pxmitbuf++;
}
- if (pxmitpriv->pallocated_xmit_extbuf)
- rtw_vmfree(pxmitpriv->pallocated_xmit_extbuf, num_xmit_extbuf * sizeof(struct xmit_buf) + 4);
+ vfree(pxmitpriv->pallocated_xmit_extbuf);
if (padapter->registrypriv.mp_mode == 0) {
max_xmit_extbuf_size = 6000;
rtw_os_recv_resource_free(precvpriv);
- if (precvpriv->pallocated_frame_buf) {
- rtw_vmfree(precvpriv->pallocated_frame_buf, NR_RECVFRAME * sizeof(struct recv_frame) + RXFRAME_ALIGN_SZ);
- }
+ vfree(precvpriv->pallocated_frame_buf);
rtw_hal_free_recv_priv(padapter);
-
}
struct recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
rtw_mfree_sta_priv_lock(pstapriv);
if (pstapriv->pallocated_stainfo_buf)
- rtw_vmfree(pstapriv->pallocated_stainfo_buf, sizeof(struct sta_info)*NUM_STA+4);
+ vfree(pstapriv->pallocated_stainfo_buf);
}
return _SUCCESS;
pxmitbuf++;
}
- if (pxmitpriv->pallocated_frame_buf)
- rtw_vmfree(pxmitpriv->pallocated_frame_buf, NR_XMITFRAME * sizeof(struct xmit_frame) + 4);
+ vfree(pxmitpriv->pallocated_frame_buf);
- if (pxmitpriv->pallocated_xmitbuf)
- rtw_vmfree(pxmitpriv->pallocated_xmitbuf, NR_XMITBUFF * sizeof(struct xmit_buf) + 4);
+ vfree(pxmitpriv->pallocated_xmitbuf);
/* free xmit extension buff */
_rtw_spinlock_free(&pxmitpriv->free_xmit_extbuf_queue.lock);
pxmitbuf++;
}
- if (pxmitpriv->pallocated_xmit_extbuf) {
- rtw_vmfree(pxmitpriv->pallocated_xmit_extbuf, num_xmit_extbuf * sizeof(struct xmit_buf) + 4);
- }
+ vfree(pxmitpriv->pallocated_xmit_extbuf);
rtw_free_hwxmits(padapter);
/* length could be ignored, used to detect memory leakage. */
void ODM_FreeMemory(struct odm_dm_struct *pDM_Odm, void *pPtr, u32 length)
{
- rtw_vmfree(pPtr, length);
+ vfree(pPtr);
}
s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2, u32 length)
} while (!rstatus && (loop++ < 10));
}
rtw_IOL_cmd_buf_dump(Adapter, data_len, pbuf);
- rtw_vmfree(pbuf, data_len+10);
+ vfree(pbuf);
}
DBG_88E("###### %s ######\n", __func__);
}
#define rtw_update_mem_stat(flag, sz) do {} while (0)
u8 *_rtw_vmalloc(u32 sz);
u8 *_rtw_zvmalloc(u32 sz);
-void _rtw_vmfree(u8 *pbuf, u32 sz);
#define rtw_vmalloc(sz) _rtw_vmalloc((sz))
#define rtw_zvmalloc(sz) _rtw_zvmalloc((sz))
-#define rtw_vmfree(pbuf, sz) _rtw_vmfree((pbuf), (sz))
void *rtw_malloc2d(int h, int w, int size);
return -ENOMEM;
if (copy_from_user(ext, dwrq->pointer, len)) {
- rtw_vmfree(ext, len);
+ vfree(ext);
return -EFAULT;
}
FREE_EXT:
- rtw_vmfree(ext, len);
+ vfree(ext);
return ret;
}
return pbuf;
}
-inline void _rtw_vmfree(u8 *pbuf, u32 sz)
-{
- vfree(pbuf);
-}
-
void *rtw_malloc2d(int h, int w, int size)
{
int j;
if (!pnpi->priv)
goto RETURN;
- rtw_vmfree(pnpi->priv, pnpi->sizeof_priv);
+ vfree(pnpi->priv);
free_netdev(netdev);
RETURN:
if (pnetdev)
rtw_free_netdev(pnetdev);
else if (padapter)
- rtw_vmfree((u8 *)padapter, sizeof(*padapter));
+ vfree(padapter);
padapter = NULL;
}
exit: