qcacld-3.0: Add policy attribute to FETCH_BSS_TRANSITION_STATUS
According to new changes in kernel 5.4 version onwards, driver has to provide the policy for a NL command to be verified against while registering wiphy to the kernel. To satisfy kernel 5.4 requirement add policy to following vendor command as part of this change: QCA_NL80211_VENDOR_SUBCMD_FETCH_BSS_TRANSITION_STATUS Change-Id: I7c49d959e7c5d232572aae78616b18cee875cbb1 CRs-Fixed: 2632084
此提交包含在:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -82,6 +82,22 @@ static int wlan_hdd_fill_btm_resp(struct sk_buff *reply_skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
const struct nla_policy
|
||||
btm_params_policy[QCA_WLAN_VENDOR_ATTR_MAX + 1] = {
|
||||
[QCA_WLAN_VENDOR_ATTR_BTM_MBO_TRANSITION_REASON] = {
|
||||
.type = NLA_U8},
|
||||
[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO] =
|
||||
VENDOR_NLA_POLICY_NESTED(btm_cand_list_policy),
|
||||
};
|
||||
|
||||
const struct nla_policy
|
||||
btm_cand_list_policy[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_MAX + 1]
|
||||
= {[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_BSSID] = {
|
||||
.len = QDF_MAC_ADDR_SIZE},
|
||||
[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_STATUS] = {
|
||||
.type = NLA_U32},
|
||||
};
|
||||
|
||||
/**
|
||||
* __wlan_hdd_cfg80211_fetch_bss_transition_status() - fetch bss transition
|
||||
* status
|
||||
@@ -118,21 +134,6 @@ __wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy,
|
||||
mac_handle_t mac_handle;
|
||||
QDF_STATUS status;
|
||||
|
||||
const struct nla_policy
|
||||
btm_params_policy[QCA_WLAN_VENDOR_ATTR_MAX + 1] = {
|
||||
[QCA_WLAN_VENDOR_ATTR_BTM_MBO_TRANSITION_REASON] = {
|
||||
.type = NLA_U8},
|
||||
[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO] = {
|
||||
.type = NLA_NESTED},
|
||||
};
|
||||
const struct nla_policy
|
||||
btm_cand_list_policy[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_MAX + 1]
|
||||
= {[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_BSSID] = {
|
||||
.len = QDF_MAC_ADDR_SIZE},
|
||||
[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_STATUS] = {
|
||||
.type = NLA_U32},
|
||||
};
|
||||
|
||||
hdd_enter();
|
||||
|
||||
if (hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -43,6 +43,14 @@ wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int data_len);
|
||||
|
||||
extern const struct nla_policy
|
||||
btm_params_policy
|
||||
[QCA_WLAN_VENDOR_ATTR_MAX + 1];
|
||||
|
||||
extern const struct nla_policy
|
||||
btm_cand_list_policy
|
||||
[QCA_WLAN_VENDOR_ATTR_BTM_CANDIDATE_INFO_MAX + 1];
|
||||
|
||||
#define FEATURE_BSS_TRANSITION_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
@@ -51,7 +59,9 @@ wlan_hdd_cfg80211_fetch_bss_transition_status(struct wiphy *wiphy,
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING, \
|
||||
.doit = wlan_hdd_cfg80211_fetch_bss_transition_status \
|
||||
.doit = wlan_hdd_cfg80211_fetch_bss_transition_status, \
|
||||
vendor_command_policy(btm_params_policy, \
|
||||
QCA_WLAN_VENDOR_ATTR_MAX) \
|
||||
},
|
||||
#else /* FEATURE_BSS_TRANSITION */
|
||||
#define FEATURE_BSS_TRANSITION_VENDOR_COMMANDS
|
||||
|
新增問題並參考
封鎖使用者