linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat: backport ether_addr_equal
@ 2012-05-16  9:55 Ozan Çağlayan
  2012-05-16 20:17 ` [Lf_driver_backport] " Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Ozan Çağlayan @ 2012-05-16  9:55 UTC (permalink / raw)
  To: mcgrof
  Cc: lf_driver_backport, linux-wireless, linux-bluetooth,
	Ozan Çağlayan

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-11 22:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-16  9:55 [PATCH] compat: backport ether_addr_equal Ozan Çağlayan
2012-05-16 20:17 ` [Lf_driver_backport] " 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

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).