Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8f37171a6243a8370211a1e86d58be683ccf01f0
Commit:     8f37171a6243a8370211a1e86d58be683ccf01f0
Parent:     8f20fc24986a083228823d9b68adca20714b254e
Author:     Johannes Berg <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 17:01:54 2007 -0400
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:48:51 2007 -0700

    [MAC80211]: remove krefs for keys
    
    they aren't really refcounted anyway
    
    Signed-off-by: Johannes Berg <[EMAIL PROTECTED]>
    Acked-by: Michael Wu <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/mac80211/ieee80211_key.h |    4 +---
 net/mac80211/key.c           |   13 +++----------
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/net/mac80211/ieee80211_key.h b/net/mac80211/ieee80211_key.h
index 1b5e539..58e1925 100644
--- a/net/mac80211/ieee80211_key.h
+++ b/net/mac80211/ieee80211_key.h
@@ -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>
 
@@ -42,8 +42,6 @@
 #define NUM_RX_DATA_QUEUES 17
 
 struct ieee80211_key {
-       struct kref kref;
-
        union {
                struct {
                        /* last used TSC */
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 92d994f..843d157 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -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);
-}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to