qcacld-3.0: Specify policy for txpower_scale_decr_db

__wlan_hdd_cfg80211_txpower_scale_decr_db() calls nla_parse without
specifying a policy. Specify an nla policy with the expected attribute
information when calling nla_parse in
__wlan_hdd_cfg80211_txpower_scale_decr_db().

Change-Id: I219190726ccb19cb8849177888bca859da1c76db
CRs-Fixed: 2054752
This commit is contained in:
Dustin Brown 2017-06-06 12:29:43 -07:00 • committed by snandini
commit 498b11a4a1

View file

@ -6947,6 +6947,11 @@ static int wlan_hdd_cfg80211_txpower_scale(struct wiphy *wiphy,
return ret;
}
static const struct nla_policy txpower_scale_decr_db_policy
[QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_DECR_DB_MAX + 1] = {
[QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_DECR_DB] = { .type = NLA_U8 },
};
/**
* __wlan_hdd_cfg80211_txpower_scale_decr_db () - txpower scaling
* @wiphy: Pointer to wireless phy
@ -6978,7 +6983,7 @@ static int __wlan_hdd_cfg80211_txpower_scale_decr_db(struct wiphy *wiphy,
adapter = WLAN_HDD_GET_PRIV_PTR(dev);
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_DECR_DB_MAX,
data, data_len, NULL)) {
data, data_len, txpower_scale_decr_db_policy)) {
hdd_err("Invalid ATTR");
return -EINVAL;
}