|
@@ -15118,7 +15118,8 @@ static void wlan_hdd_cfg80211_set_wiphy_scan_flags(struct wiphy *wiphy)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-#ifdef WLAN_FEATURE_SAE
|
|
|
+#if defined(WLAN_FEATURE_SAE) && \
|
|
|
+ defined(CFG80211_EXTERNAL_AUTH_SUPPORT)
|
|
|
/**
|
|
|
* wlan_hdd_cfg80211_set_wiphy_sae_feature() - Indicates support of SAE feature
|
|
|
* @wiphy: Pointer to wiphy
|
|
@@ -22249,6 +22250,69 @@ static int wlan_hdd_cfg80211_update_connect_params(struct wiphy *wiphy,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+#if defined(WLAN_FEATURE_SAE) && \
|
|
|
+ defined(CFG80211_EXTERNAL_AUTH_SUPPORT)
|
|
|
+/**
|
|
|
+ * __wlan_hdd_cfg80211_external_auth() - Handle external auth
|
|
|
+ * @wiphy: Pointer to wireless phy
|
|
|
+ * @dev: net device
|
|
|
+ * @params: Pointer to external auth params
|
|
|
+ *
|
|
|
+ * Return: 0 on success, negative errno on failure
|
|
|
+ */
|
|
|
+static int
|
|
|
+__wlan_hdd_cfg80211_external_auth(struct wiphy *wiphy,
|
|
|
+ struct net_device *dev,
|
|
|
+ struct cfg80211_external_auth_params *params)
|
|
|
+{
|
|
|
+ struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
|
|
+ struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ if (hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) {
|
|
|
+ hdd_err("Command not allowed in FTM mode");
|
|
|
+ return -EPERM;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (wlan_hdd_validate_session_id(adapter->session_id)) {
|
|
|
+ hdd_err("invalid session id: %d", adapter->session_id);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ ret = wlan_hdd_validate_context(hdd_ctx);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+
|
|
|
+
|
|
|
+ hdd_debug("external_auth status: %d", params->status);
|
|
|
+ sme_handle_sae_msg(hdd_ctx->hHal, adapter->session_id, params->status);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * wlan_hdd_cfg80211_external_auth() - Handle external auth
|
|
|
+ * @wiphy: Pointer to wireless phy
|
|
|
+ * @dev: net device
|
|
|
+ * @params: Pointer to external auth params
|
|
|
+ *
|
|
|
+ * Return: 0 on success, negative errno on failure
|
|
|
+ */
|
|
|
+static int
|
|
|
+wlan_hdd_cfg80211_external_auth(struct wiphy *wiphy,
|
|
|
+ struct net_device *dev,
|
|
|
+ struct cfg80211_external_auth_params *params)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ cds_ssr_protect(__func__);
|
|
|
+ ret = __wlan_hdd_cfg80211_external_auth(wiphy, dev, params);
|
|
|
+ cds_ssr_unprotect(__func__);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
/**
|
|
|
* wlan_hdd_chan_info_cb() - channel info callback
|
|
|
* @chan_info: struct scan_chan_info
|
|
@@ -22544,4 +22608,8 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops = {
|
|
|
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)))
|
|
|
.update_connect_params = wlan_hdd_cfg80211_update_connect_params,
|
|
|
#endif
|
|
|
+#if defined(WLAN_FEATURE_SAE) && \
|
|
|
+ defined(CFG80211_EXTERNAL_AUTH_SUPPORT)
|
|
|
+ .external_auth = wlan_hdd_cfg80211_external_auth,
|
|
|
+#endif
|
|
|
};
|