inline int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta)
{
int offset = (((u8 *)sta) - stapriv->pstainfo_buf) / sizeof(struct sta_info);
- struct net_device *pnetdev = stapriv->padapter->pnetdev;
-
- if (!stainfo_offset_valid(offset))
- netdev_dbg(pnetdev, "invalid offset(%d), out of range!!!\n", offset);
return offset;
}
inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int offset)
{
- struct net_device *pnetdev = stapriv->padapter->pnetdev;
-
- if (!stainfo_offset_valid(offset))
- netdev_dbg(pnetdev, "invalid offset(%d), out of range!!!\n", offset);
-
return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
}