lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net] staging: rtl8188eu: use is_zero_ether_addr() instead of memcmp()
From
Date
On Tue, 2019-03-12 at 14:29 +0800, maowenan wrote:
> ping...
>
> On 2019/3/9 11:26, Mao Wenan wrote:
> > Using is_zero_ether_addr() instead of directly use
> > memcmp() to determine if the ethernet address is all
> > zeros.
[]
> > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
[]
> > @@ -180,9 +180,8 @@ struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
> > {
> > struct list_head *phead, *plist;
> > struct wlan_network *pnetwork = NULL;
> > - u8 zero_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
> >
> > - if (!memcmp(zero_addr, addr, ETH_ALEN)) {
> > + if (is_zero_ether_addr(addr)) {

How did you verify that addr is __aligned(2)?


\
 
 \ /
  Last update: 2019-03-12 07:36    [W:0.066 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site