Debian Codegraph @

patches/rtl8187-ng-2.6.31.patch

raw
1 diff -ur rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.c rtl8187_linux_26.1010.0622.2006.netdev/beta-8187/r8187_core.c
2 --- rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.c 2009-11-02 17:37:33.944878408 +0100
3 +++ rtl8187_linux_26.1010.0622.2006.netdev/beta-8187/r8187_core.c 2009-11-02 17:50:23.252287868 +0100
4 @@ -1892,8 +1892,10 @@
5 priv->epromtype=EPROM_93c46;
6 DMESG("Reported EEPROM chip is a 93c46 (1Kbit)");
7 }
8 -
9 - dev->get_stats = rtl8180_stats;
10 +
11 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
12 + dev->get_stats = rtl8180_stats;
13 +#endif
14
15 dev->dev_addr[0]=eprom_read(dev,MAC_ADR) & 0xff;
16 dev->dev_addr[1]=(eprom_read(dev,MAC_ADR) & 0xff00)>>8;
17 @@ -2596,7 +2598,19 @@
18 /****************************************************************************
19 ---------------------------- USB_STUFF---------------------------
20 *****************************************************************************/
21 -
22 +
23 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
24 +static const struct net_device_ops rtl8180_netdev_ops = {
25 + .ndo_open = rtl8180_open,
26 + .ndo_stop = rtl8180_close,
27 + .ndo_get_stats = rtl8180_stats,
28 + .ndo_tx_timeout = tx_timeout,
29 + .ndo_do_ioctl = rtl8180_ioctl,
30 + .ndo_set_multicast_list = r8180_set_multicast,
31 + .ndo_set_mac_address = r8180_set_mac_adr,
32 + //.ndo_start_xmit = rtl8180_8023_hard_start_xmit,
33 +};
34 +#endif
35
36 static int __devinit rtl8187_usb_probe(struct usb_interface *intf,
37 const struct usb_device_id *id)
38 @@ -2620,16 +2634,20 @@
39 priv = ieee80211_priv_rtl7(dev);
40 priv->ieee80211 = netdev_priv(dev);
41
42 - priv->udev=udev;
43 -
44 - dev->open = rtl8180_open;
45 - dev->stop = rtl8180_close;
46 - //dev->hard_start_xmit = rtl8180_8023_hard_start_xmit;
47 - dev->tx_timeout = tx_timeout;
48 - dev->wireless_handlers = &r8180_wx_handlers_def;
49 - dev->do_ioctl = rtl8180_ioctl;
50 - dev->set_multicast_list = r8180_set_multicast;
51 - dev->set_mac_address = r8180_set_mac_adr;
52 + priv->udev=udev;
53 +
54 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
55 + dev->netdev_ops = &rtl8180_netdev_ops;
56 +#else
57 + dev->open = rtl8180_open;
58 + dev->stop = rtl8180_close;
59 + //dev->hard_start_xmit = rtl8180_8023_hard_start_xmit;
60 + dev->tx_timeout = tx_timeout;
61 + dev->wireless_handlers = &r8180_wx_handlers_def;
62 + dev->do_ioctl = rtl8180_ioctl;
63 + dev->set_multicast_list = r8180_set_multicast;
64 + dev->set_mac_address = r8180_set_mac_adr;
65 +#endif
66 #if WIRELESS_EXT >= 12
67 #if WIRELESS_EXT < 17
68 dev->get_wireless_stats = r8180_get_wireless_stats;
69 diff -ur rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_module.c rtl8187_linux_26.1010.0622.2006.netdev/ieee80211/ieee80211_module.c
70 --- rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_module.c 2009-11-02 17:37:33.954872206 +0100
71 +++ rtl8187_linux_26.1010.0622.2006.netdev/ieee80211/ieee80211_module.c 2009-11-02 17:39:50.322350883 +0100
72 @@ -103,6 +103,11 @@
73 list_add_tail(&ieee->networks[i].list, &ieee->network_free_list);
74 }
75
76 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
77 +static struct net_device_ops ieee80211_netdev_ops = {
78 + .ndo_start_xmit = ieee80211_xmit_rtl7,
79 +};
80 +#endif
81
82 struct net_device *alloc_ieee80211_rtl7(int sizeof_priv)
83 {
84 @@ -118,7 +123,11 @@
85 goto failed;
86 }
87 ieee = netdev_priv(dev);
88 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
89 + dev->netdev_ops = &ieee80211_netdev_ops;
90 +#else
91 dev->hard_start_xmit = ieee80211_xmit_rtl7;
92 +#endif
93
94 ieee->dev = dev;
95