浏览代码

qcacld-3.0: Add policy attribute to hdd_wiphy_vendor_commands

According to new changes in kernel 5.4 version onwards, driver has to
provide the policy for a NL command to ve verified against while
registering wiphy to the kernel.

To accommodate these changes, add policy for all the following
vendor commands that are being registered in the driver

QCA_NL80211_VENDOR_SUBCMD_DO_ACS
QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES

Change-Id: I56d685cf3d7bab8f758d52b2e5d3c0a735accb26
CRs-Fixed: 2635226
Will Huang 5 年之前
父节点
当前提交
573db4b40c
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      core/hdd/src/wlan_hdd_cfg80211.c

+ 4 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -2674,7 +2674,7 @@ static int hdd_create_acs_timer(struct hdd_adapter *adapter)
 }
 
 static const struct nla_policy
-wlan_hdd_cfg80211_do_acs_policy[QCA_WLAN_VENDOR_ATTR_ACS_MAX+1] = {
+wlan_hdd_cfg80211_do_acs_policy[QCA_WLAN_VENDOR_ATTR_ACS_MAX + 1] = {
 	[QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE] = { .type = NLA_U8 },
 	[QCA_WLAN_VENDOR_ATTR_ACS_HT_ENABLED] = { .type = NLA_FLAG },
 	[QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED] = { .type = NLA_FLAG },
@@ -14505,7 +14505,9 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
 		.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
 				WIPHY_VENDOR_CMD_NEED_NETDEV |
 				WIPHY_VENDOR_CMD_NEED_RUNNING,
-		.doit = wlan_hdd_cfg80211_do_acs
+		.doit = wlan_hdd_cfg80211_do_acs,
+		vendor_command_policy(wlan_hdd_cfg80211_do_acs_policy,
+				      QCA_WLAN_VENDOR_ATTR_ACS_MAX)
 	},
 
 	{