Revert "ath9k: Group Key fix for VAPs"
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 24 May 2010 14:45:43 +0000 (07:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 24 May 2010 14:45:43 +0000 (07:45 -0700)
This reverts commit 03ceedea972a82d343fa5c2528b3952fa9e615d5, since it
breaks resume from suspend-to-ram on Rafael's Acer Ferrari One.
NetworkManager thinks everything is ok, but it can't connect to the AP
to get an IP address after the resume.

In fact, it even breaks resume for non-ath9k chipsets: reverting it also
fixes Rafael's Toshiba Protege R500 with the iwlagn driver.  As Johannes
says:

  "Indeed, this patch needs to be reverted. That mac80211 change is wrong
   and completely unnecessary."

Reported-and-requested-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Daniel Yingqiang Ma <yma.cool@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/wireless/ath/ath9k/main.c
include/net/mac80211.h
net/mac80211/key.c

index 893b552981a07494413288064dd9601be1e3373e..abfa0493236f5a8c5f785d0126a26c9c0cba45bc 100644 (file)
@@ -752,7 +752,6 @@ static int ath_key_config(struct ath_common *common,
        struct ath_hw *ah = common->ah;
        struct ath9k_keyval hk;
        const u8 *mac = NULL;
-       u8 gmac[ETH_ALEN];
        int ret = 0;
        int idx;
 
@@ -776,30 +775,9 @@ static int ath_key_config(struct ath_common *common,
        memcpy(hk.kv_val, key->key, key->keylen);
 
        if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
-
-               if (key->ap_addr) {
-                       /*
-                        * Group keys on hardware that supports multicast frame
-                        * key search use a mac that is the sender's address with
-                        * the high bit set instead of the app-specified address.
-                        */
-                       memcpy(gmac, key->ap_addr, ETH_ALEN);
-                       gmac[0] |= 0x80;
-                       mac = gmac;
-
-                       if (key->alg == ALG_TKIP)
-                               idx = ath_reserve_key_cache_slot_tkip(common);
-                       else
-                               idx = ath_reserve_key_cache_slot(common);
-                       if (idx < 0)
-                               mac = NULL; /* no free key cache entries */
-               }
-
-               if (!mac) {
-                       /* For now, use the default keys for broadcast keys. This may
-                        * need to change with virtual interfaces. */
-                       idx = key->keyidx;
-               }
+               /* For now, use the default keys for broadcast keys. This may
+                * need to change with virtual interfaces. */
+               idx = key->keyidx;
        } else if (key->keyidx) {
                if (WARN_ON(!sta))
                        return -EOPNOTSUPP;
index 5be900d19660543adfbd040bc9abfe42f1e78fdb..e24b0363e6cb20616118f4376d0199a250b15543 100644 (file)
@@ -831,7 +831,6 @@ struct ieee80211_key_conf {
        u8 iv_len;
        u8 hw_key_idx;
        u8 flags;
-       u8 *ap_addr;
        s8 keyidx;
        u8 keylen;
        u8 key[0];
index 8d4b41787dcf5146b94267a4aff7c8025b4a21c0..e8f6e3b252d8b8ee3ef4210695dfc44283534bc4 100644 (file)
@@ -140,7 +140,6 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
                                     struct ieee80211_sub_if_data,
                                     u.ap);
 
-       key->conf.ap_addr = sdata->dev->dev_addr;
        ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf);
 
        if (!ret) {