Skip to content

Commit

Permalink
staging: rtl8188eu: convert DBG_88E calls in core/rtw_sta_mgt.c
Browse files Browse the repository at this point in the history
Convert both calls to the DBG_88E macro in core/rtw_sta_mgt.c into
netdev_dbg calls. The DBG_88E macro is unnecessary, as visibility of
debug messages can be controlled more precisely by just using debugfs.
It is important to keep these messages still, as they are displayable
via a kernel module parameter when using DBG_88E.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210613102454.7480-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Phillip Potter authored and Greg Kroah-Hartman committed Jun 14, 2021
1 parent 47bbb44 commit 9d056c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,20 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
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))
DBG_88E("%s invalid offset(%d), out of range!!!", __func__, 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))
DBG_88E("%s invalid offset(%d), out of range!!!", __func__, offset);
netdev_dbg(pnetdev, "invalid offset(%d), out of range!!!\n", offset);

return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
}
Expand Down

0 comments on commit 9d056c1

Please sign in to comment.