Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66358
b: refs/heads/master
c: 8f37171
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and David S. Miller committed Oct 10, 2007
1 parent 6ff8e1b commit 5a7da3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f20fc24986a083228823d9b68adca20714b254e
refs/heads/master: 8f37171a6243a8370211a1e86d58be683ccf01f0
4 changes: 1 addition & 3 deletions trunk/net/mac80211/ieee80211_key.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define IEEE80211_KEY_H

#include <linux/types.h>
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/crypto.h>
#include <net/mac80211.h>

Expand Down Expand Up @@ -42,8 +42,6 @@
#define NUM_RX_DATA_QUEUES 17

struct ieee80211_key {
struct kref kref;

union {
struct {
/* last used TSC */
Expand Down
13 changes: 3 additions & 10 deletions trunk/net/mac80211/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,16 @@ struct ieee80211_key *ieee80211_key_alloc(struct ieee80211_sub_if_data *sdata,
key = kzalloc(sizeof(struct ieee80211_key) + key_len, flags);
if (!key)
return NULL;
kref_init(&key->kref);
return key;
}

static void ieee80211_key_release(struct kref *kref)
void ieee80211_key_free(struct ieee80211_key *key)
{
struct ieee80211_key *key;
if (!key)
return;

key = container_of(kref, struct ieee80211_key, kref);
if (key->conf.alg == ALG_CCMP)
ieee80211_aes_key_free(key->u.ccmp.tfm);
ieee80211_debugfs_key_remove(key);
kfree(key);
}

void ieee80211_key_free(struct ieee80211_key *key)
{
if (key)
kref_put(&key->kref, ieee80211_key_release);
}

0 comments on commit 5a7da3a

Please sign in to comment.