diff options
-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)); |