From: Kalle Valo <kvalo@codeaurora.org>
To: <yhchuang@realtek.com>
Cc: <linux-wireless@vger.kernel.org>, <briannorris@chromium.org>,
<timlee@realtek.com>
Subject: Re: [PATCH] rtw88: add more check for wowlan pattern
Date: Mon, 06 Apr 2020 11:16:54 +0300 [thread overview]
Message-ID: <87eet1f2q1.fsf@codeaurora.org> (raw)
In-Reply-To: <20200406074705.25022-1-yhchuang@realtek.com> (yhchuang@realtek.com's message of "Mon, 6 Apr 2020 15:47:05 +0800")
<yhchuang@realtek.com> writes:
> From: Chin-Yen Lee <timlee@realtek.com>
>
> 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@realtek.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
[...]
> +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
next prev parent reply other threads:[~2020-04-06 8:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 7:47 [PATCH] rtw88: add more check for wowlan pattern yhchuang
2020-04-06 8:16 ` Kalle Valo [this message]
2020-04-06 18:32 ` Brian Norris
2020-04-06 18:52 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eet1f2q1.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=briannorris@chromium.org \
--cc=linux-wireless@vger.kernel.org \
--cc=timlee@realtek.com \
--cc=yhchuang@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).