diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 71a54de..1e45c2d 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -222,13 +222,12 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) s32 i; - pstapriv->pallocated_stainfo_buf = rtw_zvmalloc(sizeof(struct sta_info) * NUM_STA + 4); + pstapriv->pallocated_stainfo_buf = rtw_zvmalloc(sizeof(struct sta_info) * NUM_STA); if (!pstapriv->pallocated_stainfo_buf) return _FAIL; - pstapriv->pstainfo_buf = pstapriv->pallocated_stainfo_buf + 4 - - ((SIZE_PTR)(pstapriv->pallocated_stainfo_buf) & 3); + pstapriv->pstainfo_buf = pstapriv->pallocated_stainfo_buf; _rtw_init_queue(&pstapriv->free_sta_queue); @@ -423,7 +422,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) #endif if (pstapriv->pallocated_stainfo_buf) - rtw_vmfree(pstapriv->pallocated_stainfo_buf, sizeof(struct sta_info) * NUM_STA + 4); + rtw_vmfree(pstapriv->pallocated_stainfo_buf, sizeof(struct sta_info) * NUM_STA); } return _SUCCESS;