diff options
| author | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2014-11-24 21:43:54 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2014-11-24 21:45:21 +0530 |
| commit | 4efd70892371d189ecc16cac4eb167fa0b74bfc4 (patch) | |
| tree | 9d12e873160efbd131f31eab1b326b852c214d5a | |
| parent | fd2a4cfd542b86929ab8b925525b265591a55483 (diff) | |
| parent | 07c5f282c770963fe9cce41b38baa1ef2fd58420 (diff) | |
Release 1.0.0.242 QCACLD WLAN Driver
Merge remote-tracking branch 'origin/caf/caf-wlan/master' into HEAD
* origin/caf/caf-wlan/master:
Cafstaging Release 1.0.0.242
qcacld: Add "LINKSPEED" support to device ioctl handler hdd_ioctl()
qcacld: SME: Support Software Authentication Offload
qcacld: WMA: Support Software AP Authentication Offload
qcacld: Support Software AP Authentication Offload
qcacld: CL 1156589 - update fw common interface files
qcacld: CL 1153980 - update fw common interface files
qcacld: CL 1149257 - update fw common interface files
qcacld: CL 1143872 - update fw common interface files
qcacld: CL 1140415 - update fw common interface files
qcacld: CL 1133654 - update fw common interface files
Change-Id: Ibfbdb0dae852dbe8dc40693f6d2b8061fc0d0053
30 files changed, 1388 insertions, 61 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index ccdf0b08aedd..0cb804d64cdf 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -57,6 +57,11 @@ //Number of items that can be configured #define MAX_CFG_INI_ITEMS 512 +#ifdef SAP_AUTH_OFFLOAD +/* 802.11 pre-share key length */ +#define WLAN_PSK_STRING_LENGTH (64) +#endif /* SAP_AUTH_OFFLOAD */ + // Defines for all of the things we read from the configuration (registry). #define CFG_RTS_THRESHOLD_NAME "RTSThreshold" @@ -2675,6 +2680,29 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */ #define CFG_MDNS_RESPONSE_TYPE_SRV_TGT_DEFAULT "" #endif /* MDNS_OFFLOAD */ +#ifdef SAP_AUTH_OFFLOAD +/* Enable/Disable SAP Authentication offload + * Default: Disable + */ +#define CFG_ENABLE_SAP_AUTH_OFL_NAME "gEnableSAPAuthOffload" +#define CFG_ENABLE_SAP_AUTH_OFL_MIN ( 0 ) +#define CFG_ENABLE_SAP_AUTH_OFL_MAX ( 1 ) +#define CFG_ENABLE_SAP_AUTH_OFL_DEFAULT ( 0 ) + +/* SAP Authentication offload Security Type + * 0: None Security + * 1: WPA2-PSK CCMP + */ +#define CFG_SAP_AUTH_OFL_SECURITY_TYPE_NAME "gSAPAuthOffloadSec" +#define CFG_SAP_AUTH_OFL_SECURITY_TYPE_MIN ( 0 ) +#define CFG_SAP_AUTH_OFL_SECURITY_TYPE_MAX ( 1 ) +#define CFG_SAP_AUTH_OFL_SECURITY_TYPE_DEFAULT ( 0 ) + +/* SAP Authentication offload Security Key */ +#define CFG_SAP_AUTH_OFL_KEY_NAME "gSAPAuthOffloadKey" +#define CFG_SAP_AUTH_OFL_KEY_DEFAULT "" +#endif /* SAP_AUTH_OFFLOAD */ + /*--------------------------------------------------------------------------- Type declarations -------------------------------------------------------------------------*/ @@ -3255,6 +3283,12 @@ typedef struct uint16_t mdns_resp_type_srv_port; uint8_t mdns_resp_type_srv_target[MAX_MDNS_RESP_LEN]; #endif /* MDNS_OFFLOAD */ + +#ifdef SAP_AUTH_OFFLOAD + bool enable_sap_auth_offload; + uint32_t sap_auth_offload_sec_type; + uint8_t sap_auth_offload_key[WLAN_PSK_STRING_LENGTH]; +#endif /* SAP_AUTH_OFFLOAD */ } hdd_config_t; #ifdef WLAN_FEATURE_MBSSID diff --git a/CORE/HDD/inc/wlan_hdd_hostapd.h b/CORE/HDD/inc/wlan_hdd_hostapd.h index 0808f10d82b5..5bbcb266bfc6 100644 --- a/CORE/HDD/inc/wlan_hdd_hostapd.h +++ b/CORE/HDD/inc/wlan_hdd_hostapd.h @@ -101,4 +101,15 @@ void hdd_restart_softap (hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter); VOS_STATUS hdd_set_sap_ht2040_mode(hdd_adapter_t *pHostapdAdapter, tANI_U8 channel_type); #endif + +#ifdef SAP_AUTH_OFFLOAD +void hdd_set_sap_auth_offload(hdd_adapter_t *pHostapdAdapter, + bool enabled); +#else +static inline void +hdd_set_sap_auth_offload(hdd_adapter_t *pHostapdAdapter, bool enabled) +{ +} +#endif /* SAP_AUTH_OFFLOAD */ + #endif // end #if !defined( WLAN_HDD_HOSTAPD_H ) diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index dcfd3a5481d7..6346ab574659 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -1736,4 +1736,5 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter); static inline void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter) {} static inline void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter) {} #endif +int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed); #endif // end #if !defined( WLAN_HDD_MAIN_H ) diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index f977e4db658c..680097c1ef4e 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -3494,6 +3494,27 @@ REG_TABLE_ENTRY g_registry_table[] = VAR_FLAGS_OPTIONAL, (void *) CFG_MDNS_RESPONSE_TYPE_SRV_TGT_DEFAULT ), #endif /* MDNS_OFFLOAD */ + +#ifdef SAP_AUTH_OFFLOAD + REG_VARIABLE( CFG_ENABLE_SAP_AUTH_OFL_NAME, WLAN_PARAM_Integer, + hdd_config_t, enable_sap_auth_offload, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ENABLE_SAP_AUTH_OFL_DEFAULT, + CFG_ENABLE_SAP_AUTH_OFL_MIN, + CFG_ENABLE_SAP_AUTH_OFL_MAX ), + + REG_VARIABLE( CFG_SAP_AUTH_OFL_SECURITY_TYPE_NAME, WLAN_PARAM_Integer, + hdd_config_t, sap_auth_offload_sec_type, + VAR_FLAGS_OPTIONAL | CFG_SAP_AUTH_OFL_SECURITY_TYPE_DEFAULT, + CFG_SAP_AUTH_OFL_SECURITY_TYPE_DEFAULT, + CFG_SAP_AUTH_OFL_SECURITY_TYPE_MIN, + CFG_SAP_AUTH_OFL_SECURITY_TYPE_MAX ), + + REG_VARIABLE_STRING( CFG_SAP_AUTH_OFL_KEY_NAME, WLAN_PARAM_String, + hdd_config_t, sap_auth_offload_key, + VAR_FLAGS_OPTIONAL, + (void *) CFG_SAP_AUTH_OFL_KEY_DEFAULT ), +#endif /* SAP_AUTH_OFFLOAD */ }; #ifdef WLAN_FEATURE_MBSSID diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index 47bfe806796b..5405e66f3793 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -721,6 +721,60 @@ static int hdd_stop_p2p_link(hdd_adapter_t *pHostapdAdapter,v_PVOID_t usrDataFor return (status == VOS_STATUS_SUCCESS) ? 0 : -EBUSY; } +#ifdef SAP_AUTH_OFFLOAD +void hdd_set_sap_auth_offload(hdd_adapter_t *pHostapdAdapter, + bool enabled) +{ + hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pHostapdAdapter); + struct tSirSapOffloadInfo *sap_offload_info = NULL; + + /* Prepare the request to send to SME */ + sap_offload_info = vos_mem_malloc(sizeof(*sap_offload_info)); + if (NULL == sap_offload_info) { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%s: could not allocate tSirSapOffloadInfo!", __func__); + return; + } + + vos_mem_zero(sap_offload_info, sizeof(*sap_offload_info)); + + sap_offload_info->vdev_id = pHostapdAdapter->sessionId; + sap_offload_info->sap_auth_offload_enable = + pHddCtx->cfg_ini->enable_sap_auth_offload && enabled; + sap_offload_info->sap_auth_offload_sec_type = + pHddCtx->cfg_ini->sap_auth_offload_sec_type; + sap_offload_info->key_len = + strlen(pHddCtx->cfg_ini->sap_auth_offload_key); + + if (sap_offload_info->sap_auth_offload_enable) { + if (sap_offload_info->key_len < 8 || + sap_offload_info->key_len > WLAN_PSK_STRING_LENGTH) { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%s: invalid key length(%d) of WPA security!", __func__, + sap_offload_info->key_len); + goto end; + } + } + + vos_mem_copy(sap_offload_info->key, + pHddCtx->cfg_ini->sap_auth_offload_key, + sap_offload_info->key_len); + if (eHAL_STATUS_SUCCESS != + sme_set_sap_auth_offload(pHddCtx->hHal, sap_offload_info)) { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%s: sme_set_sap_auth_offload fail!", __func__); + goto end; + } + + hddLog(VOS_TRACE_LEVEL_INFO_HIGH, + "%s: sme_set_sap_auth_offload successfully!", __func__); + +end: + vos_mem_free(sap_offload_info); + return; +} +#endif /* SAP_AUTH_OFFLOAD */ + VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCallback) { hdd_adapter_t *pHostapdAdapter; @@ -989,6 +1043,8 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa hddLog(LOG1, FL("BSS stop status = %s"),pSapEvent->sapevt.sapStopBssCompleteEvent.status ? "eSAP_STATUS_FAILURE" : "eSAP_STATUS_SUCCESS"); + hdd_set_sap_auth_offload(pHostapdAdapter, FALSE); + hdd_hostapd_channel_allow_suspend(pHostapdAdapter, pHddApCtx->operatingChannel); @@ -4968,6 +5024,8 @@ VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter ) ENTER(); + hdd_set_sap_auth_offload(pAdapter, TRUE); + #ifdef WLAN_FEATURE_MBSSID sapContext = WLANSAP_Open(pVosContext); if (sapContext == NULL) diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index a3c669a8f6d1..8a1b4a93c673 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -4015,6 +4015,51 @@ int hdd_set_miracast_mode(hdd_adapter_t *pAdapter, tANI_U8 *command) return 0; } +/** + * wlan_hdd_get_link_speed() - get link speed + * @pAdapter: pointer to the adapter + * @link_speed: pointer to link speed + * + * This function fetches per bssid link speed. + * + * Return: if associated, link speed shall be returned. + * if not associated, link speed of 0 is returned. + * On error, error number will be returned. + */ +int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed) +{ + hdd_context_t *hddctx = WLAN_HDD_GET_CTX(sta_adapter); + hdd_station_ctx_t *hdd_stactx = WLAN_HDD_GET_STATION_CTX_PTR(sta_adapter); + int ret; + + ret = wlan_hdd_validate_context(hddctx); + + if (0 != ret) { + hddLog(LOGE, FL("HDD context is not valid")); + return ret; + } + + if (eConnectionState_Associated != hdd_stactx->conn_info.connState) { + /* we are not connected so we don't have a classAstats */ + *link_speed = 0; + } else { + VOS_STATUS status; + tSirMacAddr bssid; + + vos_mem_copy(bssid, hdd_stactx->conn_info.bssId, VOS_MAC_ADDR_SIZE); + + status = wlan_hdd_get_linkspeed_for_peermac(sta_adapter, bssid); + if (!VOS_IS_STATUS_SUCCESS(status)) { + hddLog(LOGE, FL("Unable to retrieve SME linkspeed")); + return -EINVAL; + } + *link_speed = sta_adapter->ls_stats.estLinkSpeed; + /* linkspeed in units of 500 kbps */ + *link_speed = (*link_speed) / 500; + } + return 0; +} + static int hdd_driver_command(hdd_adapter_t *pAdapter, hdd_priv_data_t *ppriv_data) { @@ -6113,6 +6158,21 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, ret = -EFAULT; goto exit; } + } else if (strncasecmp(command, "LINKSPEED", 9) == 0) { + uint32_t link_speed = 0; + char extra[32]; + uint8_t len = 0; + + ret = wlan_hdd_get_link_speed(pAdapter, &link_speed); + if (0 != ret) + goto exit; + + len = scnprintf(extra, sizeof(extra), "%s %d", command, link_speed); + if (copy_to_user(priv_data.buf, &extra, len + 1)) { + hddLog(LOGE, FL("Failed to copy data to user buffer")); + ret = -EFAULT; + goto exit; + } } else { MTRACE(vos_trace(VOS_MODULE_ID_HDD, TRACE_CODE_HDD_UNSUPPORTED_IOCTL, @@ -9610,6 +9670,8 @@ VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter, wlan_hdd_cleanup_remain_on_channel_ctx(pAdapter); } + hdd_set_sap_auth_offload(pAdapter, FALSE); + #ifdef QCA_LL_TX_FLOW_CT WLANTL_DeRegisterTXFlowControl(pHddCtx->pvosContext, pAdapter->sessionId); if (pAdapter->tx_flow_timer_initialized == VOS_TRUE) { diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index 1089da8b8155..4ccf782365eb 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -3007,44 +3007,17 @@ static int iw_get_linkspeed(struct net_device *dev, union iwreq_data *wrqu, char *extra) { hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); - hdd_context_t *pHddCtx; - hdd_station_ctx_t *pHddStaCtx; char *pLinkSpeed = (char*)extra; int len = sizeof(v_U32_t) + 1; v_U32_t link_speed = 0; - VOS_STATUS status; - int rc, valid; - tSirMacAddr bssid; - - pHddCtx = WLAN_HDD_GET_CTX(pAdapter); - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); - - valid = wlan_hdd_validate_context(pHddCtx); + int rc; + int ret_val; - if (0 != valid) - { - hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid")); - return valid; + ret_val = wlan_hdd_get_link_speed(pAdapter, &link_speed); + if (0 != ret_val) { + return ret_val; } - vos_mem_copy(bssid, pHddStaCtx->conn_info.bssId, VOS_MAC_ADDR_SIZE); - if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) - { - /* we are not connected so we don't have a classAstats */ - link_speed = 0; - } - else - { - status = wlan_hdd_get_linkspeed_for_peermac(pAdapter, bssid); - if (!VOS_IS_STATUS_SUCCESS(status )) - { - hddLog(VOS_TRACE_LEVEL_ERROR, FL("Unable to retrieve SME linkspeed")); - return -EINVAL; - } - link_speed = pAdapter->ls_stats.estLinkSpeed; - /* linkspeed in units of 500 kbps */ - link_speed = link_speed / 500; - } wrqu->data.length = len; /* return the linkspeed in the format required by the WiFi Framework */ rc = snprintf(pLinkSpeed, len, "%u", link_speed); diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h index 78ee9f7eee08..0224b806ca3f 100644 --- a/CORE/MAC/inc/aniGlobal.h +++ b/CORE/MAC/inc/aniGlobal.h @@ -1039,6 +1039,10 @@ typedef struct sAniSirGlobal csrReadyToExtWoWCallback readyToExtWoWCallback; void *readyToExtWoWContext; #endif +#ifdef SAP_AUTH_OFFLOAD + bool sap_auth_offload; + uint32_t sap_auth_offload_sec_type; +#endif /* SAP_AUTH_OFFLOAD */ } tAniSirGlobal; typedef enum diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index 152cd8ef8e31..b4c36c50427a 100644 --- a/CORE/MAC/inc/qwlan_version.h +++ b/CORE/MAC/inc/qwlan_version.h @@ -42,9 +42,9 @@ BRIEF DESCRIPTION: #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 0 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 241 +#define QWLAN_VERSION_BUILD 242 -#define QWLAN_VERSIONSTR "1.0.0.241B" +#define QWLAN_VERSIONSTR "1.0.0.242" #define AR6320_REV1_VERSION 0x5000000 diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index 82ad3609fbe2..1f94faa4411b 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -5585,4 +5585,26 @@ typedef struct /* number of neighbor reports that we can handle in Neighbor Report Response */ #define MAX_SUPPORTED_NEIGHBOR_RPT 15 +#ifdef SAP_AUTH_OFFLOAD +/* 80211 Pre-Share Key length */ +#define SIR_PSK_MAX_LEN 64 + +/* Definition for Software AP Auth Offload Security Type */ +enum tSirSecurityType +{ + eSIR_OFFLOAD_NONE, + eSIR_OFFLOAD_WPA2PSK_CCMP, +}; + +/* Structure for Software AP Auth Offload feature */ +struct tSirSapOffloadInfo +{ + uint32_t vdev_id; + bool sap_auth_offload_enable; + uint32_t sap_auth_offload_sec_type; + uint32_t key_len; + uint8_t key[SIR_PSK_MAX_LEN]; +}; +#endif /* SAP_AUTH_OFFLOAD */ + #endif /* __SIR_API_H */ diff --git a/CORE/MAC/src/cfg/cfgApi.c b/CORE/MAC/src/cfg/cfgApi.c index 343fd6e41540..5008619b78c1 100644 --- a/CORE/MAC/src/cfg/cfgApi.c +++ b/CORE/MAC/src/cfg/cfgApi.c @@ -856,6 +856,15 @@ cfgGetCapabilityInfo(tpAniSirGlobal pMac, tANI_U16 *pCap,tpPESession sessionEntr if (LIM_IS_AP_ROLE(sessionEntry)) { val = sessionEntry->privacy; +#ifdef SAP_AUTH_OFFLOAD + /* Support software AP Authentication Offload feature, + * If Auth offload security Type is not disabled + * We need to enable privacy bit in beacon + */ + if (pMac->sap_auth_offload && pMac->sap_auth_offload_sec_type) { + val = 1; + } +#endif } else { // PRIVACY bit if (wlan_cfgGetInt(pMac, WNI_CFG_PRIVACY_ENABLED, &val) != eSIR_SUCCESS) diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h index 0e1a88d6c169..8876dd50d249 100644 --- a/CORE/MAC/src/include/parserApi.h +++ b/CORE/MAC/src/include/parserApi.h @@ -858,3 +858,10 @@ PopulateDot11fWiderBWChanSwitchAnn(tpAniSirGlobal pMac, void PopulateDot11fTimeoutInterval( tpAniSirGlobal pMac, tDot11fIETimeoutInterval *pDot11f, tANI_U8 type, tANI_U32 value ); + +#ifdef SAP_AUTH_OFFLOAD +void +sap_auth_offload_update_rsn_ie(tpAniSirGlobal pmac, + tDot11fIERSNOpaque *pdot11f); +#endif /* SAP_AUTH_OFFLOAD */ + diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h index a4b3885975c9..3a9f2e6da09f 100644 --- a/CORE/MAC/src/include/sirParams.h +++ b/CORE/MAC/src/include/sirParams.h @@ -682,6 +682,12 @@ typedef struct sSirMbMsgP2p #define SIR_HAL_GET_MDNS_STATUS (SIR_HAL_ITC_MSG_TYPES_BEGIN + 302) #endif /* MDNS_OFFLOAD */ +#ifdef SAP_AUTH_OFFLOAD +#define SIR_HAL_SET_SAP_AUTH_OFL (SIR_HAL_ITC_MSG_TYPES_BEGIN + 303) +#define SIR_HAL_SAP_OFL_ADD_STA (SIR_HAL_ITC_MSG_TYPES_BEGIN + 304) +#define SIR_HAL_SAP_OFL_DEL_STA (SIR_HAL_ITC_MSG_TYPES_BEGIN + 305) +#endif + #define SIR_HAL_MSG_TYPES_END (SIR_HAL_MSG_TYPES_BEGIN + 0x1FF) // CFG message types diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c index 6bfe87f73110..e0abca44ee8c 100644 --- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c +++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c @@ -2021,6 +2021,15 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg) limMsg->bodyptr = NULL; break; #endif + +#ifdef SAP_AUTH_OFFLOAD + case WDA_SAP_OFL_ADD_STA: + lim_sap_offload_add_sta(pMac, limMsg); + break; + case WDA_SAP_OFL_DEL_STA: + lim_sap_offload_del_sta(pMac, limMsg); + break; +#endif /* SAP_AUTH_OFFLOAD */ default: vos_mem_free((v_VOID_t*)limMsg->bodyptr); limMsg->bodyptr = NULL; diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 1e506cb139c8..96d8029ead4c 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -4016,8 +4016,85 @@ end: } /*** end __limProcessSmeAssocCnfNew() ***/ +#ifdef SAP_AUTH_OFFLOAD +/** + * __lim_process_sme_assoc_offload_cnf() station connect confirm + * @pMac: SirGlobal handler + * @msgType: message type + * @pMsgBuf: message body + * + * This function handles the station connect confirm of + * Software AP authentication offload feature + * + * Return: None + */ +static void +__lim_process_sme_assoc_offload_cnf(tpAniSirGlobal pmac, + tANI_U32 msg_type, + tANI_U32 *pmsg_buf) +{ + tSirSmeAssocCnf assoc_cnf; + tpDphHashNode sta_ds = NULL; + tpPESession psession_entry= NULL; + tANI_U8 session_id; + tANI_U16 aid=0; + + if(pmsg_buf == NULL) { + limLog(pmac, LOGE, FL("pmsg_buf is NULL ")); + goto end; + } + + if ((limAssocCnfSerDes(pmac, &assoc_cnf, (tANI_U8 *) pmsg_buf) == + eSIR_FAILURE) || !__limIsSmeAssocCnfValid(&assoc_cnf)) { + limLog(pmac, LOGE, FL("Received invalid SME_RE(ASSOC)_CNF message ")); + goto end; + } + + if((psession_entry = + peFindSessionByBssid(pmac, assoc_cnf.bssId, &session_id))== NULL) { + limLog(pmac, LOGE, FL("session does not exist for given bssId")); + goto end; + } + if ((!LIM_IS_AP_ROLE(psession_entry) && + !LIM_IS_BT_AMP_AP_ROLE(psession_entry)) || + ((psession_entry->limSmeState != eLIM_SME_NORMAL_STATE) && + (psession_entry->limSmeState != eLIM_SME_NORMAL_CHANNEL_SCAN_STATE))) { + limLog(pmac, LOGE, + FL("Received unexpected message %X in state %X, in role %X"), + msg_type, psession_entry->limSmeState, + GET_LIM_SYSTEM_ROLE(psession_entry)); + goto end; + } + + sta_ds = dphGetHashEntry(pmac, + assoc_cnf.aid, + &psession_entry->dph.dphHashTable); + if (sta_ds != NULL) { + aid = sta_ds->assocId; + limDeactivateAndChangePerStaIdTimer(pmac, + eLIM_CNF_WAIT_TIMER, + aid); + } + +end: + if((psession_entry != NULL) && (sta_ds != NULL)) { + if ( psession_entry->parsedAssocReq[aid] != NULL ) { + if ( ((tpSirAssocReq) + (psession_entry->parsedAssocReq[aid]))->assocReqFrame) { + vos_mem_free(((tpSirAssocReq) + (psession_entry->parsedAssocReq[aid]))->assocReqFrame); + ((tpSirAssocReq) + (psession_entry->parsedAssocReq[aid]))->assocReqFrame = + NULL; + } + vos_mem_free(psession_entry->parsedAssocReq[aid]); + psession_entry->parsedAssocReq[aid] = NULL; + } + } +} /*** end __lim_process_sme_assoc_offload_cnf() ***/ +#endif /* SAP_AUTH_OFFLOAD */ static void __limProcessSmeAddtsReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) @@ -5658,7 +5735,16 @@ limProcessSmeReqMessages(tpAniSirGlobal pMac, tpSirMsgQ pMsg) PELOG1(limLog(pMac, LOG1, FL("Received ASSOC_CNF message"));) else PELOG1(limLog(pMac, LOG1, FL("Received REASSOC_CNF message"));) + +#ifdef SAP_AUTH_OFFLOAD + if (pMac->sap_auth_offload) { + __lim_process_sme_assoc_offload_cnf(pMac, pMsg->type, pMsgBuf); + } else { + __limProcessSmeAssocCnfNew(pMac, pMsg->type, pMsgBuf); + } +#else __limProcessSmeAssocCnfNew(pMac, pMsg->type, pMsgBuf); +#endif /* SAP_AUTH_OFFLOAD */ break; case eWNI_SME_ADDTS_REQ: diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c index 3825ce5482f0..9eaff2c2fa94 100644 --- a/CORE/MAC/src/pe/lim/limUtils.c +++ b/CORE/MAC/src/pe/lim/limUtils.c @@ -64,6 +64,10 @@ #include "wniCfgAp.h" #endif +#ifdef SAP_AUTH_OFFLOAD +#include "limAssocUtils.h" +#endif + /* Static global used to mark situations where pMac->lim.gLimTriggerBackgroundScanDuringQuietBss is SET * and limTriggerBackgroundScanDuringQuietBss() returned failure. In this case, we will stop data * traffic instead of going into scan. The recover function limProcessQuietBssTimeout() needs to have @@ -7520,3 +7524,430 @@ void lim_set_ht_caps(tpAniSirGlobal p_mac, tpPESession p_session_entry, p_ht_cap->txSoundingPPDUs = dot11_ht_cap.txSoundingPPDUs; } } + +#ifdef SAP_AUTH_OFFLOAD +static tpDphHashNode +_sap_offload_parse_assoc_req(tpAniSirGlobal pmac, + tpSirAssocReq assoc_req, + struct sap_offload_add_sta_req *add_sta_req) +{ + tpSirMacAssocReqFrame mac_assoc_req = NULL; + tpSirAssocReq temp_assoc_req; + tSirRetStatus status; + tpSirMacMgmtHdr mac_hdr = NULL; + tpDphHashNode sta_ds = NULL; + uint8_t *frame_body; + + tpPESession session_entry = limIsApSessionActive(pmac); + mac_hdr = (tpSirMacMgmtHdr)add_sta_req->conn_req; + + /* Update Attribute and Remove IE for + * Software AP Authentication Offload + */ + frame_body = (tANI_U8 *)add_sta_req->conn_req + sizeof(*mac_hdr); + mac_assoc_req = (tpSirMacAssocReqFrame)frame_body; + mac_assoc_req->capabilityInfo.privacy = 0; + + status = sirConvertAssocReqFrame2Struct(pmac, + frame_body, + add_sta_req->conn_req_len, + assoc_req); + if (status != eSIR_SUCCESS) { + limLog(pmac, LOGW, FL("sap_offload_add_sta_req parse error\n")); + goto error; + } + /* For software AP Auth Offload feature + * Host will take it as none security station + * Force change to none security + */ + assoc_req->rsnPresent = 0; + assoc_req->wpaPresent = 0; + + sta_ds = dphAddHashEntry(pmac, + mac_hdr->sa, + add_sta_req->assoc_id, + &session_entry->dph.dphHashTable); + if (sta_ds == NULL) { + /* Could not add hash table entry at DPH */ + limLog(pmac, LOGE, + FL("could not add hash entry at DPH for aid=%d, MacAddr:" + MAC_ADDRESS_STR), + add_sta_req->assoc_id,MAC_ADDR_ARRAY(mac_hdr->sa)); + goto error; + } + + if (session_entry->parsedAssocReq != NULL) { + temp_assoc_req = session_entry->parsedAssocReq[sta_ds->assocId]; + if (temp_assoc_req != NULL) { + if (temp_assoc_req->assocReqFrame) { + vos_mem_free(temp_assoc_req->assocReqFrame); + temp_assoc_req->assocReqFrame = NULL; + temp_assoc_req->assocReqFrameLength = 0; + } + vos_mem_free(temp_assoc_req); + temp_assoc_req = NULL; + } + session_entry->parsedAssocReq[sta_ds->assocId] = assoc_req; + } +error: + return sta_ds; +} + +static void +_sap_offload_parse_sta_capability(tpDphHashNode sta_ds, + tpSirAssocReq assoc_req, + struct sap_offload_add_sta_req *add_sta_req) +{ + tpSirMacMgmtHdr mac_hdr = NULL; + + mac_hdr = (tpSirMacMgmtHdr)add_sta_req->conn_req; + + sta_ds->mlmStaContext.htCapability = assoc_req->HTCaps.present; +#ifdef WLAN_FEATURE_11AC + sta_ds->mlmStaContext.vhtCapability = assoc_req->VHTCaps.present; +#endif + sta_ds->qos.addtsPresent = (assoc_req->addtsPresent==0) ? false : true; + sta_ds->qos.addts = assoc_req->addtsReq; + sta_ds->qos.capability = assoc_req->qosCapability; + sta_ds->versionPresent = 0; + /* short slot and short preamble should be + * updated before doing limaddsta + */ + sta_ds->shortPreambleEnabled = + (tANI_U8)assoc_req->capabilityInfo.shortPreamble; + sta_ds->shortSlotTimeEnabled = + (tANI_U8)assoc_req->capabilityInfo.shortSlotTime; + + sta_ds->valid = 0; + /* The Auth Type of Software AP Authentication Offload + * is always Open System is host side + */ + sta_ds->mlmStaContext.authType = eSIR_OPEN_SYSTEM; + sta_ds->staType = STA_ENTRY_PEER; + + /* Re/Assoc Response frame to requesting STA */ + sta_ds->mlmStaContext.subType = mac_hdr->fc.subType; + + sta_ds->mlmStaContext.listenInterval = assoc_req->listenInterval; + sta_ds->mlmStaContext.capabilityInfo = assoc_req->capabilityInfo; + + /* The following count will be used to knock-off the station + * if it doesn't come back to receive the buffered data. + * The AP will wait for numTimSent number of beacons after + * sending TIM information for the station, before assuming that + * the station is no more associated and disassociates it + */ + + /* timWaitCount is used by PMM for monitoring the STA's in PS for LINK*/ + sta_ds->timWaitCount = + (tANI_U8)GET_TIM_WAIT_COUNT(assoc_req->listenInterval); + + /* Initialise the Current successful + * MPDU's tranfered to this STA count as 0 + */ + sta_ds->curTxMpduCnt = 0; +} + +static tSirRetStatus +_sap_offload_parse_sta_vht(tpAniSirGlobal pmac, + tpDphHashNode sta_ds, + tpSirAssocReq assoc_req) +{ + tpPESession session_entry = limIsApSessionActive(pmac); + + if (IS_DOT11_MODE_HT(session_entry->dot11mode) && + assoc_req->HTCaps.present && assoc_req->wmeInfoPresent) { + sta_ds->htGreenfield = (tANI_U8)assoc_req->HTCaps.greenField; + sta_ds->htAMpduDensity = assoc_req->HTCaps.mpduDensity; + sta_ds->htDsssCckRate40MHzSupport = + (tANI_U8)assoc_req->HTCaps.dsssCckMode40MHz; + sta_ds->htLsigTXOPProtection = + (tANI_U8)assoc_req->HTCaps.lsigTXOPProtection; + sta_ds->htMaxAmsduLength = + (tANI_U8)assoc_req->HTCaps.maximalAMSDUsize; + sta_ds->htMaxRxAMpduFactor = assoc_req->HTCaps.maxRxAMPDUFactor; + sta_ds->htMIMOPSState = assoc_req->HTCaps.mimoPowerSave; + sta_ds->htShortGI20Mhz = (tANI_U8)assoc_req->HTCaps.shortGI20MHz; + sta_ds->htShortGI40Mhz = (tANI_U8)assoc_req->HTCaps.shortGI40MHz; + sta_ds->htSupportedChannelWidthSet = + (tANI_U8)assoc_req->HTCaps.supportedChannelWidthSet; + /* peer just follows AP; so when we are softAP/GO, + * we just store our session entry's secondary channel offset here + * in peer INFRA STA. However, if peer's 40MHz channel width support + * is disabled then secondary channel will be zero + */ + sta_ds->htSecondaryChannelOffset = + (sta_ds->htSupportedChannelWidthSet) ? + session_entry->htSecondaryChannelOffset : 0; +#ifdef WLAN_FEATURE_11AC + if (assoc_req->operMode.present) { + sta_ds->vhtSupportedChannelWidthSet = + (tANI_U8)((assoc_req->operMode.chanWidth == + eHT_CHANNEL_WIDTH_80MHZ) ? + WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ : + WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ); + sta_ds->htSupportedChannelWidthSet = + (tANI_U8)(assoc_req->operMode.chanWidth ? + eHT_CHANNEL_WIDTH_40MHZ : eHT_CHANNEL_WIDTH_20MHZ); + } else if (assoc_req->VHTCaps.present) { + /* Check if STA has enabled it's channel bonding mode. + * If channel bonding mode is enabled, we decide based on + * SAP's current configuration else, we set it to VHT20. + */ + sta_ds->vhtSupportedChannelWidthSet = + (tANI_U8)((sta_ds->htSupportedChannelWidthSet == + eHT_CHANNEL_WIDTH_20MHZ) ? + WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ : + session_entry->vhtTxChannelWidthSet ); + sta_ds->htMaxRxAMpduFactor = assoc_req->VHTCaps.maxAMPDULenExp; + } + + /* Lesser among the AP and STA bandwidth of operation. */ + sta_ds->htSupportedChannelWidthSet = + (sta_ds->htSupportedChannelWidthSet < + session_entry->htSupportedChannelWidthSet) ? + sta_ds->htSupportedChannelWidthSet : + session_entry->htSupportedChannelWidthSet ; +#endif + sta_ds->baPolicyFlag = 0xFF; + sta_ds->htLdpcCapable = (tANI_U8)assoc_req->HTCaps.advCodingCap; + } + + if (assoc_req->VHTCaps.present && assoc_req->wmeInfoPresent) { + sta_ds->vhtLdpcCapable = (tANI_U8)assoc_req->VHTCaps.ldpcCodingCap; + } + + if (!assoc_req->wmeInfoPresent) { + sta_ds->mlmStaContext.htCapability = 0; +#ifdef WLAN_FEATURE_11AC + sta_ds->mlmStaContext.vhtCapability = 0; +#endif + } +#ifdef WLAN_FEATURE_11AC + if (limPopulateMatchingRateSet(pmac, + sta_ds, + &(assoc_req->supportedRates), + &(assoc_req->extendedRates), + assoc_req->HTCaps.supportedMCSSet, + session_entry , &assoc_req->VHTCaps) + != eSIR_SUCCESS) { +#else + if (limPopulateMatchingRateSet(pmac, + sta_ds, + &(assoc_req->supportedRates), + &(assoc_req->extendedRates), + assoc_req->HTCaps.supportedMCSSet, + &(assoc_req->propIEinfo.propRates), + session_entry) != eSIR_SUCCESS) { +#endif + limLog(pmac, LOGE, + FL("Rate set mismatched for aid=%d, MacAddr: " + MAC_ADDRESS_STR), + sta_ds->assocId, MAC_ADDR_ARRAY(sta_ds->staAddr)); + goto error; + } + +#ifdef WLAN_FEATURE_11AC + if (assoc_req->operMode.present) { + sta_ds->vhtSupportedRxNss = assoc_req->operMode.rxNSS + 1; + } else { + sta_ds->vhtSupportedRxNss = + ((sta_ds->supportedRates.vhtRxMCSMap & MCSMAPMASK2x2) + == MCSMAPMASK2x2) ? 1 : 2; + } +#endif + + return eSIR_SUCCESS; +error: + return eSIR_FAILURE; +} + +static void +_sap_offload_parse_sta_qos(tpAniSirGlobal pmac, + tpDphHashNode sta_ds, + tpSirAssocReq assoc_req) +{ + tHalBitVal qos_mode; + tHalBitVal wsm_mode, wme_mode; + tpPESession session_entry = limIsApSessionActive(pmac); + + limGetQosMode(session_entry, &qos_mode); + sta_ds->qosMode = eANI_BOOLEAN_FALSE; + sta_ds->lleEnabled = eANI_BOOLEAN_FALSE; + + if (assoc_req->capabilityInfo.qos && (qos_mode == eHAL_SET)) { + sta_ds->lleEnabled = eANI_BOOLEAN_TRUE; + sta_ds->qosMode = eANI_BOOLEAN_TRUE; + } + + sta_ds->wmeEnabled = eANI_BOOLEAN_FALSE; + sta_ds->wsmEnabled = eANI_BOOLEAN_FALSE; + limGetWmeMode(session_entry, &wme_mode); + if ((!sta_ds->lleEnabled) && assoc_req->wmeInfoPresent && + (wme_mode == eHAL_SET)) { + sta_ds->wmeEnabled = eANI_BOOLEAN_TRUE; + sta_ds->qosMode = eANI_BOOLEAN_TRUE; + limGetWsmMode(session_entry, &wsm_mode); + /* WMM_APSD - WMM_SA related processing should be + * separate; WMM_SA and WMM_APSD can coexist + */ + if (assoc_req->WMMInfoStation.present) { + /* check whether AP supports or not */ + if ((session_entry->limSystemRole == eLIM_AP_ROLE) + && (session_entry->apUapsdEnable == 0) && + (assoc_req->WMMInfoStation.acbe_uapsd + || assoc_req->WMMInfoStation.acbk_uapsd + || assoc_req->WMMInfoStation.acvo_uapsd + || assoc_req->WMMInfoStation.acvi_uapsd)) { + /* + * Received Re/Association Request from + * STA when UPASD is not supported + */ + limLog( pmac, LOGE, FL( "AP do not support UAPSD so reply " + "to STA accordingly" )); + /* update UAPSD and send it to LIM to add STA */ + sta_ds->qos.capability.qosInfo.acbe_uapsd = 0; + sta_ds->qos.capability.qosInfo.acbk_uapsd = 0; + sta_ds->qos.capability.qosInfo.acvo_uapsd = 0; + sta_ds->qos.capability.qosInfo.acvi_uapsd = 0; + sta_ds->qos.capability.qosInfo.maxSpLen = 0; + } else { + /* update UAPSD and send it to LIM to add STA */ + sta_ds->qos.capability.qosInfo.acbe_uapsd = + assoc_req->WMMInfoStation.acbe_uapsd; + sta_ds->qos.capability.qosInfo.acbk_uapsd = + assoc_req->WMMInfoStation.acbk_uapsd; + sta_ds->qos.capability.qosInfo.acvo_uapsd = + assoc_req->WMMInfoStation.acvo_uapsd; + sta_ds->qos.capability.qosInfo.acvi_uapsd = + assoc_req->WMMInfoStation.acvi_uapsd; + sta_ds->qos.capability.qosInfo.maxSpLen = + assoc_req->WMMInfoStation.max_sp_length; + } + } + if (assoc_req->wsmCapablePresent && (wsm_mode == eHAL_SET)) + sta_ds->wsmEnabled = eANI_BOOLEAN_TRUE; + } +} + +void lim_sap_offload_add_sta(tpAniSirGlobal pmac, tpSirMsgQ lim_msgq) +{ + tpSirAssocReq assoc_req = NULL; + tpDphHashNode sta_ds = NULL; + + struct sap_offload_add_sta_req *add_sta_req = NULL; + tpPESession session_entry = limIsApSessionActive(pmac); + + if (session_entry == NULL) { + PELOGE(limLog(pmac, LOGE, FL(" Session not found"));) + return; + } + add_sta_req = (struct sap_offload_add_sta_req *)lim_msgq->bodyptr; + assoc_req = vos_mem_malloc(sizeof(*assoc_req)); + if (NULL == assoc_req) { + limLog(pmac, LOGP, FL("Allocate Memory failed in AssocReq")); + return; + } + vos_mem_set(assoc_req , sizeof(*assoc_req), 0); + + /* parse Assoc req frame for station information */ + sta_ds = _sap_offload_parse_assoc_req(pmac, assoc_req, add_sta_req); + if (sta_ds == NULL) { + vos_mem_free(assoc_req); + goto error; + } + + /* Parse Station Capability */ + _sap_offload_parse_sta_capability(sta_ds, assoc_req, add_sta_req); + + /* Parse Station HT/VHT information */ + if (_sap_offload_parse_sta_vht(pmac, sta_ds, assoc_req) + == eSIR_FAILURE) { + goto error; + } + + /* Parse Station QOS information */ + _sap_offload_parse_sta_qos(pmac, sta_ds, assoc_req); + + if (assoc_req->ExtCap.present) { + sta_ds->timingMeasCap = 0; + sta_ds->timingMeasCap |= (assoc_req->ExtCap.timingMeas)? + RTT_TIMING_MEAS_CAPABILITY : + RTT_INVALID; + sta_ds->timingMeasCap |= (assoc_req->ExtCap.fineTimingMeas)? + RTT_FINE_TIMING_MEAS_CAPABILITY : + RTT_INVALID; + PELOG1(limLog(pmac, LOG1, + FL("ExtCap present, timingMeas: %d fineTimingMeas: %d"), + assoc_req->ExtCap.timingMeas, + assoc_req->ExtCap.fineTimingMeas);) + } else { + sta_ds->timingMeasCap = 0; + PELOG1(limLog(pmac, LOG1, FL("ExtCap not present"));) + } + + session_entry->parsedAssocReq[sta_ds->assocId] = assoc_req; + + if (limAddSta(pmac, sta_ds, false, session_entry) != eSIR_SUCCESS) { + limLog(pmac, LOGE, FL("could not Add STA with assocId=%d"), + sta_ds->assocId); + } + +error: + vos_mem_free(add_sta_req); + return; +} + +void +lim_sap_offload_del_sta(tpAniSirGlobal pmac, tpSirMsgQ lim_msgq) +{ + struct sap_offload_del_sta_req *del_sta_req = NULL; + tpDphHashNode sta_ds = NULL; + tANI_U16 assoc_id = 0; + tpPESession psession_entry = limIsApSessionActive(pmac); + + if (psession_entry == NULL) { + PELOGE(limLog(pmac, LOGE, FL(" Session not found"));) + goto error; + } + + del_sta_req = ( struct sap_offload_del_sta_req *)lim_msgq->bodyptr; + sta_ds = dphLookupHashEntry(pmac, + del_sta_req->sta_mac, + &assoc_id, + &psession_entry->dph.dphHashTable); + if (sta_ds == NULL) { + /* + * Disassociating STA is not associated. + * Log error + */ + PELOGE(limLog(pmac, LOGE, + FL("received del sta event that sta not exist in table " + "reasonCode=%d, addr "MAC_ADDRESS_STR), + del_sta_req->reason_code, + MAC_ADDR_ARRAY(del_sta_req->sta_mac));) + goto error; + } + + if (assoc_id != (tANI_U16)del_sta_req->assoc_id) { + /* + * Associate Id mismatch + * Log error + */ + PELOGE(limLog(pmac, LOGE, + FL("received del sta event that sta assoc Id mismatch"));) + goto error; + } + + sta_ds->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DISASSOC; + sta_ds->mlmStaContext.disassocReason = + (tSirMacReasonCodes) del_sta_req->reason_code; + sta_ds->mlmStaContext.updateContext = 1; + + limSendSmeDisassocInd(pmac, sta_ds, psession_entry); + +error: + vos_mem_free(del_sta_req); + return; +} +#endif /* SAP_AUTH_OFFLOAD */ diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h index 2ee20a5acf89..696ca6e62af3 100644 --- a/CORE/MAC/src/pe/lim/limUtils.h +++ b/CORE/MAC/src/pe/lim/limUtils.h @@ -587,4 +587,12 @@ void lim_set_ht_caps(tpAniSirGlobal p_mac, tpPESession p_session_entry, tANI_U8 *p_ie_start, tANI_U32 num_bytes); + +#ifdef SAP_AUTH_OFFLOAD +void lim_sap_offload_add_sta(tpAniSirGlobal pmac, + tpSirMsgQ lim_msgq); +void lim_sap_offload_del_sta(tpAniSirGlobal pmac, + tpSirMsgQ lim_msgq); +#endif /* SAP_AUTH_OFFLOAD */ + #endif /* __LIM_UTILS_H */ diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c index e7743bcb7586..558fbca08a86 100644 --- a/CORE/MAC/src/pe/sch/schBeaconGen.c +++ b/CORE/MAC/src/pe/sch/schBeaconGen.c @@ -386,6 +386,13 @@ tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEn &pBcn2->WPA ); PopulateDot11fRSNOpaque( pMac, &psessionEntry->pLimStartBssReq->rsnIE, &pBcn2->RSNOpaque ); +#ifdef SAP_AUTH_OFFLOAD + /* Software AP Authentication Offload feature + * only support WPA2-PSK AES and we + * need to update RSNIE for beacon + */ + sap_auth_offload_update_rsn_ie(pMac, &pBcn2->RSNOpaque); +#endif } if(psessionEntry->limWmeEnabled) diff --git a/CORE/SERVICES/COMMON/wmi_services.h b/CORE/SERVICES/COMMON/wmi_services.h index 41ad47d36a98..461c77548e3a 100644 --- a/CORE/SERVICES/COMMON/wmi_services.h +++ b/CORE/SERVICES/COMMON/wmi_services.h @@ -93,7 +93,7 @@ typedef enum { WMI_SERVICE_QPOWER, /* QPower service */ WMI_SERVICE_PLMREQ, WMI_SERVICE_THERMAL_MGMT, - WMI_SERVICE_RMC, /* reliable multicast support */ + WMI_SERVICE_RMC, /* RMC support */ WMI_SERVICE_MHF_OFFLOAD, /* multi-hop forwarding offload */ WMI_SERVICE_COEX_SAR, /* target support SAR tx limit from WMI_PDEV_PARAM_TXPOWER_LIMITxG */ WMI_SERVICE_BCN_TXRATE_OVERRIDE, /* Will support the bcn/prb rsp rate override */ @@ -114,6 +114,7 @@ typedef enum { WMI_SERVICE_DHCP_OFFLOAD, /* DHCP offload support */ WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT, /* STA RX DATA offload to IPA support */ WMI_SERVICE_MDNS_OFFLOAD, /* mDNS responder offload support */ + WMI_SERVICE_SAP_AUTH_OFFLOAD, /* softap auth offload */ WMI_MAX_SERVICE=128 /* max service */ } WMI_SERVICE; diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h index 5dee8b4618bf..058ee257f24b 100644 --- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h +++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h @@ -519,7 +519,14 @@ typedef enum { WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param, - WMITLV_TAG_STRUC_wmi_roam_invoke_cmd_fixed_param + WMITLV_TAG_STRUC_wmi_roam_invoke_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param, + WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param, + WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param, + WMITLV_TAG_STRUC_wmi_apfind_cmd_param, + WMITLV_TAG_STRUC_wmi_apfind_event_hdr, } WMITLV_TAG_ID; /* @@ -716,7 +723,10 @@ typedef enum { OP(WMI_MDNS_OFFLOAD_ENABLE_CMDID) \ OP(WMI_MDNS_SET_FQDN_CMDID) \ OP(WMI_MDNS_SET_RESPONSE_CMDID) \ - OP(WMI_MDNS_GET_STATS_CMDID) + OP(WMI_MDNS_GET_STATS_CMDID) \ + OP(WMI_SET_ANTENNA_DIVERSITY_CMDID) \ + OP(WMI_SAP_OFL_ENABLE_CMDID) \ + OP(WMI_APFIND_CMDID) @@ -764,6 +774,7 @@ typedef enum { OP(WMI_GTK_REKEY_FAIL_EVENTID) \ OP(WMI_NLO_MATCH_EVENTID) \ OP(WMI_NLO_SCAN_COMPLETE_EVENTID) \ + OP(WMI_APFIND_EVENTID) \ OP(WMI_CHATTER_PC_QUERY_EVENTID) \ OP(WMI_UPLOADH_EVENTID) \ OP(WMI_CAPTUREH_EVENTID) \ @@ -808,7 +819,10 @@ typedef enum { OP(WMI_UPDATE_VDEV_RATE_STATS_EVENTID) \ OP(WMI_PDEV_TEMPERATURE_EVENTID) \ OP(WMI_DIAG_EVENTID) \ - OP(WMI_MDNS_STATS_EVENTID) + OP(WMI_MDNS_STATS_EVENTID) \ + OP(WMI_PDEV_RESUME_EVENTID) \ + OP(WMI_SAP_OFL_ADD_STA_EVENTID) \ + OP(WMI_SAP_OFL_DEL_STA_EVENTID) /* TLV definitions of WMI commands */ @@ -1953,6 +1967,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_D0_WOW_ENABLE_DISABLE_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param, wmi_pdev_get_temperature_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_GET_TEMPERATURE_CMDID); +/* Set antenna diversiry Cmd */ +#define WMITLV_TABLE_WMI_SET_ANTENNA_DIVERSITY_CMDID(id,op,buf,len) \ +WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param, wmi_pdev_set_antenna_diversity_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_SET_ANTENNA_DIVERSITY_CMDID); + /* DHCP server offload param Cmd */ #define WMITLV_TABLE_WMI_SET_DHCP_SERVER_OFFLOAD_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param, wmi_set_dhcp_server_offload_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -1994,6 +2013,18 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MDNS_GET_STATS_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_mac_addr, bssid_list, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_INVOKE_CMDID); +/* SAP Authentication offload param Cmd */ +#define WMITLV_TABLE_WMI_SAP_OFL_ENABLE_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param, wmi_sap_ofl_enable_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, psk, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_SAP_OFL_ENABLE_CMDID); + +/* APFIND Request */ +#define WMITLV_TABLE_WMI_APFIND_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_apfind_cmd_param, wmi_apfind_cmd_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_APFIND_CMDID); + /************************** TLV definitions of WMI events *******************************/ /* Service Ready event */ @@ -2336,6 +2367,12 @@ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_nlo_event, wmi_nlo_event, fixed_ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_nlo_event, wmi_nlo_event, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_NLO_SCAN_COMPLETE_EVENTID); +/* APFIND event */ +#define WMITLV_TABLE_WMI_APFIND_EVENTID(id,op,buf,len) \ +WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_apfind_event_hdr, wmi_apfind_event_hdr, hdr, WMITLV_SIZE_FIX) \ +WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) + WMITLV_CREATE_PARAM_STRUC(WMI_APFIND_EVENTID); + /* Chatter query reply event */ #define WMITLV_TABLE_WMI_CHATTER_PC_QUERY_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param, wmi_chatter_query_reply_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -2455,6 +2492,21 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_TEMPERATURE_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param, wmi_mdns_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_MDNS_STATS_EVENTID); +/* pdev resume event */ +#define WMITLV_TABLE_WMI_PDEV_RESUME_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param, wmi_pdev_resume_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_RESUME_EVENTID); + +/* SAP Authentication offload event */ +#define WMITLV_TABLE_WMI_SAP_OFL_ADD_STA_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param, wmi_sap_ofl_add_sta_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bufp, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_SAP_OFL_ADD_STA_EVENTID); + +#define WMITLV_TABLE_WMI_SAP_OFL_DEL_STA_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param, wmi_sap_ofl_del_sta_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_SAP_OFL_DEL_STA_EVENTID); + #ifdef __cplusplus } #endif diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index bd570d67f347..5a5b7c7810d0 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -178,6 +178,7 @@ typedef enum { WMI_GRP_DHCP_OFL, WMI_GRP_IPA, WMI_GRP_MDNS_OFL, + WMI_GRP_SAP_OFL, } WMI_GRP_ID; #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) @@ -507,10 +508,13 @@ typedef enum { /** NS offload confid*/ WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL), - /* GTK offload Specific WMI commands*/ - WMI_GTK_OFFLOAD_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL), + /** APFIND Config */ + WMI_APFIND_CMDID, - /* CSA offload Specific WMI commands*/ + /* GTK offload Specific WMI commands*/ + WMI_GTK_OFFLOAD_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL), + + /* CSA offload Specific WMI commands*/ /** csa offload enable */ WMI_CSA_OFFLOAD_ENABLE_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL), /** chan switch command */ @@ -574,6 +578,8 @@ typedef enum { WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID, /** set tpc chainmask config command */ WMI_TPC_CHAINMASK_CONFIG_CMDID, + /** set Antenna diversity command */ + WMI_SET_ANTENNA_DIVERSITY_CMDID, /* GPIO Configuration */ WMI_GPIO_CONFIG_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_GPIO), @@ -698,6 +704,10 @@ typedef enum { WMI_MDNS_SET_FQDN_CMDID, WMI_MDNS_SET_RESPONSE_CMDID, WMI_MDNS_GET_STATS_CMDID, + + /* enable/disable AP Authentication offload */ + WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL), + } WMI_CMD_ID; typedef enum { @@ -812,6 +822,9 @@ typedef enum { /*send noa info to host when noa is changed for beacon tx offload enable*/ WMI_P2P_NOA_EVENTID, + /* send pdev resume event to host after pdev resume. */ + WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND), + /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID. will cary wake reason */ WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW), @@ -841,6 +854,8 @@ typedef enum { /** NLO scan complete event */ WMI_NLO_SCAN_COMPLETE_EVENTID, + /** APFIND specific events */ + WMI_APFIND_EVENTID, /** GTK offload stautus event requested by host */ WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL), @@ -950,6 +965,10 @@ typedef enum { /* mDNS offload events */ WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL), + /* SAP Authentication offload events */ + WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL), + WMI_SAP_OFL_DEL_STA_EVENTID, + } WMI_EVT_ID; /* defines for OEM message sub-types */ @@ -2451,6 +2470,15 @@ typedef struct { A_UINT32 param; } wmi_pdev_get_tpc_config_cmd_fixed_param; +#define WMI_FAST_DIVERSITY_BIT_OFFSET 0 +#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1 + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */ + A_UINT32 mac_id; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ + /** parameter */ + A_UINT32 value; /** bit0 is for enable/disable FAST diversity, and bit1 is for enable/disable SLOW diversity, 0->disable, 1->enable */ +} wmi_pdev_set_antenna_diversity_cmd_fixed_param; typedef struct { /** parameter */ @@ -4952,6 +4980,8 @@ typedef struct { #define WMI_AP_PROFILE_FLAG_WPS 0x1 /** looking for a secure AP */ #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2 +/** looking for a PMF enabled AP */ +#define WMI_AP_PROFILE_FLAG_PMF 0x4 /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear. @@ -7274,23 +7304,26 @@ typedef struct A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/ } wmi_batch_scan_result_scan_list; -#define LPI_IE_BITMAP_BSSID 0x0001 -#define LPI_IE_BITMAP_IS_PROBE 0x0002 -#define LPI_IE_BITMAP_SSID 0x0004 -#define LPI_IE_BITMAP_RSSI 0x0008 -#define LPI_IE_BITMAP_CHAN 0x0010 -#define LPI_IE_BITMAP_AP_TX_PWR 0x0020 -#define LPI_IE_BITMAP_TX_RATE 0x0040 -#define LPI_IE_BITMAP_80211_MC_SUPPORT 0x0080 -#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x0100 -#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT 0x0200 -#define LPI_IE_BITMAP_CONN_STATUS 0x0400 -#define LPI_IE_BITMAP_MSAP_IE 0x0800 -#define LPI_IE_BITMAP_SEC_STATUS 0x1000 -#define LPI_IE_BITMAP_DEVICE_TYPE 0x2000 -#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x4000 -#define LPI_IE_BITMAP_DWELL_TIME 0x8000 -#define LPI_IE_BITMAP_ALL 0xFFFF +#define LPI_IE_BITMAP_BSSID 0x00000001 +#define LPI_IE_BITMAP_IS_PROBE 0x00000002 +#define LPI_IE_BITMAP_SSID 0x00000004 +#define LPI_IE_BITMAP_RSSI 0x00000008 +#define LPI_IE_BITMAP_CHAN 0x00000010 +#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 +#define LPI_IE_BITMAP_TX_RATE 0x00000040 +#define LPI_IE_BITMAP_80211_MC_SUPPORT 0x00000080 +#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 +#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT 0x00000200 +#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 +#define LPI_IE_BITMAP_MSAP_IE 0x00000800 +#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 +#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 +#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 +#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 +#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 +#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 +#define LPI_IE_BITMAP_PHY_MODE 0x00040000 +#define LPI_IE_BITMAP_ALL 0xFFFFFFFF typedef struct { A_UINT32 tlv_header; @@ -7579,7 +7612,7 @@ enum wmi_rmc_mode { WMI_RMC_MODE_ENABLED = 1, }; -/** Enable reliable multicast transmitter functionality. Upon +/** Enable RMC transmitter functionality. Upon * receiving this, the FW shall mutlicast frames with * reliablity. This is a vendor * proprietary feature. */ @@ -7595,7 +7628,7 @@ typedef struct { } wmi_rmc_set_mode_cmd_fixed_param; /** Configure transmission periodicity of action frames in a - * reliable multicast network for the multicast transmitter */ + * RMC network for the multicast transmitter */ typedef struct { /** TLV tag and len; tag equals * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */ @@ -8856,6 +8889,13 @@ typedef struct{ A_UINT32 reserved0; /* for future need */ } wmi_d0_wow_disable_ack_event_fixed_param; +/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */ +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */ + A_UINT32 rsvd; /* for future need */ +} wmi_pdev_resume_event_fixed_param; + + /** value representing all modules */ #define WMI_DEBUG_LOG_MODULE_ALL 0xffff @@ -9075,6 +9115,95 @@ typedef struct { A_UINT32 status; } wmi_mdns_stats_event_fixed_param; +/** + * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process + * down to the firmware. When this feature is enabled, firmware can process the association/disassociation + * request and create/remove connection even host is suspended. + * 3 major components are offloaded: + * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response. + * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4. + * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK. + * Current implementation only supports WPA2 CCMP. + */ + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */ + /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */ + A_UINT32 vdev_id; + /** enable/disable sap auth offload */ + A_UINT32 enable; + /** sap ssid */ + wmi_ssid ap_ssid; + /** authentication mode (defined above) */ + A_UINT32 rsn_authmode; + /** unicast cipher set */ + A_UINT32 rsn_ucastcipherset; + /** mcast/group cipher set */ + A_UINT32 rsn_mcastcipherset; + /** mcast/group management frames cipher set */ + A_UINT32 rsn_mcastmgmtcipherset; + /** sap channel */ + A_UINT32 channel; + /** length of psk */ + A_UINT32 psk_len; + /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len + * A_UINT8 psk[]; + */ +} wmi_sap_ofl_enable_cmd_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */ + /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */ + A_UINT32 vdev_id; + /** aid (association id) of this station */ + A_UINT32 assoc_id; + /** peer station's mac addr */ + wmi_mac_addr peer_macaddr; + /** length of association request frame */ + A_UINT32 data_len; + /* Following this structure is the TLV byte stream of a whole association request frame of length data_len + * A_UINT8 bufp[]; + */ +} wmi_sap_ofl_add_sta_event_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */ + /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */ + A_UINT32 vdev_id; + /** aid (association id) of this station */ + A_UINT32 assoc_id; + /** peer station's mac addr */ + wmi_mac_addr peer_macaddr; + /** disassociation reason */ + A_UINT32 reason; +} wmi_sap_ofl_del_sta_event_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */ + A_UINT32 data_len; /** length in byte of data[]. */ + /** This structure is used to send REQ binary blobs + * from application/service to firmware where Host drv is pass through . + * Following this structure is the TLV: + * A_UINT8 data[]; // length in byte given by field data_len. + */ +} wmi_apfind_cmd_param; + +typedef enum apfind_event_type_e { + APFIND_MATCH_EVENT = 0, + APFIND_WAKEUP_EVENT, +} APFIND_EVENT_TYPE; + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */ + A_UINT32 event_type; /** APFIND_EVENT_TYPE */ + A_UINT32 data_len; /** length in byte of data[]. */ + /** This structure is used to send event binary blobs + * from firmware to application/service and Host drv. + * Following this structure is the TLV: + * A_UINT8 data[]; // length in byte given by field data_len. + */ +} wmi_apfind_event_hdr; + #ifdef __cplusplus } #endif diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h index bff9376e8bd1..810b365c5432 100644 --- a/CORE/SERVICES/COMMON/wmi_version.h +++ b/CORE/SERVICES/COMMON/wmi_version.h @@ -36,7 +36,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 77 +#define __WMI_REVISION_ 84 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 5e9281e0d2df..cd878e8b3d80 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -22460,6 +22460,73 @@ static int wma_get_mdns_status(tp_wma_handle wma_handle, A_UINT32 *pVdev_id) } #endif /* MDNS_OFFLOAD */ +#ifdef SAP_AUTH_OFFLOAD +static int wma_process_sap_auth_offload(tp_wma_handle wma_handle, + struct tSirSapOffloadInfo *sap_auth_offload_info) +{ + wmi_sap_ofl_enable_cmd_fixed_param *cmd = NULL; + wmi_buf_t buf; + u_int8_t *buf_ptr; + u_int16_t len, psk_len; + int err; + + psk_len = sap_auth_offload_info->key_len; + len = sizeof(*cmd) + WMI_TLV_HDR_SIZE + psk_len; + buf = wmi_buf_alloc(wma_handle->wmi_handle, len); + if (!buf) { + WMA_LOGE("Failed to allocate buffer to send " + "sap_auth_offload_enable cmd"); + return -ENOMEM; + } + + vos_mem_zero(cmd, len); + + buf_ptr = wmi_buf_data(buf); + cmd = (wmi_sap_ofl_enable_cmd_fixed_param *)buf_ptr; + + WMITLV_SET_HDR(&cmd->tlv_header, + WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param, + WMITLV_GET_STRUCT_TLVLEN(wmi_sap_ofl_enable_cmd_fixed_param)); + + cmd->enable = sap_auth_offload_info->sap_auth_offload_enable; + cmd->vdev_id = sap_auth_offload_info->vdev_id; + cmd->psk_len = psk_len; + + /* SSID didn't assign here, left for Supplicant Profile Assign + * This field just keep for extendable + */ + switch (sap_auth_offload_info->sap_auth_offload_sec_type) { + case eSIR_OFFLOAD_WPA2PSK_CCMP: + cmd->rsn_authmode = WMI_AUTH_RSNA_PSK; + cmd->rsn_mcastcipherset = WMI_CIPHER_AES_CCM; + cmd->rsn_ucastcipherset = WMI_CIPHER_AES_CCM; + break; + case eSIR_OFFLOAD_NONE: + default: + WMA_LOGE("Set software AP Auth offload " + "with none support security type\n"); + break; + } + + buf_ptr += sizeof(wmi_sap_ofl_enable_cmd_fixed_param); + WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, psk_len); + buf_ptr += WMI_TLV_HDR_SIZE; + vos_mem_copy(buf_ptr, sap_auth_offload_info->key, psk_len); + + err = wmi_unified_cmd_send(wma_handle->wmi_handle, buf, + len, WMI_SAP_OFL_ENABLE_CMDID); + if (err) { + WMA_LOGE("Failed to set software AP Auth offload enable cmd"); + wmi_buf_free(buf); + return -EIO; + } + WMA_LOGD("Set software AP Auth offload enable = %d to vdevId %d", + sap_auth_offload_info->sap_auth_offload_enable, + sap_auth_offload_info->vdev_id); + return 0; +} +#endif /* SAP_AUTH_OFFLOAD */ + /* * function : wma_mc_process_msg * Description : @@ -23087,6 +23154,12 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg) wma_get_mdns_status(wma_handle, (A_UINT32 *) msg->bodyptr); break; #endif /* MDNS_OFFLOAD */ +#ifdef SAP_AUTH_OFFLOAD + case WDA_SET_SAP_AUTH_OFL: + wma_process_sap_auth_offload(wma_handle, msg->bodyptr); + vos_mem_free(msg->bodyptr); + break; +#endif /* SAP_AUTH_OFFLOAD */ default: WMA_LOGD("unknow msg type %x", msg->type); /* Do Nothing? MSG Body should be freed at here */ @@ -24291,6 +24364,66 @@ void wma_scan_completion_timeout(void *data) return; } +#ifdef SAP_AUTH_OFFLOAD +static int wma_sap_ofl_add_sta_handler(void *handle, u_int8_t *data, + u_int32_t data_len) +{ + tp_wma_handle wma = handle; + WMI_SAP_OFL_ADD_STA_EVENTID_param_tlvs *param_buf = NULL; + wmi_sap_ofl_add_sta_event_fixed_param *sta_add_event = NULL; + struct sap_offload_add_sta_req *add_sta_req = NULL; + u_int8_t *buf_ptr; + + param_buf = (WMI_SAP_OFL_ADD_STA_EVENTID_param_tlvs *)data; + sta_add_event = param_buf->fixed_param; + buf_ptr = (u_int8_t *)param_buf->bufp; + + add_sta_req = vos_mem_malloc(sizeof(*add_sta_req)); + if (!add_sta_req) { + WMA_LOGE("%s: Failed to alloc memory for sap_ofl_add_sta_event", + __func__); + return 0; + } + + vos_mem_set(add_sta_req, sizeof(*add_sta_req), 0); + add_sta_req->assoc_id = sta_add_event->assoc_id; + add_sta_req->conn_req_len = sta_add_event->data_len; + vos_mem_copy(add_sta_req->conn_req, buf_ptr, + sta_add_event->data_len); + + wma_send_msg(wma, WDA_SAP_OFL_ADD_STA, add_sta_req, 0); + + return 1; +} + +static int wma_sap_ofl_del_sta_handler(void *handle, u_int8_t *data, + u_int32_t data_len) +{ + tp_wma_handle wma = handle; + WMI_SAP_OFL_DEL_STA_EVENTID_param_tlvs *param_buf = NULL; + wmi_sap_ofl_del_sta_event_fixed_param *sta_del_event = NULL; + struct sap_offload_del_sta_req *del_sta_req = NULL; + + param_buf = (WMI_SAP_OFL_DEL_STA_EVENTID_param_tlvs *)data; + sta_del_event = param_buf->fixed_param; + + del_sta_req = vos_mem_malloc(sizeof(*del_sta_req)); + if (!del_sta_req) { + WMA_LOGE("%s: Failed to alloc memory for sap_ofl_del_sta_event", + __func__); + return 0; + } + vos_mem_set(del_sta_req, sizeof(*del_sta_req), 0); + WMI_MAC_ADDR_TO_CHAR_ARRAY(&sta_del_event->peer_macaddr, + del_sta_req->sta_mac); + + del_sta_req->assoc_id = sta_del_event->assoc_id; + del_sta_req->reason_code = sta_del_event->reason; + wma_send_msg(wma, WDA_SAP_OFL_DEL_STA, del_sta_req, 0); + return 1; +} +#endif /* SAP_AUTH_OFFLOAD */ + /* function : wma_start * Description : * Args : @@ -24493,6 +24626,31 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx) goto end; } +#ifdef SAP_AUTH_OFFLOAD + /* Initialize the station connect event handler for + * software AP authentication offload feature. + */ + status = wmi_unified_register_event_handler(wma_handle->wmi_handle, + WMI_SAP_OFL_ADD_STA_EVENTID, + wma_sap_ofl_add_sta_handler); + if (status != VOS_STATUS_SUCCESS) { + WMA_LOGE("Failed to register sap offload add_sta event cb"); + vos_status = VOS_STATUS_E_FAILURE; + goto end; + } + /* Initialize the station disconnect event handler for + * software AP authentication offload feature. + */ + status = wmi_unified_register_event_handler(wma_handle->wmi_handle, + WMI_SAP_OFL_DEL_STA_EVENTID, + wma_sap_ofl_del_sta_handler); + if (status != VOS_STATUS_SUCCESS) { + WMA_LOGE("Failed to register sap offload del_sta event cb"); + vos_status = VOS_STATUS_E_FAILURE; + goto end; + } +#endif /* SAP_AUTH_OFFLOAD */ + end: WMA_LOGD("%s: Exit", __func__); return vos_status; diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c index 4552682f12b8..7b8e25ae8804 100644 --- a/CORE/SERVICES/WMI/wmi_unified.c +++ b/CORE/SERVICES/WMI/wmi_unified.c @@ -601,6 +601,9 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command) CASE_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID); CASE_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID); CASE_RETURN_STRING(WMI_ROAM_INVOKE_CMDID); + CASE_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID); + CASE_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID); + CASE_RETURN_STRING(WMI_APFIND_CMDID); } return "Invalid WMI cmd"; } diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index 346f6a1992a9..33f58e6bec94 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -4189,4 +4189,19 @@ eHalStatus sme_setMDNSResponse(tHalHandle hHal, tSirMDNSResponseInfo *pMDNSRespInfo); #endif /* MDNS_OFFLOAD */ +#ifdef SAP_AUTH_OFFLOAD +/** + * sme_set_sap_auth_offload() enable/disable Software AP Auth Offload + * @hHal: hal layer handler + * @sap_auth_offload_info: the information of Software AP Auth Offload + * + * This function provide enable/disable Software AP authenticaiton offload + * feature on target firmware + * + * Return: Return eHalStatus. + */ +eHalStatus sme_set_sap_auth_offload(tHalHandle hHal, + struct tSirSapOffloadInfo *sap_auth_offload_info); +#endif /* SAP_AUTH_OFFLOAD */ + #endif //#if !defined( __SME_API_H ) diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 3a838489a8db..5d4fdca1b034 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -14648,3 +14648,66 @@ eHalStatus sme_setMDNSResponse(tHalHandle hHal, } #endif /* MDNS_OFFLOAD */ +#ifdef SAP_AUTH_OFFLOAD +/** + * sme_set_sap_auth_offload() enable/disable Software AP Auth Offload + * @hHal: hal layer handler + * @sap_auth_offload_info: the information of Software AP Auth offload + * + * This function provide enable/disable Software AP authenticaiton offload + * feature on target firmware + * + * Return: Return eHalStatus. + */ +eHalStatus sme_set_sap_auth_offload(tHalHandle hHal, + struct tSirSapOffloadInfo *sap_auth_offload_info) +{ + vos_msg_t vosMessage; + struct tSirSapOffloadInfo *sme_sap_auth_offload_info; + eHalStatus status = eHAL_STATUS_SUCCESS; + tpAniSirGlobal pMac = PMAC_STRUCT(hHal); + + pMac->sap_auth_offload_sec_type = + sap_auth_offload_info->sap_auth_offload_sec_type; + pMac->sap_auth_offload = sap_auth_offload_info->sap_auth_offload_enable; + + sme_sap_auth_offload_info = + vos_mem_malloc(sizeof(*sme_sap_auth_offload_info)); + + if (!sme_sap_auth_offload_info) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, + "%s: Not able to allocate memory for WDA_SET_SAP_AUTH_OFL", + __func__); + return eHAL_STATUS_E_MALLOC_FAILED; + } + + vos_mem_copy(sme_sap_auth_offload_info, sap_auth_offload_info, + sizeof(*sap_auth_offload_info)); + + if (eHAL_STATUS_SUCCESS == (status = sme_AcquireGlobalLock(&pMac->sme))) { + /* serialize the req through MC thread */ + vosMessage.type = WDA_SET_SAP_AUTH_OFL; + vosMessage.bodyptr = sme_sap_auth_offload_info; + + if (!VOS_IS_STATUS_SUCCESS( + vos_mq_post_message(VOS_MODULE_ID_WDA, &vosMessage))) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, + "%s: Not able to post WDA_SET_SAP_AUTH_OFL to WDA!", + __func__); + vos_mem_free(sme_sap_auth_offload_info); + status = eHAL_STATUS_FAILURE; + } + sme_ReleaseGlobalLock(&pMac->sme); + } else { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, + "%s: sme_AcquireGlobalLock error!", + __func__); + vos_mem_free(sme_sap_auth_offload_info); + status = eHAL_STATUS_FAILURE; + } + + return (status); + +} +#endif /* SAP_AUTH_OFFLOAD */ + diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c index fdb12ee57ae1..8d4f238b2b3a 100644 --- a/CORE/SYS/legacy/src/utils/src/parserApi.c +++ b/CORE/SYS/legacy/src/utils/src/parserApi.c @@ -50,6 +50,29 @@ #include "rrmApi.h" #endif +#define DOT11F_RSN_VERSION 1 /* current supported version */ +#define DOT11F_RSN_OUI_SIZE 4 +#define DOT11F_RSN_CSE_NULL 0x00 +#define DOT11F_RSN_CSE_WEP40 0x01 +#define DOT11F_RSN_CSE_TKIP 0x02 +#define DOT11F_RSN_CSE_WRAP 0x03 +#define DOT11F_RSN_CSE_CCMP 0x04 +#define DOT11F_RSN_CSE_WEP104 0x05 +#define DOT11F_RSN_CSE_AES_CMAC 0x06 + +static const tANI_U8 sirRSNOui[][ DOT11F_RSN_OUI_SIZE ] = { + { 0x00, 0x0F, 0xAC, 0x00 }, /* group cipher */ + { 0x00, 0x0F, 0xAC, 0x01 }, /* WEP-40 or RSN */ + { 0x00, 0x0F, 0xAC, 0x02 }, /* TKIP or RSN-PSK */ + { 0x00, 0x0F, 0xAC, 0x03 }, /* Reserved */ + { 0x00, 0x0F, 0xAC, 0x04 }, /* AES-CCMP */ + { 0x00, 0x0F, 0xAC, 0x05 }, /* WEP-104 */ + { 0x00, 0x40, 0x96, 0x00 }, /* CCKM */ + /* BIP (encryption type) or RSN-PSK-SHA256 (authentication type) */ + { 0x00, 0x0F, 0xAC, 0x06 }, + /* RSN-8021X-SHA256 (authentication type) */ + { 0x00, 0x0F, 0xAC, 0x05 } +}; //////////////////////////////////////////////////////////////////////// @@ -5134,4 +5157,108 @@ void PopulateDot11fTimeoutInterval( tpAniSirGlobal pMac, pDot11f->timeoutType = type; pDot11f->timeoutValue = value; } + +#ifdef SAP_AUTH_OFFLOAD +tSirRetStatus +sap_auth_offload_construct_rsn_opaque( tDot11fIERSN *pdot11f_rsn, + tDot11fIERSNOpaque *pdot11f) +{ + tANI_U32 data_len=0; + tANI_U8 *ptr; + tANI_U32 element_len=0; + tANI_U32 count=0; + ptr = (tANI_U8 *)pdot11f->data; + if (pdot11f_rsn->present) { + pdot11f->present = pdot11f_rsn->present; + element_len = sizeof(pdot11f_rsn->version); + vos_mem_copy(ptr, &pdot11f_rsn->version, element_len); + ptr += element_len; + data_len += element_len; + element_len = sizeof(pdot11f_rsn->gp_cipher_suite); + vos_mem_copy(ptr, pdot11f_rsn->gp_cipher_suite, element_len); + ptr += element_len; + data_len += element_len; + + if (pdot11f_rsn->pwise_cipher_suite_count) { + element_len = sizeof(pdot11f_rsn->pwise_cipher_suite_count); + vos_mem_copy(ptr, + &pdot11f_rsn->pwise_cipher_suite_count, + element_len); + ptr += element_len; + data_len += element_len; + for (count = 0; count < pdot11f_rsn->pwise_cipher_suite_count; + count++) { + element_len = DOT11F_RSN_OUI_SIZE; + vos_mem_copy(ptr, + &pdot11f_rsn->pwise_cipher_suites[count][0], + element_len); + ptr += element_len; + data_len += element_len; + } + } + + if (pdot11f_rsn->akm_suite_count) { + element_len = sizeof(pdot11f_rsn->akm_suite_count); + vos_mem_copy(ptr, &pdot11f_rsn->akm_suite_count, element_len); + ptr += element_len; + data_len += element_len; + for (count = 0; count < pdot11f_rsn->akm_suite_count; count++) { + element_len = DOT11F_RSN_OUI_SIZE; + vos_mem_copy(ptr, + &pdot11f_rsn->akm_suites[count][0], + element_len); + ptr += element_len; + data_len += element_len; + } + } + + element_len = sizeof(pdot11f_rsn->RSN_Cap); + vos_mem_copy(ptr, pdot11f_rsn->RSN_Cap, element_len); + ptr += element_len; + data_len += element_len; + } + pdot11f->num_data = data_len; + return eSIR_SUCCESS; +} + +void +sap_auth_offload_update_rsn_ie( tpAniSirGlobal pmac, + tDot11fIERSNOpaque *pdot11f) +{ + tDot11fIERSN *pdot11f_rsn; + pdot11f_rsn = vos_mem_malloc(sizeof(tDot11fIERSN)); + vos_mem_set(pdot11f_rsn, sizeof(tDot11fIERSN), 0); + /* Assign RSN IE for Software AP Authentication offload security */ + if (pmac->sap_auth_offload && pmac->sap_auth_offload_sec_type) { + switch (pmac->sap_auth_offload_sec_type) { + case eSIR_OFFLOAD_WPA2PSK_CCMP: + /* Only Support one kind of Cipher Suit for + * Software AP authentication offload + */ + pdot11f_rsn->present = 1; + pdot11f_rsn->version = 1; + vos_mem_copy(pdot11f_rsn->gp_cipher_suite, + &sirRSNOui[DOT11F_RSN_CSE_CCMP][0], + DOT11F_RSN_OUI_SIZE); + pdot11f_rsn->pwise_cipher_suite_count = 1; + vos_mem_copy(&(pdot11f_rsn->pwise_cipher_suites[0][0]), + &sirRSNOui[DOT11F_RSN_CSE_CCMP][0], + DOT11F_RSN_OUI_SIZE); + pdot11f_rsn->akm_suite_count = 1; + vos_mem_copy(&(pdot11f_rsn->akm_suites[0][0]), + &sirRSNOui[DOT11F_RSN_CSE_TKIP][0], + DOT11F_RSN_OUI_SIZE); + pdot11f_rsn->pmkid_count = 0; + /* Construct RSN IE into RSNOpaque*/ + sap_auth_offload_construct_rsn_opaque(pdot11f_rsn, pdot11f); + break; + default: + dot11fLog( pmac, LOGE, + FL("The security type is not definied for " + "Software AP authentication offload!\n")); + break; + } + } +} +#endif /* SAP_AUTH_OFFLOAD */ // parserApi.c ends here. diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h index 3f60751440fa..253c523b4d76 100644 --- a/CORE/WDA/inc/legacy/halMsgApi.h +++ b/CORE/WDA/inc/legacy/halMsgApi.h @@ -80,6 +80,10 @@ */ #define BSSIDX_INVALID 254 +#ifdef SAP_AUTH_OFFLOAD +#define MAX_CONNECT_REQ_LENGTH 512 +#endif + #define HAL_IS_VALID_BSS_INDEX(pMac, bssIdx) ((BSSIDX_INVALID != (bssIdx)) && ((bssIdx) < (pMac)->hal.memMap.maxBssids)) // Beacon structure @@ -1571,4 +1575,19 @@ typedef struct sNanRequest } tNanRequest, *tpNanRequest; #endif +#ifdef SAP_AUTH_OFFLOAD +struct sap_offload_add_sta_req +{ + tANI_U32 assoc_id; + tANI_U32 conn_req_len; + tANI_U8 conn_req[MAX_CONNECT_REQ_LENGTH]; +}; +struct sap_offload_del_sta_req +{ + tANI_U32 assoc_id; + tANI_U32 reason_code; + tSirMacAddr sta_mac; +}; +#endif /* SAP_AUTH_OFFLOAD */ + #endif /* _HALMSGAPI_H_ */ diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h index e6d8ed60d6fd..ab66db5d85d0 100644 --- a/CORE/WDA/inc/wlan_qct_wda.h +++ b/CORE/WDA/inc/wlan_qct_wda.h @@ -1010,6 +1010,12 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb); #define WDA_GET_MDNS_STATUS_CMD SIR_HAL_GET_MDNS_STATUS #endif /* MDNS_OFFLOAD */ +#ifdef SAP_AUTH_OFFLOAD +#define WDA_SAP_OFL_ADD_STA SIR_HAL_SAP_OFL_ADD_STA +#define WDA_SAP_OFL_DEL_STA SIR_HAL_SAP_OFL_DEL_STA +#define WDA_SET_SAP_AUTH_OFL SIR_HAL_SET_SAP_AUTH_OFL +#endif /* SAP_AUTH_OFFLOAD */ + tSirRetStatus wdaPostCtrlMsg(tpAniSirGlobal pMac, tSirMsgQ *pMsg); #define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40 // Bit 6 will be used to control BD rate for Management frames @@ -1301,6 +1301,11 @@ ifeq ($(CONFIG_LINUX_QCMBR),y) CDEFINES += -DLINUX_QCMBR endif +# Enable feature Software AP Authentication Offload +ifeq ($(SAP_AUTH_OFFLOAD),1) +CDEFINES += -DSAP_AUTH_OFFLOAD +endif + # Enable target dump for non-qualcomm platform ifeq ($(CONFIG_NON_QC_PLATFORM), y) ifeq ($(CONFIG_CLD_HL_SDIO_CORE), y) |
