From f57fa308b0d8330580a932dcc5c460e9d2352284 Mon Sep 17 00:00:00 2001 From: Sunil Dutt Date: Wed, 9 Jan 2019 22:12:29 +0530 Subject: cfg80211/nl80211: Offload OWE processing to user space This interface allows the host driver to offload OWE processing to user space. This intends to support OWE/Enhanced Open AKM by the host drivers that implement SME but rely on the user space for the crypotographic/OWE processing.Such drivers are not capable of processing/deriving the DH IE's. This interface acts as both the event from the driver to userspace and a command from userspace to the driver. Host driver shall use the event to notify the OWE info of the peer to the userspace for the cryptographic processing of the DH ie's. Accordingly, the userspace shall update the OWE info/DH ie's to the host driver corresponding to the peer. Above sequence aims for the AP mode where the event carries the OWE info of the peer(STA) obtained in the Assoc Request. The request interface from the userspace shall update the OWE info to the host driver, which is used to send the Assoc response to the peer. This OWE info in the command interface shall contain the ie's which either include the pmkid of the peer if the PMKSA is still valid or an updated DH ie's for generating a new PMKSA with the peer. Change-Id: Id5a2e800bdae1ea31a20a062d012cc33e5a3c6a3 CRs-Fixed: 2414077 Signed-off-by: Liangwei Dong Signed-off-by: Sunil Dutt --- include/net/cfg80211.h | 41 +++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/nl80211.h | 6 ++++++ 2 files changed, 47 insertions(+) (limited to 'include') diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 18aff0c86724..78ad3fe17a09 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -2443,6 +2443,31 @@ struct cfg80211_external_auth_params { const u8 *pmkid; }; +/** + * struct cfg80211_update_owe_info - OWE Information + * + * This structure provides information needed for the drivers to offload OWE + * (Oppurtunistic Wireless Encryption) processing to the user space. + * + * Commonly used across update_owe request and event interfaces. + * + * @bssid: BSSID of the peer from which the OWE processing has to be done. + * @status: status code, %WLAN_STATUS_SUCCESS for successful OWE info + * processing, use %WLAN_STATUS_UNSPECIFIED_FAILURE if user space + * cannot give you the real status code for failures. Used only for + * OWE update response command interface (user space to driver). + * @ie: IE's obtained from the peer or constructed by the user space. These are + * the IE's of the remote peer in the event from the host driver and + * the constructed IE's by the user space in the request interface. + * @ie_len: Length of IE's in octets. + */ +struct cfg80211_update_owe_info { + u8 bssid[ETH_ALEN] __aligned(2); + u16 status; + const u8 *ie; + size_t ie_len; +}; + /** * struct cfg80211_ops - backend description for wireless configuration * @@ -2741,6 +2766,10 @@ struct cfg80211_external_auth_params { * * @external_auth: indicates result of offloaded authentication processing from * user space + * + * @update_owe_info: Provide updated OWE info to driver. Driver implementing SME + * but offloading the OWE processing to the user space will get the updated + * DH IE's (from the IE's) obtained through this interface. */ struct cfg80211_ops { int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); @@ -3012,6 +3041,8 @@ struct cfg80211_ops { const u8 *addr); int (*external_auth)(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_external_auth_params *params); + int (*update_owe_info)(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_update_owe_info *owe_info); }; /* @@ -5896,4 +5927,14 @@ int cfg80211_external_auth_request(struct net_device *netdev, #define wiphy_WARN(wiphy, format, args...) \ WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args); +/** + * cfg80211_update_owe_info_event - Notify the peer's OWE info to user space + * @netdev: network device + * @owe_info: peer's owe info + * @gfp: allocation flags + */ +void cfg80211_update_owe_info_event(struct net_device *netdev, + struct cfg80211_update_owe_info *owe_info, + gfp_t gfp); + #endif /* __NET_CFG80211_H */ diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 0527b779f2f0..9ac3946a916f 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -990,6 +990,11 @@ * indicated by %NL80211_ATTR_WIPHY_FREQ and other attributes * determining the width and type. * + * @NL80211_CMD_UPDATE_OWE_INFO: This interface allows the host driver to + * offload OWE processing to user space. This intends to support + * OWE/Enhanced Open AKM by the host drivers that implemnt SME but rely + * on the user space for the crypotographic/DH IE processing. + * * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use */ @@ -1210,6 +1215,7 @@ enum nl80211_commands { NL80211_CMD_NOTIFY_RADAR, + NL80211_CMD_UPDATE_OWE_INFO, /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ -- cgit v1.2.3 From c397cb9371b8621993239031993f4f5ad31b69f1 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 26 Dec 2018 23:45:41 -0500 Subject: cfg80211: indicate support for DH IE update Define macro to indicate backport support for DH IE update. Change-Id: Ib39032cab976fa465e417c9d1f6193306ea78565 CRs-Fixed: 2415038 Signed-off-by: Liangwei Dong --- include/net/cfg80211.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 78ad3fe17a09..1265820a3802 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -30,6 +30,9 @@ /* Indicate backport support for external authentication in AP mode */ #define CFG80211_EXTERNAL_AUTH_AP_SUPPORT 1 +/* Indicate backport support for DH IE creation/update*/ +#define CFG80211_EXTERNAL_DH_UPDATE_SUPPORT 1 + /** * DOC: Introduction * -- cgit v1.2.3 From a526edca0eb8d80efd12824b99c82b9f63300aae Mon Sep 17 00:00:00 2001 From: Asish Bhattacharya Date: Tue, 19 Mar 2019 21:03:30 +0530 Subject: apr: msm: fix compilation for non glink targets Define proto functions for non glink targets. Change-Id: Ie9eb32fe9af70d078d8ddc915c998d49e89b79c1 Signed-off-by: Asish Bhattacharya --- include/linux/qdsp6v2/apr.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/linux/qdsp6v2/apr.h b/include/linux/qdsp6v2/apr.h index 31c552b8da07..e7e2a53a70d7 100644 --- a/include/linux/qdsp6v2/apr.h +++ b/include/linux/qdsp6v2/apr.h @@ -196,6 +196,18 @@ int apr_set_q6_state(enum apr_subsys_state state); void apr_set_subsys_state(void); const char *apr_get_lpass_subsys_name(void); uint16_t apr_get_reset_domain(uint16_t proc); +#ifdef CONFIG_MSM_QDSP6_APRV2_VM +static inline int apr_start_rx_rt(void *handle) +{ + return 0; +} + +static inline int apr_end_rx_rt(void *handle) +{ + return 0; +} +#else int apr_start_rx_rt(void *handle); int apr_end_rx_rt(void *handle); #endif +#endif -- cgit v1.2.3