mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
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:
parent
f2dbc2e5eb
commit
498b11a4a1
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue