| 1 |
diff -udpr rtl8187_linux_26.1010.0622.2006/beta-8187/r8187.h rtl8187_linux_26.1010.0622.2006_2.6.32/beta-8187/r8187.h |
| 2 |
--- rtl8187_linux_26.1010.0622.2006/beta-8187/r8187.h 2010-01-31 11:32:06.000000000 -0500 |
| 3 |
+++ rtl8187_linux_26.1010.0622.2006_2.6.32/beta-8187/r8187.h 2010-01-31 09:28:57.000000000 -0500 |
| 4 |
@@ -43,12 +43,14 @@ |
| 5 |
#include <linux/if_arp.h> |
| 6 |
#include <linux/random.h> |
| 7 |
#include <linux/version.h> |
| 8 |
-#include <asm/io.h> |
| 9 |
-#include <asm/semaphore.h> |
| 10 |
|
| 11 |
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) |
| 12 |
+#include <asm/io.h> |
| 13 |
+#include <asm/semaphore.h> |
| 14 |
#include <linux/config.h> |
| 15 |
#else |
| 16 |
+#include <linux/io.h> |
| 17 |
+#include <linux/semaphore.h> |
| 18 |
#include <linux/autoconf.h> |
| 19 |
#endif |
| 20 |
|
| 21 |
diff -udpr rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.c rtl8187_linux_26.1010.0622.2006_2.6.32/beta-8187/r8187_core.c |
| 22 |
--- rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.c 2010-01-31 11:32:05.000000000 -0500 |
| 23 |
+++ rtl8187_linux_26.1010.0622.2006_2.6.32/beta-8187/r8187_core.c 2010-01-31 11:15:27.000000000 -0500 |
| 24 |
@@ -1893,8 +1893,6 @@ short rtl8180_init(struct net_device *de |
| 25 |
DMESG("Reported EEPROM chip is a 93c46 (1Kbit)"); |
| 26 |
} |
| 27 |
|
| 28 |
- dev->get_stats = rtl8180_stats; |
| 29 |
- |
| 30 |
dev->dev_addr[0]=eprom_read(dev,MAC_ADR) & 0xff; |
| 31 |
dev->dev_addr[1]=(eprom_read(dev,MAC_ADR) & 0xff00)>>8; |
| 32 |
dev->dev_addr[2]=eprom_read(dev,MAC_ADR+1) & 0xff; |
| 33 |
@@ -2597,6 +2595,19 @@ void rtl8180_irq_rx_tasklet(struct r8180 |
| 34 |
---------------------------- USB_STUFF--------------------------- |
| 35 |
*****************************************************************************/ |
| 36 |
|
| 37 |
+#ifdef HAVE_NET_DEVICE_OPS |
| 38 |
+static const struct net_device_ops rtl8180_netdev_ops = { |
| 39 |
+ .ndo_open = rtl8180_open, |
| 40 |
+ .ndo_stop = rtl8180_close, |
| 41 |
+ .ndo_get_stats = rtl8180_stats, |
| 42 |
+ .ndo_tx_timeout = tx_timeout, |
| 43 |
+ .ndo_do_ioctl = rtl8180_ioctl, |
| 44 |
+ .ndo_set_multicast_list = r8180_set_multicast, |
| 45 |
+ .ndo_set_mac_address = r8180_set_mac_adr, |
| 46 |
+ .ndo_start_xmit = ieee80211_xmit_rtl7, |
| 47 |
+// .ndo_start_xmit = ieee80211_xmit, |
| 48 |
+}; |
| 49 |
+#endif |
| 50 |
|
| 51 |
static int __devinit rtl8187_usb_probe(struct usb_interface *intf, |
| 52 |
const struct usb_device_id *id) |
| 53 |
@@ -2622,14 +2633,20 @@ static int __devinit rtl8187_usb_probe(s |
| 54 |
|
| 55 |
priv->udev=udev; |
| 56 |
|
| 57 |
+#ifdef HAVE_NET_DEVICE_OPS |
| 58 |
+ dev->netdev_ops = &rtl8180_netdev_ops; |
| 59 |
+#else |
| 60 |
dev->open = rtl8180_open; |
| 61 |
dev->stop = rtl8180_close; |
| 62 |
+ dev->get_stats = rtl8180_stats; |
| 63 |
//dev->hard_start_xmit = rtl8180_8023_hard_start_xmit; |
| 64 |
dev->tx_timeout = tx_timeout; |
| 65 |
dev->wireless_handlers = &r8180_wx_handlers_def; |
| 66 |
dev->do_ioctl = rtl8180_ioctl; |
| 67 |
dev->set_multicast_list = r8180_set_multicast; |
| 68 |
dev->set_mac_address = r8180_set_mac_adr; |
| 69 |
+#endif |
| 70 |
+ |
| 71 |
#if WIRELESS_EXT >= 12 |
| 72 |
#if WIRELESS_EXT < 17 |
| 73 |
dev->get_wireless_stats = r8180_get_wireless_stats; |
| 74 |
diff -udpr rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_module.c rtl8187_linux_26.1010.0622.2006_2.6.32/ieee80211/ieee80211_module.c |
| 75 |
--- rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_module.c 2010-01-31 11:32:06.000000000 -0500 |
| 76 |
+++ rtl8187_linux_26.1010.0622.2006_2.6.32/ieee80211/ieee80211_module.c 2010-01-31 09:25:48.000000000 -0500 |
| 77 |
@@ -117,8 +117,12 @@ struct net_device *alloc_ieee80211_rtl7( |
| 78 |
IEEE80211_ERROR("Unable to network device.\n"); |
| 79 |
goto failed; |
| 80 |
} |
| 81 |
+ |
| 82 |
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) |
| 83 |
ieee = netdev_priv(dev); |
| 84 |
- dev->hard_start_xmit = ieee80211_xmit_rtl7; |
| 85 |
+#else |
| 86 |
+ ieee = (struct ieee80211_device *)dev->priv; |
| 87 |
+#endif |
| 88 |
|
| 89 |
ieee->dev = dev; |
| 90 |
|
| 91 |
diff -udpr rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_rx.c rtl8187_linux_26.1010.0622.2006_2.6.32/ieee80211/ieee80211_rx.c |
| 92 |
--- rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_rx.c 2010-01-31 11:28:19.000000000 -0500 |
| 93 |
+++ rtl8187_linux_26.1010.0622.2006_2.6.32/ieee80211/ieee80211_rx.c 2010-01-31 11:49:16.000000000 -0500 |
| 94 |
@@ -104,7 +104,12 @@ static inline void ieee80211_monitor_rx_ |
| 95 |
hdr->f.did = LWNG_CAP_DID_BASE | (i << 12); \ |
| 96 |
hdr->f.status = s; hdr->f.len = l; hdr->f.data = d |
| 97 |
LWNG_SETVAL(hosttime, 1, 0, 4, jiffies); |
| 98 |
- LWNG_SETVAL(mactime, 2, 0, 4, ((u32)rx_stats->mac_time)); |
| 99 |
+ |
| 100 |
+ hdr->mactime.did = LWNG_CAP_DID_BASE | (2 << 12); |
| 101 |
+ hdr->mactime.status = 0; |
| 102 |
+ hdr->mactime.len = 4; |
| 103 |
+ hdr->mactime.data = rx_stats->mac_time[0]; |
| 104 |
+ |
| 105 |
LWNG_SETVAL(channel, 3, 1 /* no value */, 4, 0); |
| 106 |
LWNG_SETVAL(rssi, 4, 1 /* no value */, 4, 0); |
| 107 |
LWNG_SETVAL(sq, 5, 1 /* no value */, 4, 0); |
| 108 |
diff -udpr rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_tx.c rtl8187_linux_26.1010.0622.2006_2.6.32/ieee80211/ieee80211_tx.c |
| 109 |
--- rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_tx.c 2010-01-31 11:32:06.000000000 -0500 |
| 110 |
+++ rtl8187_linux_26.1010.0622.2006_2.6.32/ieee80211/ieee80211_tx.c 2010-01-31 11:17:55.000000000 -0500 |
| 111 |
@@ -511,3 +511,4 @@ int ieee80211_xmit_rtl7(struct sk_buff * |
| 112 |
} |
| 113 |
|
| 114 |
EXPORT_SYMBOL(ieee80211_txb_free_rtl7); |
| 115 |
+EXPORT_SYMBOL(ieee80211_xmit_rtl7); |