]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/rtl8192e/rtllib_crypt.c
Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / drivers / staging / rtl8192e / rtllib_crypt.c
index c6e2440d44b9233a2a6500b660dc4da4c1fc6adc..86152d0e6b5dba3515dd5ba7d75ec351d16d0f6c 100644 (file)
@@ -21,7 +21,7 @@
 
 struct rtllib_crypto_alg {
        struct list_head list;
-       struct rtllib_crypto_ops *ops;
+       struct lib80211_crypto_ops *ops;
 };
 
 
@@ -32,15 +32,15 @@ struct rtllib_crypto {
 
 static struct rtllib_crypto *hcrypt;
 
-void rtllib_crypt_deinit_entries(struct rtllib_device *ieee,
+void rtllib_crypt_deinit_entries(struct lib80211_crypt_info *info,
                                           int force)
 {
        struct list_head *ptr, *n;
-       struct rtllib_crypt_data *entry;
+       struct lib80211_crypt_data *entry;
 
-       for (ptr = ieee->crypt_deinit_list.next, n = ptr->next;
-            ptr != &ieee->crypt_deinit_list; ptr = n, n = ptr->next) {
-               entry = list_entry(ptr, struct rtllib_crypt_data, list);
+       for (ptr = info->crypt_deinit_list.next, n = ptr->next;
+            ptr != &info->crypt_deinit_list; ptr = n, n = ptr->next) {
+               entry = list_entry(ptr, struct lib80211_crypt_data, list);
 
                if (atomic_read(&entry->refcnt) != 0 && !force)
                        continue;
@@ -56,26 +56,26 @@ EXPORT_SYMBOL(rtllib_crypt_deinit_entries);
 
 void rtllib_crypt_deinit_handler(unsigned long data)
 {
-       struct rtllib_device *ieee = (struct rtllib_device *)data;
+       struct lib80211_crypt_info *info = (struct lib80211_crypt_info *)data;
        unsigned long flags;
 
-       spin_lock_irqsave(&ieee->lock, flags);
-       rtllib_crypt_deinit_entries(ieee, 0);
-       if (!list_empty(&ieee->crypt_deinit_list)) {
+       spin_lock_irqsave(info->lock, flags);
+       rtllib_crypt_deinit_entries(info, 0);
+       if (!list_empty(&info->crypt_deinit_list)) {
                printk(KERN_DEBUG "%s: entries remaining in delayed crypt "
-                      "deletion list\n", ieee->dev->name);
-               ieee->crypt_deinit_timer.expires = jiffies + HZ;
-               add_timer(&ieee->crypt_deinit_timer);
+                      "deletion list\n", info->name);
+               info->crypt_deinit_timer.expires = jiffies + HZ;
+               add_timer(&info->crypt_deinit_timer);
        }
-       spin_unlock_irqrestore(&ieee->lock, flags);
+       spin_unlock_irqrestore(info->lock, flags);
 
 }
 EXPORT_SYMBOL(rtllib_crypt_deinit_handler);
 
-void rtllib_crypt_delayed_deinit(struct rtllib_device *ieee,
-                                   struct rtllib_crypt_data **crypt)
+void rtllib_crypt_delayed_deinit(struct lib80211_crypt_info *info,
+                                struct lib80211_crypt_data **crypt)
 {
-       struct rtllib_crypt_data *tmp;
+       struct lib80211_crypt_data *tmp;
        unsigned long flags;
 
        if (*crypt == NULL)
@@ -88,17 +88,17 @@ void rtllib_crypt_delayed_deinit(struct rtllib_device *ieee,
         * decrypt operations. Use a list of delayed deinits to avoid needing
         * locking. */
 
-       spin_lock_irqsave(&ieee->lock, flags);
-       list_add(&tmp->list, &ieee->crypt_deinit_list);
-       if (!timer_pending(&ieee->crypt_deinit_timer)) {
-               ieee->crypt_deinit_timer.expires = jiffies + HZ;
-               add_timer(&ieee->crypt_deinit_timer);
+       spin_lock_irqsave(info->lock, flags);
+       list_add(&tmp->list, &info->crypt_deinit_list);
+       if (!timer_pending(&info->crypt_deinit_timer)) {
+               info->crypt_deinit_timer.expires = jiffies + HZ;
+               add_timer(&info->crypt_deinit_timer);
        }
-       spin_unlock_irqrestore(&ieee->lock, flags);
+       spin_unlock_irqrestore(info->lock, flags);
 }
 EXPORT_SYMBOL(rtllib_crypt_delayed_deinit);
 
-int rtllib_register_crypto_ops(struct rtllib_crypto_ops *ops)
+int rtllib_register_crypto_ops(struct lib80211_crypto_ops *ops)
 {
        unsigned long flags;
        struct rtllib_crypto_alg *alg;
@@ -123,7 +123,7 @@ int rtllib_register_crypto_ops(struct rtllib_crypto_ops *ops)
 }
 EXPORT_SYMBOL(rtllib_register_crypto_ops);
 
-int rtllib_unregister_crypto_ops(struct rtllib_crypto_ops *ops)
+int rtllib_unregister_crypto_ops(struct lib80211_crypto_ops *ops)
 {
        unsigned long flags;
        struct list_head *ptr;
@@ -155,7 +155,7 @@ int rtllib_unregister_crypto_ops(struct rtllib_crypto_ops *ops)
 EXPORT_SYMBOL(rtllib_unregister_crypto_ops);
 
 
-struct rtllib_crypto_ops *rtllib_get_crypto_ops(const char *name)
+struct lib80211_crypto_ops *rtllib_get_crypto_ops(const char *name)
 {
        unsigned long flags;
        struct list_head *ptr;
@@ -186,7 +186,7 @@ EXPORT_SYMBOL(rtllib_get_crypto_ops);
 static void * rtllib_crypt_null_init(int keyidx) { return (void *) 1; }
 static void rtllib_crypt_null_deinit(void *priv) {}
 
-static struct rtllib_crypto_ops rtllib_crypt_null = {
+static struct lib80211_crypto_ops rtllib_crypt_null = {
        .name                   = "NULL",
        .init                   = rtllib_crypt_null_init,
        .deinit                 = rtllib_crypt_null_deinit,
@@ -196,8 +196,10 @@ static struct rtllib_crypto_ops rtllib_crypt_null = {
        .decrypt_msdu           = NULL,
        .set_key                = NULL,
        .get_key                = NULL,
-       .extra_prefix_len       = 0,
-       .extra_postfix_len      = 0,
+       .extra_mpdu_prefix_len  = 0,
+       .extra_mpdu_postfix_len = 0,
+       .extra_msdu_prefix_len  = 0,
+       .extra_msdu_postfix_len = 0,
        .owner                  = THIS_MODULE,
 };
 
@@ -213,7 +215,7 @@ int __init rtllib_crypto_init(void)
        INIT_LIST_HEAD(&hcrypt->algs);
        spin_lock_init(&hcrypt->lock);
 
-       ret = rtllib_register_crypto_ops(&rtllib_crypt_null);
+       ret = lib80211_register_crypto_ops(&rtllib_crypt_null);
        if (ret < 0) {
                kfree(hcrypt);
                hcrypt = NULL;