diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2015-04-10 00:03:07 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-04-10 00:03:07 -0700 |
| commit | c4d13ab42dfd4f3d75861c3d70486c8b37f9b604 (patch) | |
| tree | 4c6d79dfdb35887cda9816b8457d0273b74f3a04 | |
| parent | d2a13a14ca4e6b880b5a523c57736d5e5719bd1d (diff) | |
| parent | 0d618ca381a3a735ba1de2df667e88f9242385f8 (diff) | |
Merge "Release 4.0.10.72 QCACLD WLAN Driver"
| -rw-r--r-- | CORE/CLD_TXRX/HTT/htt.h | 2 | ||||
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg80211.h | 23 | ||||
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_main.h | 3 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 154 | ||||
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 24 | ||||
| -rw-r--r-- | CORE/MAC/inc/qwlan_version.h | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limFT.c | 6 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c | 9 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 22 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSecurityUtils.c | 5 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSendManagementFrames.c | 12 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limUtils.h | 15 | ||||
| -rw-r--r-- | CORE/SAP/inc/sapApi.h | 2 | ||||
| -rw-r--r-- | CORE/SAP/src/sapModule.c | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/dbglog.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_unified.h | 5 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_version.h | 2 | ||||
| -rw-r--r-- | CORE/SME/inc/csrInternal.h | 11 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiScan.c | 7 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrUtil.c | 32 |
22 files changed, 297 insertions, 53 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt.h b/CORE/CLD_TXRX/HTT/htt.h index b28d30d8788f..79ea8ac7de46 100644 --- a/CORE/CLD_TXRX/HTT/htt.h +++ b/CORE/CLD_TXRX/HTT/htt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h index ceed656fca11..8fa080d32d28 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg80211.h +++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h @@ -202,9 +202,12 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_NOP_FINISHED = 59, QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_RADAR_DETECTED = 60, - QCA_NL80211_VENDOR_SUBCMD_GET_FIRMWARE_VERSION = 61, - QCA_NL80211_VENDOR_SUBCMD_GET_DRIVER_VERSION = 62, - QCA_NL80211_VENDOR_SUBCMD_GET_LOGGER_FEATURE_SET = 63, + /* Get Wifi Specific Info */ + QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_INFO = 61, + /* Start Wifi Logger */ + QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_START = 62, + /* Start Wifi Memory Dump */ + QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_MEMORY_DUMP = 63, QCA_NL80211_VENDOR_SUBCMD_ROAM = 64, QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_SET_SSID_HOTLIST = 65, QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_RESET_SSID_HOTLIST = 66, @@ -1229,6 +1232,20 @@ enum qca_wlan_vendor_attr_roam_subcmd QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_AFTER_LAST - 1, }; +/* NL attributes for data used by + * QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_INFO sub command. + */ +enum qca_wlan_vendor_attr_get_wifi_info { + QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_WIFI_INFO_DRIVER_VERSION = 1, + QCA_WLAN_VENDOR_ATTR_WIFI_INFO_FIRMWARE_VERSION = 2, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_MAX = + QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_AFTER_LAST - 1, +}; + /** * enum qca_wlan_vendor_features - vendor device/driver features * @QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD: Device supports key diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index 398862a49a3c..7a54bb8db39a 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -1821,5 +1821,8 @@ static inline bool hdd_link_layer_stats_supported(void) } #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ +void hdd_get_fw_version(hdd_context_t *hdd_ctx, + uint32_t *major_spid, uint32_t *minor_spid, + uint32_t *siid, uint32_t *crmid); #endif // end #if !defined( WLAN_HDD_MAIN_H ) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index be347a7e5d93..52b878b882c3 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -108,6 +108,7 @@ #include <wlan_hdd_ipa.h> #endif #include "wlan_hdd_mdns_offload.h" +#include "qwlan_version.h" #define g_mode_rates_size (12) #define a_mode_rates_size (8) @@ -5235,6 +5236,85 @@ static int wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy, return 0; } +static const struct +nla_policy +qca_wlan_vendor_get_wifi_info_policy[ + QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_MAX +1] = { + [QCA_WLAN_VENDOR_ATTR_WIFI_INFO_DRIVER_VERSION] = {.type = NLA_U8 }, + [QCA_WLAN_VENDOR_ATTR_WIFI_INFO_FIRMWARE_VERSION] = {.type = NLA_U8 }, +}; + +/** + * wlan_hdd_cfg80211_get_wifi_info() - Get the wifi driver related info + * @wiphy: pointer to wireless wiphy structure. + * @wdev: pointer to wireless_dev structure. + * @data: Pointer to the data to be passed via vendor interface + * @data_len:Length of the data to be passed + * + * This is called when wlan driver needs to send wifi driver related info + * (driver/fw version) to the user space application upon request. + * + * Return: Return the Success or Failure code. + */ +static int +wlan_hdd_cfg80211_get_wifi_info(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, int data_len) +{ + hdd_context_t *hdd_ctx = wiphy_priv(wiphy); + struct nlattr *tb_vendor[QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_MAX + 1]; + tSirVersionString version; + uint32_t version_len; + uint32_t major_spid = 0, minor_spid = 0, siid = 0, crmid = 0; + uint8_t attr; + int status; + struct sk_buff *reply_skb = NULL; + + status = wlan_hdd_validate_context(hdd_ctx); + if (0 != status) { + hddLog(LOGE, FL("HDD context is not valid")); + return -EINVAL; + } + + if (nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_MAX, data, + data_len, qca_wlan_vendor_get_wifi_info_policy)) { + hddLog(LOGE, FL("WIFI_INFO_GET NL CMD parsing failed")); + return -EINVAL; + } + + if (tb_vendor[QCA_WLAN_VENDOR_ATTR_WIFI_INFO_DRIVER_VERSION]) { + hddLog(LOG1, FL("Rcvd req for Driver version")); + strlcpy(version, QWLAN_VERSIONSTR, sizeof(version)); + attr = QCA_WLAN_VENDOR_ATTR_WIFI_INFO_DRIVER_VERSION; + } else if (tb_vendor[QCA_WLAN_VENDOR_ATTR_WIFI_INFO_FIRMWARE_VERSION]) { + hddLog(LOG1, FL("Rcvd req for FW version")); + hdd_get_fw_version(hdd_ctx, &major_spid, &minor_spid, &siid, + &crmid); + snprintf(version, sizeof(version), "%d:%d:%d:%d", + major_spid, minor_spid, siid, crmid); + attr = QCA_WLAN_VENDOR_ATTR_WIFI_INFO_FIRMWARE_VERSION; + } else { + hddLog(LOGE, FL("Invalid attribute in get wifi info request")); + return -EINVAL; + } + + version_len = strlen(version); + reply_skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, + version_len + NLA_HDRLEN + NLMSG_HDRLEN); + if (!reply_skb) { + hddLog(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed")); + return -ENOMEM; + } + + if (nla_put(reply_skb, attr, version_len, version)) { + hddLog(LOGE, FL("nla put fail")); + kfree_skb(reply_skb); + return -EINVAL; + } + + return cfg80211_vendor_cmd_reply(reply_skb); +} + /** * wlan_hdd_send_roam_auth_event() - Send the roamed and authorized event * @hdd_ctx_ptr: pointer to HDD Context. @@ -6122,13 +6202,6 @@ static int wlan_hdd_cfg80211_start_acs(hdd_adapter_t *adapter) vos_mem_zero(&smeConfig, sizeof(smeConfig)); sme_GetConfigParam(hdd_ctx->hHal, &smeConfig); - if (sap_config->acs_hw_mode == QCA_ACS_MODE_IEEE80211G) - smeConfig.csrConfig.phyMode = eCSR_DOT11_MODE_11g; - else if (sap_config->acs_hw_mode == QCA_ACS_MODE_IEEE80211B) - smeConfig.csrConfig.phyMode = eCSR_DOT11_MODE_11b; - else if (sap_config->acs_hw_mode == QCA_ACS_MODE_IEEE80211A) - smeConfig.csrConfig.phyMode = eCSR_DOT11_MODE_11a; - if (sap_config->acs_ch_width == 40) { switch (adapter->sap_dyn_ini_cfg.apOperatingBand) { case eSAP_RF_SUBBAND_5_ALL_GHZ: @@ -6141,7 +6214,7 @@ static int wlan_hdd_cfg80211_start_acs(hdd_adapter_t *adapter) break; } - smeConfig.csrConfig.phyMode = eCSR_DOT11_MODE_11n; + sap_config->acs_hw_mode = eCSR_DOT11_MODE_11n; #ifdef WLAN_FEATURE_11AC /* Overwrite the hostapd setting for HW mode only for 11ac. @@ -6155,23 +6228,21 @@ static int wlan_hdd_cfg80211_start_acs(hdd_adapter_t *adapter) eHDD_DOT11_MODE_11ac) || (hdd_ctx->cfg_ini->dot11Mode == eHDD_DOT11_MODE_11ac_ONLY))) { - if (hdd_ctx->cfg_ini->dot11Mode == - eHDD_DOT11_MODE_11ac_ONLY) - smeConfig.csrConfig.phyMode = - eCSR_DOT11_MODE_11ac_ONLY; - else - smeConfig.csrConfig.phyMode = - eCSR_DOT11_MODE_11ac; - /* for 2.4G */ if ((sap_config->acs_hw_mode - == QCA_ACS_MODE_IEEE80211G) && + == eCSR_DOT11_MODE_11g) && !hdd_ctx->cfg_ini->enableVhtFor24GHzBand) - smeConfig.csrConfig.phyMode = + sap_config->acs_hw_mode = eCSR_DOT11_MODE_11n; + else if (hdd_ctx->cfg_ini->dot11Mode == + eHDD_DOT11_MODE_11ac_ONLY) + sap_config->acs_hw_mode = + eCSR_DOT11_MODE_11ac_ONLY; + else + sap_config->acs_hw_mode = eCSR_DOT11_MODE_11ac; } #endif - hddLog(LOG1, FL("phyMode is %d"), smeConfig.csrConfig.phyMode); + hddLog(LOG1, FL("phyMode is %d"), sap_config->acs_hw_mode); } sme_UpdateConfig(hdd_ctx->hHal, &smeConfig); @@ -6276,7 +6347,12 @@ static int wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, */ sap_config = &adapter->sessionCtx.ap.sapConfig; sap_config->channel = AUTO_CHANNEL_SELECT; - sap_config->acs_hw_mode = hw_mode; + if (hw_mode == QCA_ACS_MODE_IEEE80211G) + sap_config->acs_hw_mode = eCSR_DOT11_MODE_11g; + else if (hw_mode == QCA_ACS_MODE_IEEE80211B) + sap_config->acs_hw_mode = eCSR_DOT11_MODE_11b; + else if (hw_mode == QCA_ACS_MODE_IEEE80211A) + sap_config->acs_hw_mode = eCSR_DOT11_MODE_11a; if (1 != hdd_ctx->is_dynamic_channel_range_set) { if (hw_mode != @@ -7104,6 +7180,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = .doit = wlan_hdd_cfg80211_extscan_reset_ssid_hotlist }, #endif /* FEATURE_WLAN_EXTSCAN */ + { + .info.vendor_id = QCA_NL80211_VENDOR_ID, + .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_INFO, + .flags = WIPHY_VENDOR_CMD_NEED_WDEV | + WIPHY_VENDOR_CMD_NEED_NETDEV, + .doit = wlan_hdd_cfg80211_get_wifi_info + }, + }; @@ -8531,8 +8615,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, clear_bit(ACS_IN_PROGRESS, &pHddCtx->g_event_flags); pConfig = &pHostapdAdapter->sessionCtx.ap.sapConfig; - vos_mem_zero(&sme_config, sizeof (tSmeConfigParams)); - sme_GetConfigParam(pHddCtx->hHal, &sme_config); pBeacon = pHostapdAdapter->sessionCtx.ap.beacon; @@ -8555,6 +8637,27 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if (pHostapdAdapter->device_mode == WLAN_HDD_SOFTAP) { +#ifndef QCA_HT_2040_COEX + /* + * Restore the channel bonding parameter to avoid + * falling to previous SAP configuration in concurrency + * scenarios. + */ + tSmeConfigParams *sme_config; + + sme_config = vos_mem_malloc(sizeof(*sme_config)); + if (!sme_config) { + hddLog(LOGE, FL("memory allocation failed for sme_config")); + return -ENOMEM; + } + + vos_mem_zero(sme_config, sizeof(*sme_config)); + sme_GetConfigParam(hHal, sme_config); + sme_config->csrConfig.channelBondingMode5GHz = + pHddCtx->cfg_ini->nChannelBondingMode5GHz; + sme_UpdateConfig(hHal, sme_config); + vos_mem_free(sme_config); +#endif pIe = wlan_hdd_cfg80211_get_ie_ptr(pBeacon->tail, pBeacon->tail_len, WLAN_EID_COUNTRY); if(memcmp(pHddCtx->cfg_ini->apCntryCode, CFG_AP_COUNTRY_CODE_DEFAULT, 3) != 0) @@ -8988,6 +9091,8 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, * As per spec 11n/11AC STA are QOS STA and may not connect to nonQOS 11n AP * Default enable QOS for SAP */ + vos_mem_zero(&sme_config, sizeof(tSmeConfigParams)); + sme_GetConfigParam(pHddCtx->hHal, &sme_config); sme_config.csrConfig.WMMSupportMode = eCsrRoamWmmAuto; pIe = wlan_hdd_get_vendor_oui_ie_ptr(WMM_OUI_TYPE, WMM_OUI_TYPE_SIZE, pBeacon->tail, pBeacon->tail_len); @@ -8995,6 +9100,8 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->SapHw_mode == eCSR_DOT11_MODE_11g || pConfig->SapHw_mode == eCSR_DOT11_MODE_11b)) sme_config.csrConfig.WMMSupportMode = eCsrRoamWmmNoQos; + sme_UpdateConfig(pHddCtx->hHal, &sme_config); + #ifdef WLAN_FEATURE_11AC /* Overwrite the hostapd setting for HW mode only for 11ac. @@ -9122,9 +9229,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, (WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))->dfs_cac_block_tx = VOS_TRUE; - /* Apply updated SME config before start BSS */ - sme_UpdateConfig(pHddCtx->hHal, &sme_config); - status = WLANSAP_StartBss( #ifdef WLAN_FEATURE_MBSSID WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter), diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 43e5ae56810d..b98150f7a81a 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -15513,6 +15513,30 @@ int32_t hdd_wlan_set_mcc_p2p_quota(hdd_adapter_t *hostapd_adapater, return ret; } +/** + * hdd_get_fw_version() - Get FW version + * @hdd_ctx: pointer to HDD context. + * @major_spid: FW version - major spid. + * @minor_spid: FW version - minor spid + * @ssid: FW version - ssid + * @crmid: FW version - crmid + * + * This function is called to get the firmware build version stored + * as part of the HDD context + * + * Return: None + */ + +void hdd_get_fw_version(hdd_context_t *hdd_ctx, + uint32_t *major_spid, uint32_t *minor_spid, + uint32_t *siid, uint32_t *crmid) +{ + *major_spid = (hdd_ctx->target_fw_version & 0xf0000000) >> 28; + *minor_spid = (hdd_ctx->target_fw_version & 0xf000000) >> 24; + *siid = (hdd_ctx->target_fw_version & 0xf00000) >> 20; + *crmid = hdd_ctx->target_fw_version & 0x7fff; +} + //Register the module init/exit functions module_init(hdd_module_init); module_exit(hdd_module_exit); diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index d525d1eb6d28..ba099e3c2f5b 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 10 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 71 +#define QWLAN_VERSION_BUILD 72 -#define QWLAN_VERSIONSTR "4.0.10.71" +#define QWLAN_VERSIONSTR "4.0.10.72" #define AR6320_REV1_VERSION 0x5000000 diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c index 05a7170925bc..f85599eb6da6 100644 --- a/CORE/MAC/src/pe/lim/limFT.c +++ b/CORE/MAC/src/pe/lim/limFT.c @@ -401,6 +401,10 @@ void limPerformFTPreAuth(tpAniSirGlobal pMac, eHalStatus status, #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG PELOG1(limLog( pMac, LOG1, FL("FT Auth Rsp Timer Started"));) #endif +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_ROAM_AUTH_START_EVENT, + pMac->lim.pSessionEntry, eSIR_SUCCESS, eSIR_SUCCESS); +#endif limSendAuthMgmtFrame(pMac, &authFrame, psessionEntry->ftPEContext.pFTPreAuthReq->preAuthbssId, @@ -1173,7 +1177,7 @@ void limHandleFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status, tpPESession pftSessionEntry = NULL; tANI_U8 sessionId = 0; tpSirBssDescription pbssDescription = NULL; -#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM +#ifdef FEATURE_WLAN_DIAG_SUPPORT limDiagEventReport(pMac, WLAN_PE_DIAG_PRE_AUTH_RSP_EVENT, psessionEntry, (tANI_U16)status, 0); #endif diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c index 85e990970b7a..a98912ee1e29 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c @@ -718,6 +718,10 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub { // Log success PELOG1(limLog(pMac, LOG1, FL("Successfully Reassociated with BSS"));) +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_ROAM_ASSOC_COMP_EVENT, + psessionEntry, eSIR_SUCCESS, eSIR_SUCCESS); +#endif #ifdef FEATURE_WLAN_ESE { tANI_U8 cnt = 0; @@ -908,8 +912,9 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub else psessionEntry->beaconParams.fShortPreamble = true; } -#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT - limDiagEventReport(pMac, WLAN_PE_DIAG_CONNECTED, psessionEntry, 0, 0); +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_CONNECTED, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); #endif if( pAssocRsp->QosMapSet.present ) { diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c index 37079280bb6f..12440bbd92d7 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c @@ -2394,6 +2394,10 @@ limProcessMlmAuthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) (tANI_U8) pMac->lim.gpLimMlmAuthReq->authType; authFrameBody.authTransactionSeqNumber = SIR_MAC_AUTH_FRAME_1; authFrameBody.authStatusCode = 0; +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_AUTH_START_EVENT, psessionEntry, + eSIR_SUCCESS, authFrameBody.authStatusCode); +#endif limSendAuthMgmtFrame(pMac, &authFrameBody, pMac->lim.gpLimMlmAuthReq->peerMacAddr, diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c index cafbe3c9bc74..3821a2fc29e6 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c @@ -631,6 +631,10 @@ limSendMlmAssocReq( tpAniSirGlobal pMac, } } +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_ASSOC_REQ_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif pMlmAssocReq->listenInterval = (tANI_U16)val; /* Update PE session ID*/ pMlmAssocReq->sessionId = psessionEntry->peSessionId; diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 8c6213ea1090..7abf06977ed8 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -1302,9 +1302,10 @@ __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) tpSirSmeScanReq pScanReq; tANI_U8 i = 0; -#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT - limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_REQ_EVENT, NULL, 0, 0); -#endif //FEATURE_WLAN_DIAG_SUPPORT +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_REQ_EVENT, NULL, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif pScanReq = (tpSirSmeScanReq) pMsgBuf; limLog(pMac, LOG1, FL("SME SCAN REQ numChan %d min %d max %d IELen %d first %d fresh %d unique %d type %d mode %d rsp %d"), @@ -2351,9 +2352,10 @@ __limProcessSmeReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) return; } -#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT - limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_REQ_EVENT, psessionEntry, 0, 0); -#endif //FEATURE_WLAN_DIAG_SUPPORT +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_REQ_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif //pMac->lim.gpLimReassocReq = pReassocReq;//TO SUPPORT BT-AMP /* Store the reassoc handle in the session Table.. 23rd sep review */ @@ -5699,35 +5701,27 @@ limProcessSmeReqMessages(tpAniSirGlobal pMac, tpSirMsgQ pMsg) case eWNI_SME_REASSOC_REQ: __limProcessSmeReassocReq(pMac, pMsgBuf); - break; case eWNI_SME_DISASSOC_REQ: __limProcessSmeDisassocReq(pMac, pMsgBuf); - break; case eWNI_SME_DISASSOC_CNF: case eWNI_SME_DEAUTH_CNF: __limProcessSmeDisassocCnf(pMac, pMsgBuf); - break; case eWNI_SME_DEAUTH_REQ: __limProcessSmeDeauthReq(pMac, pMsgBuf); - break; - - case eWNI_SME_SETCONTEXT_REQ: __limProcessSmeSetContextReq(pMac, pMsgBuf); - break; case eWNI_SME_REMOVEKEY_REQ: __limProcessSmeRemoveKeyReq(pMac, pMsgBuf); - break; case eWNI_SME_STOP_BSS_REQ: diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.c b/CORE/MAC/src/pe/lim/limSecurityUtils.c index 3608e72e0c17..26b5119c968d 100644 --- a/CORE/MAC/src/pe/lim/limSecurityUtils.c +++ b/CORE/MAC/src/pe/lim/limSecurityUtils.c @@ -432,6 +432,11 @@ limRestoreFromAuthState(tpAniSirGlobal pMac, tSirResultCodes resultCode, tANI_U1 tSirMacAddr currentBssId; tLimMlmAuthCnf mlmAuthCnf; +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_AUTH_COMP_EVENT, sessionEntry, + resultCode, protStatusCode); +#endif + vos_mem_copy( (tANI_U8 *) &mlmAuthCnf.peerMacAddr, (tANI_U8 *) &pMac->lim.gpLimMlmAuthReq->peerMacAddr, sizeof(tSirMacAddr)); diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index 573145f8c3e8..32dfe14e2baa 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -2478,6 +2478,10 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, txFlag |= HAL_USE_PEER_STA_REQUESTED_MASK; } +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_ASSOC_START_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif pMacHdr = ( tpSirMacMgmtHdr ) pFrame; MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_MGMT, psessionEntry->peSessionId, pMacHdr->fc.subType)); @@ -2932,6 +2936,10 @@ limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac, psessionEntry->assocReqLen = (ft_ies_length); } +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_START_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_MGMT, psessionEntry->peSessionId, pMacHdr->fc.subType)); halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) (nBytes + ft_ies_length), @@ -3299,6 +3307,10 @@ limSendReassocReqMgmtFrame(tpAniSirGlobal pMac, txFlag |= HAL_USE_PEER_STA_REQUESTED_MASK; } +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_START_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_MGMT, psessionEntry->peSessionId, pMacHdr->fc.subType)); halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) (sizeof(tSirMacMgmtHdr) + nPayload), diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h index 7b08e1024c92..1fecbb73ed59 100644 --- a/CORE/MAC/src/pe/lim/limUtils.h +++ b/CORE/MAC/src/pe/lim/limUtils.h @@ -526,9 +526,22 @@ typedef enum WLAN_PE_DIAG_PREAUTH_DONE, WLAN_PE_DIAG_REASSOCIATING, WLAN_PE_DIAG_CONNECTED, -}WLAN_PE_DIAG_EVENT_TYPE; + WLAN_PE_DIAG_ASSOC_REQ_EVENT, + WLAN_PE_DIAG_AUTH_COMP_EVENT, + WLAN_PE_DIAG_ASSOC_COMP_EVENT, + WLAN_PE_DIAG_AUTH_START_EVENT, + WLAN_PE_DIAG_ASSOC_START_EVENT, + WLAN_PE_DIAG_REASSOC_START_EVENT, + WLAN_PE_DIAG_ROAM_AUTH_START_EVENT, + WLAN_PE_DIAG_ROAM_AUTH_COMP_EVENT, + WLAN_PE_DIAG_ROAM_ASSOC_START_EVENT, + WLAN_PE_DIAG_ROAM_ASSOC_COMP_EVENT, + RESERVED1, /* for SCAN_COMPLETE */ + RESERVED2, /* for SCAN_RES_FOUND */ +} WLAN_PE_DIAG_EVENT_TYPE; void limDiagEventReport(tpAniSirGlobal pMac, tANI_U16 eventType, tpPESession pSessionEntry, tANI_U16 status, tANI_U16 reasonCode); + #endif /* FEATURE_WLAN_DIAG_SUPPORT */ void peSetResumeChannel(tpAniSirGlobal pMac, tANI_U16 channel, ePhyChanBondState cbState); diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h index 14056e28cccd..4dab41b452d2 100644 --- a/CORE/SAP/inc/sapApi.h +++ b/CORE/SAP/inc/sapApi.h @@ -488,7 +488,7 @@ typedef struct sap_Config { v_U8_t apOperatingBand; v_U8_t acs_case; v_U8_t acs_ch_width; - v_U8_t acs_hw_mode; + v_U32_t acs_hw_mode; #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE v_U8_t skip_acs_scan_status; v_U8_t skip_acs_scan_range1_stch; diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c index cee7bbc48307..afdaa6b7a3f8 100644 --- a/CORE/SAP/src/sapModule.c +++ b/CORE/SAP/src/sapModule.c @@ -4119,7 +4119,7 @@ WLANSAP_ACS_CHSelect(v_PVOID_t pvosGCtx, pMac = PMAC_STRUCT( hHal ); - sapContext->csrRoamProfile.phyMode = pMac->roam.configParam.phyMode; + sapContext->csrRoamProfile.phyMode = pConfig->acs_hw_mode; if ((pConfig->channel == AUTO_CHANNEL_SELECT) && (sapContext->isScanSessionOpen == eSAP_FALSE)) { diff --git a/CORE/SERVICES/COMMON/dbglog.h b/CORE/SERVICES/COMMON/dbglog.h index 327bd3c86467..9874ac8998b2 100644 --- a/CORE/SERVICES/COMMON/dbglog.h +++ b/CORE/SERVICES/COMMON/dbglog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 The Linux Foundation. All rights reserved. + * Copyright (c) 2012, 2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index 675154afade4..e843030e4487 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -2558,6 +2558,8 @@ typedef enum { WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /** Set CTS channel BW for dynamic BW adjustment feature */ WMI_PDEV_PARAM_CTS_CBW, + /** Set GPIO pin info used by WNTS */ + WMI_PDEV_PARAM_WNTS_CONFIG, } WMI_PDEV_PARAM; typedef enum { @@ -7878,6 +7880,9 @@ typedef struct { A_UINT32 led_enable; } wmi_pdev_set_led_config_cmd_fixed_param; +#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0 +#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff + /** WMI_PEER_INFO_REQ_CMDID * Request FW to provide peer info */ typedef struct { diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h index 137f534213ea..7c67b024cd6a 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_ 104 +#define __WMI_REVISION_ 105 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h index c8d15e5850d8..54d1582bd5ae 100644 --- a/CORE/SME/inc/csrInternal.h +++ b/CORE/SME/inc/csrInternal.h @@ -289,6 +289,13 @@ typedef enum }eCsrDiagWlanStatusEventReason; +typedef enum +{ + eCSR_EVENT_TYPE_INVALID = 0, + eCSR_EVENT_SCAN_COMPLETE = 70, + eCSR_EVENT_SCAN_RES_FOUND = 71, +} eCSR_WLAN_DIAG_EVENT_TYPE; + #endif //FEATURE_WLAN_DIAG_SUPPORT typedef struct tagCsrChannel @@ -1555,5 +1562,9 @@ bool csr_clear_joinreq_param(tpAniSirGlobal mac_ctx, eHalStatus csr_issue_stored_joinreq(tpAniSirGlobal mac_ctx, uint32_t *roam_id, uint32_t session_id); +#ifdef FEATURE_WLAN_DIAG_SUPPORT +void csr_diag_event_report(tpAniSirGlobal pmac, uint16_t event_type, + uint16_t status, uint16_t reasoncode); +#endif #endif diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 737086f4ce6a..e104a5548e29 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -5216,6 +5216,13 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo csrLLCount(&pMac->scan.tempScanResults), pScanRsp->statusCode); smsLog(pMac, LOG1, "scan reason is %d", pCommand->u.scanCmd.reason); +#ifdef FEATURE_WLAN_DIAG_SUPPORT + csr_diag_event_report(pMac, eCSR_EVENT_SCAN_COMPLETE, eSIR_SUCCESS, + eSIR_SUCCESS); + if (csrLLCount(&pMac->scan.tempScanResults) > 0) + csr_diag_event_report(pMac, eCSR_EVENT_SCAN_RES_FOUND, eSIR_SUCCESS, + eSIR_SUCCESS); +#endif fRemoveCommand = csrScanComplete( pMac, pScanRsp ); fRet = eANI_BOOLEAN_TRUE; }//if ( eSIR_SME_MORE_SCAN_RESULTS_FOLLOW != pScanRsp->statusCode ) diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c index bf2ed06df7ec..f41b7a138445 100644 --- a/CORE/SME/src/csr/csrUtil.c +++ b/CORE/SME/src/csr/csrUtil.c @@ -5934,3 +5934,35 @@ VOS_STATUS csrAddToChannelListFront( return eHAL_STATUS_SUCCESS; } #endif +#ifdef FEATURE_WLAN_DIAG_SUPPORT +/** + * csr_diag_event_report() - send PE diag event + * @pmac: pointer to global MAC context. + * @event_typev: sub event type for DIAG event. + * @status: status of the event + * @reasoncode: reasoncode for the given status + * + * This function is called to send diag event + * + * Return: NA + */ + +void csr_diag_event_report(tpAniSirGlobal pmac, uint16_t event_type, + uint16_t status, uint16_t reasoncode) +{ + tSirMacAddr nullbssid = { 0, 0, 0, 0, 0, 0 }; + WLAN_VOS_DIAG_EVENT_DEF(diag_event, vos_event_wlan_pe_payload_type); + + vos_mem_set(&diag_event, sizeof(vos_event_wlan_pe_payload_type), 0); + + vos_mem_copy(diag_event.bssid, nullbssid, sizeof(tSirMacAddr)); + diag_event.sme_state = (tANI_U16)pmac->lim.gLimSmeState; + diag_event.mlm_state = (tANI_U16)pmac->lim.gLimMlmState; + diag_event.event_type = event_type; + diag_event.status = status; + diag_event.reason_code = reasoncode; + + WLAN_VOS_DIAG_EVENT_REPORT(&diag_event, EVENT_WLAN_PE); + return; +} +#endif |
