diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-01-14 05:42:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:21:13 -0500 |
commit | f99725777e0f57e71f37191eee5f10071ed7b423 (patch) | |
tree | 6d4a027f89f828fa769632fb6f5f27b90ee67160 | |
parent | 6ae4bb6612c675d4132bd4fcc7cac4eef46f9624 (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>
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/mac80211-ops.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index d366dadcf86e..4ab835f08a43 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -2442,6 +2442,9 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops) | |||
2442 | BIT(NL80211_IFTYPE_ADHOC) | | 2442 | BIT(NL80211_IFTYPE_ADHOC) | |
2443 | BIT(NL80211_IFTYPE_MESH_POINT); | 2443 | BIT(NL80211_IFTYPE_MESH_POINT); |
2444 | 2444 | ||
2445 | /* SW support for IBSS_RSN is provided by mac80211 */ | ||
2446 | hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; | ||
2447 | |||
2445 | /* both antennas can be configured as RX or TX */ | 2448 | /* both antennas can be configured as RX or TX */ |
2446 | hw->wiphy->available_antennas_tx = 0x3; | 2449 | hw->wiphy->available_antennas_tx = 0x3; |
2447 | hw->wiphy->available_antennas_rx = 0x3; | 2450 | hw->wiphy->available_antennas_rx = 0x3; |
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: |