summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@qca.qualcomm.com>2015-11-13 11:26:14 -0800
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-11-20 15:15:51 +0530
commit4bfbefdab6e3ef5872f4ce1b56bc7d8107b85a90 (patch)
treef3cde8cb3fbda1c60c0291b0f39343b90a3d9e13
parentbf12b2761db30f62883f2924f197de5ef87fb8a7 (diff)
qcacld-2.0: Remove set_oem_data_req ioctl support
On qcacld-2.0 the OEM DATA application does not use the wext ioctl interface, but instead uses the netlink interface. Remove support for the set_oem_data_req ioctl so that it cannot be abused. Change-Id: I5642a93a25bce48b0f68e8549880ef41237fdf8c CRs-Fixed: 911404
-rw-r--r--CORE/HDD/inc/wlan_hdd_oemdata.h11
-rw-r--r--CORE/HDD/src/wlan_hdd_oemdata.c109
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c10
3 files changed, 1 insertions, 129 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_oemdata.h b/CORE/HDD/inc/wlan_hdd_oemdata.h
index 7751f85ae92f..78d3c99287c8 100644
--- a/CORE/HDD/inc/wlan_hdd_oemdata.h
+++ b/CORE/HDD/inc/wlan_hdd_oemdata.h
@@ -158,17 +158,6 @@ typedef PACKED_PRE struct PACKED_POST
tHddChannelInfo peer_chan_info;
} tPeerStatusInfo;
-struct iw_oem_data_req
-{
- v_U8_t oemDataReq[OEM_DATA_REQ_SIZE];
-};
-
-int iw_set_oem_data_req(
- struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra);
-
int iw_get_oem_data_rsp(
struct net_device *dev,
struct iw_request_info *info,
diff --git a/CORE/HDD/src/wlan_hdd_oemdata.c b/CORE/HDD/src/wlan_hdd_oemdata.c
index 1aef25740130..eac50d3ca555 100644
--- a/CORE/HDD/src/wlan_hdd_oemdata.c
+++ b/CORE/HDD/src/wlan_hdd_oemdata.c
@@ -174,115 +174,6 @@ int iw_get_oem_data_rsp(struct net_device *dev,
return ret;
}
-/**
- * __iw_set_oem_data_req() - set oem data req configuration.
- * @dev: pointer to net_device
- * @info: pointer to iw_request_info
- * @wrqu: pointer to iwreq_data
- * @extra: extra
- *
- * Return; 0 on success, error number otherwise
- */
-static int __iw_set_oem_data_req(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra)
-{
- int rc = 0;
- eHalStatus status = eHAL_STATUS_SUCCESS;
- struct iw_oem_data_req *pOemDataReq = NULL;
- tOemDataReqConfig oemDataReqConfig;
-
- tANI_U32 oemDataReqID = 0;
-
- hdd_adapter_t *pAdapter = (netdev_priv(dev));
- hdd_wext_state_t *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
-
- ENTER();
-
- if (!capable(CAP_NET_ADMIN)) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("permission check failed"));
- return -EPERM;
- }
-
- if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s:LOGP in Progress. Ignore!!!",__func__);
- return -EBUSY;
- }
-
- do
- {
- if (NULL != wrqu->data.pointer)
- {
- pOemDataReq = (struct iw_oem_data_req *)wrqu->data.pointer;
- }
-
- if (pOemDataReq == NULL)
- {
- hddLog(LOGE, "in %s oemDataReq == NULL", __func__);
- rc = -EIO;
- break;
- }
-
- vos_mem_zero(&oemDataReqConfig, sizeof(tOemDataReqConfig));
-
- if (copy_from_user((&oemDataReqConfig)->oemDataReq,
- pOemDataReq->oemDataReq, OEM_DATA_REQ_SIZE))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: copy_from_user() failed!", __func__);
- rc = -EFAULT;
- break;
- }
-
- status = sme_OemDataReq(WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId,
- &oemDataReqConfig,
- &oemDataReqID,
- &hdd_OemDataReqCallback,
- dev);
- if (status != eHAL_STATUS_SUCCESS)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: sme_OemDataReq status %d", __func__, status);
- rc = -EFAULT;
- break;
- }
- pwextBuf->oemDataReqID = oemDataReqID;
- pwextBuf->oemDataReqInProgress = TRUE;
-
- } while (0);
- EXIT();
- return rc;
-}
-
-/**
- * iw_set_oem_data_req() - SSR wrapper for __iw_set_oem_data_req
- * @dev: pointer to net_device
- * @info: pointer to iw_request_info
- * @wrqu: pointer to iwreq_data
- * @extra: extra
- *
- * Return; 0 on success, error number otherwise
- */
-int iw_set_oem_data_req(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra)
-{
- int ret;
-
- vos_ssr_protect(__func__);
- ret = __iw_set_oem_data_req(dev, info, wrqu, extra);
- vos_ssr_unprotect(__func__);
-
- return ret;
-}
-
-
/**---------------------------------------------------------------------------
\brief iw_get_oem_data_cap()
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 7e420d1aca10..71fab19e8dc5 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -415,7 +415,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#ifdef FEATURE_OEM_DATA_SUPPORT
/* Private ioctls for setting the measurement configuration */
-#define WLAN_PRIV_SET_OEM_DATA_REQ (SIOCIWFIRSTPRIV + 17)
+/* (SIOCIWFIRSTPRIV + 17) is currently unused */
#define WLAN_PRIV_GET_OEM_DATA_RSP (SIOCIWFIRSTPRIV + 19)
#endif
@@ -11183,7 +11183,6 @@ static const iw_handler we_private[] = {
[WLAN_PRIV_DEL_TSPEC - SIOCIWFIRSTPRIV] = iw_del_tspec,
[WLAN_PRIV_GET_TSPEC - SIOCIWFIRSTPRIV] = iw_get_tspec,
#ifdef FEATURE_OEM_DATA_SUPPORT
- [WLAN_PRIV_SET_OEM_DATA_REQ - SIOCIWFIRSTPRIV] = iw_set_oem_data_req, //oem data req Specifc
[WLAN_PRIV_GET_OEM_DATA_RSP - SIOCIWFIRSTPRIV] = iw_get_oem_data_rsp, //oem data req Specifc
#endif
@@ -12203,13 +12202,6 @@ static const struct iw_priv_args we_private_args[] = {
#ifdef FEATURE_OEM_DATA_SUPPORT
/* handlers for main ioctl - OEM DATA */
{
- WLAN_PRIV_SET_OEM_DATA_REQ,
- IW_PRIV_TYPE_BYTE | sizeof(struct iw_oem_data_req) | IW_PRIV_SIZE_FIXED,
- 0,
- "set_oem_data_req" },
-
- /* handlers for main ioctl - OEM DATA */
- {
WLAN_PRIV_GET_OEM_DATA_RSP,
0,
IW_PRIV_TYPE_BYTE | MAX_OEM_DATA_RSP_LEN,