[atheros] remove the clz function, use fls instead
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.23 / 630-phy_packets.patch
1 Index: linux-2.6.23.16/drivers/net/phy/phy_device.c
2 ===================================================================
3 --- linux-2.6.23.16.orig/drivers/net/phy/phy_device.c 2008-02-11 07:06:32.000000000 +0100
4 +++ linux-2.6.23.16/drivers/net/phy/phy_device.c 2008-04-20 05:42:28.000000000 +0200
5 @@ -67,6 +67,8 @@
6 dev->bus = bus;
7
8 dev->state = PHY_DOWN;
9 + dev->netif_receive_skb = &netif_receive_skb;
10 + dev->netif_rx = &netif_rx;
11
12 spin_lock_init(&dev->lock);
13
14 Index: linux-2.6.23.16/include/linux/phy.h
15 ===================================================================
16 --- linux-2.6.23.16.orig/include/linux/phy.h 2008-04-20 04:40:31.000000000 +0200
17 +++ linux-2.6.23.16/include/linux/phy.h 2008-04-20 05:53:21.000000000 +0200
18 @@ -289,6 +289,17 @@
19 void (*adjust_link)(struct net_device *dev);
20
21 void (*adjust_state)(struct net_device *dev);
22 +
23 + /*
24 + * By default these point to the original functions
25 + * with the same name. adding them to the phy_device
26 + * allows the phy driver to override them for packet
27 + * mangling if the ethernet driver supports it
28 + * This is required to support some really horrible
29 + * switches such as the Marvell 88E6060
30 + */
31 + int (*netif_receive_skb)(struct sk_buff *skb);
32 + int (*netif_rx)(struct sk_buff *skb);
33 };
34 #define to_phy_device(d) container_of(d, struct phy_device, dev)
35
36 Index: linux-2.6.23.16/include/linux/netdevice.h
37 ===================================================================
38 --- linux-2.6.23.16.orig/include/linux/netdevice.h 2008-02-11 07:06:32.000000000 +0100
39 +++ linux-2.6.23.16/include/linux/netdevice.h 2008-04-20 06:33:25.000000000 +0200
40 @@ -426,6 +426,7 @@
41 void *ax25_ptr; /* AX.25 specific data */
42 struct wireless_dev *ieee80211_ptr; /* IEEE 802.11 specific data,
43 assign before registering */
44 + void *phy_ptr; /* PHY device specific data */
45
46 /*
47 * Cache line mostly used on receive path (including eth_type_trans())
This page took 0.039212 seconds and 5 git commands to generate.