mirror of
https://github.com/amazingfate/rtl8723ds.git
synced 2025-10-13 12:26:02 +01:00
Merge pull request #30 from johnkeeping/sta-info-alignment
rtl8723ds: fix sta_info alignment
This commit is contained in:
commit
38231d5832
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user