qcacld-3.0: Handle deauthentication action for PASN peer
The userspace sends QCA_WLAN_VENDOR_SECURE_RANGING_CTX_ACTION_DELETE action in the QCA_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_ACTION to delete the pasn peer. Add changes to handle this action. Change-Id: I30bcdadd792d5bf1271c61fa585c62d5255eee5b CRs-Fixed: 3358878
This commit is contained in:

committed by
Madan Koyyalamudi

parent
8232f4cfd0
commit
e340881301
@@ -450,9 +450,11 @@ __wlan_hdd_cfg80211_set_secure_ranging_context(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int data_len)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(wdev->netdev);
|
||||
int errno = 0;
|
||||
struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_MAX + 1];
|
||||
struct qdf_mac_addr peer_mac;
|
||||
|
||||
hdd_enter();
|
||||
|
||||
@@ -487,7 +489,22 @@ __wlan_hdd_cfg80211_set_secure_ranging_context(struct wiphy *wiphy,
|
||||
if (errno)
|
||||
return errno;
|
||||
}
|
||||
} else if (nla_get_u32(
|
||||
tb[QCA_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_ACTION]) ==
|
||||
QCA_WLAN_VENDOR_SECURE_RANGING_CTX_ACTION_DELETE) {
|
||||
if (!tb[QCA_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_PEER_MAC_ADDR]) {
|
||||
hdd_err_rl("Peer mac address attribute is missing");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
qdf_mem_copy(peer_mac.bytes,
|
||||
nla_data(tb[QCA_WLAN_VENDOR_ATTR_SECURE_RANGING_CTX_PEER_MAC_ADDR]),
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
hdd_debug("Delete PASN peer" QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(peer_mac.bytes));
|
||||
wifi_pos_send_pasn_peer_deauth(hdd_ctx->psoc, &peer_mac);
|
||||
}
|
||||
|
||||
hdd_exit();
|
||||
|
||||
return errno;
|
||||
|
Reference in New Issue
Block a user