mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Clean up of external range validation for Boolean type
BOOLEAN is native c type so external range validation is not needed. Cleanup references to cfg_in_range(), cfg_min and cfg_max for BOOLEAN items Change-Id: I4a60d1bbd12ad3cce00b33c551b3927b2f01f638 CRs-Fixed: 2359500
This commit is contained in:
parent
278ad9746b
commit
89780bfc35
3 changed files with 1 additions and 57 deletions
|
|
@ -1361,11 +1361,6 @@ QDF_STATUS ucfg_mlme_set_ibss_auto_bssid(struct wlan_objmgr_psoc *psoc,
|
|||
mlme_err("MLME Obj null on get IBSS config");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
if (!cfg_in_range(CFG_IBSS_AUTO_BSSID, auto_bssid)) {
|
||||
mlme_err("Invalid IBSS Auto BSSID control value: %d",
|
||||
auto_bssid);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
mlme_obj->cfg.ibss.auto_bssid = auto_bssid;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3188,15 +3188,6 @@ static int drv_cmd_set_roam_mode(struct hdd_adapter *adapter,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!cfg_in_range(CFG_LFR_FEATURE_ENABLED, roam_mode)) {
|
||||
hdd_err("Roam Mode value %d is out of range (Min: %d Max: %d)",
|
||||
roam_mode,
|
||||
cfg_min(CFG_LFR_FEATURE_ENABLED),
|
||||
cfg_max(CFG_LFR_FEATURE_ENABLED));
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
hdd_debug("Received Command to Set Roam Mode = %d",
|
||||
roam_mode);
|
||||
/*
|
||||
|
|
@ -3809,13 +3800,6 @@ static int drv_cmd_set_roam_intra_band(struct hdd_adapter *adapter,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!cfg_in_range(CFG_LFR_ROAM_INTRA_BAND, val)) {
|
||||
hdd_err("intra band mode value %d is out of range (Min: %d Max: %d)",
|
||||
val, cfg_min(CFG_LFR_ROAM_INTRA_BAND),
|
||||
cfg_max(CFG_LFR_ROAM_INTRA_BAND));
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
hdd_debug("Received Command to change intra band = %d",
|
||||
val);
|
||||
|
||||
|
|
@ -4027,14 +4011,6 @@ static int drv_cmd_set_wes_mode(struct hdd_adapter *adapter,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!cfg_in_range(CFG_LFR_ENABLE_WES_MODE, wes_mode)) {
|
||||
hdd_err("WES Mode value %d is out of range (Min: %d Max: %d)",
|
||||
wes_mode, cfg_min(CFG_LFR_ENABLE_WES_MODE),
|
||||
cfg_max(CFG_LFR_ENABLE_WES_MODE));
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
hdd_debug("Received Command to Set WES Mode rssi diff = %d", wes_mode);
|
||||
|
||||
sme_update_wes_mode(hdd_ctx->mac_handle, wes_mode, adapter->vdev_id);
|
||||
|
|
@ -4207,14 +4183,6 @@ static int drv_cmd_set_fast_roam(struct hdd_adapter *adapter,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!cfg_in_range(CFG_LFR_FEATURE_ENABLED, lfr_mode)) {
|
||||
hdd_err("lfr mode value %d is out of range (Min: %d Max: %d)",
|
||||
lfr_mode, cfg_min(CFG_LFR_FEATURE_ENABLED),
|
||||
cfg_max(CFG_LFR_FEATURE_ENABLED));
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
hdd_debug("Received Command to change lfr mode = %d",
|
||||
lfr_mode);
|
||||
|
||||
|
|
@ -4254,14 +4222,6 @@ static int drv_cmd_set_fast_transition(struct hdd_adapter *adapter,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!cfg_in_range(CFG_LFR_FAST_TRANSITION_ENABLED, ft)) {
|
||||
hdd_err("ft mode value %d is out of range (Min: %d Max: %d)",
|
||||
ft, cfg_min(CFG_LFR_FAST_TRANSITION_ENABLED),
|
||||
cfg_max(CFG_LFR_FAST_TRANSITION_ENABLED));
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
hdd_debug("Received Command to change ft mode = %d", ft);
|
||||
|
||||
ucfg_mlme_set_fast_transition_enabled(hdd_ctx->psoc, (bool)ft);
|
||||
|
|
@ -5720,13 +5680,6 @@ static int drv_cmd_set_ccx_mode(struct hdd_adapter *adapter,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!cfg_in_range(CFG_LFR_ESE_FEATURE_ENABLED, ese_mode)) {
|
||||
hdd_err("Ese mode value %d is out of range (Min: %d Max: %d)",
|
||||
ese_mode, cfg_min(CFG_LFR_ESE_FEATURE_ENABLED),
|
||||
cfg_max(CFG_LFR_ESE_FEATURE_ENABLED));
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
hdd_debug("Received Command to change ese mode = %d", ese_mode);
|
||||
|
||||
sme_update_is_ese_feature_enabled(mac_handle,
|
||||
|
|
|
|||
|
|
@ -11382,11 +11382,7 @@ int sme_update_he_om_ctrl_supp(mac_handle_t mac_handle, uint8_t session_id,
|
|||
sme_err("No session for id %d", session_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (cfg_in_range(CFG_HE_OMI, cfg_val))
|
||||
mac_ctx->mlme_cfg->he_caps.dot11_he_cap.omi_a_ctrl =
|
||||
cfg_val;
|
||||
else
|
||||
return -EINVAL;
|
||||
mac_ctx->mlme_cfg->he_caps.dot11_he_cap.omi_a_ctrl = cfg_val;
|
||||
|
||||
csr_update_session_he_cap(mac_ctx, session);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue