aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-24 10:45:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-24 10:45:43 -0400
commita69eee4988752c7196677958b4ed8f4c2b28499a (patch)
treeb676b8a05e10f5003d17091fc7085fad29910702
parent3e766fd41ddc31c47ec5b2840c6a45803d35ff40 (diff)
Revert "ath9k: Group Key fix for VAPs"
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>
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c28
-rw-r--r--include/net/mac80211.h1
-rw-r--r--net/mac80211/key.c1
3 files changed, 3 insertions, 27 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 893b552981a0..abfa0493236f 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -752,7 +752,6 @@ static int ath_key_config(struct ath_common *common,
752 struct ath_hw *ah = common->ah; 752 struct ath_hw *ah = common->ah;
753 struct ath9k_keyval hk; 753 struct ath9k_keyval hk;
754 const u8 *mac = NULL; 754 const u8 *mac = NULL;
755 u8 gmac[ETH_ALEN];
756 int ret = 0; 755 int ret = 0;
757 int idx; 756 int idx;
758 757
@@ -776,30 +775,9 @@ static int ath_key_config(struct ath_common *common,
776 memcpy(hk.kv_val, key->key, key->keylen); 775 memcpy(hk.kv_val, key->key, key->keylen);
777 776
778 if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { 777 if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
779 778 /* For now, use the default keys for broadcast keys. This may
780 if (key->ap_addr) { 779 * need to change with virtual interfaces. */
781 /* 780 idx = key->keyidx;
782 * Group keys on hardware that supports multicast frame
783 * key search use a mac that is the sender's address with
784 * the high bit set instead of the app-specified address.
785 */
786 memcpy(gmac, key->ap_addr, ETH_ALEN);
787 gmac[0] |= 0x80;
788 mac = gmac;
789
790 if (key->alg == ALG_TKIP)
791 idx = ath_reserve_key_cache_slot_tkip(common);
792 else
793 idx = ath_reserve_key_cache_slot(common);
794 if (idx < 0)
795 mac = NULL; /* no free key cache entries */
796 }
797
798 if (!mac) {
799 /* For now, use the default keys for broadcast keys. This may
800 * need to change with virtual interfaces. */
801 idx = key->keyidx;
802 }
803 } else if (key->keyidx) { 781 } else if (key->keyidx) {
804 if (WARN_ON(!sta)) 782 if (WARN_ON(!sta))
805 return -EOPNOTSUPP; 783 return -EOPNOTSUPP;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5be900d19660..e24b0363e6cb 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -831,7 +831,6 @@ struct ieee80211_key_conf {
831 u8 iv_len; 831 u8 iv_len;
832 u8 hw_key_idx; 832 u8 hw_key_idx;
833 u8 flags; 833 u8 flags;
834 u8 *ap_addr;
835 s8 keyidx; 834 s8 keyidx;
836 u8 keylen; 835 u8 keylen;
837 u8 key[0]; 836 u8 key[0];
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 8d4b41787dcf..e8f6e3b252d8 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -140,7 +140,6 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
140 struct ieee80211_sub_if_data, 140 struct ieee80211_sub_if_data,
141 u.ap); 141 u.ap);
142 142
143 key->conf.ap_addr = sdata->dev->dev_addr;
144 ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf); 143 ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf);
145 144
146 if (!ret) { 145 if (!ret) {