From: Anchal Jain <anchalj109@gmail.com>
To: gregkh@linuxfoundation.org
Cc: outreachy-kernel@googlegroups.com
Subject: [PATCH v2] staging: rtl8188eu: core: rtw_ap: Replace memcmp() with ether_addr_equal()
Date: Sun, 2 Oct 2016 21:34:17 +0530 [thread overview]
Message-ID: <20161002160401.GA4550@life-desktop> (raw)
When comparing MAC addresses, use ether_addr_equal instead of memcmp to
ETH_ALEN length.
Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c
index fbe9941..6a3dc5e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ap.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ap.c
@@ -1163,7 +1163,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
plist = plist->next;
- if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
+ if (!ether_addr_equal(paclnode->addr, addr)) {
if (paclnode->valid) {
added = true;
DBG_88E("%s, sta has been added\n", __func__);
@@ -1223,7 +1223,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
plist = plist->next;
- if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
+ if (!ether_addr_equal(paclnode->addr, addr, ETH_ALEN)) {
if (paclnode->valid) {
paclnode->valid = false;
--
1.9.1
next reply other threads:[~2016-10-02 16:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-02 16:04 Anchal Jain [this message]
2016-10-02 16:09 ` [Outreachy kernel] [PATCH v2] staging: rtl8188eu: core: rtw_ap: Replace memcmp() with ether_addr_equal() Julia Lawall
2016-10-02 16:11 ` Greg KH
2016-10-02 16:11 ` Greg KH
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=20161002160401.GA4550@life-desktop \
--to=anchalj109@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.