diff options
| author | Jeff Johnson <jjohnson@qca.qualcomm.com> | 2015-08-12 19:08:29 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-08-14 13:29:19 +0530 |
| commit | 8ad373ff2ef842737d56ef878dea2035d33675d2 (patch) | |
| tree | a88a44a06f2c83d63d305e2bcb798253931b71e1 | |
| parent | 5f87bad58be0395007e8232b5517b9d3938ba532 (diff) | |
qcacld-2.0: SSR-protect wlan_hdd_cfg80211_keymgmt_set_key()
Currently wlan_hdd_cfg80211_keymgmt_set_key() does not use the SSR
protection wrapper. This can lead to unexpected behavior if the
function is executing concurrently with SSR, so add the SSR protection
wrapper.
Change-Id: Iec0f6d4a01f8244d420a80db89201012f53a28c2
CRs-Fixed: 889507
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index a8138de58268..d7628cb17e37 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -6613,7 +6613,7 @@ static int wlan_hdd_cfg80211_ll_stats_clear(struct wiphy *wiphy, #ifdef WLAN_FEATURE_ROAM_OFFLOAD /** - * wlan_hdd_cfg80211_keymgmt_set_key() - Store the Keys in the driver session + * __wlan_hdd_cfg80211_keymgmt_set_key() - Store the Keys in the driver session * @wiphy: pointer to wireless wiphy structure. * @wdev: pointer to wireless_dev structure. * @data: Pointer to the Key data @@ -6624,7 +6624,7 @@ static int wlan_hdd_cfg80211_ll_stats_clear(struct wiphy *wiphy, * * Return: Return the Success or Failure code. */ -static int wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy, +static int __wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy, struct wireless_dev *wdev, const void *data, int data_len) { @@ -6666,6 +6666,31 @@ static int wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy, return 0; } +/** + * wlan_hdd_cfg80211_keymgmt_set_key() - Store the Keys in the driver session + * @wiphy: pointer to wireless wiphy structure. + * @wdev: pointer to wireless_dev structure. + * @data: Pointer to the Key data + * @data_len:Length of the data passed + * + * This is called when wlan driver needs to save the keys received via + * vendor specific command. + * + * Return: Return the Success or Failure code. + */ +static int wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, int data_len) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __wlan_hdd_cfg80211_keymgmt_set_key(wiphy, wdev, data, data_len); + vos_ssr_unprotect(__func__); + + return ret; +} + static const struct nla_policy qca_wlan_vendor_get_wifi_info_policy[ |
