summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@qca.qualcomm.com>2015-08-17 19:11:02 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-08-24 17:55:26 +0530
commitb444487fc56ee5e92bfaed66edd234ac86664056 (patch)
tree301225af9fd4fa89e23f821599ffc3e30da28877
parent57357d211e7d67d449f8a9ad697474da1691908c (diff)
qcacld-2.0: SSR-protect iw_set_retry()
Currently iw_set_retry() 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: I6ae60c02d5dccb00943f97b3dcdb2f245004d830 CRs-Fixed: 891029
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 1cd8b532692f..d0abcd219a62 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -4908,8 +4908,17 @@ static int iw_set_encodeext(struct net_device *dev,
return halStatus;
}
-static int iw_set_retry(struct net_device *dev, struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
+/**
+ * __iw_set_retry() - SIOCSIWRETRY ioctl handler
+ * @dev: device upon which the ioctl was received
+ * @info: ioctl request information
+ * @wrqu: ioctl request data
+ * @extra: ioctl extra data
+ *
+ * Return: 0 on success, non-zero on error
+ */
+static int __iw_set_retry(struct net_device *dev, struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
@@ -4965,6 +4974,27 @@ static int iw_set_retry(struct net_device *dev, struct iw_request_info *info,
}
+/**
+ * iw_set_retry() - SSR wrapper for __iw_set_retry()
+ * @dev: pointer to net_device
+ * @info: pointer to iw_request_info
+ * @wrqu: pointer to iwreq_data
+ * @extra: pointer to extra ioctl payload
+ *
+ * Return: 0 on success, error number otherwise
+ */
+static int iw_set_retry(struct net_device *dev, struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
+{
+ int ret;
+
+ vos_ssr_protect(__func__);
+ ret = __iw_set_retry(dev, info, wrqu, extra);
+ vos_ssr_unprotect(__func__);
+
+ return ret;
+}
+
static int iw_get_retry(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{