psta->keep_alive_trycnt = 0;
}
-u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
+int _rtw_init_sta_priv(struct sta_priv *pstapriv)
{
struct sta_info *psta;
s32 i;
pstapriv->pallocated_stainfo_buf = vzalloc(sizeof(struct sta_info) * NUM_STA + 4);
if (!pstapriv->pallocated_stainfo_buf)
- return _FAIL;
+ return -ENOMEM;
pstapriv->pstainfo_buf = pstapriv->pallocated_stainfo_buf + 4 -
((size_t)(pstapriv->pallocated_stainfo_buf) & 3);
pstapriv->expire_to = 3; /* 3*2 = 6 sec */
pstapriv->max_num_sta = NUM_STA;
- return _SUCCESS;
+ return 0;
}
inline int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta)
return x;
}
-extern u32 _rtw_init_sta_priv(struct sta_priv *pstapriv);
+extern int _rtw_init_sta_priv(struct sta_priv *pstapriv);
extern void _rtw_free_sta_priv(struct sta_priv *pstapriv);
#define stainfo_offset_valid(offset) (offset < NUM_STA && offset >= 0)
goto free_xmit_priv;
}
- if (_rtw_init_sta_priv(&padapter->stapriv) == _FAIL) {
+ if (_rtw_init_sta_priv(&padapter->stapriv)) {
dev_err(dvobj_to_dev(padapter->dvobj), "_rtw_init_sta_priv failed\n");
goto free_recv_priv;
}