diff options
| author | Jeff Johnson <jjohnson@qca.qualcomm.com> | 2015-08-17 18:18:25 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-08-24 17:55:25 +0530 |
| commit | a63b408d21fcb627b82dd90609c3b3bad123eb6d (patch) | |
| tree | 207b47ae2e872cace15427052975434d2617da64 | |
| parent | f45f5049a10ee080326bd470ad9b6a19d4497b2d (diff) | |
qcacld-2.0: SSR-protect iw_get_rts_threshold()
Currently iw_get_rts_threshold() 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: Ic2243e9670c2cadb9f80a6f70207001c9dc3ec9a
CRs-Fixed: 891029
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wext.c | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index 3889d501bb08..5a68294a90e3 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -2710,9 +2710,18 @@ static int iw_get_encode(struct net_device *dev, * This function sends a single 'key' to LIM at all time. */ -static int iw_get_rts_threshold(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) +/** + * __iw_get_rts_threshold() - SIOCGIWRTS 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_get_rts_threshold(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); v_U32_t status = 0; @@ -2723,6 +2732,28 @@ static int iw_get_rts_threshold(struct net_device *dev, } /** + * iw_get_rts_threshold() - SSR wrapper for __iw_get_rts_threshold() + * @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_get_rts_threshold(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __iw_get_rts_threshold(dev, info, wrqu, extra); + vos_ssr_unprotect(__func__); + + return ret; +} + +/** * __iw_set_rts_threshold() - SIOCSIWRTS ioctl handler * @dev: device upon which the ioctl was received * @info: ioctl request information |
