diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/mac80211-ops.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/mac80211-ops.c | 8 |
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, | |||
483 | if (ath5k_modparam_nohwcrypt) | 483 | if (ath5k_modparam_nohwcrypt) |
484 | return -EOPNOTSUPP; | 484 | return -EOPNOTSUPP; |
485 | 485 | ||
486 | if (vif->type == NL80211_IFTYPE_ADHOC && | ||
487 | (key->cipher == WLAN_CIPHER_SUITE_TKIP || | ||
488 | key->cipher == WLAN_CIPHER_SUITE_CCMP) && | ||
489 | !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { | ||
490 | /* don't program group keys when using IBSS_RSN */ | ||
491 | return -EOPNOTSUPP; | ||
492 | } | ||
493 | |||
486 | switch (key->cipher) { | 494 | switch (key->cipher) { |
487 | case WLAN_CIPHER_SUITE_WEP40: | 495 | case WLAN_CIPHER_SUITE_WEP40: |
488 | case WLAN_CIPHER_SUITE_WEP104: | 496 | case WLAN_CIPHER_SUITE_WEP104: |