diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-05-28 05:53:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-06 15:18:18 -0400 |
commit | 6851dff3e6b858f2759fc9ecebc4ec608df81805 (patch) | |
tree | ed4f671d4771920ccdd12d8a81fa704ca4b3fc2a /drivers/net/wireless/rt2x00 | |
parent | 620a55687b20c23ca7b8d8560b0e8fb3ca13869a (diff) |
rt2x00: claim RSN IBSS support
Similar like other drivers, do not configure group keys to the hardware
(on Ad-Hoc mode) to make IBSS RSN work.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index e5404e576251..a6b88bd4a1a5 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -1161,6 +1161,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
1161 | BIT(NL80211_IFTYPE_MESH_POINT) | | 1161 | BIT(NL80211_IFTYPE_MESH_POINT) | |
1162 | BIT(NL80211_IFTYPE_WDS); | 1162 | BIT(NL80211_IFTYPE_WDS); |
1163 | 1163 | ||
1164 | rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; | ||
1165 | |||
1164 | /* | 1166 | /* |
1165 | * Initialize work. | 1167 | * Initialize work. |
1166 | */ | 1168 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index dd24b2663b5e..4ff26c2159bf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -506,9 +506,19 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
506 | 506 | ||
507 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) | 507 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) |
508 | return 0; | 508 | return 0; |
509 | else if (!test_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags)) | 509 | |
510 | if (!test_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags)) | ||
511 | return -EOPNOTSUPP; | ||
512 | |||
513 | /* | ||
514 | * To support IBSS RSN, don't program group keys in IBSS, the | ||
515 | * hardware will then not attempt to decrypt the frames. | ||
516 | */ | ||
517 | if (vif->type == NL80211_IFTYPE_ADHOC && | ||
518 | !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) | ||
510 | return -EOPNOTSUPP; | 519 | return -EOPNOTSUPP; |
511 | else if (key->keylen > 32) | 520 | |
521 | if (key->keylen > 32) | ||
512 | return -ENOSPC; | 522 | return -ENOSPC; |
513 | 523 | ||
514 | memset(&crypto, 0, sizeof(crypto)); | 524 | memset(&crypto, 0, sizeof(crypto)); |