Ticket #378: rtl8187_2.6.22_to_2.6.24.patch

File rtl8187_2.6.22_to_2.6.24.patch, 4.1 kB (added by misterx, 10 months ago)

r8187 patch (2.6.22 -> 2.6.24)

  • rtl8187_linux_26.1010.0622.

    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
    old new  
    431431void rtl8180_proc_module_init(void) 
    432432{ 
    433433        DMESG("Initializing proc filesystem"); 
     434#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) 
    434435        rtl8180_proc=create_proc_entry(RTL8187_MODULE_NAME, S_IFDIR, proc_net); 
     436#else 
     437        rtl8180_proc=create_proc_entry(RTL8187_MODULE_NAME, S_IFDIR, init_net.proc_net); 
     438#endif 
    435439} 
    436440 
    437441 
    438442void rtl8180_proc_module_remove(void) 
    439443{ 
     444#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) 
    440445        remove_proc_entry(RTL8187_MODULE_NAME, proc_net); 
     446#else 
     447        remove_proc_entry(RTL8187_MODULE_NAME, init_net.proc_net); 
     448#endif 
    441449} 
    442450 
    443451 
     
    26022610 
    26032611        dev = alloc_ieee80211_rtl7(sizeof(struct r8180_priv)); 
    26042612 
     2613#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) 
    26052614        SET_MODULE_OWNER(dev); 
     2615#endif 
    26062616        usb_set_intfdata(intf, dev); 
    26072617 
    26082618        SET_NETDEV_DEV(dev, &intf->dev); 
  • ieee80211/ieee80211_crypt_tkip.c

    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
    old new  
    394394#else 
    395395        crypto_blkcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16); 
    396396#endif 
     397#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 
    397398        sg.page = virt_to_page(pos); 
    398399        sg.offset = offset_in_page(pos); 
    399400        sg.length = len + 4; 
     401#else 
     402        sg_set_page(&sg, virt_to_page(pos), len + 2, offset_in_page(pos)); 
     403#endif 
    400404#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) 
    401405        crypto_cipher_encrypt(tkey->tfm_arc4, &sg, &sg, len + 4); 
    402406#else 
     
    484488#else 
    485489        crypto_blkcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16); 
    486490#endif 
     491#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 
    487492        sg.page = virt_to_page(pos); 
    488493        sg.offset = offset_in_page(pos); 
    489494        sg.length = plen + 4; 
     495#else 
     496        sg_set_page(&sg, virt_to_page(pos), plen + 4, offset_in_page(pos)); 
     497#endif 
    490498#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) 
    491499        crypto_cipher_decrypt(tkey->tfm_arc4, &sg, &sg, plen + 4); 
    492500#else 
     
    544552                printk(KERN_WARNING "michael_mic: tfm_michael == NULL\n"); 
    545553                return -1; 
    546554        } 
     555#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 
    547556        sg[0].page = virt_to_page(hdr); 
    548557        sg[0].offset = offset_in_page(hdr); 
    549558        sg[0].length = 16; 
     559#else 
     560        sg_set_page(&sg[0], virt_to_page(hdr), 16, offset_in_page(hdr)); 
     561#endif 
    550562 
     563#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 
    551564        sg[1].page = virt_to_page(data); 
    552565        sg[1].offset = offset_in_page(data); 
    553566        sg[1].length = data_len; 
     567#else 
     568        sg_set_page(&sg[1], virt_to_page(data), data_len, offset_in_page(data)); 
     569#endif 
    554570 
    555571#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) 
    556572        crypto_digest_init(tkey->tfm_michael); 
  • ieee80211/ieee80211_crypt_wep.c

    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
    old new  
    190190#else 
    191191        crypto_blkcipher_setkey(wep->tx_tfm, key, klen); 
    192192#endif 
     193#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 
    193194        sg.page = virt_to_page(pos); 
    194195        sg.offset = offset_in_page(pos); 
    195196        sg.length = len + 4; 
     197#else 
     198        sg_set_page(&sg, virt_to_page(pos), len + 4, offset_in_page(pos)); 
     199#endif 
    196200 
    197201#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) 
    198202        crypto_cipher_encrypt(wep->tfm, &sg, &sg, len + 4); 
     
    246250        crypto_blkcipher_setkey(wep->rx_tfm, key, klen); 
    247251#endif 
    248252 
     253#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 
    249254        sg.page = virt_to_page(pos); 
    250255        sg.offset = offset_in_page(pos); 
    251256        sg.length = plen + 4; 
     257#else 
     258        sg_set_page(&sg, virt_to_page(pos), plen + 4, offset_in_page(pos)); 
     259#endif 
    252260 
    253261#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) 
    254262        crypto_cipher_decrypt(wep->tfm, &sg, &sg, plen + 4);