From d4db749fd7871921ff4a6aeb6e9631c641851998 Mon Sep 17 00:00:00 2001 From: kaloz Date: Tue, 9 Feb 2010 00:11:50 +0000 Subject: [pxa]: upgrade to 2.6.32.7, switch to squashfs, remove broken flag git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19562 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../pxa/patches-2.6.21/012-serial-ether-addr.patch | 60 ---------------------- 1 file changed, 60 deletions(-) delete mode 100644 target/linux/pxa/patches-2.6.21/012-serial-ether-addr.patch (limited to 'target/linux/pxa/patches-2.6.21/012-serial-ether-addr.patch') diff --git a/target/linux/pxa/patches-2.6.21/012-serial-ether-addr.patch b/target/linux/pxa/patches-2.6.21/012-serial-ether-addr.patch deleted file mode 100644 index 7fdbebe5a..000000000 --- a/target/linux/pxa/patches-2.6.21/012-serial-ether-addr.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- a/drivers/usb/gadget/ether.c -+++ b/drivers/usb/gadget/ether.c -@@ -2249,6 +2249,38 @@ static u8 __devinit nibble (unsigned cha - return 0; - } - -+static inline unsigned int is_gumstix_oui(u8 *addr) -+{ -+ return (addr[0] == 0x00 && addr[1] == 0x15 && addr[2] == 0xC9); -+} -+ -+/** -+ * gen_serial_ether_addr - Generate software assigned Ethernet address -+ * based on the system_serial number -+ * @addr: Pointer to a six-byte array containing the Ethernet address -+ * -+ * Generate an Ethernet address (MAC) that is not multicast -+ * and has the local assigned bit set, keyed on the system_serial -+ */ -+static inline void gen_serial_ether_addr(u8 *addr) -+{ -+ static u8 ether_serial_digit = 0; -+ addr [0] = system_serial_high >> 8; -+ addr [1] = system_serial_high; -+ addr [2] = system_serial_low >> 24; -+ addr [3] = system_serial_low >> 16; -+ addr [4] = system_serial_low >> 8; -+ addr [5] = (system_serial_low & 0xc0) | /* top bits are from system serial */ -+ (2 << 4) | /* 2 bits identify interface type 1=ether, 2=usb, 3&4 undef */ -+ ((ether_serial_digit++) & 0x0f); /* 15 possible interfaces of each type */ -+ -+ if(!is_gumstix_oui(addr)) -+ { -+ addr [0] &= 0xfe; /* clear multicast bit */ -+ addr [0] |= 0x02; /* set local assignment bit (IEEE802) */ -+ } -+} -+ - static int __devinit get_ether_addr(const char *str, u8 *dev_addr) - { - if (str) { -@@ -2266,8 +2298,16 @@ static int __devinit get_ether_addr(cons - if (is_valid_ether_addr (dev_addr)) - return 0; - } -- random_ether_addr(dev_addr); -- return 1; -+ if(system_serial_high | system_serial_low) -+ { -+ gen_serial_ether_addr(dev_addr); -+ return 0; -+ } -+ else -+ { -+ random_ether_addr(dev_addr); -+ return 1; -+ } - } - - static int __devinit -- cgit v1.2.3