diff options
-rw-r--r-- | include/net/cfg80211.h | 5 | ||||
-rw-r--r-- | net/wireless/wext-compat.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 81a3bfa45471..389f1d20adf4 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -781,10 +781,11 @@ enum wiphy_params_flags { | |||
781 | * @get_key: get information about the key with the given parameters. | 781 | * @get_key: get information about the key with the given parameters. |
782 | * @mac_addr will be %NULL when requesting information for a group | 782 | * @mac_addr will be %NULL when requesting information for a group |
783 | * key. All pointers given to the @callback function need not be valid | 783 | * key. All pointers given to the @callback function need not be valid |
784 | * after it returns. | 784 | * after it returns. This function should return an error if it is |
785 | * not possible to retrieve the key, -ENOENT if it doesn't exist. | ||
785 | * | 786 | * |
786 | * @del_key: remove a key given the @mac_addr (%NULL for a group key) | 787 | * @del_key: remove a key given the @mac_addr (%NULL for a group key) |
787 | * and @key_index | 788 | * and @key_index, return -ENOENT if the key doesn't exist. |
788 | * | 789 | * |
789 | * @set_default_key: set the default key on an interface | 790 | * @set_default_key: set the default key on an interface |
790 | * | 791 | * |
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index f98090b90fbf..711e00a0c9b5 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -504,6 +504,13 @@ static int cfg80211_set_encryption(struct cfg80211_registered_device *rdev, | |||
504 | else if (idx == wdev->wext.default_mgmt_key) | 504 | else if (idx == wdev->wext.default_mgmt_key) |
505 | wdev->wext.default_mgmt_key = -1; | 505 | wdev->wext.default_mgmt_key = -1; |
506 | } | 506 | } |
507 | /* | ||
508 | * Applications using wireless extensions expect to be | ||
509 | * able to delete keys that don't exist, so allow that. | ||
510 | */ | ||
511 | if (err == -ENOENT) | ||
512 | return 0; | ||
513 | |||
507 | return err; | 514 | return err; |
508 | } else { | 515 | } else { |
509 | if (addr) | 516 | if (addr) |