From: "Ozan Çağlayan" <ozancag@gmail.com>
To: mcgrof@kernel.org
Cc: lf_driver_backport@lists.linux-foundation.org,
linux-wireless@vger.kernel.org, linux-bluetooth@vger.kernel.org,
"Ozan Çağlayan" <ozancag@gmail.com>
Subject: [PATCH] compat: backport ether_addr_equal
Date: Wed, 16 May 2012 12:55:48 +0300 [thread overview]
Message-ID: <1337162148-16499-1-git-send-email-ozancag@gmail.com> (raw)
This backports:
commit a599b0f54d233d0f63d6be9a2ff0049d24751669
Author: Joe Perches <joe@perches.com>
Date: Tue May 8 18:56:45 2012 +0000
etherdevice.h: Add ether_addr_equal
Add a boolean function to check if 2 ethernet addresses
are the same.
This is to avoid any confusion about compare_ether_addr
returning an unsigned, and not being able to use the
compare_ether_addr function for sorting ala memcmp.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[root@ozzyfedora compat]# bin/ckmake
Trying kernel 3.3.4-5.fc17.x86_64 [OK]
Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
---
include/linux/compat-3.5.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/compat-3.5.h b/include/linux/compat-3.5.h
index 554d347..a83266b 100644
--- a/include/linux/compat-3.5.h
+++ b/include/linux/compat-3.5.h
@@ -3,6 +3,7 @@
#include <linux/version.h>
#include <linux/fs.h>
+#include <linux/etherdevice.h>
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
@@ -12,6 +13,12 @@ extern int simple_open(struct inode *inode, struct file *file);
#define tty_lock(__tty) tty_lock()
#define tty_unlock(__tty) tty_unlock()
+/* Backport ether_addr_equal */
+static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
+{
+ return !compare_ether_addr(addr1, addr2);
+}
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */
#endif /* LINUX_3_5_COMPAT_H */
--
1.7.10.1
next reply other threads:[~2012-05-16 10:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 9:55 Ozan Çağlayan [this message]
2012-05-16 20:17 ` [Lf_driver_backport] [PATCH] compat: backport ether_addr_equal Luis R. Rodriguez
2012-05-16 20:25 ` Luis R. Rodriguez
2012-05-16 20:37 ` Hauke Mehrtens
2012-05-16 20:46 ` Johannes Berg
2012-06-11 18:49 ` Luis R. Rodriguez
2012-06-11 21:51 ` Hauke Mehrtens
2012-06-11 22:24 ` Luis R. Rodriguez
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=1337162148-16499-1-git-send-email-ozancag@gmail.com \
--to=ozancag@gmail.com \
--cc=lf_driver_backport@lists.linux-foundation.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@kernel.org \
/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).