mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Remove hdd_nla_parse* wrappers
Instead of maintaining two sets of nla_parse wrappers, update HDD to reference the nla_parse wrappers defined in the wlan_cfg80211 component. Change-Id: Ic0701f47fbc524fcaea623934f447142d39a5b77 CRs-Fixed: 2168630
This commit is contained in:
parent
bab8af920c
commit
4ea21dbcf5
12 changed files with 249 additions and 232 deletions
|
|
@ -2761,50 +2761,17 @@ static inline void hdd_update_hlp_info(struct net_device *dev,
|
|||
{}
|
||||
#endif
|
||||
|
||||
#undef nla_parse
|
||||
#undef nla_parse_nested
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
||||
static inline void hdd_dev_setup_destructor(struct net_device *dev)
|
||||
{
|
||||
dev->destructor = free_netdev;
|
||||
}
|
||||
|
||||
static inline int
|
||||
hdd_nla_parse(struct nlattr **tb, int maxtype, const struct nlattr *head,
|
||||
int len, const struct nla_policy *policy)
|
||||
{
|
||||
return nla_parse(tb, maxtype, head, len, policy);
|
||||
}
|
||||
|
||||
static inline int
|
||||
hdd_nla_parse_nested(struct nlattr *tb[], int maxtype, const struct nlattr *nla,
|
||||
const struct nla_policy *policy)
|
||||
{
|
||||
return nla_parse_nested(tb, maxtype, nla, policy);
|
||||
}
|
||||
#else
|
||||
static inline void hdd_dev_setup_destructor(struct net_device *dev)
|
||||
{
|
||||
dev->needs_free_netdev = true;
|
||||
}
|
||||
|
||||
static inline int
|
||||
hdd_nla_parse(struct nlattr **tb, int maxtype, const struct nlattr *head,
|
||||
int len, const struct nla_policy *policy)
|
||||
{
|
||||
return nla_parse(tb, maxtype, head, len, policy, NULL);
|
||||
}
|
||||
|
||||
static inline int
|
||||
hdd_nla_parse_nested(struct nlattr *tb[], int maxtype, const struct nlattr *nla,
|
||||
const struct nla_policy *policy)
|
||||
{
|
||||
return nla_parse_nested(tb, maxtype, nla, policy, NULL);
|
||||
}
|
||||
#endif /* KERNEL_VERSION(4, 12, 0) */
|
||||
#define nla_parse(...) (obsolete, use wlan_cfg80211_nla_parse or hdd_nla_parse)
|
||||
#define nla_parse_nested(...) \
|
||||
(obsolete, use wlan_cfg80211_nla_parse_nested or hdd_nla_parse_nested)
|
||||
|
||||
/**
|
||||
* hdd_dp_trace_init() - initialize DP Trace by calling the QDF API
|
||||
|
|
|
|||
|
|
@ -2550,8 +2550,9 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|||
qdf_mem_free(sap_config->acs_cfg.ch_list);
|
||||
qdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
|
||||
|
||||
status = hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_MAX, data, data_len,
|
||||
wlan_hdd_cfg80211_do_acs_policy);
|
||||
status = wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_MAX, data,
|
||||
data_len,
|
||||
wlan_hdd_cfg80211_do_acs_policy);
|
||||
if (status) {
|
||||
hdd_err("Invalid ATTR");
|
||||
goto out;
|
||||
|
|
@ -3163,8 +3164,9 @@ __wlan_hdd_cfg80211_set_scanning_mac_oui(struct wiphy *wiphy,
|
|||
* audit note: it is ok to pass a NULL policy here since only
|
||||
* one attribute is parsed and it is explicitly validated
|
||||
*/
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SET_SCANNING_MAC_OUI_MAX,
|
||||
data, data_len, NULL)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_SET_SCANNING_MAC_OUI_MAX,
|
||||
data, data_len, NULL)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -3281,8 +3283,8 @@ static int __wlan_hdd_cfg80211_get_concurrency_matrix(struct wiphy *wiphy,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (hdd_nla_parse(tb, MAX_CONCURRENT_MATRIX, data, data_len,
|
||||
wlan_hdd_get_concurrency_matrix_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, MAX_CONCURRENT_MATRIX, data, data_len,
|
||||
wlan_hdd_get_concurrency_matrix_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -3611,12 +3613,12 @@ static int hdd_set_white_list(struct hdd_context *hddctx,
|
|||
if (count && tb[PARAM_SSID_LIST]) {
|
||||
nla_for_each_nested(curr_attr,
|
||||
tb[PARAM_SSID_LIST], rem) {
|
||||
if (hdd_nla_parse(tb2,
|
||||
QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_MAX,
|
||||
nla_data(curr_attr),
|
||||
nla_len(curr_attr),
|
||||
wlan_hdd_set_roam_param_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
if (wlan_cfg80211_nla_parse(tb2,
|
||||
QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_MAX,
|
||||
nla_data(curr_attr),
|
||||
nla_len(curr_attr),
|
||||
wlan_hdd_set_roam_param_policy)) {
|
||||
hdd_err("nla_parse failed");
|
||||
goto fail;
|
||||
}
|
||||
/* Parse and Fetch allowed SSID list*/
|
||||
|
|
@ -3708,11 +3710,12 @@ static int hdd_set_bssid_prefs(struct hdd_context *hddctx,
|
|||
break;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb2,
|
||||
QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_MAX,
|
||||
nla_data(curr_attr), nla_len(curr_attr),
|
||||
wlan_hdd_set_roam_param_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
if (wlan_cfg80211_nla_parse(tb2,
|
||||
QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_MAX,
|
||||
nla_data(curr_attr),
|
||||
nla_len(curr_attr),
|
||||
wlan_hdd_set_roam_param_policy)) {
|
||||
hdd_err("nla_parse failed");
|
||||
goto fail;
|
||||
}
|
||||
/* Parse and fetch MAC address */
|
||||
|
|
@ -3792,12 +3795,12 @@ static int hdd_set_blacklist_bssid(struct hdd_context *hddctx,
|
|||
break;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb2,
|
||||
if (wlan_cfg80211_nla_parse(tb2,
|
||||
QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_MAX,
|
||||
nla_data(curr_attr),
|
||||
nla_len(curr_attr),
|
||||
wlan_hdd_set_roam_param_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
hdd_err("nla_parse failed");
|
||||
goto fail;
|
||||
}
|
||||
/* Parse and fetch MAC address */
|
||||
|
|
@ -3844,8 +3847,8 @@ static int hdd_set_ext_roam_params(struct hdd_context *hddctx,
|
|||
struct nlattr *tb[MAX_ROAMING_PARAM + 1];
|
||||
int ret;
|
||||
|
||||
if (hdd_nla_parse(tb, MAX_ROAMING_PARAM, data, data_len,
|
||||
wlan_hdd_set_roam_param_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, MAX_ROAMING_PARAM, data, data_len,
|
||||
wlan_hdd_set_roam_param_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -4272,9 +4275,10 @@ static int __wlan_hdd_cfg80211_disable_dfs_chan_scan(struct wiphy *wiphy,
|
|||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SET_NO_DFS_FLAG_MAX,
|
||||
data, data_len,
|
||||
wlan_hdd_set_no_dfs_flag_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_SET_NO_DFS_FLAG_MAX,
|
||||
data, data_len,
|
||||
wlan_hdd_set_no_dfs_flag_config_policy)) {
|
||||
hdd_err("invalid attr");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -4368,8 +4372,8 @@ static int __wlan_hdd_cfg80211_handle_wisa_cmd(struct wiphy *wiphy,
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_WISA_MAX, data, data_len,
|
||||
wlan_hdd_wisa_cmd_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_WISA_MAX, data,
|
||||
data_len, wlan_hdd_wisa_cmd_policy)) {
|
||||
hdd_err("Invalid WISA cmd attributes");
|
||||
ret_val = -EINVAL;
|
||||
goto err;
|
||||
|
|
@ -5507,8 +5511,10 @@ __hdd_cfg80211_get_station_cmd(struct wiphy *wiphy,
|
|||
goto out;
|
||||
|
||||
|
||||
status = hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_GET_STATION_MAX,
|
||||
data, data_len, hdd_get_station_policy);
|
||||
status = wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_GET_STATION_MAX,
|
||||
data, data_len,
|
||||
hdd_get_station_policy);
|
||||
if (status) {
|
||||
hdd_err("Invalid ATTR");
|
||||
goto out;
|
||||
|
|
@ -5741,8 +5747,10 @@ __wlan_hdd_cfg80211_get_wifi_info(struct wiphy *wiphy,
|
|||
if (status)
|
||||
return status;
|
||||
|
||||
if (hdd_nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_MAX, data,
|
||||
data_len, qca_wlan_vendor_get_wifi_info_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb_vendor,
|
||||
QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_get_wifi_info_policy)) {
|
||||
hdd_err("WIFI_INFO_GET NL CMD parsing failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -6648,8 +6656,8 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
|
|||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_CONFIG_MAX,
|
||||
data, data_len, wlan_hdd_wifi_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_CONFIG_MAX, data,
|
||||
data_len, wlan_hdd_wifi_config_policy)) {
|
||||
hdd_err("invalid attr");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -7250,9 +7258,10 @@ static int __wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_wifi_logger_start_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_wifi_logger_start_policy)) {
|
||||
hdd_err("Invalid attribute");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -7378,9 +7387,10 @@ static int __wlan_hdd_cfg80211_wifi_logger_get_ring_data(struct wiphy *wiphy,
|
|||
if (status)
|
||||
return status;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_GET_RING_DATA_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_wifi_logger_get_ring_data_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_GET_RING_DATA_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_wifi_logger_get_ring_data_policy)) {
|
||||
hdd_err("Invalid attribute");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -7782,7 +7792,7 @@ __wlan_hdd_cfg80211_offloaded_packets(struct wiphy *wiphy,
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, PARAM_MAX, data, data_len, policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, PARAM_MAX, data, data_len, policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -7896,7 +7906,7 @@ __wlan_hdd_cfg80211_monitor_rssi(struct wiphy *wiphy,
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, PARAM_MAX, data, data_len, policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, PARAM_MAX, data, data_len, policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8086,10 +8096,10 @@ __wlan_hdd_cfg80211_set_ns_offload(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX,
|
||||
(struct nlattr *)data,
|
||||
data_len, ns_offload_set_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
ns_offload_set_policy)) {
|
||||
hdd_err("nla_parse failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -8175,8 +8185,10 @@ static int __wlan_hdd_cfg80211_get_preferred_freq_list(struct wiphy *wiphy,
|
|||
if (ret)
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST_MAX,
|
||||
data, data_len, get_preferred_freq_list_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST_MAX,
|
||||
data, data_len,
|
||||
get_preferred_freq_list_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8304,8 +8316,10 @@ static int __wlan_hdd_cfg80211_set_probable_oper_channel(struct wiphy *wiphy,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_MAX,
|
||||
data, data_len, set_probable_oper_channel_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_MAX,
|
||||
data, data_len,
|
||||
set_probable_oper_channel_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8443,8 +8457,8 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy,
|
|||
if (0 != wlan_hdd_validate_context(hdd_ctx))
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX, data, data_len,
|
||||
qca_wlan_vendor_attr_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX, data,
|
||||
data_len, qca_wlan_vendor_attr_policy)) {
|
||||
hdd_err("Invalid attribute");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8634,8 +8648,9 @@ static int __wlan_hdd_cfg80211_set_ota_test(struct wiphy *wiphy,
|
|||
if (0 != wlan_hdd_validate_context(hdd_ctx))
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OTA_TEST_MAX,
|
||||
data, data_len, qca_wlan_vendor_ota_test_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OTA_TEST_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_ota_test_policy)) {
|
||||
hdd_err("invalid attr");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8745,8 +8760,8 @@ static int __wlan_hdd_cfg80211_txpower_scale(struct wiphy *wiphy,
|
|||
|
||||
adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_MAX,
|
||||
data, data_len, txpower_scale_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_MAX,
|
||||
data, data_len, txpower_scale_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8833,8 +8848,10 @@ static int __wlan_hdd_cfg80211_txpower_scale_decr_db(struct wiphy *wiphy,
|
|||
|
||||
adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_DECR_DB_MAX,
|
||||
data, data_len, txpower_scale_decr_db_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_DECR_DB_MAX,
|
||||
data, data_len,
|
||||
txpower_scale_decr_db_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -8936,9 +8953,9 @@ static int __wlan_hdd_cfg80211_conditional_chan_switch(struct wiphy *wiphy,
|
|||
* one attribute is parsed which is array of frequencies and
|
||||
* it is explicitly validated for both under read and over read
|
||||
*/
|
||||
if (hdd_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_MAX,
|
||||
data, data_len, NULL)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_MAX,
|
||||
data, data_len, NULL)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -9060,8 +9077,10 @@ static int __wlan_hdd_cfg80211_p2p_lo_start(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_MAX,
|
||||
data, data_len, p2p_listen_offload_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_MAX,
|
||||
data, data_len,
|
||||
p2p_listen_offload_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -9591,8 +9610,8 @@ __wlan_hdd_cfg80211_bpf_offload(struct wiphy *wiphy,
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, BPF_MAX, data, data_len,
|
||||
wlan_hdd_bpf_offload_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, BPF_MAX, data, data_len,
|
||||
wlan_hdd_bpf_offload_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10178,8 +10197,9 @@ __wlan_hdd_cfg80211_acs_dfs_mode(struct wiphy *wiphy,
|
|||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_DFS_MAX,
|
||||
data, data_len, wlan_hdd_set_acs_dfs_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_DFS_MAX,
|
||||
data, data_len,
|
||||
wlan_hdd_set_acs_dfs_config_policy)) {
|
||||
hdd_err("invalid attr");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10341,9 +10361,10 @@ __wlan_hdd_cfg80211_sta_roam_policy(struct wiphy *wiphy,
|
|||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_STA_CONNECT_ROAM_POLICY_MAX,
|
||||
data, data_len,
|
||||
wlan_hdd_set_sta_roam_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_STA_CONNECT_ROAM_POLICY_MAX,
|
||||
data, data_len,
|
||||
wlan_hdd_set_sta_roam_config_policy)) {
|
||||
hdd_err("invalid attr");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -10540,8 +10561,9 @@ __wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy,
|
|||
if (0 != ret)
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SAP_CONFIG_MAX,
|
||||
data, data_len, wlan_hdd_sap_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SAP_CONFIG_MAX,
|
||||
data, data_len,
|
||||
wlan_hdd_sap_config_policy)) {
|
||||
hdd_err("invalid attr");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -11016,8 +11038,8 @@ static int __wlan_hdd_cfg80211_setband(struct wiphy *wiphy,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX,
|
||||
data, data_len, policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX,
|
||||
data, data_len, policy)) {
|
||||
hdd_err(FL("Invalid ATTR"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -11196,7 +11218,7 @@ static int hdd_parse_vendor_acs_chan_config(struct hdd_vendor_chan_info
|
|||
struct nlattr *curr_attr;
|
||||
struct hdd_vendor_chan_info *channel_list;
|
||||
|
||||
if (hdd_nla_parse(tb, SET_CHAN_MAX, data, data_len, NULL)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, SET_CHAN_MAX, data, data_len, NULL)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -11221,9 +11243,10 @@ static int hdd_parse_vendor_acs_chan_config(struct hdd_vendor_chan_info
|
|||
|
||||
i = 0;
|
||||
nla_for_each_nested(curr_attr, tb[SET_CHAN_CHAN_LIST], rem) {
|
||||
if (hdd_nla_parse(tb2, SET_CHAN_MAX, nla_data(curr_attr),
|
||||
nla_len(curr_attr), NULL)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
if (wlan_cfg80211_nla_parse(tb2, SET_CHAN_MAX,
|
||||
nla_data(curr_attr),
|
||||
nla_len(curr_attr), NULL)) {
|
||||
hdd_err("nla_parse failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (tb2[SET_EXT_ACS_BAND]) {
|
||||
|
|
@ -11533,8 +11556,8 @@ static int __wlan_hdd_set_sar_power_limits(struct wiphy *wiphy,
|
|||
if (wlan_hdd_validate_context(hdd_ctx))
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_MAX,
|
||||
data, data_len, sar_limits_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_MAX,
|
||||
data, data_len, sar_limits_policy)) {
|
||||
hdd_err("Invalid SAR attributes");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -11583,10 +11606,12 @@ static int __wlan_hdd_set_sar_power_limits(struct wiphy *wiphy,
|
|||
break;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(sar_spec, QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_MAX,
|
||||
nla_data(sar_spec_list),
|
||||
nla_len(sar_spec_list), sar_limits_policy)) {
|
||||
hdd_err("hdd_nla_parse failed for SAR Spec list");
|
||||
if (wlan_cfg80211_nla_parse(sar_spec,
|
||||
QCA_WLAN_VENDOR_ATTR_SAR_LIMITS_MAX,
|
||||
nla_data(sar_spec_list),
|
||||
nla_len(sar_spec_list),
|
||||
sar_limits_policy)) {
|
||||
hdd_err("nla_parse failed for SAR Spec list");
|
||||
goto fail;
|
||||
}
|
||||
sar_limit_cmd.sar_limit_row_list[i].validity_bitmap = 0;
|
||||
|
|
@ -11736,8 +11761,9 @@ static int __wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX, data, data_len,
|
||||
qca_wlan_vendor_attr);
|
||||
ret = wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_MAX, data, data_len,
|
||||
qca_wlan_vendor_attr);
|
||||
if (ret) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
|
|
@ -11892,8 +11918,10 @@ __wlan_hdd_cfg80211_set_trace_level(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb1, QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_MAX, data,
|
||||
data_len, qca_wlan_vendor_set_trace_level_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb1,
|
||||
QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_set_trace_level_policy)) {
|
||||
hdd_err("Invalid attr");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -11905,8 +11933,9 @@ __wlan_hdd_cfg80211_set_trace_level(struct wiphy *wiphy,
|
|||
|
||||
nla_for_each_nested(apth,
|
||||
tb1[QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_PARAM], rem) {
|
||||
if (hdd_nla_parse(tb2, QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_MAX,
|
||||
nla_data(apth), nla_len(apth), NULL)) {
|
||||
if (wlan_cfg80211_nla_parse(tb2,
|
||||
QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_MAX,
|
||||
nla_data(apth), nla_len(apth), NULL)) {
|
||||
hdd_err("Invalid attr");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -12015,8 +12044,8 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy,
|
|||
if (0 != err)
|
||||
return err;
|
||||
|
||||
err = hdd_nla_parse(tb, STATS_SET_MAX, data, data_len,
|
||||
qca_wlan_vendor_set_nud_stats);
|
||||
err = wlan_cfg80211_nla_parse(tb, STATS_SET_MAX, data, data_len,
|
||||
qca_wlan_vendor_set_nud_stats);
|
||||
if (err) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s STATS_SET_START ATTR", __func__);
|
||||
|
|
@ -12425,7 +12454,8 @@ static int __wlan_hdd_cfg80211_get_chain_rssi(struct wiphy *wiphy,
|
|||
if (0 != retval)
|
||||
return retval;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX, data, data_len, NULL)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX,
|
||||
data, data_len, NULL)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -12529,9 +12559,9 @@ static int __wlan_hdd_cfg80211_set_limit_offchan_param(struct wiphy *wiphy,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX, data,
|
||||
data_len,
|
||||
wlan_hdd_set_limit_off_channel_param_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACTIVE_TOS_MAX,
|
||||
data, data_len,
|
||||
wlan_hdd_set_limit_off_channel_param_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -12689,8 +12719,8 @@ static int __wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX, data,
|
||||
data_len, btm_params_policy);
|
||||
ret = wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_MAX, data,
|
||||
data_len, btm_params_policy);
|
||||
if (ret) {
|
||||
hdd_err("Attribute parse failed");
|
||||
return -EINVAL;
|
||||
|
|
@ -12708,10 +12738,9 @@ static int __wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy,
|
|||
nla_for_each_nested(attr,
|
||||
tb[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO],
|
||||
rem) {
|
||||
ret = hdd_nla_parse_nested(
|
||||
tb_msg,
|
||||
QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_MAX,
|
||||
attr, btm_cand_list_policy);
|
||||
ret = wlan_cfg80211_nla_parse_nested(tb_msg,
|
||||
QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_MAX,
|
||||
attr, btm_cand_list_policy);
|
||||
if (ret) {
|
||||
hdd_err("Attribute parse failed");
|
||||
return -EINVAL;
|
||||
|
|
@ -20301,8 +20330,8 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
err = hdd_nla_parse(tb, WLAN_HDD_TM_ATTR_MAX, data,
|
||||
len, wlan_hdd_tm_policy);
|
||||
err = wlan_cfg80211_nla_parse(tb, WLAN_HDD_TM_ATTR_MAX, data,
|
||||
len, wlan_hdd_tm_policy);
|
||||
if (err) {
|
||||
hdd_err("Testmode INV ATTR");
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -177,8 +177,9 @@ hdd_fill_encrypt_decrypt_params(struct disa_encrypt_decrypt_req_params
|
|||
uint8_t *tmp;
|
||||
uint8_t fc[2];
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_MAX,
|
||||
data, data_len, encrypt_decrypt_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_MAX,
|
||||
data, data_len, encrypt_decrypt_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -1658,9 +1658,9 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
|
|||
hdd_err("extscan not supported");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
if (hdd_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1797,8 +1797,8 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
|
|||
hdd_err("extscan not supported");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
if (hdd_nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1946,9 +1946,9 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
|
|||
hdd_err("extscan not supported");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
if (hdd_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2011,11 +2011,11 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
|
|||
break;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb2,
|
||||
if (wlan_cfg80211_nla_parse(tb2,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
nla_data(apTh), nla_len(apTh),
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
hdd_err("nla_parse failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -2164,9 +2164,9 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
|
|||
if (0 != retval)
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2254,11 +2254,11 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
|
|||
break;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb2,
|
||||
if (wlan_cfg80211_nla_parse(tb2,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
nla_data(apTh), nla_len(apTh),
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
hdd_err("nla_parse failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -2466,9 +2466,9 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
|
|||
hdd_err("extscan not supported");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
if (hdd_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2713,11 +2713,11 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
|
|||
break;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(bucket,
|
||||
if (wlan_cfg80211_nla_parse(bucket,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
nla_data(buckets), nla_len(buckets),
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
hdd_err("nla_parse failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -2937,11 +2937,11 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
|
|||
total_channels))
|
||||
break;
|
||||
|
||||
if (hdd_nla_parse(channel,
|
||||
if (wlan_cfg80211_nla_parse(channel,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
nla_data(channels), nla_len(channels),
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
hdd_err("nla_parse failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -3157,8 +3157,8 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
|
|||
hdd_err("extscan not supported");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
if (hdd_nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -3371,8 +3371,8 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
|
|||
hdd_err("extscan not supported");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
if (hdd_nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, PARAM_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -3501,9 +3501,9 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
|
|||
hdd_err("extscan not supported");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
if (hdd_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -3631,9 +3631,9 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
|
||||
data, data_len, wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -3757,10 +3757,12 @@ static int hdd_extscan_epno_fill_network_list(
|
|||
break;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(network, QCA_WLAN_VENDOR_ATTR_PNO_MAX,
|
||||
nla_data(networks), nla_len(networks),
|
||||
wlan_hdd_pno_config_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
if (wlan_cfg80211_nla_parse(network,
|
||||
QCA_WLAN_VENDOR_ATTR_PNO_MAX,
|
||||
nla_data(networks),
|
||||
nla_len(networks),
|
||||
wlan_hdd_pno_config_policy)) {
|
||||
hdd_err("nla_parse failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -3772,7 +3774,7 @@ static int hdd_extscan_epno_fill_network_list(
|
|||
ssid_len = nla_len(
|
||||
network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_SSID]);
|
||||
|
||||
/* hdd_nla_parse will detect overflow but not underflow */
|
||||
/* nla_parse will detect overflow but not underflow */
|
||||
if (0 == ssid_len) {
|
||||
hdd_err("zero ssid length");
|
||||
return -EINVAL;
|
||||
|
|
@ -3858,8 +3860,8 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX,
|
||||
data, data_len, wlan_hdd_pno_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX, data,
|
||||
data_len, wlan_hdd_pno_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -4061,10 +4063,12 @@ static int hdd_extscan_passpoint_fill_network_list(
|
|||
break;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(network, QCA_WLAN_VENDOR_ATTR_PNO_MAX,
|
||||
nla_data(networks), nla_len(networks),
|
||||
wlan_hdd_pno_config_policy)) {
|
||||
hdd_err("hdd_nla_parse failed");
|
||||
if (wlan_cfg80211_nla_parse(network,
|
||||
QCA_WLAN_VENDOR_ATTR_PNO_MAX,
|
||||
nla_data(networks),
|
||||
nla_len(networks),
|
||||
wlan_hdd_pno_config_policy)) {
|
||||
hdd_err("nla_parse failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -4160,8 +4164,8 @@ static int __wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy,
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX, data, data_len,
|
||||
wlan_hdd_pno_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX, data,
|
||||
data_len, wlan_hdd_pno_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -4281,8 +4285,8 @@ static int __wlan_hdd_cfg80211_reset_passpoint_list(struct wiphy *wiphy,
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX, data, data_len,
|
||||
wlan_hdd_extscan_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX, data,
|
||||
data_len, wlan_hdd_extscan_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -1997,8 +1997,9 @@ static int __wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy,
|
|||
hdd_err("NAN datapath is not enabled");
|
||||
return -EPERM;
|
||||
}
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX,
|
||||
data, data_len, qca_wlan_vendor_ndp_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_ndp_policy)) {
|
||||
hdd_err("Invalid NDP vendor command attributes");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -800,8 +800,9 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
/* Parse the netlink message */
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_MAX, data,
|
||||
data_len, qca_wlan_vendor_ocb_set_config_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_ocb_set_config_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1005,8 +1006,10 @@ static int __wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
/* Parse the netlink message */
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_MAX, data,
|
||||
data_len, qca_wlan_vendor_ocb_set_utc_time_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_ocb_set_utc_time_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1122,9 +1125,10 @@ __wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy,
|
|||
timing_advert->vdev_id = adapter->session_id;
|
||||
|
||||
/* Parse the netlink message */
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_ocb_start_timing_advert_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_ocb_start_timing_advert_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -1238,9 +1242,10 @@ __wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy,
|
|||
timing_advert->vdev_id = adapter->session_id;
|
||||
|
||||
/* Parse the netlink message */
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_ocb_stop_timing_advert_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_ocb_stop_timing_advert_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -1635,8 +1640,9 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
/* Parse the netlink message */
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_MAX, data,
|
||||
data_len, qca_wlan_vendor_dcc_get_stats)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_dcc_get_stats)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1764,8 +1770,10 @@ static int __wlan_hdd_cfg80211_dcc_clear_stats(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
/* Parse the netlink message */
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_MAX, data,
|
||||
data_len, qca_wlan_vendor_dcc_clear_stats)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_dcc_clear_stats)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1893,8 +1901,9 @@ static int __wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
/* Parse the netlink message */
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_MAX, data,
|
||||
data_len, qca_wlan_vendor_dcc_update_ndl)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_MAX,
|
||||
data, data_len,
|
||||
qca_wlan_vendor_dcc_update_ndl)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -1016,7 +1016,8 @@ static void oem_cmd_handler(const void *data, int data_len, void *ctx, int pid)
|
|||
* audit note: it is ok to pass a NULL policy here since only
|
||||
* one attribute is parsed and it is explicitly validated
|
||||
*/
|
||||
if (hdd_nla_parse(tb, CLD80211_ATTR_MAX, data, data_len, NULL)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, CLD80211_ATTR_MAX,
|
||||
data, data_len, NULL)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -940,8 +940,8 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy,
|
|||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SCAN_MAX, data, data_len,
|
||||
scan_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SCAN_MAX,
|
||||
data, data_len, scan_policy)) {
|
||||
hdd_err("Invalid ATTR");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -1216,9 +1216,10 @@ __wlan_hdd_cfg80211_ll_stats_set(struct wiphy *wiphy,
|
|||
if (0 != status)
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
qca_wlan_vendor_ll_set_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb_vendor,
|
||||
QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
qca_wlan_vendor_ll_set_policy)) {
|
||||
hdd_err("maximum attribute not present");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1423,9 +1424,10 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
|
|||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
qca_wlan_vendor_ll_get_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb_vendor,
|
||||
QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
qca_wlan_vendor_ll_get_policy)) {
|
||||
hdd_err("max attribute not present");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1539,9 +1541,10 @@ __wlan_hdd_cfg80211_ll_stats_clear(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (hdd_nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
qca_wlan_vendor_ll_clr_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb_vendor,
|
||||
QCA_WLAN_VENDOR_ATTR_LL_STATS_CLR_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
qca_wlan_vendor_ll_clr_policy)) {
|
||||
hdd_err("STATS_CLR_MAX is not present");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2462,9 +2465,9 @@ static int __wlan_hdd_cfg80211_ll_stats_ext_set_param(struct wiphy *wiphy,
|
|||
if (0 != status)
|
||||
return -EPERM;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
qca_wlan_vendor_ll_ext_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX,
|
||||
(struct nlattr *)data, data_len,
|
||||
qca_wlan_vendor_ll_ext_policy)) {
|
||||
hdd_err("maximum attribute not present");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -111,8 +111,9 @@ static int __wlan_hdd_cfg80211_set_gateway_params(struct wiphy *wiphy,
|
|||
* ipv4 addr: 4 bytes
|
||||
* ipv6 addr: 16 bytes
|
||||
*/
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_GW_PARAM_CONFIG_MAX, data,
|
||||
data_len, policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb,
|
||||
QCA_WLAN_VENDOR_ATTR_GW_PARAM_CONFIG_MAX,
|
||||
data, data_len, policy)) {
|
||||
hdd_err("Invalid ATTR list");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -227,8 +227,9 @@ __wlan_hdd_cfg80211_configure_tdls_mode(struct wiphy *wiphy,
|
|||
if (NULL == adapter)
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_TDLS_CONFIG_MAX, data,
|
||||
data_len, wlan_hdd_tdls_mode_configuration_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_TDLS_CONFIG_MAX,
|
||||
data, data_len,
|
||||
wlan_hdd_tdls_mode_configuration_policy)) {
|
||||
hdd_err("Invalid attribute");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -1145,8 +1145,8 @@ static int __wlan_hdd_cfg80211_handle_tsf_cmd(struct wiphy *wiphy,
|
|||
if (0 != status)
|
||||
return -EINVAL;
|
||||
|
||||
if (hdd_nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_TSF_MAX, data,
|
||||
data_len, tsf_policy)) {
|
||||
if (wlan_cfg80211_nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_TSF_MAX,
|
||||
data, data_len, tsf_policy)) {
|
||||
hdd_err("Invalid TSF cmd");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue