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>
This commit is contained in:
parent
620a55687b
commit
6851dff3e6
@ -1161,6 +1161,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
|
||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
BIT(NL80211_IFTYPE_WDS);
|
||||
|
||||
rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
|
||||
|
||||
/*
|
||||
* Initialize work.
|
||||
*/
|
||||
|
@ -506,9 +506,19 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
||||
|
||||
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
||||
return 0;
|
||||
else if (!test_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags))
|
||||
|
||||
if (!test_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags))
|
||||
return -EOPNOTSUPP;
|
||||
else if (key->keylen > 32)
|
||||
|
||||
/*
|
||||
* To support IBSS RSN, don't program group keys in IBSS, the
|
||||
* hardware will then not attempt to decrypt the frames.
|
||||
*/
|
||||
if (vif->type == NL80211_IFTYPE_ADHOC &&
|
||||
!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (key->keylen > 32)
|
||||
return -ENOSPC;
|
||||
|
||||
memset(&crypto, 0, sizeof(crypto));
|
||||
|
Loading…
x
Reference in New Issue
Block a user