diff -aburN rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.c rtl8187_linux_26.1010.0622.2006-2.6.24/beta-8187/r8187_core.c
--- rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.c	2008-01-26 12:26:25.000000000 +0100
+++ rtl8187_linux_26.1010.0622.2006-2.6.24/beta-8187/r8187_core.c	2008-01-26 12:20:57.000000000 +0100
@@ -431,13 +431,21 @@
 void rtl8180_proc_module_init(void)
 {
 	DMESG("Initializing proc filesystem");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
 	rtl8180_proc=create_proc_entry(RTL8187_MODULE_NAME, S_IFDIR, proc_net);
+#else
+	rtl8180_proc=create_proc_entry(RTL8187_MODULE_NAME, S_IFDIR, init_net.proc_net);
+#endif
 }
 
 
 void rtl8180_proc_module_remove(void)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
 	remove_proc_entry(RTL8187_MODULE_NAME, proc_net);
+#else
+	remove_proc_entry(RTL8187_MODULE_NAME, init_net.proc_net);
+#endif
 }
 
 
@@ -2602,7 +2610,9 @@
 
 	dev = alloc_ieee80211_rtl7(sizeof(struct r8180_priv));
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
 	SET_MODULE_OWNER(dev);
+#endif
 	usb_set_intfdata(intf, dev);
 
 	SET_NETDEV_DEV(dev, &intf->dev);
diff -aburN rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_crypt_tkip.c rtl8187_linux_26.1010.0622.2006-2.6.24/ieee80211/ieee80211_crypt_tkip.c
--- rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_crypt_tkip.c	2008-01-26 12:26:25.000000000 +0100
+++ rtl8187_linux_26.1010.0622.2006-2.6.24/ieee80211/ieee80211_crypt_tkip.c	2008-01-26 12:05:28.000000000 +0100
@@ -394,9 +394,13 @@
 #else
 	crypto_blkcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16);
 #endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = len + 4;
+#else
+	sg_set_page(&sg, virt_to_page(pos), len + 2, offset_in_page(pos));
+#endif
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
 	crypto_cipher_encrypt(tkey->tfm_arc4, &sg, &sg, len + 4);
 #else
@@ -484,9 +488,13 @@
 #else
 	crypto_blkcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16);
 #endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = plen + 4;
+#else
+	sg_set_page(&sg, virt_to_page(pos), plen + 4, offset_in_page(pos));
+#endif
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
 	crypto_cipher_decrypt(tkey->tfm_arc4, &sg, &sg, plen + 4);
 #else
@@ -544,13 +552,21 @@
 		printk(KERN_WARNING "michael_mic: tfm_michael == NULL\n");
 		return -1;
 	}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 	sg[0].page = virt_to_page(hdr);
 	sg[0].offset = offset_in_page(hdr);
 	sg[0].length = 16;
+#else
+	sg_set_page(&sg[0], virt_to_page(hdr), 16, offset_in_page(hdr));
+#endif
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 	sg[1].page = virt_to_page(data);
 	sg[1].offset = offset_in_page(data);
 	sg[1].length = data_len;
+#else
+	sg_set_page(&sg[1], virt_to_page(data), data_len, offset_in_page(data));
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
 	crypto_digest_init(tkey->tfm_michael);
diff -aburN rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_crypt_wep.c rtl8187_linux_26.1010.0622.2006-2.6.24/ieee80211/ieee80211_crypt_wep.c
--- rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_crypt_wep.c	2008-01-26 12:26:25.000000000 +0100
+++ rtl8187_linux_26.1010.0622.2006-2.6.24/ieee80211/ieee80211_crypt_wep.c	2008-01-26 12:07:06.000000000 +0100
@@ -190,9 +190,13 @@
 #else
 	crypto_blkcipher_setkey(wep->tx_tfm, key, klen);
 #endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = len + 4;
+#else
+	sg_set_page(&sg, virt_to_page(pos), len + 4, offset_in_page(pos));
+#endif
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
 	crypto_cipher_encrypt(wep->tfm, &sg, &sg, len + 4);
@@ -246,9 +250,13 @@
 	crypto_blkcipher_setkey(wep->rx_tfm, key, klen);
 #endif
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 	sg.page = virt_to_page(pos);
 	sg.offset = offset_in_page(pos);
 	sg.length = plen + 4;
+#else
+	sg_set_page(&sg, virt_to_page(pos), plen + 4, offset_in_page(pos));
+#endif
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
 	crypto_cipher_decrypt(wep->tfm, &sg, &sg, plen + 4);
