<yhchuang@xxxxxxxxxxx> writes: > From: Chin-Yen Lee <timlee@xxxxxxxxxxx> > > Previously the mask of wowlan pattern is not checked, > and it may lead to wrong pattern match. We fix it and > add wildcard type for the pattern whose DA is not masked. > Besides, if user pattern is an invalid type for us, > show the error in kernel log, and then wowlan will > not work. > > Signed-off-by: Chin-Yen Lee <timlee@xxxxxxxxxxx> > Signed-off-by: Yan-Hsuan Chuang <yhchuang@xxxxxxxxxxx> [...] > +static inline void ether_addr_copy_mask(u8 *dst, const u8 *src, u8 mask) > +{ > + int i; > + > + eth_zero_addr(dst); > + for (i = 0; i < ETH_ALEN; i++) { > + if (mask & BIT(i)) > + dst[i] = src[i]; > + } > +} You should not use ether_ prefix within a driver, that is for include/linux/etherdevice.h. But as you call this only from one place I recommend just moving the code there and not using a separate function at all. -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches