lkml.org 
[lkml]   [2022]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] staging: r8188eu: remove get_da
Thus wrote Joe Perches (joe@perches.com):

> On Sat, 2022-10-29 at 19:10 +0200, Martin Kaiser wrote:
> > Replace the last get_da call with ieee80211_get_DA and remove the get_da
> > function.
> []
> > diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
> []
> > @@ -125,7 +126,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, struct phy_stat
> > get_bssid(&padapter->mlmepriv), ETH_ALEN));

> > pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID &&
> > - (!memcmp(get_da(wlanhdr),
> > + (!memcmp(ieee80211_get_DA(hdr),
> > myid(&padapter->eeprompriv), ETH_ALEN));

> trivia:

> As both of the addresses returned are minimum __aligned(2),
> these memcmp uses could be ether_addr_equal

Thanks, I'll fix this in a separate patch and keep this pattern in mind
for other parts of the code.

> Look for ETH_ALEN

> $ git grep ETH_ALEN drivers/staging/r8188eu/

> Perhaps see if the memcpy/memcmp uses with ETH_ALEN could be
> converted to ether_addr_copy/ether_addr_equal or any of the
> other is_<foo>_ether_addr calls.

\
 
 \ /
  Last update: 2022-10-30 19:50    [W:0.033 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site