qcacld-3.0: Add policy attribute for tdls/supported_feature

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_TDLS_ENABLE
    QCA_NL80211_VENDOR_SUBCMD_TDLS_DISABLE
    QCA_NL80211_VENDOR_SUBCMD_TDLS_GET_STATUS
    QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES

Change-Id: I4ad3d952d2af8f1d7f37179f9c92b0e77fc2eb23
CRs-Fixed: 2635755
This commit is contained in:
Jingxiang Ge 2020-03-06 11:50:00 +08:00 committed by nshrivas
parent 0d364672c5
commit ba6213b1b6
2 changed files with 31 additions and 24 deletions

View File

@ -43,6 +43,32 @@ extern const struct nla_policy
.doit = wlan_hdd_cfg80211_configure_tdls_mode, \
vendor_command_policy(wlan_hdd_tdls_mode_configuration_policy, \
QCA_WLAN_VENDOR_ATTR_TDLS_CONFIG_MAX) \
}, \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_TDLS_ENABLE, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV | \
WIPHY_VENDOR_CMD_NEED_RUNNING, \
.doit = wlan_hdd_cfg80211_exttdls_enable, \
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
}, \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_TDLS_DISABLE, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV | \
WIPHY_VENDOR_CMD_NEED_RUNNING, \
.doit = wlan_hdd_cfg80211_exttdls_disable, \
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
}, \
{ \
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_TDLS_GET_STATUS, \
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
WIPHY_VENDOR_CMD_NEED_NETDEV, \
.doit = wlan_hdd_cfg80211_exttdls_get_status, \
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \
},
/* Bit mask flag for tdls_option to FW */

View File

@ -14423,33 +14423,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
.doit = wlan_hdd_cfg80211_ll_stats_get
},
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
#ifdef FEATURE_WLAN_TDLS
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_TDLS_ENABLE,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV | WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlan_hdd_cfg80211_exttdls_enable
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_TDLS_DISABLE,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV | WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlan_hdd_cfg80211_exttdls_disable
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_TDLS_GET_STATUS,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
.doit = wlan_hdd_cfg80211_exttdls_get_status
},
#endif
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
.doit = wlan_hdd_cfg80211_get_supported_features
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
.doit = wlan_hdd_cfg80211_get_supported_features,
vendor_command_policy(VENDOR_CMD_RAW_DATA, 0)
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,