lib80211.c (5a2dd72abdae75ea2960145e0549635ce4e0be96) | lib80211.c (e9c0268f02f8970149158a9b7ea1e5c1c45c819d) |
---|---|
1/* 2 * lib80211 -- common bits for IEEE802.11 drivers 3 * 4 * Copyright(c) 2008 John W. Linville <linville@tuxdriver.com> 5 * 6 * Portions copied from old ieee80211 component, w/ original copyright 7 * notices below: 8 * 9 * Host AP crypto routines 10 * 11 * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi> 12 * Portions Copyright (C) 2004, Intel Corporation <jketreno@linux.intel.com> 13 * 14 */ 15 | 1/* 2 * lib80211 -- common bits for IEEE802.11 drivers 3 * 4 * Copyright(c) 2008 John W. Linville <linville@tuxdriver.com> 5 * 6 * Portions copied from old ieee80211 component, w/ original copyright 7 * notices below: 8 * 9 * Host AP crypto routines 10 * 11 * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi> 12 * Portions Copyright (C) 2004, Intel Corporation <jketreno@linux.intel.com> 13 * 14 */ 15 |
16#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 17 |
|
16#include <linux/module.h> 17#include <linux/ctype.h> 18#include <linux/ieee80211.h> 19#include <linux/errno.h> 20#include <linux/init.h> 21#include <linux/slab.h> 22#include <linux/string.h> 23 --- 195 unchanged lines hidden (view full) --- 219 list_for_each_entry(alg, &lib80211_crypto_algs, list) { 220 if (alg->ops == ops) 221 goto found; 222 } 223 spin_unlock_irqrestore(&lib80211_crypto_lock, flags); 224 return -EINVAL; 225 226 found: | 18#include <linux/module.h> 19#include <linux/ctype.h> 20#include <linux/ieee80211.h> 21#include <linux/errno.h> 22#include <linux/init.h> 23#include <linux/slab.h> 24#include <linux/string.h> 25 --- 195 unchanged lines hidden (view full) --- 221 list_for_each_entry(alg, &lib80211_crypto_algs, list) { 222 if (alg->ops == ops) 223 goto found; 224 } 225 spin_unlock_irqrestore(&lib80211_crypto_lock, flags); 226 return -EINVAL; 227 228 found: |
227 printk(KERN_DEBUG "lib80211_crypt: unregistered algorithm " 228 "'%s'\n", ops->name); | 229 printk(KERN_DEBUG "lib80211_crypt: unregistered algorithm '%s'\n", 230 ops->name); |
229 list_del(&alg->list); 230 spin_unlock_irqrestore(&lib80211_crypto_lock, flags); 231 kfree(alg); 232 return 0; 233} 234EXPORT_SYMBOL(lib80211_unregister_crypto_ops); 235 236struct lib80211_crypto_ops *lib80211_get_crypto_ops(const char *name) --- 28 unchanged lines hidden (view full) --- 265 .name = "NULL", 266 .init = lib80211_crypt_null_init, 267 .deinit = lib80211_crypt_null_deinit, 268 .owner = THIS_MODULE, 269}; 270 271static int __init lib80211_init(void) 272{ | 231 list_del(&alg->list); 232 spin_unlock_irqrestore(&lib80211_crypto_lock, flags); 233 kfree(alg); 234 return 0; 235} 236EXPORT_SYMBOL(lib80211_unregister_crypto_ops); 237 238struct lib80211_crypto_ops *lib80211_get_crypto_ops(const char *name) --- 28 unchanged lines hidden (view full) --- 267 .name = "NULL", 268 .init = lib80211_crypt_null_init, 269 .deinit = lib80211_crypt_null_deinit, 270 .owner = THIS_MODULE, 271}; 272 273static int __init lib80211_init(void) 274{ |
273 printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION "\n"); | 275 pr_info(DRV_DESCRIPTION "\n"); |
274 return lib80211_register_crypto_ops(&lib80211_crypt_null); 275} 276 277static void __exit lib80211_exit(void) 278{ 279 lib80211_unregister_crypto_ops(&lib80211_crypt_null); 280 BUG_ON(!list_empty(&lib80211_crypto_algs)); 281} 282 283module_init(lib80211_init); 284module_exit(lib80211_exit); | 276 return lib80211_register_crypto_ops(&lib80211_crypt_null); 277} 278 279static void __exit lib80211_exit(void) 280{ 281 lib80211_unregister_crypto_ops(&lib80211_crypt_null); 282 BUG_ON(!list_empty(&lib80211_crypto_algs)); 283} 284 285module_init(lib80211_init); 286module_exit(lib80211_exit); |