|
@@ -1128,6 +1128,35 @@ int hdd_priv_get_data(struct iw_point *p_priv_data, union iwreq_data *wrqu)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static int hdd_check_wext_control(enum hdd_wext_control wext_control,
|
|
|
+ struct iw_request_info *info)
|
|
|
+{
|
|
|
+ switch (wext_control) {
|
|
|
+ default:
|
|
|
+ case hdd_wext_disabled:
|
|
|
+ hdd_err("Rejecting disabled ioctl %x", info->cmd);
|
|
|
+ return -ENOTSUPP;
|
|
|
+ case hdd_wext_deprecated:
|
|
|
+ hdd_warn("Using deprecated ioctl %x", info->cmd);
|
|
|
+ return 0;
|
|
|
+ case hdd_wext_enabled:
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+int hdd_check_standard_wext_control(struct hdd_context_s *hdd_ctx,
|
|
|
+ struct iw_request_info *info)
|
|
|
+{
|
|
|
+ return hdd_check_wext_control(hdd_ctx->config->standard_wext_control,
|
|
|
+ info);
|
|
|
+}
|
|
|
+
|
|
|
+int hdd_check_private_wext_control(struct hdd_context_s *hdd_ctx,
|
|
|
+ struct iw_request_info *info)
|
|
|
+{
|
|
|
+ return hdd_check_wext_control(hdd_ctx->config->private_wext_control,
|
|
|
+ info);
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* hdd_wlan_get_stats() - Get txrx stats in SAP mode
|
|
@@ -2456,6 +2485,10 @@ static int __iw_set_commit(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
/* Do nothing for now */
|
|
|
return 0;
|
|
|
}
|
|
@@ -2505,6 +2538,10 @@ static int __iw_get_name(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
strlcpy(wrqu, "Qcom:802.11n", IFNAMSIZ);
|
|
|
EXIT();
|
|
|
return 0;
|
|
@@ -2561,6 +2598,10 @@ static int __iw_set_mode(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
|
|
wdev = dev->ieee80211_ptr;
|
|
|
pRoamProfile = &pWextState->roamProfile;
|
|
@@ -2669,6 +2710,10 @@ __iw_get_mode(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
|
|
|
|
|
switch (pWextState->roamProfile.BSSType) {
|
|
@@ -2743,6 +2788,10 @@ static int __iw_set_freq(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
|
|
|
|
|
pRoamProfile = &pWextState->roamProfile;
|
|
@@ -2867,6 +2916,10 @@ static int __iw_get_freq(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
|
|
hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
|
|
|
|
@@ -2948,6 +3001,10 @@ static int __iw_get_tx_power(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
|
|
|
wrqu->txpower.value = 0;
|
|
|
return 0;
|
|
@@ -3005,6 +3062,10 @@ static int __iw_set_tx_power(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (sme_cfg_set_int(hHal, WNI_CFG_CURRENT_TX_POWER_LEVEL,
|
|
|
wrqu->txpower.value) != QDF_STATUS_SUCCESS) {
|
|
|
hdd_err("failed to set ini parameter, WNI_CFG_CURRENT_TX_POWER_LEVEL");
|
|
@@ -3065,6 +3126,10 @@ static int __iw_get_bitrate(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
|
|
|
wrqu->bitrate.value = 0;
|
|
|
} else {
|
|
@@ -3160,6 +3225,10 @@ static int __iw_set_bitrate(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
|
|
|
|
|
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
|
|
@@ -3260,6 +3329,10 @@ static int __iw_set_genie(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (!wrqu->data.length) {
|
|
|
hdd_clear_roam_profile_ie(pAdapter);
|
|
|
EXIT();
|
|
@@ -3431,6 +3504,10 @@ static int __iw_get_genie(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
hdd_notice("getGEN_IE ioctl");
|
|
|
|
|
|
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
|
@@ -3522,6 +3599,10 @@ static int __iw_get_encode(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
keyId = pRoamProfile->Keys.defaultIndex;
|
|
|
|
|
|
if (keyId < 0 || keyId >= MAX_WEP_KEYS) {
|
|
@@ -3613,6 +3694,10 @@ static int __iw_get_rts_threshold(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (QDF_STATUS_SUCCESS !=
|
|
|
sme_cfg_get_int(hal, WNI_CFG_RTS_THRESHOLD, &threshold)) {
|
|
|
hdd_warn("failed to get ini parameter, WNI_CFG_RTS_THRESHOLD");
|
|
@@ -3652,6 +3737,10 @@ static int __iw_set_rts_threshold(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (wrqu->rts.value < WNI_CFG_RTS_THRESHOLD_STAMIN
|
|
|
|| wrqu->rts.value > WNI_CFG_RTS_THRESHOLD_STAMAX) {
|
|
|
return -EINVAL;
|
|
@@ -3738,6 +3827,10 @@ static int __iw_get_frag_threshold(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (sme_cfg_get_int(hal, WNI_CFG_FRAGMENTATION_THRESHOLD, &threshold)
|
|
|
!= QDF_STATUS_SUCCESS) {
|
|
|
hdd_warn("failed to get ini parameter, WNI_CFG_FRAGMENTATION_THRESHOLD");
|
|
@@ -3799,6 +3892,10 @@ static int __iw_set_frag_threshold(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (wrqu->frag.value < WNI_CFG_FRAGMENTATION_THRESHOLD_STAMIN
|
|
|
|| wrqu->frag.value > WNI_CFG_FRAGMENTATION_THRESHOLD_STAMAX) {
|
|
|
return -EINVAL;
|
|
@@ -3863,6 +3960,10 @@ static int __iw_get_power_mode(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
return -EOPNOTSUPP;
|
|
|
}
|
|
|
|
|
@@ -3913,6 +4014,10 @@ static int __iw_set_power_mode(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
return -EOPNOTSUPP;
|
|
|
}
|
|
|
|
|
@@ -3972,6 +4077,10 @@ static int __iw_get_range(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
wrqu->data.length = sizeof(struct iw_range);
|
|
|
memset(range, 0, sizeof(struct iw_range));
|
|
|
|
|
@@ -4384,18 +4493,23 @@ static int __iw_get_linkspeed(struct net_device *dev,
|
|
|
int len = sizeof(uint32_t) + 1;
|
|
|
uint32_t link_speed = 0;
|
|
|
hdd_context_t *hdd_ctx;
|
|
|
- int rc, valid;
|
|
|
+ int ret;
|
|
|
+ int rc;
|
|
|
|
|
|
ENTER_DEV(dev);
|
|
|
|
|
|
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
|
|
- valid = wlan_hdd_validate_context(hdd_ctx);
|
|
|
- if (0 != valid)
|
|
|
- return valid;
|
|
|
+ ret = wlan_hdd_validate_context(hdd_ctx);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
|
|
|
- rc = wlan_hdd_get_link_speed(pAdapter, &link_speed);
|
|
|
- if (0 != rc) {
|
|
|
- return rc;
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
+ ret = wlan_hdd_get_link_speed(pAdapter, &link_speed);
|
|
|
+ if (0 != ret) {
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
wrqu->data.length = len;
|
|
@@ -4476,6 +4590,10 @@ static int __iw_set_nick(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -4526,6 +4644,10 @@ static int __iw_get_nick(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -4582,6 +4704,10 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
keyId = encoderq->flags & IW_ENCODE_INDEX;
|
|
|
|
|
|
if (keyId) {
|
|
@@ -4762,6 +4888,10 @@ static int __iw_get_encodeext(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
keyId = pRoamProfile->Keys.defaultIndex;
|
|
|
|
|
|
if (keyId < 0 || keyId >= MAX_WEP_KEYS) {
|
|
@@ -4865,6 +4995,10 @@ static int __iw_set_encodeext(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
key_index = encoding->flags & IW_ENCODE_INDEX;
|
|
|
|
|
|
if (key_index > 0) {
|
|
@@ -5070,6 +5204,10 @@ static int __iw_set_retry(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (wrqu->retry.value < WNI_CFG_LONG_RETRY_LIMIT_STAMIN ||
|
|
|
wrqu->retry.value > WNI_CFG_LONG_RETRY_LIMIT_STAMAX) {
|
|
|
|
|
@@ -5153,6 +5291,10 @@ static int __iw_get_retry(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if ((wrqu->retry.flags & IW_RETRY_LONG)) {
|
|
|
wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
|
|
|
|
|
@@ -5232,6 +5374,10 @@ static int __iw_set_mlme(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_standard_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
/* reason_code is unused. By default it is set to
|
|
|
* eCSR_DISCONNECT_REASON_UNSPECIFIED
|
|
|
*/
|
|
@@ -5716,14 +5862,18 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|
|
|
|
|
ENTER_DEV(dev);
|
|
|
|
|
|
- INIT_COMPLETION(pWextState->completion_var);
|
|
|
- memset(&smeConfig, 0x00, sizeof(smeConfig));
|
|
|
-
|
|
|
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
|
|
ret = wlan_hdd_validate_context(hdd_ctx);
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
+ INIT_COMPLETION(pWextState->completion_var);
|
|
|
+ memset(&smeConfig, 0x00, sizeof(smeConfig));
|
|
|
+
|
|
|
switch (sub_cmd) {
|
|
|
case WE_SET_11D_STATE:
|
|
|
{
|
|
@@ -6843,6 +6993,10 @@ static int __iw_setnone_get_threeint(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
hdd_info("param = %d", value[0]);
|
|
|
switch (value[0]) {
|
|
|
case WE_GET_TSF:
|
|
@@ -6911,6 +7065,10 @@ static int __iw_setchar_getnone(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
/* helper function to get iwreq_data with compat handling. */
|
|
|
if (hdd_priv_get_data(&s_priv_data, wrqu)) {
|
|
|
return -EINVAL;
|
|
@@ -7039,6 +7197,10 @@ static int __iw_setnone_getint(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
switch (value[0]) {
|
|
|
case WE_GET_11D_STATE:
|
|
|
{
|
|
@@ -7584,6 +7746,10 @@ static int __iw_set_three_ints_getnone(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
switch (sub_cmd) {
|
|
|
|
|
|
case WE_SET_WLAN_DBG:
|
|
@@ -7701,6 +7867,10 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
switch (sub_cmd) {
|
|
|
case WE_WLAN_VERSION:
|
|
|
{
|
|
@@ -8246,6 +8416,10 @@ static int __iw_setnone_getnone(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
#ifdef CONFIG_COMPAT
|
|
|
/* this ioctl is a special case where a sub-ioctl is used and both
|
|
|
* the number of get and set args is 0. in this specific case the
|
|
@@ -8553,10 +8727,9 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
- if (extra == NULL) {
|
|
|
- hdd_err("NULL extra buffer pointer");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
|
|
|
sub_cmd = wrqu->data.flags;
|
|
|
num_args = wrqu->data.length;
|
|
@@ -8907,6 +9080,10 @@ static int __iw_add_tspec(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
/* make sure the application is sufficiently priviledged */
|
|
|
/* note that the kernel will do this for "set" ioctls, but since */
|
|
|
/* this ioctl wants to return status to user space it must be */
|
|
@@ -9078,6 +9255,10 @@ static int __iw_del_tspec(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
/* make sure the application is sufficiently priviledged */
|
|
|
/* note that the kernel will do this for "set" ioctls, but since */
|
|
|
/* this ioctl wants to return status to user space it must be */
|
|
@@ -9142,6 +9323,10 @@ static int __iw_get_tspec(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
/* although we are defined to be a "get" ioctl, the params we require */
|
|
|
/* will fit in the iwreq_data, therefore unlike iw_add_tspec() there */
|
|
|
/* is no need to copy the params from user space */
|
|
@@ -9200,6 +9385,10 @@ static int __iw_set_fties(struct net_device *dev, struct iw_request_info *info,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (!wrqu->data.length) {
|
|
|
hdd_err("called with 0 length IEs");
|
|
|
return -EINVAL;
|
|
@@ -9291,6 +9480,10 @@ static int __iw_set_host_offload(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (!hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))) {
|
|
|
hdd_err("dev is not in CONNECTED state, ignore!!!");
|
|
|
return -EINVAL;
|
|
@@ -9398,6 +9591,10 @@ static int __iw_set_keepalive_params(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (wrqu->data.length != sizeof(*request)) {
|
|
|
hdd_err("Invalid length %d", wrqu->data.length);
|
|
|
return -EINVAL;
|
|
@@ -9631,6 +9828,10 @@ static int __iw_set_packet_filter_params(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (hdd_priv_get_data(&priv_data, wrqu)) {
|
|
|
hdd_err("failed to get priv data");
|
|
|
return -EINVAL;
|
|
@@ -9704,6 +9905,10 @@ static int __iw_get_statistics(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
if (eConnectionState_Associated !=
|
|
|
(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState) {
|
|
|
|
|
@@ -9948,6 +10153,10 @@ static int __iw_set_pno(struct net_device *dev,
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
hdd_notice("PNO data len %d data %s", wrqu->data.length, extra);
|
|
|
|
|
|
request.enable = 0;
|
|
@@ -10287,6 +10496,9 @@ static int __iw_set_band_config(struct net_device *dev,
|
|
|
struct iw_request_info *info,
|
|
|
union iwreq_data *wrqu, char *extra)
|
|
|
{
|
|
|
+ hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
|
|
+ hdd_context_t *hdd_ctx;
|
|
|
+ int ret;
|
|
|
int *value = (int *)extra;
|
|
|
|
|
|
ENTER_DEV(dev);
|
|
@@ -10296,6 +10508,11 @@ static int __iw_set_band_config(struct net_device *dev,
|
|
|
return -EPERM;
|
|
|
}
|
|
|
|
|
|
+ hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
return hdd_set_band(dev, value[0]);
|
|
|
}
|
|
|
|
|
@@ -10376,6 +10593,10 @@ static int __iw_set_two_ints_getnone(struct net_device *dev,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ ret = hdd_check_private_wext_control(hdd_ctx, info);
|
|
|
+ if (0 != ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
switch (sub_cmd) {
|
|
|
case WE_SET_SMPS_PARAM:
|
|
|
hdd_notice("WE_SET_SMPS_PARAM val %d %d", value[1], value[2]);
|