summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/mac80211-ops.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-01-14 11:42:43 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:21:13 -0500
commitf99725777e0f57e71f37191eee5f10071ed7b423 (patch)
tree6d4a027f89f828fa769632fb6f5f27b90ee67160 /drivers/net/wireless/ath/ath5k/mac80211-ops.c
parent6ae4bb6612c675d4132bd4fcc7cac4eef46f9624 (diff)
ath5k: claim support for IBSS RSN
Disable group keys programming when using IBSS RSN. Keys will be managed using software. In this way IBSS RSN can correctly work. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/mac80211-ops.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/mac80211-ops.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 6ed4c0717e3e..af4c7ecb4b30 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -483,6 +483,14 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
if (ath5k_modparam_nohwcrypt)
return -EOPNOTSUPP;
+ if (vif->type == NL80211_IFTYPE_ADHOC &&
+ (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
+ key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
+ !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
+ /* don't program group keys when using IBSS_RSN */
+ return -EOPNOTSUPP;
+ }
+
switch (key->cipher) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104: