summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Kumar Dhanotiya <adhanoti@codeaurora.org>2018-11-28 19:40:17 +0530
committernshrivas <nshrivas@codeaurora.org>2019-02-11 10:12:25 -0800
commitd8e767c846d0e107b03d88faf192753701f7aec6 (patch)
tree48abd6ca1098ec2bb26dea447bca0ce6b59e738b
parentd3e47a8bdc2983d66d3b23384c411b33cc388967 (diff)
qcacld-3.0: Send sta auth status as per updated vendor attr
Vendor attribute QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS is updated to accept the nla values in the form of nl80211_sta_flag_update structure instead of uint32_t flags at user space, the name of the vendor attribute QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_MAC for the same event is changed to QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_MAC_ADDR and enum values are also updated for sta_flags and MAC_ADDR. Update the driver according to updated format of the event attributes. Change-Id: I54b95ecbe05af64c375a06bb36e59ae2b04ddf7f CRs-Fixed: 2359794
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c13
-rw-r--r--uapi/linux/qca_vendor.h14
2 files changed, 19 insertions, 8 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index c135116a9ec8..024543526956 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -14977,8 +14977,8 @@ QDF_STATUS wlan_hdd_send_sta_authorized_event(
const struct qdf_mac_addr *mac_addr)
{
struct sk_buff *vendor_event;
- uint32_t sta_flags = 0;
QDF_STATUS status;
+ struct nl80211_sta_flag_update sta_flags;
ENTER();
@@ -14998,18 +14998,21 @@ QDF_STATUS wlan_hdd_send_sta_authorized_event(
return -EINVAL;
}
- sta_flags |= BIT(NL80211_STA_FLAG_AUTHORIZED);
+ sta_flags.mask |= BIT(NL80211_STA_FLAG_AUTHORIZED);
+ sta_flags.set = true;
- status = nla_put_u32(vendor_event,
+ status = nla_put(vendor_event,
QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS,
- sta_flags);
+ sizeof(struct nl80211_sta_flag_update),
+ &sta_flags);
if (status) {
hdd_err("STA flag put fails");
kfree_skb(vendor_event);
return QDF_STATUS_E_FAILURE;
}
+
status = nla_put(vendor_event,
- QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_MAC,
+ QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_MAC_ADDR,
QDF_MAC_ADDR_SIZE, mac_addr->bytes);
if (status) {
hdd_err("STA MAC put fails");
diff --git a/uapi/linux/qca_vendor.h b/uapi/linux/qca_vendor.h
index 6638e054c802..fdc95618cba4 100644
--- a/uapi/linux/qca_vendor.h
+++ b/uapi/linux/qca_vendor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -2855,6 +2855,12 @@ enum qca_wlan_vendor_attr_get_logger_features {
* to specify negotiated rate flags i.e. ht, vht and channel width
* @QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_FREQ: Unsigned 32bit value to
* specify the operating frequency
+ * @QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_MAC_ADDR: MAC Address of the peer
+ * (STA / AP ) for the connected link.
+ * @QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS: Attribute containing a
+ * &struct nl80211_sta_flag_update for the respective connected link. MAC
+ * address of the peer represented by
+ * QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_MAC_ADDR.
* @QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_AFTER_LAST: after last
* @QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_MAX: max value
*/
@@ -2863,8 +2869,10 @@ enum qca_wlan_vendor_attr_link_properties {
QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_NSS = 1,
QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_RATE_FLAGS = 2,
QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_FREQ = 3,
- QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS = 4,
- QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_MAC = 5,
+ QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_MAC_ADDR = 4,
+ QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS = 5,
+
+
/* KEEP LAST */
QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_AFTER_LAST,