|
@@ -1485,6 +1485,10 @@ static const struct nl80211_vendor_cmd_info wlan_hdd_cfg80211_vendor_events[] =
|
|
|
.vendor_id = QCA_NL80211_VENDOR_ID,
|
|
|
.subcmd = QCA_NL80211_VENDOR_SUBCMD_NAN_EXT
|
|
|
},
|
|
|
+ [QCA_NL80211_VENDOR_SUBCMD_LINK_PROPERTIES_INDEX] = {
|
|
|
+ .vendor_id = QCA_NL80211_VENDOR_ID,
|
|
|
+ .subcmd = QCA_NL80211_VENDOR_SUBCMD_LINK_PROPERTIES,
|
|
|
+ },
|
|
|
#ifdef WLAN_UMAC_CONVERGENCE
|
|
|
COMMON_VENDOR_EVENTS
|
|
|
#endif
|
|
@@ -13773,6 +13777,59 @@ static int wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|
|
}
|
|
|
#endif /* KERNEL_VERSION(4, 12, 0) */
|
|
|
|
|
|
+QDF_STATUS wlan_hdd_send_sta_authorized_event(
|
|
|
+ struct hdd_adapter *adapter,
|
|
|
+ struct hdd_context *hdd_ctx,
|
|
|
+ const struct qdf_mac_addr *mac_addr)
|
|
|
+{
|
|
|
+ struct sk_buff *vendor_event;
|
|
|
+ QDF_STATUS status;
|
|
|
+ struct nl80211_sta_flag_update sta_flags;
|
|
|
+
|
|
|
+ hdd_enter();
|
|
|
+ if (!hdd_ctx) {
|
|
|
+ hdd_err("HDD context is null");
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ vendor_event =
|
|
|
+ cfg80211_vendor_event_alloc(
|
|
|
+ hdd_ctx->wiphy, &adapter->wdev, sizeof(sta_flags) +
|
|
|
+ QDF_MAC_ADDR_SIZE + NLMSG_HDRLEN,
|
|
|
+ QCA_NL80211_VENDOR_SUBCMD_LINK_PROPERTIES_INDEX,
|
|
|
+ GFP_KERNEL);
|
|
|
+ if (!vendor_event) {
|
|
|
+ hdd_err("cfg80211_vendor_event_alloc failed");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ sta_flags.mask |= BIT(NL80211_STA_FLAG_AUTHORIZED);
|
|
|
+ sta_flags.set = true;
|
|
|
+
|
|
|
+ status = nla_put(vendor_event,
|
|
|
+ QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_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_MAC_ADDR,
|
|
|
+ QDF_MAC_ADDR_SIZE, mac_addr->bytes);
|
|
|
+ if (status) {
|
|
|
+ hdd_err("STA MAC put fails");
|
|
|
+ kfree_skb(vendor_event);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ cfg80211_vendor_event(vendor_event, GFP_KERNEL);
|
|
|
+
|
|
|
+ hdd_exit();
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* __wlan_hdd_change_station() - change station
|
|
|
* @wiphy: Pointer to the wiphy structure
|
|
@@ -13849,6 +13906,13 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
|
|
|
hdd_debug("Not able to change TL state to AUTHENTICATED");
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
+ status = wlan_hdd_send_sta_authorized_event(
|
|
|
+ adapter,
|
|
|
+ hdd_ctx,
|
|
|
+ &STAMacAddress);
|
|
|
+ if (status != QDF_STATUS_SUCCESS) {
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
}
|
|
|
} else if ((adapter->device_mode == QDF_STA_MODE) ||
|
|
|
(adapter->device_mode == QDF_P2P_CLIENT_MODE)) {
|