lib80211.c (274bfb8dc5ffa16cb073801bebe76ab7f4e2e73d) | lib80211.c (2ba4b32ecf748d5f45f298fc9677fa46d1dd9aff) |
---|---|
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 * --- 57 unchanged lines hidden (view full) --- 66 d += snprintf(d, 3, "%03o", *s); 67 s++; 68 } 69 *d = '\0'; 70 return buf; 71} 72EXPORT_SYMBOL(print_ssid); 73 | 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 * --- 57 unchanged lines hidden (view full) --- 66 d += snprintf(d, 3, "%03o", *s); 67 s++; 68 } 69 *d = '\0'; 70 return buf; 71} 72EXPORT_SYMBOL(print_ssid); 73 |
74int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name, 75 spinlock_t *lock) 76{ 77 memset(info, 0, sizeof(*info)); 78 79 info->name = name; 80 info->lock = lock; 81 82 INIT_LIST_HEAD(&info->crypt_deinit_list); 83 setup_timer(&info->crypt_deinit_timer, lib80211_crypt_deinit_handler, 84 (unsigned long)info); 85 86 return 0; 87} 88EXPORT_SYMBOL(lib80211_crypt_info_init); 89 90void lib80211_crypt_info_free(struct lib80211_crypt_info *info) 91{ 92 int i; 93 94 lib80211_crypt_quiescing(info); 95 del_timer_sync(&info->crypt_deinit_timer); 96 lib80211_crypt_deinit_entries(info, 1); 97 98 for (i = 0; i < NUM_WEP_KEYS; i++) { 99 struct lib80211_crypt_data *crypt = info->crypt[i]; 100 if (crypt) { 101 if (crypt->ops) { 102 crypt->ops->deinit(crypt->priv); 103 module_put(crypt->ops->owner); 104 } 105 kfree(crypt); 106 info->crypt[i] = NULL; 107 } 108 } 109} 110EXPORT_SYMBOL(lib80211_crypt_info_free); 111 |
|
74void lib80211_crypt_deinit_entries(struct lib80211_crypt_info *info, int force) 75{ 76 struct lib80211_crypt_data *entry, *next; 77 unsigned long flags; 78 79 spin_lock_irqsave(info->lock, flags); 80 list_for_each_entry_safe(entry, next, &info->crypt_deinit_list, list) { 81 if (atomic_read(&entry->refcnt) != 0 && !force) --- 165 unchanged lines hidden --- | 112void lib80211_crypt_deinit_entries(struct lib80211_crypt_info *info, int force) 113{ 114 struct lib80211_crypt_data *entry, *next; 115 unsigned long flags; 116 117 spin_lock_irqsave(info->lock, flags); 118 list_for_each_entry_safe(entry, next, &info->crypt_deinit_list, list) { 119 if (atomic_read(&entry->refcnt) != 0 && !force) --- 165 unchanged lines hidden --- |