From 8a605e1b59e9b66098d11c1fb8f6ffdd63cc5e5f Mon Sep 17 00:00:00 2001 From: "Gupta, Kapil" Date: Wed, 8 Jun 2016 14:14:35 +0530 Subject: qcacld-3.0: Correct len size of oem data request qcacld-2.0 to qcacld-3.0 propagation. oem data request len size should be of 4 byte instead of 1 byte. Add changes to correct len size in oem data structure across the layers. Change-Id: I9b377420c50ff1160964f94be5eaa0072df0f63d CRs-Fixed: 1013488 --- core/mac/inc/sir_api.h | 2 +- core/mac/src/pe/include/lim_global.h | 2 +- core/sme/inc/oem_data_api.h | 2 +- core/wma/inc/wma_if.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index fdf1f8763daa..210550560588 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -879,7 +879,7 @@ typedef struct sSirOemDataReq { uint16_t messageType; /* eWNI_SME_OEM_DATA_REQ */ uint16_t messageLen; struct qdf_mac_addr selfMacAddr; - uint8_t data_len; + uint32_t data_len; uint8_t *data; } tSirOemDataReq, *tpSirOemDataReq; diff --git a/core/mac/src/pe/include/lim_global.h b/core/mac/src/pe/include/lim_global.h index 4ee0f0b113af..a563601a600b 100644 --- a/core/mac/src/pe/include/lim_global.h +++ b/core/mac/src/pe/include/lim_global.h @@ -291,7 +291,7 @@ struct tLimScanResultNode { /* OEM Data related structure definitions */ typedef struct sLimMlmOemDataReq { struct qdf_mac_addr selfMacAddr; - uint8_t data_len; + uint32_t data_len; uint8_t *data; } tLimMlmOemDataReq, *tpLimMlmOemDataReq; diff --git a/core/sme/inc/oem_data_api.h b/core/sme/inc/oem_data_api.h index fcd1fee2009c..ecc2b90c3921 100644 --- a/core/sme/inc/oem_data_api.h +++ b/core/sme/inc/oem_data_api.h @@ -46,7 +46,7 @@ /* Structure for defining req sent to the PE */ typedef struct tagOemDataReq { uint8_t sessionId; - uint8_t data_len; + uint32_t data_len; uint8_t *data; } tOemDataReq, tOemDataReqConfig; diff --git a/core/wma/inc/wma_if.h b/core/wma/inc/wma_if.h index 58b0dac039bd..01e7db0179c4 100644 --- a/core/wma/inc/wma_if.h +++ b/core/wma/inc/wma_if.h @@ -678,7 +678,7 @@ typedef struct { typedef struct { struct qdf_mac_addr selfMacAddr; QDF_STATUS status; - uint8_t data_len; + uint32_t data_len; uint8_t *data; } tStartOemDataReq, *tpStartOemDataReq; -- cgit v1.2.3 From cfb85837d37fbe30bcb2913bd4f541a716385a21 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 30 Jun 2016 13:46:10 -0700 Subject: qcacld-3.0: Convert wlan_hdd_hostapd.c to unified logging [1/7] Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_hostapd.c to use the unified set of APIs. Since there are a large number of changes in this file, perform the conversion in phases. For phase 1 update the following functions: hdd_hostapd_channel_allow_suspend() hdd_hostapd_channel_prevent_suspend() __hdd_hostapd_open() __hdd_hostapd_stop() __hdd_hostapd_uninit() hdd_set_sap_ht2040_mode() hdd_hostapd_inactivity_timer_cb() hdd_clear_all_sta() hdd_stop_bss_link() hdd_issue_stored_joinreq() hdd_send_radar_event() hdd_hostapd_sap_event_cb() Change-Id: I5ba28609a7859472bfe08517260364f286f068f4 CRs-Fixed: 937661 --- core/hdd/src/wlan_hdd_hostapd.c | 179 +++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 102 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index bca4d0000e59..31865b54d80f 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -138,7 +138,7 @@ void hdd_hostapd_channel_allow_suspend(hdd_adapter_t *pAdapter, hdd_hostapd_state_t *pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter); - hddLog(LOG1, FL("bssState: %d, channel: %d, dfs_ref_cnt: %d"), + hdd_notice("bssState: %d, channel: %d, dfs_ref_cnt: %d", pHostapdState->bssState, channel, atomic_read(&pHddCtx->sap_dfs_ref_cnt)); @@ -149,7 +149,7 @@ void hdd_hostapd_channel_allow_suspend(hdd_adapter_t *pAdapter, /* Release wakelock when no more DFS channels are used */ if (CHANNEL_STATE_DFS == cds_get_channel_state(channel)) { if (atomic_dec_and_test(&pHddCtx->sap_dfs_ref_cnt)) { - hddLog(LOGE, FL("DFS: allowing suspend (chan %d)"), + hdd_err("DFS: allowing suspend (chan %d)", channel); qdf_wake_lock_release(&pHddCtx->sap_dfs_wakelock, WIFI_POWER_EVENT_WAKELOCK_DFS); @@ -173,7 +173,7 @@ void hdd_hostapd_channel_prevent_suspend(hdd_adapter_t *pAdapter, hdd_hostapd_state_t *pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter); - hddLog(LOG1, FL("bssState: %d, channel: %d, dfs_ref_cnt: %d"), + hdd_notice("bssState: %d, channel: %d, dfs_ref_cnt: %d", pHostapdState->bssState, channel, atomic_read(&pHddCtx->sap_dfs_ref_cnt)); @@ -185,7 +185,7 @@ void hdd_hostapd_channel_prevent_suspend(hdd_adapter_t *pAdapter, /* Acquire wakelock if we have at least one DFS channel in use */ if (CHANNEL_STATE_DFS == cds_get_channel_state(channel)) { if (atomic_inc_return(&pHddCtx->sap_dfs_ref_cnt) == 1) { - hddLog(LOGE, FL("DFS: preventing suspend (chan %d)"), + hdd_err("DFS: preventing suspend (chan %d)", channel); qdf_wake_lock_acquire(&pHddCtx->sap_dfs_wakelock, WIFI_POWER_EVENT_WAKELOCK_DFS); @@ -246,7 +246,7 @@ static int __hdd_hostapd_open(struct net_device *dev) } /* Enable all Tx queues */ - hddLog(LOG1, FL("Enabling queues")); + hdd_notice("Enabling queues"); wlan_hdd_netif_queue_control(pAdapter, WLAN_START_ALL_NETIF_QUEUE_N_CARRIER, WLAN_CONTROL_PATH); @@ -287,7 +287,7 @@ static int __hdd_hostapd_stop(struct net_device *dev) ENTER_DEV(dev); /* Stop all tx queues */ - hddLog(LOG1, FL("Disabling queues")); + hdd_notice("Disabling queues"); wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_TX_DISABLE_N_CARRIER, WLAN_CONTROL_PATH); @@ -331,13 +331,13 @@ static void __hdd_hostapd_uninit(struct net_device *dev) ENTER_DEV(dev); if (WLAN_HDD_ADAPTER_MAGIC != adapter->magic) { - hddLog(LOGE, FL("Invalid magic")); + hdd_err("Invalid magic"); return; } hdd_ctx = WLAN_HDD_GET_CTX(adapter); if (NULL == hdd_ctx) { - hddLog(LOGE, FL("NULL hdd_ctx")); + hdd_err("NULL hdd_ctx"); return; } @@ -402,19 +402,19 @@ QDF_STATUS hdd_set_sap_ht2040_mode(hdd_adapter_t *pHostapdAdapter, QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; void *hHal = NULL; - hddLog(LOGE, FL("change HT20/40 mode")); + hdd_err("change HT20/40 mode"); if (QDF_SAP_MODE == pHostapdAdapter->device_mode) { hHal = WLAN_HDD_GET_HAL_CTX(pHostapdAdapter); if (NULL == hHal) { - hddLog(LOGE, FL("Hal ctx is null")); + hdd_err("Hal ctx is null"); return QDF_STATUS_E_FAULT; } qdf_ret_status = sme_set_ht2040_mode(hHal, pHostapdAdapter->sessionId, channel_type, true); if (qdf_ret_status == QDF_STATUS_E_FAILURE) { - hddLog(LOGE, FL("Failed to change HT20/40 mode")); + hdd_err("Failed to change HT20/40 mode"); return QDF_STATUS_E_FAILURE; } } @@ -508,7 +508,7 @@ void hdd_hostapd_inactivity_timer_cb(void *usrDataForCallback) (WLAN_HDD_GET_CTX(pHostapdAdapter))-> config->nAPAutoShutOff * 1000); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, FL("Failed to init AP inactivity timer")); + hdd_err("Failed to init AP inactivity timer"); } EXIT(); return; @@ -520,7 +520,7 @@ void hdd_hostapd_inactivity_timer_cb(void *usrDataForCallback) memset(&wrqu, 0, sizeof(wrqu)); wrqu.data.length = event_len; - hddLog(LOG1, FL("Shutting down AP interface due to inactivity")); + hdd_notice("Shutting down AP interface due to inactivity"); wireless_send_event(dev, IWEVCUSTOM, &wrqu, (char *)we_custom_event); EXIT(); @@ -533,7 +533,7 @@ void hdd_clear_all_sta(hdd_adapter_t *pHostapdAdapter, struct net_device *dev; dev = (struct net_device *)usrDataForCallback; - hddLog(LOGE, FL("Clearing all the STA entry....")); + hdd_err("Clearing all the STA entry...."); for (staId = 0; staId < WLAN_MAX_STA_COUNT; staId++) { if (pHostapdAdapter->aStaInfo[staId].isUsed && (staId != @@ -573,7 +573,7 @@ static int hdd_stop_bss_link(hdd_adapter_t *pHostapdAdapter, pcds_context); #endif if (QDF_IS_STATUS_SUCCESS(status)) - hddLog(LOGE, FL("Deleting SAP/P2P link!!!!!!")); + hdd_err("Deleting SAP/P2P link!!!!!!"); clear_bit(SOFTAP_BSS_STARTED, &pHostapdAdapter->event_flags); cds_decr_session_set_pcl(pHostapdAdapter->device_mode, @@ -601,9 +601,7 @@ static void hdd_issue_stored_joinreq(hdd_adapter_t *sta_adapter, uint32_t roam_id; if (NULL == sta_adapter) { - hddLog(LOGE, - FL - ("Invalid station adapter, ignore issueing join req")); + hdd_err("Invalid station adapter, ignore issueing join req"); return; } hal_handle = WLAN_HDD_GET_HAL_CTX(sta_adapter); @@ -739,7 +737,7 @@ QDF_STATUS hdd_send_radar_event(hdd_context_t *hdd_context, uint32_t data_size; if (!hdd_context) { - hddLog(LOGE, FL("HDD context is NULL")); + hdd_err("HDD context is NULL"); return QDF_STATUS_E_FAILURE; } @@ -771,15 +769,14 @@ QDF_STATUS hdd_send_radar_event(hdd_context_t *hdd_context, index, GFP_KERNEL); if (!vendor_event) { - hddLog(LOGE, - FL("cfg80211_vendor_event_alloc failed for %d"), index); + hdd_err("cfg80211_vendor_event_alloc failed for %d", index); return QDF_STATUS_E_FAILURE; } ret = nla_put_u32(vendor_event, NL80211_ATTR_WIPHY_FREQ, freq); if (ret) { - hddLog(LOGE, FL("NL80211_ATTR_WIPHY_FREQ put fail")); + hdd_err("NL80211_ATTR_WIPHY_FREQ put fail"); kfree_skb(vendor_event); return QDF_STATUS_E_FAILURE; } @@ -823,7 +820,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, dev = (struct net_device *)usrDataForCallback; if (!dev) { - hddLog(LOGE, FL("usrDataForCallback is null")); + hdd_err("usrDataForCallback is null"); return QDF_STATUS_E_FAILURE; } @@ -831,7 +828,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, if ((NULL == pHostapdAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pHostapdAdapter->magic)) { - hddLog(LOGE, "invalid adapter or adapter has invalid magic"); + hdd_err("invalid adapter or adapter has invalid magic"); return QDF_STATUS_E_FAILURE; } @@ -839,7 +836,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter); if (!pSapEvent) { - hddLog(LOGE, FL("pSapEvent is null")); + hdd_err("pSapEvent is null"); return QDF_STATUS_E_FAILURE; } @@ -848,14 +845,14 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pHddCtx = (hdd_context_t *) (pHostapdAdapter->pHddCtx); if (!pHddCtx) { - hddLog(LOGE, FL("HDD context is null")); + hdd_err("HDD context is null"); return QDF_STATUS_E_FAILURE; } cfg = pHddCtx->config; if (!cfg) { - hddLog(LOGE, FL("HDD config is null")); + hdd_err("HDD config is null"); return QDF_STATUS_E_FAILURE; } @@ -864,8 +861,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, switch (sapEvent) { case eSAP_START_BSS_EVENT: - hddLog(LOG1, - FL("BSS status = %s, channel = %u, bc sta Id = %d"), + hdd_notice("BSS status = %s, channel = %u, bc sta Id = %d", pSapEvent->sapevt.sapStartBssCompleteEvent. status ? "eSAP_STATUS_FAILURE" : "eSAP_STATUS_SUCCESS", pSapEvent->sapevt.sapStartBssCompleteEvent. @@ -881,7 +877,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, if (!QDF_IS_STATUS_SUCCESS(qdf_status) || pHostapdState->qdf_status) { - hddLog(LOGE, ("ERROR: startbss event failed!!")); + hdd_err("ERROR: startbss event failed!!"); goto stopbss; } else { sme_ch_avoid_update_req(pHddCtx->hHal); @@ -898,7 +894,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, hdd_softap_register_bc_sta(pHostapdAdapter, pHddApCtx->uPrivacy); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGW, FL("Failed to register BC STA %d"), + hdd_warn("Failed to register BC STA %d", qdf_status); hdd_stop_bss_link(pHostapdAdapter, usrDataForCallback); @@ -911,8 +907,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, WLAN_AP_CONNECT, pHostapdAdapter->dev->dev_addr); if (status) { - hddLog(LOGE, - ("WLAN_AP_CONNECT event failed!!")); + hdd_err("WLAN_AP_CONNECT event failed!!"); goto stopbss; } } @@ -928,8 +923,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, hdd_hostapd_inactivity_timer_cb, dev); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) - hddLog(LOGE, - FL("Failed to init inactivity timer")); + hdd_err("Failed to init inactivity timer"); qdf_status = qdf_mc_timer_start(&pHddApCtx-> @@ -938,8 +932,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, (pHostapdAdapter))->config-> nAPAutoShutOff * 1000); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) - hddLog(LOGE, - FL("Failed to init inactivity timer")); + hdd_err("Failed to init inactivity timer"); } #ifdef FEATURE_WLAN_AUTO_SHUTDOWN @@ -968,7 +961,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, #endif &pHddApCtx->groupKey); if (!QDF_IS_STATUS_SUCCESS(status)) - hddLog(LOGE, FL("wlansap_set_key_sta failed")); + hdd_err("wlansap_set_key_sta failed"); } else { for (i = 0; i < CSR_MAX_NUM_KEY; i++) { if (!pHddApCtx->wepKey[i].keyLength) @@ -985,8 +978,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, &pHddApCtx-> wepKey[i]); if (!QDF_IS_STATUS_SUCCESS(status)) { - hddLog(LOGE, - FL("set_key failed idx %d"), i); + hdd_err("set_key failed idx %d", i); } } } @@ -1006,22 +998,20 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, else pHddApCtx->dfs_cac_block_tx = true; - hddLog(LOG3, "The value of dfs_cac_block_tx[%d] for ApCtx[%p]", + hdd_info("The value of dfs_cac_block_tx[%d] for ApCtx[%p]", pHddApCtx->dfs_cac_block_tx, pHddApCtx); if ((CHANNEL_STATE_DFS == cds_get_channel_state(pHddApCtx->operatingChannel)) && (pHddCtx->config->IsSapDfsChSifsBurstEnabled == 0)) { - hddLog(LOG1, - FL("Set SIFS Burst disable for DFS channel %d"), + hdd_notice("Set SIFS Burst disable for DFS channel %d", pHddApCtx->operatingChannel); if (wma_cli_set_command(pHostapdAdapter->sessionId, WMI_PDEV_PARAM_BURST_ENABLE, 0, PDEV_CMD)) { - hddLog(LOGE, - FL("Failed to Set SIFS Burst %d"), + hdd_err("Failed to Set SIFS Burst %d", pHddApCtx->operatingChannel); } } @@ -1050,7 +1040,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, break; /* Event will be sent after Switch-Case stmt */ case eSAP_STOP_BSS_EVENT: - hddLog(LOG1, FL("BSS stop status = %s"), + hdd_notice("BSS stop status = %s", pSapEvent->sapevt.sapStopBssCompleteEvent. status ? "eSAP_STATUS_FAILURE" : "eSAP_STATUS_SUCCESS"); @@ -1074,8 +1064,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, WLAN_AP_DISCONNECT, pHostapdAdapter->dev->dev_addr); if (status) { - hddLog(LOGE, - ("WLAN_AP_DISCONNECT event failed!!")); + hdd_err("WLAN_AP_DISCONNECT event failed!!"); goto stopbss; } } @@ -1092,8 +1081,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, (QDF_P2P_GO_MODE == pHostapdAdapter->device_mode)) { hdd_adapter_t *sta_adapter = hdd_get_adapter(pHddCtx, QDF_STA_MODE); - hddLog(LOG2, - FL("P2PGO is going down now")); + hdd_info("P2PGO is going down now"); hdd_issue_stored_joinreq(sta_adapter, pHddCtx); } goto stopbss; @@ -1106,7 +1094,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, if (QDF_STATUS_SUCCESS != hdd_send_radar_event(pHddCtx, eSAP_DFS_CAC_START, dfs_info, &pHostapdAdapter->wdev)) { - hddLog(LOGE, FL("Unable to indicate CAC start NL event")); + hdd_err("Unable to indicate CAC start NL event"); } else { hdd_info("Sent CAC start to user space"); } @@ -1141,7 +1129,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, if (QDF_STATUS_SUCCESS != hdd_send_radar_event(pHddCtx, eSAP_DFS_CAC_END, dfs_info, &pHostapdAdapter->wdev)) { - hddLog(LOGE, FL("Unable to indicate CAC end NL event")); + hdd_err("Unable to indicate CAC end NL event"); } else { hdd_info("Sent CAC end to user space"); } @@ -1155,7 +1143,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, if (QDF_STATUS_SUCCESS != hdd_send_radar_event(pHddCtx, eSAP_DFS_RADAR_DETECT, dfs_info, &pHostapdAdapter->wdev)) { - hddLog(LOGE, FL("Unable to indicate Radar detect NL event")); + hdd_err("Unable to indicate Radar detect NL event"); } else { hdd_info("Sent radar detected to user space"); } @@ -1172,7 +1160,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, * forward the message to hostapd once implementation * is done for now just print */ - hddLog(LOG1, FL("SET Key: configured status = %s"), + hdd_notice("SET Key: configured status = %s", pSapEvent->sapevt.sapStationSetKeyCompleteEvent. status ? "eSAP_STATUS_FAILURE" : "eSAP_STATUS_SUCCESS"); return QDF_STATUS_SUCCESS; @@ -1183,7 +1171,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, memcpy(msg.src_addr.sa_data, &pSapEvent->sapevt.sapStationMICFailureEvent. staMac, QDF_MAC_ADDR_SIZE); - hddLog(LOG1, "MIC MAC " MAC_ADDRESS_STR, + hdd_notice("MIC MAC " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(msg.src_addr.sa_data)); if (pSapEvent->sapevt.sapStationMICFailureEvent. multicast == eSAP_TRUE) @@ -1219,7 +1207,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, memcpy(wrqu.addr.sa_data, &pSapEvent->sapevt.sapStationAssocReassocCompleteEvent. staMac, QDF_MAC_ADDR_SIZE); - hddLog(LOG1, " associated " MAC_ADDRESS_STR, + hdd_notice(" associated " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(wrqu.addr.sa_data)); we_event = IWEVREGISTERED; @@ -1253,9 +1241,8 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, sapStationAssocReassocCompleteEvent. wmmEnabled); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) - hddLog(LOGW, - FL("Failed to register STA %d " - MAC_ADDRESS_STR ""), qdf_status, + hdd_warn("Failed to register STA %d " + MAC_ADDRESS_STR "", qdf_status, MAC_ADDR_ARRAY(wrqu.addr.sa_data)); } else { qdf_status = hdd_softap_register_sta( @@ -1271,9 +1258,8 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, sapStationAssocReassocCompleteEvent. wmmEnabled); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) - hddLog(LOGW, - FL("Failed to register STA %d " - MAC_ADDRESS_STR ""), qdf_status, + hdd_warn("Failed to register STA %d " + MAC_ADDRESS_STR "", qdf_status, MAC_ADDR_ARRAY(wrqu.addr.sa_data)); } @@ -1299,8 +1285,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, sapStationAssocReassocCompleteEvent. staMac.bytes); if (status) { - hddLog(LOGE, - FL("WLAN_CLIENT_CONNECT_EX event failed")); + hdd_err("WLAN_CLIENT_CONNECT_EX event failed"); goto stopbss; } } @@ -1333,8 +1318,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, qdf_mc_timer_stop(&pHddApCtx-> hdd_ap_inactivity_timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, - FL("Failed to start inactivity timer")); + hdd_err("Failed to start inactivity timer"); } } #ifdef FEATURE_WLAN_AUTO_SHUTDOWN @@ -1370,8 +1354,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, staMac.bytes[0], &staInfo, GFP_KERNEL); } else { - hddLog(LOGE, - FL("Assoc Ie length is too long")); + hdd_err("Assoc Ie length is too long"); } } @@ -1402,18 +1385,18 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, memcpy(wrqu.addr.sa_data, &pSapEvent->sapevt.sapStationDisassocCompleteEvent. staMac, QDF_MAC_ADDR_SIZE); - hddLog(LOG1, " disassociated " MAC_ADDRESS_STR, + hdd_notice(" disassociated " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(wrqu.addr.sa_data)); qdf_status = qdf_event_set(&pHostapdState->qdf_event); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) - hddLog(LOGE, "ERR: Station Deauth event Set failed"); + hdd_err("ERR: Station Deauth event Set failed"); if (pSapEvent->sapevt.sapStationDisassocCompleteEvent.reason == eSAP_USR_INITATED_DISASSOC) - hddLog(LOG1, " User initiated disassociation"); + hdd_notice(" User initiated disassociation"); else - hddLog(LOG1, " MAC initiated disassociation"); + hdd_notice(" MAC initiated disassociation"); we_event = IWEVEXPIRED; qdf_status = hdd_softap_get_sta_id(pHostapdAdapter, @@ -1421,7 +1404,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, sapStationDisassocCompleteEvent.staMac, &staId); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, FL("ERROR: HDD Failed to find sta id!!")); + hdd_err("ERROR: HDD Failed to find sta id!!"); return QDF_STATUS_E_FAILURE; } #ifdef IPA_OFFLOAD @@ -1433,8 +1416,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, staMac.bytes); if (status) { - hddLog(LOGE, - ("ERROR: WLAN_CLIENT_DISCONNECT event failed!!")); + hdd_err("ERROR: WLAN_CLIENT_DISCONNECT event failed!!"); goto stopbss; } } @@ -1474,8 +1456,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, nAPAutoShutOff * 1000); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) - hddLog(LOGE, - FL("Failed to init AP inactivity timer")); + hdd_err("Failed to init AP inactivity timer"); } else QDF_ASSERT (qdf_mc_timer_get_current_state @@ -1496,7 +1477,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, /* Update the beacon Interval if it is P2P GO */ qdf_status = cds_change_mcc_go_beacon_interval(pHostapdAdapter); if (QDF_STATUS_SUCCESS != qdf_status) { - hddLog(LOGE, FL("failed to update Beacon interval %d"), + hdd_err("failed to update Beacon interval %d", qdf_status); } if (pHostapdAdapter->device_mode == QDF_P2P_GO_MODE) { @@ -1543,7 +1524,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, qdf_copy_macaddr(&pHddApCtx->WPSPBCProbeReq.peer_macaddr, &pSapEvent->sapevt.sapPBCProbeReqEvent. WPSPBCProbeReq.peer_macaddr); - hddLog(LOG1, "WPS PBC probe req " MAC_ADDRESS_STR, + hdd_notice("WPS PBC probe req " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pHddApCtx->WPSPBCProbeReq. peer_macaddr.bytes)); memset(&wreq, 0, sizeof(wreq)); @@ -1561,8 +1542,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, i < pSapEvent->sapevt.sapAssocStaListEvent. noOfAssocSta; i++) { - hddLog(LOG1, - "Associated Sta Num %d:assocId=%d, staId=%d, staMac=" + hdd_notice("Associated Sta Num %d:assocId=%d, staId=%d, staMac=" MAC_ADDRESS_STR, i + 1, pAssocStasArray->assocId, pAssocStasArray->staId, @@ -1597,7 +1577,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, wrqu.data.pointer = unknownSTAEvent; wrqu.data.length = strlen(unknownSTAEvent); we_custom_event_generic = (uint8_t *) unknownSTAEvent; - hddLog(LOGE, "%s", unknownSTAEvent); + hdd_err("%s", unknownSTAEvent); break; case eSAP_MAX_ASSOC_EXCEEDED: @@ -1616,13 +1596,13 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, wrqu.data.pointer = maxAssocExceededEvent; wrqu.data.length = strlen(maxAssocExceededEvent); we_custom_event_generic = (uint8_t *) maxAssocExceededEvent; - hddLog(LOG1, "%s", maxAssocExceededEvent); + hdd_notice("%s", maxAssocExceededEvent); break; case eSAP_STA_ASSOC_IND: return QDF_STATUS_SUCCESS; case eSAP_DISCONNECT_ALL_P2P_CLIENT: - hddLog(LOG1, FL(" Disconnecting all the P2P Clients....")); + hdd_notice(" Disconnecting all the P2P Clients...."); hdd_clear_all_sta(pHostapdAdapter, usrDataForCallback); return QDF_STATUS_SUCCESS; @@ -1630,13 +1610,13 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, qdf_status = hdd_stop_bss_link(pHostapdAdapter, usrDataForCallback); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGW, FL("hdd_stop_bss_link failed %d"), + hdd_warn("hdd_stop_bss_link failed %d", qdf_status); } return QDF_STATUS_SUCCESS; case eSAP_CHANNEL_CHANGE_EVENT: - hddLog(LOG1, FL("Received eSAP_CHANNEL_CHANGE_EVENT event")); + hdd_notice("Received eSAP_CHANNEL_CHANGE_EVENT event"); /* Prevent suspend for new channel */ hdd_hostapd_channel_prevent_suspend(pHostapdAdapter, pSapEvent->sapevt.sap_ch_selected.pri_ch); @@ -1688,21 +1668,19 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE case eSAP_ACS_SCAN_SUCCESS_EVENT: pHddCtx->skip_acs_scan_status = eSAP_SKIP_ACS_SCAN; - hddLog(LOG1, FL("Reusing Last ACS scan result for %d sec"), + hdd_notice("Reusing Last ACS scan result for %d sec", ACS_SCAN_EXPIRY_TIMEOUT_S); qdf_mc_timer_stop(&pHddCtx->skip_acs_scan_timer); qdf_status = qdf_mc_timer_start(&pHddCtx->skip_acs_scan_timer, ACS_SCAN_EXPIRY_TIMEOUT_S * 1000); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) - hddLog(LOGE, - FL("Failed to start ACS scan expiry timer")); + hdd_err("Failed to start ACS scan expiry timer"); return QDF_STATUS_SUCCESS; #endif case eSAP_DFS_NOL_GET: - hddLog(LOG1, - FL("Received eSAP_DFS_NOL_GET event")); + hdd_notice("Received eSAP_DFS_NOL_GET event"); /* get the dfs nol from PLD */ ret = pld_wlan_get_dfs_nol(pHddCtx->parent_dev, @@ -1719,7 +1697,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, return QDF_STATUS_E_FAULT; } case eSAP_DFS_NOL_SET: - hddLog(LOG1, FL("Received eSAP_DFS_NOL_SET event")); + hdd_notice("Received eSAP_DFS_NOL_SET event"); /* set the dfs nol to PLD */ ret = pld_wlan_set_dfs_nol(pHddCtx->parent_dev, @@ -1736,7 +1714,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, } return QDF_STATUS_SUCCESS; case eSAP_ACS_CHANNEL_SELECTED: - hddLog(LOG1, FL("ACS Completed for wlan%d"), + hdd_notice("ACS Completed for wlan%d", pHostapdAdapter->dev->ifindex); clear_bit(ACS_PENDING, &pHostapdAdapter->event_flags); clear_bit(ACS_IN_PROGRESS, &pHddCtx->g_event_flags); @@ -1755,8 +1733,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, wlan_hdd_cfg80211_acs_ch_select_evt(pHostapdAdapter); return QDF_STATUS_SUCCESS; case eSAP_ECSA_CHANGE_CHAN_IND: - hddLog(LOG1, - FL("Channel change indication from peer for channel %d"), + hdd_notice("Channel change indication from peer for channel %d", pSapEvent->sapevt.sap_chan_cng_ind.new_chan); if (hdd_softap_set_channel_change(dev, pSapEvent->sapevt.sap_chan_cng_ind.new_chan, @@ -1766,7 +1743,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, return QDF_STATUS_SUCCESS; default: - hddLog(LOG1, "SAP message is not handled"); + hdd_notice("SAP message is not handled"); goto stopbss; return QDF_STATUS_SUCCESS; } @@ -1780,7 +1757,7 @@ stopbss: char *stopBssEvent = "STOP-BSS.response"; /* 17 */ int event_len = strlen(stopBssEvent); - hddLog(LOG1, FL("BSS stop status = %s"), + hdd_notice("BSS stop status = %s", pSapEvent->sapevt.sapStopBssCompleteEvent.status ? "eSAP_STATUS_FAILURE" : "eSAP_STATUS_SUCCESS"); @@ -1797,8 +1774,7 @@ stopbss: qdf_mc_timer_stop(&pHddApCtx-> hdd_ap_inactivity_timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, - FL("Failed to stop AP inactivity timer")); + hdd_err("Failed to stop AP inactivity timer"); } } @@ -1806,7 +1782,7 @@ stopbss: qdf_mc_timer_destroy(&pHddApCtx-> hdd_ap_inactivity_timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) - hddLog(LOGE, FL("Failed to Destroy AP inactivity timer")); + hdd_err("Failed to Destroy AP inactivity timer"); } #ifdef FEATURE_WLAN_AUTO_SHUTDOWN wlan_hdd_auto_shutdown_enable(pHddCtx, true); @@ -1819,8 +1795,7 @@ stopbss: /* reclaim all resources allocated to the BSS */ qdf_status = hdd_softap_stop_bss(pHostapdAdapter); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGW, - FL("hdd_softap_stop_bss failed %d"), + hdd_warn("hdd_softap_stop_bss failed %d", qdf_status); } -- cgit v1.2.3 From fb33cf59d40c3f0e73ef0b24deeab7eaada32713 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 30 Jun 2016 14:06:57 -0700 Subject: qcacld-3.0: Convert wlan_hdd_hostapd.c to unified logging [2/7] Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_hostapd.c to use the unified set of APIs. Since there are a large number of changes in this file, perform the conversion in phases. For phase 2 update the following functions: hdd_softap_unpack_ie() hdd_softap_set_channel_change() __iw_softap_set_ini_cfg() __iw_softap_get_ini_cfg() __iw_softap_set_two_ints_getnone() Change-Id: Ia755a63c7154253a02b395fa60f8d3ef82628bba CRs-Fixed: 937661 --- core/hdd/src/wlan_hdd_hostapd.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 31865b54d80f..15c3e41fc858 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1836,7 +1836,7 @@ int hdd_softap_unpack_ie(tHalHandle halHandle, uint16_t RSNIeLen; if (NULL == halHandle) { - hddLog(LOGE, FL("Error haHandle returned NULL")); + hdd_err("Error haHandle returned NULL"); return -EINVAL; } /* Validity checks */ @@ -1859,9 +1859,9 @@ int hdd_softap_unpack_ie(tHalHandle halHandle, dot11f_unpack_ie_rsn((tpAniSirGlobal) halHandle, pRsnIe, RSNIeLen, &dot11RSNIE); /* Copy out the encryption and authentication types */ - hddLog(LOG1, FL("pairwise cipher suite count: %d"), + hdd_notice("pairwise cipher suite count: %d", dot11RSNIE.pwise_cipher_suite_count); - hddLog(LOG1, FL("authentication suite count: %d"), + hdd_notice("authentication suite count: %d", dot11RSNIE.akm_suite_count); /*Here we have followed the apple base code, but probably I suspect we can do something different */ @@ -1895,9 +1895,9 @@ int hdd_softap_unpack_ie(tHalHandle halHandle, dot11f_unpack_ie_wpa((tpAniSirGlobal) halHandle, pRsnIe, RSNIeLen, &dot11WPAIE); /* Copy out the encryption and authentication types */ - hddLog(LOG1, FL("WPA unicast cipher suite count: %d"), + hdd_notice("WPA unicast cipher suite count: %d", dot11WPAIE.unicast_cipher_count); - hddLog(LOG1, FL("WPA authentication suite count: %d"), + hdd_notice("WPA authentication suite count: %d", dot11WPAIE.auth_suite_count); /* dot11WPAIE.auth_suite_count */ /* Just translate the FIRST one */ @@ -1914,7 +1914,7 @@ int hdd_softap_unpack_ie(tHalHandle halHandle, *pMFPCapable = false; *pMFPRequired = false; } else { - hddLog(LOGW, FL("gen_ie[0]: %d"), gen_ie[0]); + hdd_warn("gen_ie[0]: %d", gen_ie[0]); return QDF_STATUS_E_FAILURE; } return QDF_STATUS_SUCCESS; @@ -1977,7 +1977,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, qdf_spin_lock_bh(&pHddCtx->dfs_lock); if (pHddCtx->dfs_radar_found == true) { qdf_spin_unlock_bh(&pHddCtx->dfs_lock); - hddLog(LOGE, FL("Channel switch in progress!!")); + hdd_err("Channel switch in progress!!"); return -EBUSY; } /* @@ -2006,8 +2006,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, target_bw); if (QDF_STATUS_SUCCESS != status) { - hddLog(LOGE, - FL("SAP set channel failed for channel = %d, bw:%d"), + hdd_err("SAP set channel failed for channel = %d, bw:%d", target_channel, target_bw); /* * If channel change command fails then clear the @@ -2074,7 +2073,7 @@ static __iw_softap_set_ini_cfg(struct net_device *dev, if (ret) return ret; - hddLog(LOG1, FL("Received data %s"), extra); + hdd_notice("Received data %s", extra); vstatus = hdd_execute_global_config_command(pHddCtx, extra); if (QDF_STATUS_SUCCESS != vstatus) { @@ -2114,7 +2113,7 @@ static __iw_softap_get_ini_cfg(struct net_device *dev, if (ret != 0) return ret; - hddLog(LOG1, FL("Printing CLD global INI Config")); + hdd_notice("Printing CLD global INI Config"); hdd_cfg_get_global_config(pHddCtx, extra, QCSAP_IOCTL_MAX_STR_LEN); wrqu->data.length = strlen(extra) + 1; @@ -2164,7 +2163,7 @@ static int __iw_softap_set_two_ints_getnone(struct net_device *dev, switch (sub_cmd) { #ifdef DEBUG case QCSAP_IOCTL_SET_FW_CRASH_INJECT: - hddLog(LOGE, "WE_SET_FW_CRASH_INJECT: %d %d", + hdd_err("WE_SET_FW_CRASH_INJECT: %d %d", value[1], value[2]); ret = wma_cli_set2_command(adapter->sessionId, GEN_PARAM_CRASH_INJECT, @@ -2183,20 +2182,20 @@ static int __iw_softap_set_two_ints_getnone(struct net_device *dev, qdf_dp_trace_clear_buffer(); break; case QCSAP_ENABLE_FW_PROFILE: - hddLog(LOG1, "QCSAP_ENABLE_FW_PROFILE: %d %d", + hdd_notice("QCSAP_ENABLE_FW_PROFILE: %d %d", value[1], value[2]); ret = wma_cli_set2_command(adapter->sessionId, WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, value[1], value[2], DBG_CMD); break; case QCSAP_SET_FW_PROFILE_HIST_INTVL: - hddLog(LOG1, "QCSAP_SET_FW_PROFILE_HIST_INTVL: %d %d", + hdd_notice("QCSAP_SET_FW_PROFILE_HIST_INTVL: %d %d", value[1], value[2]); ret = wma_cli_set2_command(adapter->sessionId, WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID, value[1], value[2], DBG_CMD); default: - hddLog(LOGE, FL("Invalid IOCTL command %d"), sub_cmd); + hdd_err("Invalid IOCTL command %d", sub_cmd); break; } -- cgit v1.2.3 From edff0d92afdc7169e0ad2252c6d2e203fe80e316 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 30 Jun 2016 14:35:19 -0700 Subject: qcacld-3.0: Convert wlan_hdd_hostapd.c to unified logging [3/7] Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_hostapd.c to use the unified set of APIs. Since there are a large number of changes in this file, perform the conversion in phases. For phase 3 update the following functions: __iw_softap_setparam() __iw_softap_get_three() Change-Id: I5db86f54bcc978d7935873423fa1e91bc83d7a2e CRs-Fixed: 937661 --- core/hdd/src/wlan_hdd_hostapd.c | 124 ++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 67 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 15c3e41fc858..2e83e28ae54e 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2311,19 +2311,19 @@ static __iw_softap_setparam(struct net_device *dev, hHal = WLAN_HDD_GET_HAL_CTX(pHostapdAdapter); if (!hHal) { - hddLog(LOGE, FL("Hal ctx is null")); + hdd_err("Hal ctx is null"); return -EINVAL; } p_cds_context = hdd_ctx->pcds_context; if (!p_cds_context) { - hddLog(LOGE, FL("cds ctx is null")); + hdd_err("cds ctx is null"); return -ENOENT; } switch (sub_cmd) { case QCASAP_SET_RADAR_DBG: - hddLog(LOG1, FL("QCASAP_SET_RADAR_DBG called with: value: %d"), + hdd_notice("QCASAP_SET_RADAR_DBG called with: value: %d", set_value); wlan_sap_enable_phy_error_logs(hHal, (bool) set_value); break; @@ -2344,7 +2344,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_PARAM_ACL_MODE: if ((eSAP_ALLOW_ALL < (eSapMacAddrACL) set_value) || (eSAP_ACCEPT_UNLESS_DENIED > (eSapMacAddrACL) set_value)) { - hddLog(LOGE, FL("Invalid ACL Mode value %d"), + hdd_err("Invalid ACL Mode value %d", set_value); ret = -EINVAL; } else { @@ -2361,14 +2361,12 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_PARAM_SET_CHANNEL_CHANGE: if ((QDF_SAP_MODE == pHostapdAdapter->device_mode) || (QDF_P2P_GO_MODE == pHostapdAdapter->device_mode)) { - hddLog(LOG1, - "SET Channel Change to new channel= %d", + hdd_notice("SET Channel Change to new channel= %d", set_value); ret = hdd_softap_set_channel_change(dev, set_value, CH_WIDTH_MAX); } else { - hddLog(LOGE, - FL("Channel Change Failed, Device in test mode")); + hdd_err("Channel Change Failed, Device in test mode"); ret = -EINVAL; } break; @@ -2392,24 +2390,21 @@ static __iw_softap_setparam(struct net_device *dev, break; case QCSAP_PARAM_MAX_ASSOC: if (WNI_CFG_ASSOC_STA_LIMIT_STAMIN > set_value) { - hddLog(LOGE, FL("Invalid setMaxAssoc value %d"), + hdd_err("Invalid setMaxAssoc value %d", set_value); ret = -EINVAL; } else { if (WNI_CFG_ASSOC_STA_LIMIT_STAMAX < set_value) { - hddLog(LOGW, - FL("setMaxAssoc %d > max allowed %d."), + hdd_warn("setMaxAssoc %d > max allowed %d.", set_value, WNI_CFG_ASSOC_STA_LIMIT_STAMAX); - hddLog(LOGW, - FL("Setting it to max allowed and continuing")); + hdd_warn("Setting it to max allowed and continuing"); set_value = WNI_CFG_ASSOC_STA_LIMIT_STAMAX; } status = sme_cfg_set_int(hHal, WNI_CFG_ASSOC_STA_LIMIT, set_value); if (status != QDF_STATUS_SUCCESS) { - hddLog(LOGE, - FL("setMaxAssoc failure, status %d"), + hdd_err("setMaxAssoc failure, status %d", status); ret = -EIO; } @@ -2423,7 +2418,7 @@ static __iw_softap_setparam(struct net_device *dev, sme_hide_ssid(hHal, pHostapdAdapter->sessionId, set_value); if (QDF_STATUS_SUCCESS != status) { - hddLog(LOGE, FL("QCSAP_PARAM_HIDE_SSID failed")); + hdd_err("QCSAP_PARAM_HIDE_SSID failed"); return status; } break; @@ -2433,7 +2428,7 @@ static __iw_softap_setparam(struct net_device *dev, tSirRateUpdateInd rateUpdate = {0}; struct hdd_config *pConfig = hdd_ctx->config; - hddLog(LOG1, "MC Target rate %d", set_value); + hdd_notice("MC Target rate %d", set_value); qdf_copy_macaddr(&rateUpdate.bssid, &pHostapdAdapter->macAddressCurrent); rateUpdate.nss = (pConfig->enable2x2 == 0) ? 0 : 1; @@ -2444,7 +2439,7 @@ static __iw_softap_setparam(struct net_device *dev, rateUpdate.bcastDataRate = -1; status = sme_send_rate_update_ind(hHal, &rateUpdate); if (QDF_STATUS_SUCCESS != status) { - hddLog(LOGE, FL("SET_MC_RATE failed")); + hdd_err("SET_MC_RATE failed"); ret = -1; } break; @@ -2452,7 +2447,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_PARAM_SET_TXRX_FW_STATS: { - hddLog(LOG1, "QCSAP_PARAM_SET_TXRX_FW_STATS val %d", set_value); + hdd_notice("QCSAP_PARAM_SET_TXRX_FW_STATS val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID, set_value, VDEV_CMD); @@ -2461,7 +2456,7 @@ static __iw_softap_setparam(struct net_device *dev, /* Firmware debug log */ case QCSAP_DBGLOG_LOG_LEVEL: { - hddLog(LOG1, "QCSAP_DBGLOG_LOG_LEVEL val %d", set_value); + hdd_notice("QCSAP_DBGLOG_LOG_LEVEL val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_DBGLOG_LOG_LEVEL, set_value, DBG_CMD); @@ -2470,7 +2465,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_DBGLOG_VAP_ENABLE: { - hddLog(LOG1, "QCSAP_DBGLOG_VAP_ENABLE val %d", set_value); + hdd_notice("QCSAP_DBGLOG_VAP_ENABLE val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_DBGLOG_VAP_ENABLE, set_value, DBG_CMD); @@ -2479,7 +2474,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_DBGLOG_VAP_DISABLE: { - hddLog(LOG1, "QCSAP_DBGLOG_VAP_DISABLE val %d", set_value); + hdd_notice("QCSAP_DBGLOG_VAP_DISABLE val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_DBGLOG_VAP_DISABLE, set_value, DBG_CMD); @@ -2488,7 +2483,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_DBGLOG_MODULE_ENABLE: { - hddLog(LOG1, "QCSAP_DBGLOG_MODULE_ENABLE val %d", set_value); + hdd_notice("QCSAP_DBGLOG_MODULE_ENABLE val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_DBGLOG_MODULE_ENABLE, set_value, DBG_CMD); @@ -2497,7 +2492,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_DBGLOG_MODULE_DISABLE: { - hddLog(LOG1, "QCSAP_DBGLOG_MODULE_DISABLE val %d", set_value); + hdd_notice("QCSAP_DBGLOG_MODULE_DISABLE val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_DBGLOG_MODULE_DISABLE, set_value, DBG_CMD); @@ -2506,7 +2501,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_DBGLOG_MOD_LOG_LEVEL: { - hddLog(LOG1, "QCSAP_DBGLOG_MOD_LOG_LEVEL val %d", set_value); + hdd_notice("QCSAP_DBGLOG_MOD_LOG_LEVEL val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_DBGLOG_MOD_LOG_LEVEL, set_value, DBG_CMD); @@ -2515,7 +2510,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_DBGLOG_TYPE: { - hddLog(LOG1, "QCSAP_DBGLOG_TYPE val %d", set_value); + hdd_notice("QCSAP_DBGLOG_TYPE val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_DBGLOG_TYPE, set_value, DBG_CMD); @@ -2523,7 +2518,7 @@ static __iw_softap_setparam(struct net_device *dev, } case QCSAP_DBGLOG_REPORT_ENABLE: { - hddLog(LOG1, "QCSAP_DBGLOG_REPORT_ENABLE val %d", set_value); + hdd_notice("QCSAP_DBGLOG_REPORT_ENABLE val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_DBGLOG_REPORT_ENABLE, set_value, DBG_CMD); @@ -2537,8 +2532,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_PARAM_SET_MCC_CHANNEL_QUOTA: { - hddLog(LOG1, - FL("iwpriv cmd to set MCC quota value %dms"), + hdd_notice("iwpriv cmd to set MCC quota value %dms", set_value); ret = cds_go_set_mcc_p2p_quota(pHostapdAdapter, set_value); @@ -2547,7 +2541,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCASAP_TXRX_FWSTATS_RESET: { - hddLog(LOG1, "WE_TXRX_FWSTATS_RESET val %d", set_value); + hdd_notice("WE_TXRX_FWSTATS_RESET val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMA_VDEV_TXRX_FWSTATS_RESET_CMDID, set_value, VDEV_CMD); @@ -2560,7 +2554,7 @@ static __iw_softap_setparam(struct net_device *dev, WMI_VDEV_PARAM_ENABLE_RTSCTS, set_value, VDEV_CMD); if (ret) { - hddLog(LOGE, "FAILED TO SET RTSCTS at SAP"); + hdd_err("FAILED TO SET RTSCTS at SAP"); ret = -EIO; } break; @@ -2571,7 +2565,7 @@ static __iw_softap_setparam(struct net_device *dev, tsap_Config_t *pConfig = &pHostapdAdapter->sessionCtx.ap.sapConfig; - hddLog(LOG1, "SET_HT_RATE val %d", set_value); + hdd_notice("SET_HT_RATE val %d", set_value); if (set_value != 0xff) { rix = RC_2_RATE_IDX(set_value); @@ -2588,8 +2582,7 @@ static __iw_softap_setparam(struct net_device *dev, eCSR_DOT11_MODE_abg || pConfig->SapHw_mode == eCSR_DOT11_MODE_11a) { - hddLog(LOGE, - "Not valid mode for HT"); + hdd_err("Not valid mode for HT"); ret = -EIO; break; } @@ -2598,7 +2591,7 @@ static __iw_softap_setparam(struct net_device *dev, } else if (set_value & 0x10) { if (pConfig->SapHw_mode == eCSR_DOT11_MODE_11a) { - hddLog(LOGE, "Not valid for cck"); + hdd_err("Not valid for cck"); ret = -EIO; break; } @@ -2613,7 +2606,7 @@ static __iw_softap_setparam(struct net_device *dev, eCSR_DOT11_MODE_11b || pConfig->SapHw_mode == eCSR_DOT11_MODE_11b_ONLY) { - hddLog(LOGE, "Not valid for OFDM"); + hdd_err("Not valid for OFDM"); ret = -EIO; break; } @@ -2621,7 +2614,7 @@ static __iw_softap_setparam(struct net_device *dev, } set_value = (preamble << 6) | (nss << 4) | rix; } - hddLog(LOG1, "SET_HT_RATE val %d rix %d preamble %x nss %d", + hdd_notice("SET_HT_RATE val %d rix %d preamble %x nss %d", set_value, rix, preamble, nss); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_FIXED_RATE, @@ -2637,8 +2630,7 @@ static __iw_softap_setparam(struct net_device *dev, if (pConfig->SapHw_mode != eCSR_DOT11_MODE_11ac && pConfig->SapHw_mode != eCSR_DOT11_MODE_11ac_ONLY) { - hddLog(LOGE, - FL("SET_VHT_RATE error: SapHw_mode= 0x%x, ch = %d"), + hdd_err("SET_VHT_RATE error: SapHw_mode= 0x%x, ch = %d", pConfig->SapHw_mode, pConfig->channel); ret = -EIO; break; @@ -2651,7 +2643,7 @@ static __iw_softap_setparam(struct net_device *dev, set_value = (preamble << 6) | (nss << 4) | rix; } - hddLog(LOG1, "SET_VHT_RATE val %d rix %d preamble %x nss %d", + hdd_notice("SET_VHT_RATE val %d rix %d preamble %x nss %d", set_value, rix, preamble, nss); ret = wma_cli_set_command(pHostapdAdapter->sessionId, @@ -2662,21 +2654,20 @@ static __iw_softap_setparam(struct net_device *dev, case QCASAP_SHORT_GI: { - hddLog(LOG1, "QCASAP_SET_SHORT_GI val %d", set_value); + hdd_notice("QCASAP_SET_SHORT_GI val %d", set_value); /* same as 40MHZ */ ret = sme_update_ht_config(hHal, pHostapdAdapter->sessionId, WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ, set_value); if (ret) - hddLog(LOGE, - "Failed to set ShortGI value ret(%d)", ret); + hdd_err("Failed to set ShortGI value ret(%d)", ret); break; } case QCSAP_SET_AMPDU: { - hddLog(LOG1, "QCSAP_SET_AMPDU %d", set_value); + hdd_notice("QCSAP_SET_AMPDU %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, GEN_VDEV_PARAM_AMPDU, set_value, GEN_CMD); @@ -2685,7 +2676,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_SET_AMSDU: { - hddLog(LOG1, "QCSAP_SET_AMSDU %d", set_value); + hdd_notice("QCSAP_SET_AMSDU %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, GEN_VDEV_PARAM_AMSDU, set_value, GEN_CMD); @@ -2693,7 +2684,7 @@ static __iw_softap_setparam(struct net_device *dev, } case QCSAP_GTX_HT_MCS: { - hddLog(LOG1, "WMI_VDEV_PARAM_GTX_HT_MCS %d", set_value); + hdd_notice("WMI_VDEV_PARAM_GTX_HT_MCS %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_HT_MCS, set_value, GTX_CMD); @@ -2702,7 +2693,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_GTX_VHT_MCS: { - hddLog(LOG1, "WMI_VDEV_PARAM_GTX_VHT_MCS %d", set_value); + hdd_notice("WMI_VDEV_PARAM_GTX_VHT_MCS %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_VHT_MCS, set_value, GTX_CMD); @@ -2711,7 +2702,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_GTX_USRCFG: { - hddLog(LOG1, "WMI_VDEV_PARAM_GTX_USR_CFG %d", set_value); + hdd_notice("WMI_VDEV_PARAM_GTX_USR_CFG %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_USR_CFG, set_value, GTX_CMD); @@ -2720,7 +2711,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_GTX_THRE: { - hddLog(LOG1, "WMI_VDEV_PARAM_GTX_THRE %d", set_value); + hdd_notice("WMI_VDEV_PARAM_GTX_THRE %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_THRE, set_value, GTX_CMD); @@ -2729,7 +2720,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_GTX_MARGIN: { - hddLog(LOG1, "WMI_VDEV_PARAM_GTX_MARGIN %d", set_value); + hdd_notice("WMI_VDEV_PARAM_GTX_MARGIN %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_MARGIN, set_value, GTX_CMD); @@ -2738,7 +2729,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_GTX_STEP: { - hddLog(LOG1, "WMI_VDEV_PARAM_GTX_STEP %d", set_value); + hdd_notice("WMI_VDEV_PARAM_GTX_STEP %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_STEP, set_value, GTX_CMD); @@ -2747,7 +2738,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_GTX_MINTPC: { - hddLog(LOG1, "WMI_VDEV_PARAM_GTX_MINTPC %d", set_value); + hdd_notice("WMI_VDEV_PARAM_GTX_MINTPC %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_MINTPC, set_value, GTX_CMD); @@ -2756,7 +2747,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCSAP_GTX_BWMASK: { - hddLog(LOG1, "WMI_VDEV_PARAM_GTX_BWMASK %d", set_value); + hdd_notice("WMI_VDEV_PARAM_GTX_BWMASK %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_BW_MASK, set_value, GTX_CMD); @@ -2765,14 +2756,14 @@ static __iw_softap_setparam(struct net_device *dev, case QCASAP_SET_TM_LEVEL: { - hddLog(LOG1, "Set Thermal Mitigation Level %d", set_value); + hdd_notice("Set Thermal Mitigation Level %d", set_value); (void)sme_set_thermal_level(hHal, set_value); break; } case QCASAP_SET_DFS_IGNORE_CAC: { - hddLog(LOG1, "Set Dfs ignore CAC %d", set_value); + hdd_notice("Set Dfs ignore CAC %d", set_value); if (pHostapdAdapter->device_mode != QDF_SAP_MODE) return -EINVAL; @@ -2783,7 +2774,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCASAP_SET_DFS_TARGET_CHNL: { - hddLog(LOG1, "Set Dfs target channel %d", set_value); + hdd_notice("Set Dfs target channel %d", set_value); if (pHostapdAdapter->device_mode != QDF_SAP_MODE) return -EINVAL; @@ -2815,22 +2806,21 @@ static __iw_softap_setparam(struct net_device *dev, isDfsch = (CHANNEL_STATE_DFS == cds_get_channel_state(ch)); - hddLog(LOG1, FL("Set QCASAP_SET_RADAR_CMD val %d"), set_value); + hdd_notice("Set QCASAP_SET_RADAR_CMD val %d", set_value); if (!pHddCtx->dfs_radar_found && isDfsch) { ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMA_VDEV_DFS_CONTROL_CMDID, set_value, VDEV_CMD); } else { - hddLog(LOGE, - FL("Ignore, radar_found: %d, dfs_channel: %d"), + hdd_err("Ignore, radar_found: %d, dfs_channel: %d", pHddCtx->dfs_radar_found, isDfsch); } break; } case QCASAP_TX_CHAINMASK_CMD: { - hddLog(LOG1, "QCASAP_TX_CHAINMASK_CMD val %d", set_value); + hdd_notice("QCASAP_TX_CHAINMASK_CMD val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_PDEV_PARAM_TX_CHAIN_MASK, set_value, PDEV_CMD); @@ -2839,7 +2829,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCASAP_RX_CHAINMASK_CMD: { - hddLog(LOG1, "QCASAP_RX_CHAINMASK_CMD val %d", set_value); + hdd_notice("QCASAP_RX_CHAINMASK_CMD val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_PDEV_PARAM_RX_CHAIN_MASK, set_value, PDEV_CMD); @@ -2848,7 +2838,7 @@ static __iw_softap_setparam(struct net_device *dev, case QCASAP_NSS_CMD: { - hddLog(LOG1, "QCASAP_NSS_CMD val %d", set_value); + hdd_notice("QCASAP_NSS_CMD val %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_NSS, set_value, VDEV_CMD); @@ -2887,7 +2877,7 @@ static __iw_softap_setparam(struct net_device *dev, } case QCASAP_DUMP_STATS: { - hddLog(LOG1, "QCASAP_DUMP_STATS val %d", set_value); + hdd_notice("QCASAP_DUMP_STATS val %d", set_value); hdd_wlan_dump_stats(pHostapdAdapter, set_value); break; } @@ -2895,7 +2885,7 @@ static __iw_softap_setparam(struct net_device *dev, { hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter); - hddLog(LOG1, "QCASAP_CLEAR_STATS val %d", set_value); + hdd_notice("QCASAP_CLEAR_STATS val %d", set_value); switch (set_value) { case WLAN_HDD_STATS: memset(&pHostapdAdapter->stats, 0, @@ -2918,13 +2908,13 @@ static __iw_softap_setparam(struct net_device *dev, break; } case QCSAP_START_FW_PROFILING: - hddLog(LOG1, "QCSAP_START_FW_PROFILING %d", set_value); + hdd_notice("QCSAP_START_FW_PROFILING %d", set_value); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_WLAN_PROFILE_TRIGGER_CMDID, set_value, DBG_CMD); break; default: - hddLog(LOGE, FL("Invalid setparam command %d value %d"), + hdd_err("Invalid setparam command %d value %d", sub_cmd, set_value); ret = -EINVAL; break; @@ -2962,7 +2952,7 @@ static int __iw_softap_get_three(struct net_device *dev, ret = hdd_indicate_tsf(adapter, value, 3); break; default: - hdd_err(FL("Invalid getparam command %d"), sub_cmd); + hdd_err("Invalid getparam command %d", sub_cmd); ret = -EINVAL; break; } -- cgit v1.2.3 From b849189e6dd4e853fca13c51310fa25caab9660a Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 30 Jun 2016 14:44:04 -0700 Subject: qcacld-3.0: Convert wlan_hdd_hostapd.c to unified logging [4/7] Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_hostapd.c to use the unified set of APIs. Since there are a large number of changes in this file, perform the conversion in phases. For phase 4 update the following functions: __iw_softap_getparam() __iw_softap_modify_acl() __iw_softap_set_max_tx_power() __iw_softap_set_tx_power() __iw_softap_getassoc_stamacaddr() __iw_softap_disassoc_sta() wlan_hdd_set_force_acs_ch_range() __iw_softap_get_channel_list() __iw_get_genie() __iw_get_wpspbc_probe_req_ies() __iw_set_auth_hostap() __iw_set_ap_encodeext() __iw_softap_setwpsie() Change-Id: If2388fbdaf5988bd1864443f58594098c44bf837 CRs-Fixed: 937661 --- core/hdd/src/wlan_hdd_hostapd.c | 174 ++++++++++++++++++---------------------- 1 file changed, 77 insertions(+), 97 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 2e83e28ae54e..bdeb7dc1cde3 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -3023,8 +3023,7 @@ static __iw_softap_getparam(struct net_device *dev, sme_cfg_get_int(hHal, WNI_CFG_ASSOC_STA_LIMIT, (uint32_t *) value); if (QDF_STATUS_SUCCESS != status) { - hddLog(LOGE, - FL("failed to get WNI_CFG_ASSOC_STA_LIMIT from cfg %d"), + hdd_err("failed to get WNI_CFG_ASSOC_STA_LIMIT from cfg %d", status); ret = -EIO; } @@ -3061,7 +3060,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GTX_HT_MCS: { - hddLog(LOG1, "GET WMI_VDEV_PARAM_GTX_HT_MCS"); + hdd_notice("GET WMI_VDEV_PARAM_GTX_HT_MCS"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_HT_MCS, GTX_CMD); @@ -3070,7 +3069,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GTX_VHT_MCS: { - hddLog(LOG1, "GET WMI_VDEV_PARAM_GTX_VHT_MCS"); + hdd_notice("GET WMI_VDEV_PARAM_GTX_VHT_MCS"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_VHT_MCS, GTX_CMD); @@ -3079,7 +3078,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GTX_USRCFG: { - hddLog(LOG1, "GET WMI_VDEV_PARAM_GTX_USR_CFG"); + hdd_notice("GET WMI_VDEV_PARAM_GTX_USR_CFG"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_USR_CFG, GTX_CMD); @@ -3088,7 +3087,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GTX_THRE: { - hddLog(LOG1, "GET WMI_VDEV_PARAM_GTX_THRE"); + hdd_notice("GET WMI_VDEV_PARAM_GTX_THRE"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_THRE, GTX_CMD); @@ -3097,7 +3096,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GTX_MARGIN: { - hddLog(LOG1, "GET WMI_VDEV_PARAM_GTX_MARGIN"); + hdd_notice("GET WMI_VDEV_PARAM_GTX_MARGIN"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_MARGIN, GTX_CMD); @@ -3106,7 +3105,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GTX_STEP: { - hddLog(LOG1, "GET WMI_VDEV_PARAM_GTX_STEP"); + hdd_notice("GET WMI_VDEV_PARAM_GTX_STEP"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_STEP, GTX_CMD); @@ -3115,7 +3114,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GTX_MINTPC: { - hddLog(LOG1, "GET WMI_VDEV_PARAM_GTX_MINTPC"); + hdd_notice("GET WMI_VDEV_PARAM_GTX_MINTPC"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_MINTPC, GTX_CMD); @@ -3124,7 +3123,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GTX_BWMASK: { - hddLog(LOG1, "GET WMI_VDEV_PARAM_GTX_BW_MASK"); + hdd_notice("GET WMI_VDEV_PARAM_GTX_BW_MASK"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_GTX_BW_MASK, GTX_CMD); @@ -3146,12 +3145,10 @@ static __iw_softap_getparam(struct net_device *dev, case QCSAP_GET_ACL: { - hddLog(LOG1, FL("QCSAP_GET_ACL")); + hdd_notice("QCSAP_GET_ACL"); if (hdd_print_acl(pHostapdAdapter) != QDF_STATUS_SUCCESS) { - hddLog(LOGE, - FL - ("QCSAP_GET_ACL returned Error: not completed")); + hdd_err("QCSAP_GET_ACL returned Error: not completed"); } *value = 0; break; @@ -3159,7 +3156,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCASAP_TX_CHAINMASK_CMD: { - hddLog(LOG1, "QCASAP_TX_CHAINMASK_CMD"); + hdd_notice("QCASAP_TX_CHAINMASK_CMD"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_PDEV_PARAM_TX_CHAIN_MASK, PDEV_CMD); @@ -3168,7 +3165,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCASAP_RX_CHAINMASK_CMD: { - hddLog(LOG1, "QCASAP_RX_CHAINMASK_CMD"); + hdd_notice("QCASAP_RX_CHAINMASK_CMD"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_PDEV_PARAM_RX_CHAIN_MASK, PDEV_CMD); @@ -3177,7 +3174,7 @@ static __iw_softap_getparam(struct net_device *dev, case QCASAP_NSS_CMD: { - hddLog(LOG1, "QCASAP_NSS_CMD"); + hdd_notice("QCASAP_NSS_CMD"); *value = wma_cli_get_command(pHostapdAdapter->sessionId, WMI_VDEV_PARAM_NSS, VDEV_CMD); @@ -3188,18 +3185,18 @@ static __iw_softap_getparam(struct net_device *dev, break; case QCASAP_GET_TEMP_CMD: { - hddLog(LOG1, "QCASAP_GET_TEMP_CMD"); + hdd_notice("QCASAP_GET_TEMP_CMD"); ret = wlan_hdd_get_temperature(pHostapdAdapter, value); break; } case QCSAP_GET_FW_PROFILE_DATA: - hddLog(LOG1, "QCSAP_GET_FW_PROFILE_DATA"); + hdd_notice("QCSAP_GET_FW_PROFILE_DATA"); ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, 0, DBG_CMD); break; default: - hddLog(LOGE, FL("Invalid getparam command %d"), sub_cmd); + hdd_err("Invalid getparam command %d", sub_cmd); ret = -EINVAL; break; @@ -3268,8 +3265,7 @@ int __iw_softap_modify_acl(struct net_device *dev, #ifndef WLAN_FEATURE_MBSSID cds_ctx = hdd_ctx->pcds_context; if (NULL == cds_ctx) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - "%s: Vos Context is NULL", __func__); + hdd_err("Vos Context is NULL"); return -EINVAL; } #endif @@ -3281,7 +3277,7 @@ int __iw_softap_modify_acl(struct net_device *dev, i++; cmd = (int)(*(value + i)); - hddLog(LOG1, FL("Modify ACL mac:" MAC_ADDRESS_STR " type: %d cmd: %d"), + hdd_notice("Modify ACL mac:" MAC_ADDRESS_STR " type: %d cmd: %d", MAC_ADDR_ARRAY(pPeerStaMac), listType, cmd); #ifdef WLAN_FEATURE_MBSSID @@ -3295,7 +3291,7 @@ int __iw_softap_modify_acl(struct net_device *dev, (eSapACLType) listType, (eSapACLCmdType) cmd); #endif if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, FL("Modify ACL failed")); + hdd_err("Modify ACL failed"); ret = -EIO; } EXIT(); @@ -3386,7 +3382,7 @@ static __iw_softap_set_max_tx_power(struct net_device *dev, set_value = value[0]; if (QDF_STATUS_SUCCESS != sme_set_max_tx_power(hHal, bssid, selfMac, set_value)) { - hddLog(LOGE, FL("Setting maximum tx power failed")); + hdd_err("Setting maximum tx power failed"); return -EIO; } EXIT(); @@ -3436,7 +3432,7 @@ static __iw_softap_set_tx_power(struct net_device *dev, if (QDF_STATUS_SUCCESS != sme_set_tx_power(hHal, pHostapdAdapter->sessionId, bssid, pHostapdAdapter->device_mode, set_value)) { - hddLog(LOGE, FL("Setting tx power failed")); + hdd_err("Setting tx power failed"); return -EIO; } EXIT(); @@ -3498,14 +3494,14 @@ static __iw_softap_getassoc_stamacaddr(struct net_device *dev, /* make sure userspace allocated a reasonable buffer size */ if (wrqu->data.length < sizeof(maclist_index)) { - hddLog(LOG1, FL("invalid userspace buffer")); + hdd_notice("invalid userspace buffer"); return -EINVAL; } /* allocate local buffer to build the response */ buf = kmalloc(wrqu->data.length, GFP_KERNEL); if (!buf) { - hddLog(LOG1, FL("failed to allocate response buffer")); + hdd_notice("failed to allocate response buffer"); return -ENOMEM; } @@ -3529,7 +3525,7 @@ static __iw_softap_getassoc_stamacaddr(struct net_device *dev, *((u32 *) buf) = maclist_index; wrqu->data.length = maclist_index; if (copy_to_user(wrqu->data.pointer, buf, maclist_index)) { - hddLog(LOG1, FL("failed to copy response to user buffer")); + hdd_notice("failed to copy response to user buffer"); ret = -EFAULT; } kfree(buf); @@ -3577,8 +3573,7 @@ static __iw_softap_disassoc_sta(struct net_device *dev, ENTER_DEV(dev); if (!capable(CAP_NET_ADMIN)) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - FL("permission check failed")); + hdd_err("permission check failed"); return -EPERM; } @@ -3592,7 +3587,7 @@ static __iw_softap_disassoc_sta(struct net_device *dev, */ peerMacAddr = (uint8_t *) (extra); - hddLog(LOG1, FL("data " MAC_ADDRESS_STR), + hdd_notice("data " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(peerMacAddr)); hdd_softap_sta_disassoc(pHostapdAdapter, peerMacAddr); EXIT(); @@ -3677,7 +3672,7 @@ static int wlan_hdd_set_force_acs_ch_range(struct net_device *dev, ENTER_DEV(dev); if (!capable(CAP_NET_ADMIN)) { - hddLog(LOGE, FL("permission check failed")); + hdd_err("permission check failed"); return -EPERM; } @@ -3728,7 +3723,7 @@ static int __iw_softap_get_channel_list(struct net_device *dev, return ret; if (QDF_STATUS_SUCCESS != sme_get_freq_band(hHal, &curBand)) { - hddLog(LOGE, FL("not able get the current frequency band")); + hdd_err("not able get the current frequency band"); return -EIO; } wrqu->data.length = sizeof(tChannelListInfo); @@ -3741,7 +3736,7 @@ static int __iw_softap_get_channel_list(struct net_device *dev, bandEndChannel = CHAN_ENUM_184; } - hddLog(LOG1, FL("curBand = %d, StartChannel = %hu, EndChannel = %hu "), + hdd_notice("curBand = %d, StartChannel = %hu, EndChannel = %hu ", curBand, bandStartChannel, bandEndChannel); for (i = bandStartChannel; i <= bandEndChannel; i++) { @@ -3753,7 +3748,7 @@ static int __iw_softap_get_channel_list(struct net_device *dev, } } - hddLog(LOG1, FL(" number of channels %d"), num_channels); + hdd_notice(" number of channels %d", num_channels); if (num_channels > IW_MAX_FREQUENCIES) { num_channels = IW_MAX_FREQUENCIES; @@ -3803,8 +3798,7 @@ int __iw_get_genie(struct net_device *dev, #ifndef WLAN_FEATURE_MBSSID cds_ctx = hdd_ctx->pcds_context; if (NULL == cds_ctx) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - "%s: vos context is not valid ", __func__); + hdd_err("vos context is not valid "); return -EINVAL; } #endif @@ -3825,15 +3819,15 @@ int __iw_get_genie(struct net_device *dev, length = QDF_MIN(length, DOT11F_IE_RSN_MAX_LEN); if (wrqu->data.length < length || copy_to_user(wrqu->data.pointer, (void *)genIeBytes, length)) { - hddLog(LOG1, FL("failed to copy data to user buffer")); + hdd_notice("failed to copy data to user buffer"); return -EFAULT; } wrqu->data.length = length; - hddLog(LOG1, FL(" RSN IE of %d bytes returned"), + hdd_notice(" RSN IE of %d bytes returned", wrqu->data.length); } else { wrqu->data.length = 0; - hddLog(LOG1, FL(" RSN IE failed to populate")); + hdd_notice(" RSN IE failed to populate"); } EXIT(); @@ -3872,7 +3866,7 @@ int __iw_get_wpspbc_probe_req_ies(struct net_device *dev, if (0 != ret) return ret; - hddLog(LOG1, FL("get_WPSPBCProbeReqIEs ioctl")); + hdd_notice("get_WPSPBCProbeReqIEs ioctl"); memset((void *)&WPSPBCProbeReqIEs, 0, sizeof(WPSPBCProbeReqIEs)); WPSPBCProbeReqIEs.probeReqIELen = @@ -3885,7 +3879,7 @@ int __iw_get_wpspbc_probe_req_ies(struct net_device *dev, if (copy_to_user(wrqu->data.pointer, (void *)&WPSPBCProbeReqIEs, sizeof(WPSPBCProbeReqIEs))) { - hddLog(LOG1, FL("failed to copy data to user buffer")); + hdd_notice("failed to copy data to user buffer"); return -EFAULT; } wrqu->data.length = 12 + WPSPBCProbeReqIEs.probeReqIELen; @@ -3941,13 +3935,13 @@ int __iw_set_auth_hostap(struct net_device *dev, struct iw_request_info *info, case IW_AUTH_TKIP_COUNTERMEASURES: { if (wrqu->param.value) { - hddLog(LOG2, - "Counter Measure started %d", wrqu->param.value); + hdd_info("Counter Measure started %d", + wrqu->param.value); pWextState->mTKIPCounterMeasures = TKIP_COUNTER_MEASURE_STARTED; } else { - hddLog(LOG2, - "Counter Measure stopped=%d", wrqu->param.value); + hdd_info("Counter Measure stopped=%d", + wrqu->param.value); pWextState->mTKIPCounterMeasures = TKIP_COUNTER_MEASURE_STOPED; } @@ -3960,7 +3954,7 @@ int __iw_set_auth_hostap(struct net_device *dev, struct iw_request_info *info, default: - hddLog(LOGW, FL("called with unsupported auth type %d"), + hdd_warn("called with unsupported auth type %d", wrqu->param.flags & IW_AUTH_INDEX); break; } @@ -4032,8 +4026,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev, #ifndef WLAN_FEATURE_MBSSID cds_ctx = hdd_ctx->pcds_context; if (NULL == cds_ctx) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - "%s: pVosContext is NULL", __func__); + hdd_err("pVosContext is NULL"); return -EINVAL; } #endif @@ -4085,7 +4078,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev, (ext->key_len == 5) ? eCSR_ENCRYPT_TYPE_WEP40 : eCSR_ENCRYPT_TYPE_WEP104; pHddApCtx->uPrivacy = 1; - hddLog(LOG1, FL("uPrivacy=%d"), pHddApCtx->uPrivacy); + hdd_notice("uPrivacy=%d", pHddApCtx->uPrivacy); break; case IW_ENCODE_ALG_TKIP: @@ -4132,10 +4125,10 @@ static int __iw_set_ap_encodeext(struct net_device *dev, break; } - hddLog(LOG1, FL(":EncryptionType:%d key_len:%d, KeyId:%d"), + hdd_notice(":EncryptionType:%d key_len:%d, KeyId:%d", setKey.encType, setKey.keyLength, setKey.keyId); for (i = 0; i < ext->key_len; i++) - hddLog(LOG1, "%02x", setKey.Key[i]); + hdd_notice("%02x", setKey.Key[i]); #ifdef WLAN_FEATURE_MBSSID vstatus = @@ -4146,7 +4139,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev, #endif if (vstatus != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("wlansap_set_key_sta failed, status= %d"), + hdd_err("wlansap_set_key_sta failed, status= %d", vstatus); ret = -EINVAL; } @@ -4481,8 +4474,7 @@ __iw_softap_setwpsie(struct net_device *dev, ENTER_DEV(dev); if (!capable(CAP_NET_ADMIN)) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - FL("permission check failed")); + hdd_err("permission check failed"); return -EPERM; } @@ -4494,8 +4486,7 @@ __iw_softap_setwpsie(struct net_device *dev, #ifndef WLAN_FEATURE_MBSSID cds_ctx = hdd_ctx->pcds_context; if (NULL == cds_ctx) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - "%s: HDD context is not valid ", __func__); + hdd_err("HDD context is not valid "); return -EINVAL; } #endif @@ -4514,7 +4505,7 @@ __iw_softap_setwpsie(struct net_device *dev, s_priv_data.length); if (NULL == wps_genie) { - hddLog(LOG1, FL("failed to alloc mem and copy data")); + hdd_notice("failed to alloc mem and copy data"); return -EFAULT; } @@ -4522,13 +4513,13 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe = qdf_mem_malloc(sizeof(tSap_WPSIE)); if (NULL == pSap_WPSIe) { - hddLog(LOGE, "QDF unable to allocate memory"); + hdd_err("QDF unable to allocate memory"); kfree(fwps_genie); return -ENOMEM; } qdf_mem_zero(pSap_WPSIe, sizeof(tSap_WPSIE)); - hddLog(LOG1, FL("WPS IE type[0x%X] IE[0x%X], LEN[%d]"), + hdd_notice("WPS IE type[0x%X] IE[0x%X], LEN[%d]", wps_genie[0], wps_genie[1], wps_genie[2]); WPSIeType = wps_genie[0]; if (wps_genie[0] == eQC_WPS_BEACON_IE) { @@ -4541,7 +4532,7 @@ __iw_softap_setwpsie(struct net_device *dev, goto exit; } else if (memcmp(&wps_genie[2], "\x00\x50\xf2\x04", 4) == 0) { - hddLog(LOG1, FL("Set WPS BEACON IE(len %d)"), + hdd_notice("Set WPS BEACON IE(len %d)", wps_genie[1] + 2); pos = &wps_genie[6]; while (((size_t) pos - @@ -4554,7 +4545,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSBeaconIE.Version = *pos; - hddLog(LOG1, "WPS version %d", + hdd_notice("WPS version %d", pSap_WPSIe->sapwpsie. sapWPSBeaconIE.Version); pSap_WPSIe->sapwpsie. @@ -4569,7 +4560,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSBeaconIE.wpsState = *pos; - hddLog(LOG1, "WPS State %d", + hdd_notice("WPS State %d", pSap_WPSIe->sapwpsie. sapWPSBeaconIE.wpsState); pSap_WPSIe->sapwpsie. @@ -4583,7 +4574,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSBeaconIE. APSetupLocked = *pos; - hddLog(LOG1, "AP setup lock %d", + hdd_notice("AP setup lock %d", pSap_WPSIe->sapwpsie. sapWPSBeaconIE. APSetupLocked); @@ -4598,8 +4589,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSBeaconIE. SelectedRegistra = *pos; - hddLog(LOG1, - "Selected Registra %d", + hdd_notice("Selected Registra %d", pSap_WPSIe->sapwpsie. sapWPSBeaconIE. SelectedRegistra); @@ -4615,7 +4605,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSBeaconIE. DevicePasswordID = (*pos << 8) | *(pos + 1); - hddLog(LOG1, "Password ID: %x", + hdd_notice("Password ID: %x", pSap_WPSIe->sapwpsie. sapWPSBeaconIE. DevicePasswordID); @@ -4632,8 +4622,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSBeaconIE. SelectedRegistraCfgMethod = (*pos << 8) | *(pos + 1); - hddLog(LOG1, - "Select Registra Config Methods: %x", + hdd_notice("Select Registra Config Methods: %x", pSap_WPSIe->sapwpsie. sapWPSBeaconIE. SelectedRegistraCfgMethod); @@ -4670,7 +4659,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSBeaconIE.RFBand = *pos; - hddLog(LOG1, "RF band: %d", + hdd_notice("RF band: %d", pSap_WPSIe->sapwpsie. sapWPSBeaconIE.RFBand); pSap_WPSIe->sapwpsie. @@ -4681,8 +4670,7 @@ __iw_softap_setwpsie(struct net_device *dev, break; default: - hddLog(LOGW, - "UNKNOWN TLV in WPS IE(%x)", + hdd_warn("UNKNOWN TLV in WPS IE(%x)", (*pos << 8 | *(pos + 1))); ret = -EINVAL; @@ -4690,13 +4678,13 @@ __iw_softap_setwpsie(struct net_device *dev, } } } else { - hddLog(LOGE, FL("WPS IE Mismatch %X"), + hdd_err("WPS IE Mismatch %X", wps_genie[0]); } break; default: - hddLog(LOGE, FL("Set UNKNOWN IE %X"), wps_genie[0]); + hdd_err("Set UNKNOWN IE %X", wps_genie[0]); ret = -EINVAL; goto exit; } @@ -4710,7 +4698,7 @@ __iw_softap_setwpsie(struct net_device *dev, goto exit; } else if (memcmp(&wps_genie[2], "\x00\x50\xf2\x04", 4) == 0) { - hddLog(LOG1, FL("Set WPS PROBE RSP IE(len %d)"), + hdd_notice("Set WPS PROBE RSP IE(len %d)", wps_genie[1] + 2); pos = &wps_genie[6]; while (((size_t) pos - @@ -4723,7 +4711,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSProbeRspIE.Version = *pos; - hddLog(LOG1, "WPS version %d", + hdd_notice("WPS version %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. Version); @@ -4739,7 +4727,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSProbeRspIE.wpsState = *pos; - hddLog(LOG1, "WPS State %d", + hdd_notice("WPS State %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. wpsState); @@ -4754,7 +4742,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. APSetupLocked = *pos; - hddLog(LOG1, "AP setup lock %d", + hdd_notice("AP setup lock %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. APSetupLocked); @@ -4769,8 +4757,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. SelectedRegistra = *pos; - hddLog(LOG1, - "Selected Registra %d", + hdd_notice("Selected Registra %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. SelectedRegistra); @@ -4786,7 +4773,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSProbeRspIE. DevicePasswordID = (*pos << 8) | *(pos + 1); - hddLog(LOG1, "Password ID: %d", + hdd_notice("Password ID: %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. DevicePasswordID); @@ -4803,8 +4790,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSProbeRspIE. SelectedRegistraCfgMethod = (*pos << 8) | *(pos + 1); - hddLog(LOG1, - "Select Registra Config Methods: %x", + hdd_notice("Select Registra Config Methods: %x", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. SelectedRegistraCfgMethod); @@ -4819,8 +4805,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. ResponseType = *pos; - hddLog(LOG1, - "Config Methods: %d", + hdd_notice("Config Methods: %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. ResponseType); @@ -4958,8 +4943,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSProbeRspIE. PrimaryDeviceCategory = (*pos << 8 | *(pos + 1)); - hddLog(LOG1, - "primary dev category: %d", + hdd_notice("primary dev category: %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. PrimaryDeviceCategory); @@ -4971,8 +4955,7 @@ __iw_softap_setwpsie(struct net_device *dev, PrimaryDeviceOUI, pos, HDD_WPS_DEVICE_OUI_LEN); - hddLog(LOG1, - "primary dev oui: %02x, %02x, %02x, %02x", + hdd_notice("primary dev oui: %02x, %02x, %02x, %02x", pos[0], pos[1], pos[2], pos[3]); pos += 4; @@ -4980,8 +4963,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSProbeRspIE. DeviceSubCategory = (*pos << 8 | *(pos + 1)); - hddLog(LOG1, - "primary dev sub category: %d", + hdd_notice("primary dev sub category: %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. DeviceSubCategory); @@ -5021,8 +5003,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSProbeRspIE. ConfigMethod = (*pos << 8) | *(pos + 1); - hddLog(LOG1, - "Config Methods: %d", + hdd_notice("Config Methods: %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE. SelectedRegistraCfgMethod); @@ -5038,7 +5019,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSProbeRspIE.RFBand = *pos; - hddLog(LOG1, "RF band: %d", + hdd_notice("RF band: %d", pSap_WPSIe->sapwpsie. sapWPSProbeRspIE.RFBand); pos += 1; @@ -5050,8 +5031,7 @@ __iw_softap_setwpsie(struct net_device *dev, } /* switch */ } } else { - hddLog(LOGE, - FL("WPS IE Mismatch %X"), wps_genie[0]); + hdd_err("WPS IE Mismatch %X", wps_genie[0]); } } /* switch */ -- cgit v1.2.3 From ecd884eb91eb5f9df759b91c41d975e6b1d10109 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 30 Jun 2016 14:52:25 -0700 Subject: qcacld-3.0: Convert wlan_hdd_hostapd.c to unified logging [5/7] Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_hostapd.c to use the unified set of APIs. Since there are a large number of changes in this file, perform the conversion in phases. For phase 5 update the following functions: __iw_softap_stopbss() hdd_softap_get_sta_info() __iw_softap_get_sta_info() __iw_set_ap_genie() __iw_get_softap_linkspeed() hdd_init_ap_mode() hdd_wlan_create_ap_dev() hdd_register_hostapd() hdd_unregister_hostapd() wlan_hdd_set_channel() wlan_hdd_add_ie() wlan_hdd_add_hostapd_conf_vsie() wlan_hdd_add_extra_ie() wlan_hdd_cfg80211_alloc_new_beacon() wlan_hdd_cfg80211_update_apies() wlan_hdd_config_acs() wlan_hdd_setup_driver_overrides() wlan_hdd_cfg80211_start_bss() Change-Id: Ibaf0dbb2af0928bf4dce5a475df7e536d85d1451 CRs-Fixed: 937661 --- core/hdd/src/wlan_hdd_hostapd.c | 220 +++++++++++++++++----------------------- 1 file changed, 91 insertions(+), 129 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index bdeb7dc1cde3..0c0cc4b2f06a 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -5111,8 +5111,7 @@ __iw_softap_stopbss(struct net_device *dev, 10000); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, - FL("wait for single_event failed!!")); + hdd_err("wait for single_event failed!!"); QDF_ASSERT(0); } } @@ -5185,8 +5184,7 @@ QDF_STATUS hdd_softap_get_sta_info(hdd_adapter_t *pAdapter, uint8_t *pBuf, ENTER(); if (NULL == pAdapter) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - "%s: Adapter is NULL", __func__); + hdd_err("Adapter is NULL"); return -EINVAL; } @@ -5245,7 +5243,7 @@ static int __iw_softap_get_sta_info(struct net_device *dev, WE_SAP_MAX_STA_INFO); if (!QDF_IS_STATUS_SUCCESS(status)) { - hddLog(LOGE, FL("Failed to get sta info: %d"), status); + hdd_err("Failed to get sta info: %d", status); return -EINVAL; } wrqu->data.length = strlen(extra); @@ -5300,8 +5298,7 @@ static int __iw_set_ap_genie(struct net_device *dev, #ifndef WLAN_FEATURE_MBSSID cds_ctx = hdd_ctx->pcds_context; if (NULL == cds_ctx) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - "%s: QDF Context is NULL", __func__); + hdd_err("QDF Context is NULL"); return -EINVAL; } #endif @@ -5332,7 +5329,7 @@ static int __iw_set_ap_genie(struct net_device *dev, break; default: - hddLog(LOGE, FL("Set UNKNOWN IE %X"), genie[0]); + hdd_err("Set UNKNOWN IE %X", genie[0]); qdf_ret_status = 0; } @@ -5387,18 +5384,18 @@ int __iw_get_softap_linkspeed(struct net_device *dev, if (0 != valid) return valid; - hddLog(LOG1, FL("wrqu->data.length(%d)"), wrqu->data.length); + hdd_notice("wrqu->data.length(%d)", wrqu->data.length); if (wrqu->data.length >= MAC_ADDRESS_STR_LEN - 1) { if (copy_from_user((void *)pmacAddress, wrqu->data.pointer, MAC_ADDRESS_STR_LEN)) { - hddLog(LOG1, FL("failed to copy data to user buffer")); + hdd_notice("failed to copy data to user buffer"); return -EFAULT; } pmacAddress[MAC_ADDRESS_STR_LEN] = '\0'; if (!mac_pton(pmacAddress, macAddress.bytes)) { - hddLog(LOGE, FL("String to Hex conversion Failed")); + hdd_err("String to Hex conversion Failed"); return -EINVAL; } } @@ -5420,13 +5417,13 @@ int __iw_get_softap_linkspeed(struct net_device *dev, } } if (!QDF_IS_STATUS_SUCCESS(status)) { - hddLog(LOGE, FL("Invalid peer macaddress")); + hdd_err("Invalid peer macaddress"); return -EINVAL; } status = wlan_hdd_get_linkspeed_for_peermac(pHostapdAdapter, macAddress); if (!QDF_IS_STATUS_SUCCESS(status)) { - hddLog(LOGE, FL("Unable to retrieve SME linkspeed")); + hdd_err("Unable to retrieve SME linkspeed"); return -EINVAL; } @@ -5438,7 +5435,7 @@ int __iw_get_softap_linkspeed(struct net_device *dev, rc = snprintf(pLinkSpeed, len, "%u", link_speed); if ((rc < 0) || (rc >= len)) { /* encoding or length error? */ - hddLog(LOGE, FL("Unable to encode link speed")); + hdd_err("Unable to encode link speed"); return -EIO; } EXIT(); @@ -6059,7 +6056,7 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter) #ifdef WLAN_FEATURE_MBSSID sapContext = wlansap_open(p_cds_context); if (sapContext == NULL) { - hddLog(LOGE, ("ERROR: wlansap_open failed!!")); + hdd_err("ERROR: wlansap_open failed!!"); return QDF_STATUS_E_FAULT; } @@ -6078,7 +6075,7 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter) pAdapter->macAddressCurrent.bytes, &session_id); if (!QDF_IS_STATUS_SUCCESS(status)) { - hddLog(LOGE, ("ERROR: wlansap_start failed!!")); + hdd_err("ERROR: wlansap_start failed!!"); wlansap_close(sapContext); pAdapter->sessionCtx.ap.sapContext = NULL; return status; @@ -6098,7 +6095,7 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter) /* NOP */ status = hdd_set_hostapd(pAdapter); if (!QDF_IS_STATUS_SUCCESS(status)) { - hddLog(LOGE, ("ERROR: hdd_set_hostapd failed!!")); + hdd_err("ERROR: hdd_set_hostapd failed!!"); #ifdef WLAN_FEATURE_MBSSID wlansap_close(sapContext); pAdapter->sessionCtx.ap.sapContext = NULL; @@ -6108,7 +6105,7 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter) qdf_status = qdf_event_create(&phostapdBuf->qdf_event); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, ("ERROR: Hostapd HDD qdf event init failed!!")); + hdd_err("ERROR: Hostapd HDD qdf event init failed!!"); #ifdef WLAN_FEATURE_MBSSID wlansap_close(sapContext); pAdapter->sessionCtx.ap.sapContext = NULL; @@ -6118,8 +6115,7 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter) qdf_status = qdf_event_create(&phostapdBuf->qdf_stop_bss_event); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - ("ERROR: Hostapd HDD stop bss event init failed!!")); + hdd_err("ERROR: Hostapd HDD stop bss event init failed!!"); #ifdef WLAN_FEATURE_MBSSID wlansap_close(sapContext); pAdapter->sessionCtx.ap.sapContext = NULL; @@ -6138,13 +6134,12 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter) /* Initialize the data path module */ status = hdd_softap_init_tx_rx(pAdapter); if (!QDF_IS_STATUS_SUCCESS(status)) { - hddLog(LOGP, FL("hdd_softap_init_tx_rx failed")); + hdd_alert("hdd_softap_init_tx_rx failed"); } status = hdd_wmm_adapter_init(pAdapter); if (!QDF_IS_STATUS_SUCCESS(status)) { - hddLog(LOGE, - "hdd_wmm_adapter_init() failed code %08d [x%08x]", + hdd_err("hdd_wmm_adapter_init() failed code %08d [x%08x]", status, status); goto error_wmm_init; } @@ -6157,8 +6152,7 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter) PDEV_CMD); if (0 != ret) { - hddLog(LOGE, - FL("WMI_PDEV_PARAM_BURST_ENABLE set failed %d"), ret); + hdd_err("WMI_PDEV_PARAM_BURST_ENABLE set failed %d", ret); } pAdapter->sessionCtx.ap.sapConfig.acs_cfg.acs_mode = false; qdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list); @@ -6198,7 +6192,7 @@ hdd_adapter_t *hdd_wlan_create_ap_dev(hdd_context_t *pHddCtx, struct net_device *pWlanHostapdDev = NULL; hdd_adapter_t *pHostapdAdapter = NULL; - hddLog(LOG4, FL("iface_name = %s"), iface_name); + hdd_info("iface_name = %s", iface_name); pWlanHostapdDev = alloc_netdev_mq(sizeof(hdd_adapter_t), iface_name, #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || defined(WITH_BACKPORTS) @@ -6218,8 +6212,7 @@ hdd_adapter_t *hdd_wlan_create_ap_dev(hdd_context_t *pHddCtx, pHostapdAdapter->pHddCtx = pHddCtx; pHostapdAdapter->magic = WLAN_HDD_ADAPTER_MAGIC; - hddLog(LOG4, - FL("pWlanHostapdDev = %p, pHostapdAdapter = %p, concurrency_mode=0x%x"), + hdd_info("pWlanHostapdDev = %p, pHostapdAdapter = %p, concurrency_mode=0x%x", pWlanHostapdDev, pHostapdAdapter, (int)cds_get_concurrency_mode()); @@ -6278,17 +6271,17 @@ QDF_STATUS hdd_register_hostapd(hdd_adapter_t *pAdapter, if (rtnl_lock_held) { if (strnchr(dev->name, strlen(dev->name), '%')) { if (dev_alloc_name(dev, dev->name) < 0) { - hddLog(LOGE, FL("Failed:dev_alloc_name")); + hdd_err("Failed:dev_alloc_name"); return QDF_STATUS_E_FAILURE; } } if (register_netdevice(dev)) { - hddLog(LOGE, FL("Failed:register_netdevice")); + hdd_err("Failed:register_netdevice"); return QDF_STATUS_E_FAILURE; } } else { if (register_netdev(dev)) { - hddLog(LOGE, FL("Failed:register_netdev")); + hdd_err("Failed:register_netdev"); return QDF_STATUS_E_FAILURE; } } @@ -6334,11 +6327,11 @@ QDF_STATUS hdd_unregister_hostapd(hdd_adapter_t *pAdapter, bool rtnl_held) #ifdef WLAN_FEATURE_MBSSID status = wlansap_stop(sapContext); if (!QDF_IS_STATUS_SUCCESS(status)) - hddLog(LOGE, FL("Failed:wlansap_stop")); + hdd_err("Failed:wlansap_stop"); status = wlansap_close(sapContext); if (!QDF_IS_STATUS_SUCCESS(status)) - hddLog(LOGE, FL("Failed:WLANSAP_close")); + hdd_err("Failed:WLANSAP_close"); pAdapter->sessionCtx.ap.sapContext = NULL; #endif @@ -6424,7 +6417,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, if (NULL == dev) { - hddLog(LOGE, FL("Called with dev = NULL.")); + hdd_err("Called with dev = NULL."); return -ENODEV; } pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); @@ -6433,7 +6426,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, TRACE_CODE_HDD_CFG80211_SET_CHANNEL, pAdapter->sessionId, channel_type)); - hddLog(LOG1, FL("Device_mode %s(%d) freq = %d"), + hdd_notice("Device_mode %s(%d) freq = %d", hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode, chandef->chan->center_freq); @@ -6459,8 +6452,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, /* Check freq range */ if ((WNI_CFG_CURRENT_CHANNEL_STAMIN > channel) || (WNI_CFG_CURRENT_CHANNEL_STAMAX < channel)) { - hddLog(LOGE, - FL("Channel [%d] is outside valid range from %d to %d"), + hdd_err("Channel [%d] is outside valid range from %d to %d", channel, WNI_CFG_CURRENT_CHANNEL_STAMIN, WNI_CFG_CURRENT_CHANNEL_STAMAX); return -EINVAL; @@ -6470,8 +6462,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, if ((WNI_CFG_CURRENT_CHANNEL_STAMIN > channel_seg2) || (WNI_CFG_CURRENT_CHANNEL_STAMAX < channel_seg2)) { - hddLog(LOGE, - FL("Channel [%d] is outside valid range from %d to %d"), + hdd_err("Channel [%d] is outside valid range from %d to %d", channel_seg2, WNI_CFG_CURRENT_CHANNEL_STAMIN, WNI_CFG_CURRENT_CHANNEL_STAMAX); return -EINVAL; @@ -6483,11 +6474,10 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, (QDF_P2P_GO_MODE != pAdapter->device_mode)) { if (QDF_STATUS_SUCCESS != wlan_hdd_validate_operation_channel(pAdapter, channel)) { - hddLog(LOGE, FL("Invalid Channel [%d]"), channel); + hdd_err("Invalid Channel [%d]", channel); return -EINVAL; } - hddLog(LOG2, - FL("set channel to [%d] for device mode %s(%d)"), + hdd_info("set channel to [%d] for device mode %s(%d)", channel, hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode); @@ -6505,8 +6495,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, if (eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState) { /* Link is up then return cant set channel */ - hddLog(LOGE, - FL("IBSS Associated, can't set the channel")); + hdd_err("IBSS Associated, can't set the channel"); return -EINVAL; } @@ -6522,8 +6511,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, if (QDF_STATUS_SUCCESS != wlan_hdd_validate_operation_channel(pAdapter, channel)) { - hddLog(LOGE, - FL("Invalid Channel [%d]"), channel); + hdd_err("Invalid Channel [%d]", channel); return -EINVAL; } sap_config->channel = channel; @@ -6533,8 +6521,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, if (QDF_STATUS_SUCCESS != wlan_hdd_validate_operation_channel(pAdapter, channel)) { - hddLog(LOGE, - FL("Invalid Channel [%d]"), channel); + hdd_err("Invalid Channel [%d]", channel); return -EINVAL; } @@ -6581,8 +6568,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, sap_config->sec_ch = sap_config->channel + 4; break; default: - hddLog(LOGE, - FL("Error!!! Invalid HT20/40 mode !")); + hdd_err("Error!!! Invalid HT20/40 mode !"); return -EINVAL; } smeConfig.csrConfig.obssEnabled = wlan_hdd_get_sap_obss( @@ -6590,8 +6576,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, sme_update_config(pHddCtx->hHal, &smeConfig); } } else { - hddLog(LOGE, - FL("Invalid device mode failed to set valid channel")); + hdd_err("Invalid device mode failed to set valid channel"); return -EINVAL; } EXIT(); @@ -6669,8 +6654,7 @@ static int wlan_hdd_add_ie(hdd_adapter_t *pHostapdAdapter, uint8_t *genie, if ((*total_ielen + ielen) <= MAX_GENIE_LEN) { qdf_mem_copy(&genie[*total_ielen], pIe, ielen); } else { - hddLog(LOGE, - "**Ie Length is too big***"); + hdd_err("**Ie Length is too big***"); return -EINVAL; } *total_ielen += ielen; @@ -6704,8 +6688,7 @@ static void wlan_hdd_add_hostapd_conf_vsie(hdd_adapter_t *pHostapdAdapter, elem_len = ptr[1]; left -= 2; if (elem_len > left) { - hddLog(LOGE, - FL("****Invalid IEs eid = %d elem_len=%d left=%d*****"), + hdd_err("****Invalid IEs eid = %d elem_len=%d left=%d*****", elem_id, elem_len, left); return; } @@ -6740,8 +6723,7 @@ static void wlan_hdd_add_hostapd_conf_vsie(hdd_adapter_t *pHostapdAdapter, ielen); *total_ielen += ielen; } else { - hddLog(LOGE, - FL("IE Length is too big IEs eid=%d elem_len=%d total_ie_lent=%d"), + hdd_err("IE Length is too big IEs eid=%d elem_len=%d total_ie_lent=%d", elem_id, elem_len, *total_ielen); } } @@ -6780,8 +6762,7 @@ static void wlan_hdd_add_extra_ie(hdd_adapter_t *pHostapdAdapter, elem_len = ptr[1]; left -= 2; if (elem_len > left) { - hddLog(LOGE, - FL("****Invalid IEs eid = %d elem_len=%d left=%d*****"), + hdd_err("****Invalid IEs eid = %d elem_len=%d left=%d*****", elem_id, elem_len, left); return; } @@ -6792,8 +6773,7 @@ static void wlan_hdd_add_extra_ie(hdd_adapter_t *pHostapdAdapter, qdf_mem_copy(&genie[*total_ielen], ptr, ielen); *total_ielen += ielen; } else { - hddLog(LOGE, - FL("IE Length is too big IEs eid=%d elem_len=%d total_ie_lent=%d"), + hdd_err("IE Length is too big IEs eid=%d elem_len=%d total_ie_lent=%d", elem_id, elem_len, *total_ielen); } } @@ -6826,14 +6806,14 @@ int wlan_hdd_cfg80211_alloc_new_beacon(hdd_adapter_t *pAdapter, ENTER(); if (params->head && !params->head_len) { - hddLog(LOGE, FL("head_len is NULL")); + hdd_err("head_len is NULL"); return -EINVAL; } old = pAdapter->sessionCtx.ap.beacon; if (!params->head && !old) { - hddLog(LOGE, FL("session(%d) old and new heads points to NULL"), + hdd_err("session(%d) old and new heads points to NULL", pAdapter->sessionId); return -EINVAL; } @@ -6876,8 +6856,7 @@ int wlan_hdd_cfg80211_alloc_new_beacon(hdd_adapter_t *pAdapter, beacon = kzalloc(size, GFP_KERNEL); if (beacon == NULL) { - hddLog(LOGE, - FL("Mem allocation for beacon failed")); + hdd_err("Mem allocation for beacon failed"); return -ENOMEM; } if (dtim_period) @@ -6940,14 +6919,14 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter) if (0 != wlan_hdd_add_ie(adapter, genie, &total_ielen, WPS_OUI_TYPE, WPS_OUI_TYPE_SIZE)) { - hddLog(LOGE, FL("Adding WPS IE failed")); + hdd_err("Adding WPS IE failed"); ret = -EINVAL; goto done; } #ifdef WLAN_FEATURE_WFD if (0 != wlan_hdd_add_ie(adapter, genie, &total_ielen, WFD_OUI_TYPE, WFD_OUI_TYPE_SIZE)) { - hddLog(LOGE, FL("Adding WFD IE failed")); + hdd_err("Adding WFD IE failed"); ret = -EINVAL; goto done; } @@ -6967,7 +6946,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter) if (wlan_hdd_add_ie(adapter, genie, &total_ielen, P2P_OUI_TYPE, P2P_OUI_TYPE_SIZE) != 0) { - hddLog(LOGE, FL("Adding P2P IE failed")); + hdd_err("Adding P2P IE failed"); ret = -EINVAL; goto done; } @@ -6996,8 +6975,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter) &updateIE, eUPDATE_IE_PROBE_BCN) == QDF_STATUS_E_FAILURE) { - hddLog(LOGE, - FL("Could not pass on Add Ie probe beacon data")); + hdd_err("Could not pass on Add Ie probe beacon data"); ret = -EINVAL; goto done; } @@ -7019,8 +6997,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter) &updateIE, eUPDATE_IE_PROBE_RESP) == QDF_STATUS_E_FAILURE) { - hddLog(LOGE, - FL("Could not pass on PROBE_RESP add Ie data")); + hdd_err("Could not pass on PROBE_RESP add Ie data"); ret = -EINVAL; goto done; } @@ -7042,8 +7019,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter) &updateIE, eUPDATE_IE_ASSOC_RESP) == QDF_STATUS_E_FAILURE) { - hddLog(LOGE, - FL("Could not pass on Add Ie Assoc Response data")); + hdd_err("Could not pass on Add Ie Assoc Response data"); ret = -EINVAL; goto done; } @@ -7140,7 +7116,7 @@ QDF_STATUS wlan_hdd_config_acs(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) sap_config->enOverLapCh = !!hdd_ctx->config->gEnableOverLapCh; #if defined(WLAN_FEATURE_MBSSID) && defined(FEATURE_WLAN_AP_AP_ACS_OPTIMIZE) - hddLog(LOG1, FL("HDD_ACS_SKIP_STATUS = %d"), + hdd_notice("HDD_ACS_SKIP_STATUS = %d", hdd_ctx->skip_acs_scan_status); if (hdd_ctx->skip_acs_scan_status == eSAP_SKIP_ACS_SCAN) { hdd_adapter_t *con_sap_adapter; @@ -7230,7 +7206,7 @@ QDF_STATUS wlan_hdd_config_acs(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) eSAP_DO_NEW_ACS_SCAN; - hddLog(LOG1, FL( + hdd_notice(FL( "SecAP ACS Skip=%d, ACS CH RANGE=%d-%d, %d-%d"), sap_config->acs_cfg.skip_scan_status, sap_config->acs_cfg.skip_scan_range1_stch, @@ -7279,7 +7255,7 @@ int wlan_hdd_setup_driver_overrides(hdd_adapter_t *ap_adapter) (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n || sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac || sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY)) { - hddLog(LOG1, FL("** Driver force 11AC override for SAP/Go **")); + hdd_notice("** Driver force 11AC override for SAP/Go **"); /* 11n only shall not be overridden since it may be on purpose*/ if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n) @@ -7301,7 +7277,7 @@ int wlan_hdd_setup_driver_overrides(hdd_adapter_t *ap_adapter) return 0; setup_acs_overrides: - hddLog(LOGE, FL("** Driver force ACS override **")); + hdd_err("** Driver force ACS override **"); sap_cfg->channel = AUTO_CHANNEL_SELECT; sap_cfg->acs_cfg.acs_mode = true; @@ -7309,7 +7285,7 @@ setup_acs_overrides: sap_cfg->acs_cfg.end_ch = hdd_ctx->config->force_sap_acs_end_ch; if (sap_cfg->acs_cfg.start_ch > sap_cfg->acs_cfg.end_ch) { - hddLog(LOGE, FL("Driver force ACS start ch (%d) > end ch (%d)"), + hdd_err("Driver force ACS start ch (%d) > end ch (%d)", sap_cfg->acs_cfg.start_ch, sap_cfg->acs_cfg.end_ch); return -EINVAL; } @@ -7324,7 +7300,7 @@ setup_acs_overrides: sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11g || sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11g_ONLY) && sap_cfg->acs_cfg.start_ch > 14) { - hddLog(LOGE, FL("Invalid ACS HW Mode %d + CH range <%d - %d>"), + hdd_err("Invalid ACS HW Mode %d + CH range <%d - %d>", sap_cfg->SapHw_mode, sap_cfg->acs_cfg.start_ch, sap_cfg->acs_cfg.end_ch); return -EINVAL; @@ -7360,9 +7336,9 @@ setup_acs_overrides: } sap_cfg->acs_cfg.ch_width = sap_cfg->ch_width_orig; - hddLog(LOG1, FL("Force ACS Config: HW_MODE: %d ACS_BW: %d"), + hdd_notice("Force ACS Config: HW_MODE: %d ACS_BW: %d", sap_cfg->acs_cfg.hw_mode, sap_cfg->acs_cfg.ch_width); - hddLog(LOG1, FL("Force ACS Config: ST_CH: %d END_CH: %d"), + hdd_notice("Force ACS Config: ST_CH: %d END_CH: %d", sap_cfg->acs_cfg.start_ch, sap_cfg->acs_cfg.end_ch); return 0; @@ -7439,7 +7415,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->dtim_period = pBeacon->dtim_period; - hddLog(LOG2, FL("****pConfig->dtim_period=%d***"), + hdd_info("****pConfig->dtim_period=%d***", pConfig->dtim_period); if (pHostapdAdapter->device_mode == QDF_SAP_MODE) { @@ -7472,7 +7448,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if (QDF_STATUS_SUCCESS != wlan_hdd_validate_operation_channel(pHostapdAdapter, pConfig->channel)) { - hddLog(LOGE, FL("Invalid Channel [%d]"), + hdd_err("Invalid Channel [%d]", pConfig->channel); return -EINVAL; } @@ -7481,8 +7457,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if (!(pHddCtx->config->enableDFSChnlScan) && (CHANNEL_STATE_DFS == cds_get_channel_state( pConfig->channel))) { - hddLog(LOGE, - FL("not allowed to start SAP on DFS channel")); + hdd_err("not allowed to start SAP on DFS channel"); return -EOPNOTSUPP; } wlansap_set_dfs_ignore_cac(hHal, iniConfig->ignoreCAC); @@ -7514,12 +7489,11 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if (pIe) { if (pIe[1] < (2 + WPS_OUI_TYPE_SIZE)) { - hddLog(LOGE, - FL("**Wps Ie Length is too small***")); + hdd_err("**Wps Ie Length is too small***"); return -EINVAL; } else if (memcmp(&pIe[2], WPS_OUI_TYPE, WPS_OUI_TYPE_SIZE) == 0) { - hddLog(LOG1, FL("** WPS IE(len %d) ***"), (pIe[1] + 2)); + hdd_notice("** WPS IE(len %d) ***", (pIe[1] + 2)); /* Check 15 bit of WPS IE as it contain information for * wps state */ @@ -7552,8 +7526,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, memcpy(&pConfig->RSNWPAReqIE[0], pIe, pConfig->RSNWPAReqIELength); else - hddLog(LOGE, - FL("RSNWPA IE MAX Length exceeded; length =%d"), + hdd_err("RSNWPA IE MAX Length exceeded; length =%d", pConfig->RSNWPAReqIELength); /* The actual processing may eventually be more extensive than * this. Right now, just consume any PMKIDs that are sent in @@ -7576,8 +7549,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->mcRSNEncryptType = mcRSNEncryptType; (WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))-> ucEncryptType = RSNEncryptType; - hddLog(LOG1, - FL("CSR AuthType = %d, EncryptionType = %d mcEncryptionType = %d"), + hdd_notice("CSR AuthType = %d, EncryptionType = %d mcEncryptionType = %d", RSNAuthType, RSNEncryptType, mcRSNEncryptType); } } @@ -7595,8 +7567,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, memcpy(&pConfig->RSNWPAReqIE[0] + prev_rsn_length, pIe, pIe[1] + 2); else - hddLog(LOGE, - "RSNWPA IE MAX Length exceeded; length =%d", + hdd_err("RSNWPA IE MAX Length exceeded; length =%d", pConfig->RSNWPAReqIELength); } else { pConfig->RSNWPAReqIELength = pIe[1] + 2; @@ -7605,8 +7576,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, memcpy(&pConfig->RSNWPAReqIE[0], pIe, pConfig->RSNWPAReqIELength); else - hddLog(LOGE, - "RSNWPA IE MAX Length exceeded; length =%d", + hdd_err("RSNWPA IE MAX Length exceeded; length =%d", pConfig->RSNWPAReqIELength); status = hdd_softap_unpack_ie (cds_get_context(QDF_MODULE_ID_SME), @@ -7625,8 +7595,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->mcRSNEncryptType = mcRSNEncryptType; (WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))-> ucEncryptType = RSNEncryptType; - hddLog(LOG1, - FL("CSR AuthType = %d, EncryptionType = %d mcEncryptionType = %d"), + hdd_notice("CSR AuthType = %d, EncryptionType = %d mcEncryptionType = %d", RSNAuthType, RSNEncryptType, mcRSNEncryptType); } @@ -7634,8 +7603,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, } if (pConfig->RSNWPAReqIELength > sizeof(pConfig->RSNWPAReqIE)) { - hddLog(LOGE, - FL("**RSNWPAReqIELength is too large***")); + hdd_err("**RSNWPAReqIELength is too large***"); return -EINVAL; } @@ -7647,20 +7615,20 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, switch (hidden_ssid) { case NL80211_HIDDEN_SSID_NOT_IN_USE: - hddLog(LOG1, "HIDDEN_SSID_NOT_IN_USE"); + hdd_notice("HIDDEN_SSID_NOT_IN_USE"); pConfig->SSIDinfo.ssidHidden = eHIDDEN_SSID_NOT_IN_USE; break; case NL80211_HIDDEN_SSID_ZERO_LEN: - hddLog(LOG1, "HIDDEN_SSID_ZERO_LEN"); + hdd_notice("HIDDEN_SSID_ZERO_LEN"); pConfig->SSIDinfo.ssidHidden = eHIDDEN_SSID_ZERO_LEN; break; case NL80211_HIDDEN_SSID_ZERO_CONTENTS: - hddLog(LOG1, "HIDDEN_SSID_ZERO_CONTENTS"); + hdd_notice("HIDDEN_SSID_ZERO_CONTENTS"); pConfig->SSIDinfo.ssidHidden = eHIDDEN_SSID_ZERO_CONTENTS; break; default: - hddLog(LOGE, "Wrong hidden_ssid param %d", hidden_ssid); + hdd_err("Wrong hidden_ssid param %d", hidden_ssid); break; } } @@ -7703,8 +7671,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if ((pIe != NULL) && (pIe[1] != 0)) { pConfig->SapMacaddr_acl = pIe[6]; pConfig->num_deny_mac = pIe[7]; - hddLog(LOG1, - FL("acl type = %d no deny mac = %d"), pIe[6], pIe[7]); + hdd_notice("acl type = %d no deny mac = %d", pIe[6], pIe[7]); if (pConfig->num_deny_mac > MAX_ACL_MAC_ADDRESS) pConfig->num_deny_mac = MAX_ACL_MAC_ADDRESS; acl_entry = (struct qc_mac_acl_entry *)(pIe + 8); @@ -7730,7 +7697,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if ((pIe != NULL) && (pIe[1] != 0)) { pConfig->SapMacaddr_acl = pIe[6]; pConfig->num_accept_mac = pIe[7]; - hddLog(LOG1, FL("acl type = %d no accept mac = %d"), + hdd_notice("acl type = %d no accept mac = %d", pIe[6], pIe[7]); if (pConfig->num_accept_mac > MAX_ACL_MAC_ADDRESS) pConfig->num_accept_mac = MAX_ACL_MAC_ADDRESS; @@ -7788,7 +7755,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->ht_capab = iniConfig->apProtection; if (0 != wlan_hdd_cfg80211_update_apies(pHostapdAdapter)) { - hddLog(LOGE, FL("SAP Not able to set AP IEs")); + hdd_err("SAP Not able to set AP IEs"); wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_ALL); return -EINVAL; } @@ -7803,33 +7770,33 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, else /* for P2P-Go case */ pConfig->sap_dot11mc = 1; - hddLog(LOG1, FL("11MC Support Enabled : %d\n"), + hdd_notice("11MC Support Enabled : %d\n", pConfig->sap_dot11mc); #ifdef WLAN_FEATURE_11W pConfig->mfpCapable = MFPCapable; pConfig->mfpRequired = MFPRequired; - hddLog(LOG1, FL("Soft AP MFP capable %d, MFP required %d"), + hdd_notice("Soft AP MFP capable %d, MFP required %d", pConfig->mfpCapable, pConfig->mfpRequired); #endif - hddLog(LOGW, FL("SOftAP macaddress : " MAC_ADDRESS_STR), + hdd_warn("SOftAP macaddress : " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pHostapdAdapter->macAddressCurrent.bytes)); - hddLog(LOGW, FL("ssid =%s, beaconint=%d, channel=%d"), + hdd_warn("ssid =%s, beaconint=%d, channel=%d", pConfig->SSIDinfo.ssid.ssId, (int)pConfig->beacon_int, (int)pConfig->channel); - hddLog(LOGW, FL("hw_mode=%x, privacy=%d, authType=%d"), + hdd_warn("hw_mode=%x, privacy=%d, authType=%d", pConfig->SapHw_mode, pConfig->privacy, pConfig->authType); - hddLog(LOGW, FL("RSN/WPALen=%d, Uapsd = %d"), + hdd_warn("RSN/WPALen=%d, Uapsd = %d", (int)pConfig->RSNWPAReqIELength, pConfig->UapsdEnable); - hddLog(LOGW, FL("ProtEnabled = %d, OBSSProtEnabled = %d"), + hdd_warn("ProtEnabled = %d, OBSSProtEnabled = %d", pConfig->protEnabled, pConfig->obssProtEnabled); if (test_bit(SOFTAP_BSS_STARTED, &pHostapdAdapter->event_flags)) { wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_ALL); /* Bss already started. just return. */ /* TODO Probably it should update some beacon params. */ - hddLog(LOGE, "Bss Already started...Ignore the request"); + hdd_err("Bss Already started...Ignore the request"); EXIT(); return 0; } @@ -7838,8 +7805,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, cds_convert_device_mode_to_qdf_type( pHostapdAdapter->device_mode), pConfig->channel, HW_MODE_20_MHZ)) { - hddLog(LOGW, - FL("This concurrency combination is not allowed")); + hdd_warn("This concurrency combination is not allowed"); return -EINVAL; } @@ -7867,20 +7833,18 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if (!QDF_IS_STATUS_SUCCESS(status)) { wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_ALL); cds_set_connection_in_progress(false); - hddLog(LOGE, FL("SAP Start Bss fail")); + hdd_err("SAP Start Bss fail"); return -EINVAL; } - hddLog(LOG1, - FL("Waiting for Scan to complete(auto mode) and BSS to start")); + hdd_notice("Waiting for Scan to complete(auto mode) and BSS to start"); qdf_status = qdf_wait_single_event(&pHostapdState->qdf_event, 10000); wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_ALL); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, - FL("ERROR: HDD qdf wait for single_event failed!!")); + hdd_err("ERROR: HDD qdf wait for single_event failed!!"); cds_set_connection_in_progress(false); sme_get_command_q_status(hHal); #ifdef WLAN_FEATURE_MBSSID @@ -7906,12 +7870,10 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if (pHostapdAdapter->device_mode == QDF_P2P_GO_MODE) { if (global_p2p_connection_status == P2P_GO_NEG_COMPLETED) { global_p2p_connection_status = P2P_GO_COMPLETED_STATE; - hddLog(LOGE, - FL("[P2P State] From Go nego completed to Non-autonomous Group started")); + hdd_err("[P2P State] From Go nego completed to Non-autonomous Group started"); } else if (global_p2p_connection_status == P2P_NOT_ACTIVE) { global_p2p_connection_status = P2P_GO_COMPLETED_STATE; - hddLog(LOGE, - FL("[P2P State] From Inactive to Autonomous Group started")); + hdd_err("[P2P State] From Inactive to Autonomous Group started"); } } #endif -- cgit v1.2.3 From b90586c3bc4bcfe19127fb4efcae9c71d6278c83 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 30 Jun 2016 15:00:38 -0700 Subject: qcacld-3.0: Convert wlan_hdd_hostapd.c to unified logging [6/7] Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_hostapd.c to use the unified set of APIs. Since there are a large number of changes in this file, perform the conversion in phases. For phase 6 update the following functions: __wlan_hdd_cfg80211_stop_ap() __wlan_hdd_cfg80211_start_ap() __wlan_hdd_cfg80211_change_beacon() Change-Id: I173579cb7ba6fc1baa7e6667f06bf642e961b5bb CRs-Fixed: 937661 --- core/hdd/src/wlan_hdd_hostapd.c | 42 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 0c0cc4b2f06a..c3d327f755bf 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -7911,7 +7911,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, ENTER(); if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hddLog(LOGE, FL("Command not allowed in FTM mode")); + hdd_err("Command not allowed in FTM mode"); return -EINVAL; } @@ -7929,7 +7929,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, return -EOPNOTSUPP; } - hddLog(LOG1, FL("Device_mode %s(%d)"), + hdd_notice("Device_mode %s(%d)", hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode); @@ -7943,7 +7943,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, pScanInfo = &staAdapter->scan_info; if (pScanInfo && pScanInfo->mScanPending) { - hddLog(LOG1, FL("Aborting pending scan for device mode:%d"), + hdd_notice("Aborting pending scan for device mode:%d", staAdapter->device_mode); INIT_COMPLETION(pScanInfo->abortscan_event_var); hdd_abort_mac_scan(staAdapter->pHddCtx, @@ -7954,8 +7954,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, msecs_to_jiffies( WLAN_WAIT_TIME_ABORTSCAN)); if (!rc) { - hddLog(LOGE, - FL("Timeout occurred while waiting for abortscan")); + hdd_err("Timeout occurred while waiting for abortscan"); QDF_ASSERT(pScanInfo->mScanPending); } } @@ -7972,7 +7971,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, if (pHddCtx->config->conc_custom_rule1 && (QDF_SAP_MODE == pAdapter->device_mode)) { cds_flush_work(&pHddCtx->sap_start_work); - hddLog(LOGW, FL("Canceled the pending restart work")); + hdd_warn("Canceled the pending restart work"); qdf_spin_lock(&pHddCtx->sap_update_info_lock); pHddCtx->is_sap_restart_required = false; qdf_spin_unlock(&pHddCtx->sap_update_info_lock); @@ -7986,8 +7985,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, old = pAdapter->sessionCtx.ap.beacon; if (!old) { - hddLog(LOGE, - FL("Session(%d) beacon data points to NULL"), + hdd_err("Session(%d) beacon data points to NULL", pAdapter->sessionId); return -EINVAL; } @@ -8012,8 +8010,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, 10000); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, - FL("HDD qdf wait for single_event failed!!")); + hdd_err("HDD qdf wait for single_event failed!!"); QDF_ASSERT(0); } } @@ -8027,7 +8024,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, mutex_unlock(&pHddCtx->sap_lock); if (status != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("Stopping the BSS")); + hdd_err("Stopping the BSS"); return -EINVAL; } @@ -8040,13 +8037,13 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, if (sme_update_add_ie(WLAN_HDD_GET_HAL_CTX(pAdapter), &updateIE, eUPDATE_IE_PROBE_BCN) == QDF_STATUS_E_FAILURE) { - hddLog(LOGE, FL("Could not pass on PROBE_RSP_BCN data to PE")); + hdd_err("Could not pass on PROBE_RSP_BCN data to PE"); } if (sme_update_add_ie(WLAN_HDD_GET_HAL_CTX(pAdapter), &updateIE, eUPDATE_IE_ASSOC_RESP) == QDF_STATUS_E_FAILURE) { - hddLog(LOGE, FL("Could not pass on ASSOC_RSP data to PE")); + hdd_err("Could not pass on ASSOC_RSP data to PE"); } /* Reset WNI_CFG_PROBE_RSP Flags */ wlan_hdd_reset_prob_rspies(pAdapter); @@ -8054,8 +8051,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, #ifdef WLAN_FEATURE_P2P_DEBUG if ((pAdapter->device_mode == QDF_P2P_GO_MODE) && (global_p2p_connection_status == P2P_GO_COMPLETED_STATE)) { - hddLog(LOGE, - "[P2P State] From GO completed to Inactive state GO got removed"); + hdd_err("[P2P State] From GO completed to Inactive state GO got removed"); global_p2p_connection_status = P2P_NOT_ACTIVE; } #endif @@ -8139,7 +8135,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, ENTER(); if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hddLog(LOGE, FL("Command not allowed in FTM mode")); + hdd_err("Command not allowed in FTM mode"); return -EINVAL; } @@ -8147,7 +8143,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, TRACE_CODE_HDD_CFG80211_START_AP, pAdapter->sessionId, params->beacon_interval)); if (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) { - hddLog(LOGE, FL("HDD adapter magic is invalid")); + hdd_err("HDD adapter magic is invalid"); return -ENODEV; } @@ -8157,7 +8153,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, if (0 != status) return status; - hddLog(LOG2, FL("pAdapter = %p, Device mode %s(%d)"), pAdapter, + hdd_info("pAdapter = %p, Device mode %s(%d)", pAdapter, hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode); @@ -8212,7 +8208,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, params->dtim_period); if (status != 0) { - hddLog(LOGE, FL("Error!!! Allocating the new beacon")); + hdd_err("Error!!! Allocating the new beacon"); return -EINVAL; } pAdapter->sessionCtx.ap.beacon = new; @@ -8296,14 +8292,14 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy, ENTER(); if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hddLog(LOGE, FL("Command not allowed in FTM mode")); + hdd_err("Command not allowed in FTM mode"); return -EINVAL; } MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_CFG80211_CHANGE_BEACON, pAdapter->sessionId, pAdapter->device_mode)); - hddLog(LOG1, FL("Device_mode %s(%d)"), + hdd_notice("Device_mode %s(%d)", hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode); @@ -8321,7 +8317,7 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy, old = pAdapter->sessionCtx.ap.beacon; if (!old) { - hddLog(LOGE, FL("session(%d) beacon data points to NULL"), + hdd_err("session(%d) beacon data points to NULL", pAdapter->sessionId); return -EINVAL; } @@ -8329,7 +8325,7 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy, status = wlan_hdd_cfg80211_alloc_new_beacon(pAdapter, &new, params, 0); if (status != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("new beacon alloc failed")); + hdd_err("new beacon alloc failed"); return -EINVAL; } -- cgit v1.2.3 From e2d30d000ced0aa264ce83a8212173db93d97850 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 30 Jun 2016 15:45:24 -0700 Subject: qcacld-3.0: Convert wlan_hdd_hostapd.c to unified logging [7/7] Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_hostapd.c to use the unified set of APIs. Since there are a large number of changes in this file, perform the conversion in phases. For phase 7 set the HDD_DISALLOW_LEGACY_HDDLOG flag so that no future changes can introduce new instances of legacy logging. Change-Id: Ia76d147a57bbc2f1361f8574d226447d0e4c8408 CRs-Fixed: 937661 --- core/hdd/src/wlan_hdd_hostapd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index c3d327f755bf..c17461656c2f 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -31,6 +31,9 @@ * WLAN Host Device Driver implementation */ +/* denote that this file does not allow legacy hddLog */ +#define HDD_DISALLOW_LEGACY_HDDLOG 1 + /* Include Files */ #include -- cgit v1.2.3 From 5f735d5e898c4673ec1f1ddd3e5d03fba97bd04e Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 6 Jul 2016 15:14:45 -0700 Subject: qcacld-3.0: Convert wlan_hdd_ocb.c to unified logging Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_ocb.c to use the unified set of APIs. Change-Id: I7ec58632a781024fedba46ff25baa873ac52bd9a CRs-Fixed: 937672 --- core/hdd/src/wlan_hdd_ocb.c | 171 ++++++++++++++++++++++---------------------- 1 file changed, 87 insertions(+), 84 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c index 6049680c9ac6..69e936e7b3a7 100644 --- a/core/hdd/src/wlan_hdd_ocb.c +++ b/core/hdd/src/wlan_hdd_ocb.c @@ -31,6 +31,9 @@ * WLAN Host Device Driver 802.11p OCB implementation */ +/* denote that this file does not allow legacy hddLog */ +#define HDD_DISALLOW_LEGACY_HDDLOG 1 + #include "cds_sched.h" #include "wlan_hdd_assoc.h" #include "wlan_hdd_main.h" @@ -98,7 +101,7 @@ static int dot11p_validate_qos_params(struct sir_qos_params qos_params[]) /* Validate AIFSN */ if ((qos_params[i].aifsn < AIFSN_MIN) || (qos_params[i].aifsn > AIFSN_MAX)) { - hddLog(LOGE, FL("Invalid QoS parameter aifsn %d"), + hdd_err("Invalid QoS parameter aifsn %d", qos_params[i].aifsn); return -EINVAL; } @@ -106,7 +109,7 @@ static int dot11p_validate_qos_params(struct sir_qos_params qos_params[]) /* Validate CWMin */ if ((qos_params[i].cwmin < CW_MIN) || (qos_params[i].cwmin > CW_MAX)) { - hddLog(LOGE, FL("Invalid QoS parameter cwmin %d"), + hdd_err("Invalid QoS parameter cwmin %d", qos_params[i].cwmin); return -EINVAL; } @@ -114,7 +117,7 @@ static int dot11p_validate_qos_params(struct sir_qos_params qos_params[]) /* Validate CWMax */ if ((qos_params[i].cwmax < CW_MIN) || (qos_params[i].cwmax > CW_MAX)) { - hddLog(LOGE, FL("Invalid QoS parameter cwmax %d"), + hdd_err("Invalid QoS parameter cwmax %d", qos_params[i].cwmax); return -EINVAL; } @@ -221,7 +224,7 @@ static int hdd_ocb_validate_config(hdd_adapter_t *adapter, config->channels[i].max_pwr, &config->channels[i].reg_pwr, &config->channels[i].antenna_max)) { - hddLog(LOGE, FL("Invalid channel frequency %d"), + hdd_err("Invalid channel frequency %d", config->channels[i].chan_freq); return -EINVAL; } @@ -254,7 +257,7 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter) adapter->macAddressCurrent.bytes, &peer_id); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, FL("Error registering OCB Self Peer!")); + hdd_err("Error registering OCB Self Peer!"); return -EINVAL; } @@ -273,14 +276,14 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter) qdf_status = ol_txrx_register_peer(&sta_desc); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOGE, FL("Failed to register. Status= %d [0x%08X]"), + hdd_err("Failed to register. Status= %d [0x%08X]", qdf_status, qdf_status); return -EINVAL; } if (pHddStaCtx->conn_info.staId[0] != 0 && pHddStaCtx->conn_info.staId[0] != peer_id) { - hddLog(LOGE, FL("The ID for the OCB station has changed.")); + hdd_err("The ID for the OCB station has changed."); } pHddStaCtx->conn_info.staId[0] = peer_id; @@ -364,7 +367,7 @@ static void hdd_ocb_set_config_callback(void *context_ptr, void *response_ptr) return; if (resp && resp->status) - hddLog(LOGE, FL("Operation failed: %d"), resp->status); + hdd_err("Operation failed: %d", resp->status); spin_lock(&hdd_context_lock); if (context->magic == HDD_OCB_MAGIC) { @@ -414,7 +417,7 @@ static int hdd_ocb_set_config_req(hdd_adapter_t *adapter, struct hdd_ocb_ctxt context = {0}; if (hdd_ocb_validate_config(adapter, config)) { - hddLog(LOGE, FL("The configuration is invalid")); + hdd_err("The configuration is invalid"); return -EINVAL; } @@ -422,7 +425,7 @@ static int hdd_ocb_set_config_req(hdd_adapter_t *adapter, context.adapter = adapter; context.magic = HDD_OCB_MAGIC; - hddLog(LOG1, FL("Disabling queues")); + hdd_notice("Disabling queues"); wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_TX_DISABLE_N_CARRIER, WLAN_CONTROL_PATH); @@ -431,7 +434,7 @@ static int hdd_ocb_set_config_req(hdd_adapter_t *adapter, ((hdd_context_t *)adapter->pHddCtx)->hHal, &context, hdd_ocb_set_config_callback, config); if (qdf_status != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("Error calling SME function.")); + hdd_err("Error calling SME function."); /* Convert from qdf_status to errno */ return -EINVAL; } @@ -461,7 +464,7 @@ end: context.magic = 0; spin_unlock(&hdd_context_lock); if (rc) - hddLog(LOGE, FL("Operation failed: %d"), rc); + hdd_err("Operation failed: %d", rc); return rc; } @@ -493,7 +496,7 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev, return -EINVAL; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); return -EINVAL; } @@ -503,7 +506,7 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev, config = hdd_ocb_config_new(sched->num_channels, sched->num_channels, 0, 0); if (config == NULL) { - hddLog(LOGE, FL("Failed to allocate memory!")); + hdd_err("Failed to allocate memory!"); return -ENOMEM; } @@ -546,7 +549,7 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev, } else { mac_addr = wlan_hdd_get_intf_addr(adapter->pHddCtx); if (mac_addr == NULL) { - hddLog(LOGE, FL("Cannot obtain mac address")); + hdd_err("Cannot obtain mac address"); rc = -EINVAL; goto fail; } @@ -586,7 +589,7 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev, rc = hdd_ocb_set_config_req(adapter, config); if (rc) { - hddLog(LOGE, FL("Error while setting OCB config")); + hdd_err("Error while setting OCB config"); goto fail; } @@ -800,7 +803,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, return -EINVAL; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); return -EINVAL; } @@ -808,13 +811,13 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_MAX, data, data_len, qca_wlan_vendor_ocb_set_config_policy)) { - hddLog(LOGE, FL("Invalid ATTR")); + hdd_err("Invalid ATTR"); return -EINVAL; } /* Get the number of channels in the schedule */ if (!tb[QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_COUNT]) { - hddLog(LOGE, FL("CHANNEL_COUNT is not present")); + hdd_err("CHANNEL_COUNT is not present"); return -EINVAL; } channel_count = nla_get_u32( @@ -822,7 +825,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, /* Get the size of the channel schedule */ if (!tb[QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_SCHEDULE_SIZE]) { - hddLog(LOGE, FL("SCHEDULE_SIZE is not present")); + hdd_err("SCHEDULE_SIZE is not present"); return -EINVAL; } schedule_size = nla_get_u32( @@ -847,7 +850,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, ndl_chan_list_len, ndl_active_state_list_len); if (config == NULL) { - hddLog(LOGE, FL("Failed to allocate memory!")); + hdd_err("Failed to allocate memory!"); return -ENOMEM; } @@ -858,12 +861,12 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, /* Read the channel array */ channel_array = tb[QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_ARRAY]; if (!channel_array) { - hddLog(LOGE, FL("No channel present")); + hdd_err("No channel present"); goto fail; } if (nla_len(channel_array) != channel_count * sizeof(struct wlan_hdd_ocb_config_channel)) { - hddLog(LOGE, FL("CHANNEL_ARRAY is not the correct size")); + hdd_err("CHANNEL_ARRAY is not the correct size"); goto fail; } wlan_hdd_ocb_config_channel_to_sir_ocb_config_channel( @@ -890,7 +893,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, } else { mac_addr = wlan_hdd_get_intf_addr(adapter->pHddCtx); if (mac_addr == NULL) { - hddLog(LOGE, FL("Cannot obtain mac address")); + hdd_err("Cannot obtain mac address"); goto fail; } qdf_mem_copy(config->channels[i].mac_address.bytes, @@ -906,11 +909,11 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, /* Read the schedule array */ sched_array = tb[QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_SCHEDULE_ARRAY]; if (!sched_array) { - hddLog(LOGE, FL("No channel present")); + hdd_err("No channel present"); goto fail; } if (nla_len(sched_array) != schedule_size * sizeof(*config->schedule)) { - hddLog(LOGE, FL("SCHEDULE_ARRAY is not the correct size")); + hdd_err("SCHEDULE_ARRAY is not the correct size"); goto fail; } qdf_mem_copy(config->schedule, nla_data(sched_array), @@ -934,7 +937,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, rc = hdd_ocb_set_config_req(adapter, config); if (rc) - hddLog(LOGE, FL("Error while setting OCB config: %d"), rc); + hdd_err("Error while setting OCB config: %d", rc); fail: qdf_mem_free(config); @@ -993,12 +996,12 @@ static int __wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy, return -EINVAL; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); return -EINVAL; } if (!wma_is_vdev_up(adapter->sessionId)) { - hddLog(LOGE, FL("The device has not been started")); + hdd_err("The device has not been started"); return -EINVAL; } @@ -1006,35 +1009,35 @@ static int __wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy, if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_MAX, data, data_len, qca_wlan_vendor_ocb_set_utc_time_policy)) { - hddLog(LOGE, FL("Invalid ATTR")); + hdd_err("Invalid ATTR"); return -EINVAL; } /* Read the UTC time */ utc_attr = tb[QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_VALUE]; if (!utc_attr) { - hddLog(LOGE, FL("UTC_TIME is not present")); + hdd_err("UTC_TIME is not present"); return -EINVAL; } if (nla_len(utc_attr) != SIZE_UTC_TIME) { - hddLog(LOGE, FL("UTC_TIME is not the correct size")); + hdd_err("UTC_TIME is not the correct size"); return -EINVAL; } /* Read the time error */ time_error_attr = tb[QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_ERROR]; if (!time_error_attr) { - hddLog(LOGE, FL("UTC_TIME is not present")); + hdd_err("UTC_TIME is not present"); return -EINVAL; } if (nla_len(time_error_attr) != SIZE_UTC_TIME_ERROR) { - hddLog(LOGE, FL("UTC_TIME is not the correct size")); + hdd_err("UTC_TIME is not the correct size"); return -EINVAL; } utc = qdf_mem_malloc(sizeof(*utc)); if (!utc) { - hddLog(LOGE, FL("qdf_mem_malloc failed")); + hdd_err("qdf_mem_malloc failed"); return -ENOMEM; } utc->vdev_id = adapter->sessionId; @@ -1043,7 +1046,7 @@ static int __wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy, SIZE_UTC_TIME_ERROR); if (sme_ocb_set_utc_time(hdd_ctx->hHal, utc) != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("Error while setting UTC time")); + hdd_err("Error while setting UTC time"); rc = -EINVAL; } else { rc = 0; @@ -1104,18 +1107,18 @@ __wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy, return -EINVAL; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); return -EINVAL; } if (!wma_is_vdev_up(adapter->sessionId)) { - hddLog(LOGE, FL("The device has not been started")); + hdd_err("The device has not been started"); return -EINVAL; } timing_advert = qdf_mem_malloc(sizeof(*timing_advert)); if (!timing_advert) { - hddLog(LOGE, FL("qdf_mem_malloc failed")); + hdd_err("qdf_mem_malloc failed"); return -ENOMEM; } qdf_mem_zero(timing_advert, sizeof(*timing_advert)); @@ -1126,19 +1129,19 @@ __wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy, data, data_len, qca_wlan_vendor_ocb_start_timing_advert_policy)) { - hddLog(LOGE, FL("Invalid ATTR")); + hdd_err("Invalid ATTR"); goto fail; } if (!tb[QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_CHANNEL_FREQ]) { - hddLog(LOGE, FL("CHANNEL_FREQ is not present")); + hdd_err("CHANNEL_FREQ is not present"); goto fail; } timing_advert->chan_freq = nla_get_u32( tb[QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_CHANNEL_FREQ]); if (!tb[QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_REPEAT_RATE]) { - hddLog(LOGE, FL("REPEAT_RATE is not present")); + hdd_err("REPEAT_RATE is not present"); goto fail; } timing_advert->repeat_rate = nla_get_u32( @@ -1151,13 +1154,13 @@ __wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy, &timing_advert->timestamp_offset, &timing_advert->time_value_offset); if (timing_advert->template_length <= 0) { - hddLog(LOGE, FL("Error while generating the TA frame")); + hdd_err("Error while generating the TA frame"); goto fail; } if (sme_ocb_start_timing_advert(hdd_ctx->hHal, timing_advert) != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("Error while starting timing advert")); + hdd_err("Error while starting timing advert"); rc = -EINVAL; } else { rc = 0; @@ -1222,18 +1225,18 @@ __wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy, return -EINVAL; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); return -EINVAL; } if (!wma_is_vdev_up(adapter->sessionId)) { - hddLog(LOGE, FL("The device has not been started")); + hdd_err("The device has not been started"); return -EINVAL; } timing_advert = qdf_mem_malloc(sizeof(*timing_advert)); if (!timing_advert) { - hddLog(LOGE, FL("qdf_mem_malloc failed")); + hdd_err("qdf_mem_malloc failed"); return -ENOMEM; } qdf_mem_zero(timing_advert, sizeof(sizeof(*timing_advert))); @@ -1244,12 +1247,12 @@ __wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy, data, data_len, qca_wlan_vendor_ocb_stop_timing_advert_policy)) { - hddLog(LOGE, FL("Invalid ATTR")); + hdd_err("Invalid ATTR"); goto fail; } if (!tb[QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_CHANNEL_FREQ]) { - hddLog(LOGE, FL("CHANNEL_FREQ is not present")); + hdd_err("CHANNEL_FREQ is not present"); goto fail; } timing_advert->chan_freq = nla_get_u32( @@ -1257,7 +1260,7 @@ __wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy, if (sme_ocb_stop_timing_advert(hdd_ctx->hHal, timing_advert) != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("Error while stopping timing advert")); + hdd_err("Error while stopping timing advert"); rc = -EINVAL; } else { rc = 0; @@ -1348,12 +1351,12 @@ __wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy, return -EINVAL; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); return -EINVAL; } if (!wma_is_vdev_up(adapter->sessionId)) { - hddLog(LOGE, FL("The device has not been started")); + hdd_err("The device has not been started"); return -EINVAL; } @@ -1368,7 +1371,7 @@ __wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy, hdd_ocb_get_tsf_timer_callback, &request); if (rc) { - hddLog(LOGE, FL("Error calling SME function")); + hdd_err("Error calling SME function"); /* Need to convert from qdf_status to errno. */ return -EINVAL; } @@ -1376,14 +1379,14 @@ __wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy, rc = wait_for_completion_timeout(&context.completion_evt, msecs_to_jiffies(WLAN_WAIT_TIME_OCB_CMD)); if (rc == 0) { - hddLog(LOGE, FL("Operation timed out")); + hdd_err("Operation timed out"); rc = -ETIMEDOUT; goto end; } rc = 0; if (context.status) { - hddLog(LOGE, FL("Operation failed: %d"), context.status); + hdd_err("Operation failed: %d", context.status); rc = context.status; goto end; } @@ -1393,12 +1396,12 @@ __wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy, 2 * sizeof(uint32_t) + NLMSG_HDRLEN); if (!nl_resp) { - hddLog(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed")); + hdd_err("cfg80211_vendor_cmd_alloc_reply_skb failed"); rc = -ENOMEM; goto end; } - hddLog(LOGE, FL("Got TSF timer response, high=%d, low=%d"), + hdd_err("Got TSF timer response, high=%d, low=%d", adapter->ocb_get_tsf_timer_resp.timer_high, adapter->ocb_get_tsf_timer_resp.timer_low); @@ -1418,7 +1421,7 @@ __wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy, rc = cfg80211_vendor_cmd_reply(nl_resp); nl_resp = NULL; if (rc) { - hddLog(LOGE, FL("cfg80211_vendor_cmd_reply failed: %d"), rc); + hdd_err("cfg80211_vendor_cmd_reply failed: %d", rc); goto end; } @@ -1536,12 +1539,12 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy, return -EINVAL; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); return -EINVAL; } if (!wma_is_vdev_up(adapter->sessionId)) { - hddLog(LOGE, FL("The device has not been started")); + hdd_err("The device has not been started"); return -EINVAL; } @@ -1550,14 +1553,14 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy, data, data_len, qca_wlan_vendor_dcc_get_stats)) { - hddLog(LOGE, FL("Invalid ATTR")); + hdd_err("Invalid ATTR"); return -EINVAL; } /* Validate all the parameters are present */ if (!tb[QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_CHANNEL_COUNT] || !tb[QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_REQUEST_ARRAY]) { - hddLog(LOGE, FL("Parameters are not present.")); + hdd_err("Parameters are not present."); return -EINVAL; } @@ -1583,7 +1586,7 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy, hdd_dcc_get_stats_callback, &request); if (rc) { - hddLog(LOGE, FL("Error calling SME function")); + hdd_err("Error calling SME function"); /* Need to convert from qdf_status to errno. */ return -EINVAL; } @@ -1592,19 +1595,19 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy, rc = wait_for_completion_timeout(&context.completion_evt, msecs_to_jiffies(WLAN_WAIT_TIME_OCB_CMD)); if (rc == 0) { - hddLog(LOGE, FL("Operation failed: %d"), rc); + hdd_err("Operation failed: %d", rc); rc = -ETIMEDOUT; goto end; } if (context.status) { - hddLog(LOGE, FL("There was error: %d"), context.status); + hdd_err("There was error: %d", context.status); rc = context.status; goto end; } if (!adapter->dcc_get_stats_resp) { - hddLog(LOGE, FL("The response was NULL")); + hdd_err("The response was NULL"); rc = -EINVAL; goto end; } @@ -1614,7 +1617,7 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy, adapter->dcc_get_stats_resp->channel_stats_array_len + NLMSG_HDRLEN); if (!nl_resp) { - hddLog(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed")); + hdd_err("cfg80211_vendor_cmd_alloc_reply_skb failed"); rc = -ENOMEM; goto end; } @@ -1636,7 +1639,7 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy, rc = cfg80211_vendor_cmd_reply(nl_resp); nl_resp = NULL; if (rc) { - hddLog(LOGE, FL("cfg80211_vendor_cmd_reply failed: %d"), rc); + hdd_err("cfg80211_vendor_cmd_reply failed: %d", rc); goto end; } @@ -1701,12 +1704,12 @@ static int __wlan_hdd_cfg80211_dcc_clear_stats(struct wiphy *wiphy, return -EINVAL; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); return -EINVAL; } if (!wma_is_vdev_up(adapter->sessionId)) { - hddLog(LOGE, FL("The device has not been started")); + hdd_err("The device has not been started"); return -EINVAL; } @@ -1715,13 +1718,13 @@ static int __wlan_hdd_cfg80211_dcc_clear_stats(struct wiphy *wiphy, data, data_len, qca_wlan_vendor_dcc_clear_stats)) { - hddLog(LOGE, FL("Invalid ATTR")); + hdd_err("Invalid ATTR"); return -EINVAL; } /* Verify that the parameter is present */ if (!tb[QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_BITMAP]) { - hddLog(LOGE, FL("Parameters are not present.")); + hdd_err("Parameters are not present."); return -EINVAL; } @@ -1730,7 +1733,7 @@ static int __wlan_hdd_cfg80211_dcc_clear_stats(struct wiphy *wiphy, nla_get_u32( tb[QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_BITMAP])) != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("Error calling SME function.")); + hdd_err("Error calling SME function."); return -EINVAL; } @@ -1820,12 +1823,12 @@ static int __wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy, goto end; if (adapter->device_mode != QDF_OCB_MODE) { - hddLog(LOGE, FL("Device not in OCB mode!")); + hdd_err("Device not in OCB mode!"); goto end; } if (!wma_is_vdev_up(adapter->sessionId)) { - hddLog(LOGE, FL("The device has not been started")); + hdd_err("The device has not been started"); return -EINVAL; } @@ -1834,7 +1837,7 @@ static int __wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy, data, data_len, qca_wlan_vendor_dcc_update_ndl)) { - hddLog(LOGE, FL("Invalid ATTR")); + hdd_err("Invalid ATTR"); goto end; } @@ -1842,7 +1845,7 @@ static int __wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy, if (!tb[QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_CHANNEL_COUNT] || !tb[QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_CHANNEL_ARRAY] || !tb[QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_ACTIVE_STATE_ARRAY]) { - hddLog(LOGE, FL("Parameters are not present.")); + hdd_err("Parameters are not present."); return -EINVAL; } @@ -1875,7 +1878,7 @@ static int __wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy, hdd_dcc_update_ndl_callback, &request); if (rc) { - hddLog(LOGE, FL("Error calling SME function.")); + hdd_err("Error calling SME function."); /* Convert from qdf_status to errno */ return -EINVAL; } @@ -1884,20 +1887,20 @@ static int __wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy, rc = wait_for_completion_timeout(&context.completion_evt, msecs_to_jiffies(WLAN_WAIT_TIME_OCB_CMD)); if (rc == 0) { - hddLog(LOGE, FL("Operation timed out")); + hdd_err("Operation timed out"); rc = -ETIMEDOUT; goto end; } rc = 0; if (context.status) { - hddLog(LOGE, FL("Operation failed: %d"), context.status); + hdd_err("Operation failed: %d", context.status); rc = context.status; goto end; } if (adapter->dcc_update_ndl_resp.status) { - hddLog(LOGE, FL("Operation returned: %d"), + hdd_err("Operation returned: %d", adapter->dcc_update_ndl_resp.status); rc = -EINVAL; goto end; @@ -1957,7 +1960,7 @@ static void wlan_hdd_dcc_stats_event_callback(void *context_ptr, GFP_KERNEL); if (!vendor_event) { - hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed")); + hdd_err("cfg80211_vendor_event_alloc failed"); return; } @@ -1968,7 +1971,7 @@ static void wlan_hdd_dcc_stats_event_callback(void *context_ptr, QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_STATS_ARRAY, resp->channel_stats_array_len, resp->channel_stats_array)) { - hddLog(LOGE, FL("nla put failed")); + hdd_err("nla put failed"); kfree_skb(vendor_event); return; } @@ -1987,5 +1990,5 @@ void wlan_hdd_dcc_register_for_dcc_stats_event(hdd_context_t *hdd_ctx) rc = sme_register_for_dcc_stats_event(hdd_ctx->hHal, hdd_ctx, wlan_hdd_dcc_stats_event_callback); if (rc) - hddLog(LOGE, FL("Register callback failed: %d"), rc); + hdd_err("Register callback failed: %d", rc); } -- cgit v1.2.3 From c327332c92ade9647bafcae8c8f3f9f2fcdf32d5 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 6 Jul 2016 15:28:17 -0700 Subject: qcacld-3.0: Convert wlan_hdd_power.c to unified logging Currently the HDD code uses a variety of logging APIs. In qcacld-3.0 HDD should converge on a unified set of logging APIs. Update wlan_hdd_power.c to use the unified set of APIs. Change-Id: Iba049d8734436c916efce4d3c1fa2c55ac09c333 CRs-Fixed: 937685 --- core/hdd/src/wlan_hdd_power.c | 280 ++++++++++++++++-------------------------- 1 file changed, 106 insertions(+), 174 deletions(-) diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 7412c3201e6b..8eb578c50773 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -164,16 +164,11 @@ static void hdd_conf_gtk_offload(hdd_adapter_t *pAdapter, bool fenable) &hddGtkOffloadReqParams, pAdapter->sessionId); if (QDF_STATUS_SUCCESS != ret) { - QDF_TRACE(QDF_MODULE_ID_HDD, - QDF_TRACE_LEVEL_ERROR, - "%s: sme_set_gtk_offload failed, returned %d", - __func__, ret); + hdd_err("sme_set_gtk_offload failed, returned %d", ret); return; } - QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO, - "%s: sme_set_gtk_offload successfull", - __func__); + hdd_notice("sme_set_gtk_offload successfull"); } } else { @@ -190,16 +185,10 @@ static void hdd_conf_gtk_offload(hdd_adapter_t *pAdapter, bool fenable) wlan_hdd_cfg80211_update_replay_counter_callback, pAdapter, pAdapter->sessionId); if (QDF_STATUS_SUCCESS != ret) { - QDF_TRACE(QDF_MODULE_ID_HDD, - QDF_TRACE_LEVEL_ERROR, - "%s: sme_get_gtk_offload failed, returned %d", - __func__, ret); + hdd_err("sme_get_gtk_offload failed, returned %d", ret); return; } else { - QDF_TRACE(QDF_MODULE_ID_HDD, - QDF_TRACE_LEVEL_INFO, - "%s: sme_get_gtk_offload successful", - __func__); + hdd_notice("sme_get_gtk_offload successful"); /* Sending GTK offload dissable */ memcpy(&hddGtkOffloadReqParams, @@ -213,16 +202,10 @@ static void hdd_conf_gtk_offload(hdd_adapter_t *pAdapter, bool fenable) &hddGtkOffloadReqParams, pAdapter->sessionId); if (QDF_STATUS_SUCCESS != ret) { - QDF_TRACE(QDF_MODULE_ID_HDD, - QDF_TRACE_LEVEL_ERROR, - "%s: failed to dissable GTK offload, returned %d", - __func__, ret); + hdd_err("failed to dissable GTK offload, returned %d", ret); return; } - QDF_TRACE(QDF_MODULE_ID_HDD, - QDF_TRACE_LEVEL_INFO, - "%s: successfully dissabled GTK offload request to HAL", - __func__); + hdd_notice("successfully dissabled GTK offload request to HAL"); } } } @@ -260,7 +243,7 @@ static int __wlan_hdd_ipv6_changed(struct notifier_block *nb, ENTER(); if ((pAdapter == NULL) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { - hddLog(LOGE, FL("Adapter context is invalid %p"), pAdapter); + hdd_err("Adapter context is invalid %p", pAdapter); return -EINVAL; } @@ -329,7 +312,7 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable) uint32_t count = 0, scope; ENTER(); - hddLog(LOG1, FL(" fenable = %d"), fenable); + hdd_notice(" fenable = %d", fenable); pHddCtx = WLAN_HDD_GET_CTX(pAdapter); @@ -340,8 +323,7 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable) if ((QDF_SAP_MODE == pAdapter->device_mode || QDF_P2P_GO_MODE == pAdapter->device_mode) && !pHddCtx->ap_arpns_support) { - hddLog(LOG1, - FL("NS Offload is not supported in SAP/P2PGO mode")); + hdd_notice("NS Offload is not supported in SAP/P2PGO mode"); return; } @@ -675,7 +657,7 @@ static int __wlan_hdd_ipv4_changed(struct notifier_block *nb, ENTER(); if ((pAdapter == NULL) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { - hddLog(LOGE, FL("Adapter context is invalid %p"), pAdapter); + hdd_err("Adapter context is invalid %p", pAdapter); return -EINVAL; } @@ -690,8 +672,7 @@ static int __wlan_hdd_ipv4_changed(struct notifier_block *nb, return NOTIFY_DONE; if (!pHddCtx->config->fhostArpOffload) { - hddLog(LOG1, - FL("Offload not enabled ARPOffload=%d"), + hdd_notice("Offload not enabled ARPOffload=%d", pHddCtx->config->fhostArpOffload); return NOTIFY_DONE; } @@ -764,8 +745,7 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable) if ((QDF_SAP_MODE == pAdapter->device_mode || QDF_P2P_GO_MODE == pAdapter->device_mode) && !pHddCtx->ap_arpns_support) { - hddLog(LOG1, - FL("ARP Offload is not supported in SAP/P2PGO mode")); + hdd_notice("ARP Offload is not supported in SAP/P2PGO mode"); return QDF_STATUS_SUCCESS; } @@ -786,7 +766,7 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable) hdd_wlan_offload_event(SIR_IPV4_ARP_REPLY_OFFLOAD, SIR_OFFLOAD_ENABLE); - hddLog(QDF_TRACE_LEVEL_INFO, "%s: Enabled", __func__); + hdd_notice("Enabled"); if (((HDD_MCASTBCASTFILTER_FILTER_ALL_BROADCAST == pHddCtx->sus_res_mcastbcast_filter) || @@ -796,14 +776,12 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable) pHddCtx->sus_res_mcastbcast_filter_valid)) { offLoadRequest.enableOrDisable = SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE; - hddLog(QDF_TRACE_LEVEL_INFO, - "offload: inside arp offload conditional check"); + hdd_notice("offload: inside arp offload conditional check"); } hdd_wlan_offload_event( SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE, SIR_OFFLOAD_ENABLE); - hddLog(QDF_TRACE_LEVEL_INFO, - "offload: arp filter programmed = %d", + hdd_notice("offload: arp filter programmed = %d", offLoadRequest.enableOrDisable); /* converting u32 to IPV4 address */ @@ -811,8 +789,7 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable) offLoadRequest.params.hostIpv4Addr[i] = (ifa->ifa_local >> (i * 8)) & 0xFF; } - hddLog(QDF_TRACE_LEVEL_INFO, - " Enable SME HostOffload: %d.%d.%d.%d", + hdd_notice(" Enable SME HostOffload: %d.%d.%d.%d", offLoadRequest.params.hostIpv4Addr[0], offLoadRequest.params.hostIpv4Addr[1], offLoadRequest.params.hostIpv4Addr[2], @@ -822,14 +799,11 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable) sme_set_host_offload(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId, &offLoadRequest)) { - hddLog(QDF_TRACE_LEVEL_ERROR, - "%s: Failed to enable HostOffload feature", - __func__); + hdd_err("Failed to enable HostOffload feature"); return QDF_STATUS_E_FAILURE; } } else { - hddLog(QDF_TRACE_LEVEL_INFO, - FL("IP Address is not assigned")); + hdd_notice("IP Address is not assigned"); } return QDF_STATUS_SUCCESS; @@ -844,9 +818,7 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable) if (QDF_STATUS_SUCCESS != sme_set_host_offload(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId, &offLoadRequest)) { - hddLog(QDF_TRACE_LEVEL_ERROR, - "%s: Failure to disable host " "offload feature", - __func__); + hdd_err("Failure to disable host " "offload feature"); return QDF_STATUS_E_FAILURE; } return QDF_STATUS_SUCCESS; @@ -867,7 +839,7 @@ static void hdd_mcbc_filter_modification(hdd_context_t *pHddCtx, uint8_t *pMcBcFilter) { if (NULL == pHddCtx) { - hddLog(QDF_TRACE_LEVEL_ERROR, FL("NULL HDD context passed")); + hdd_err("NULL HDD context passed"); return; } @@ -909,13 +881,10 @@ void hdd_conf_mcastbcast_filter(hdd_context_t *pHddCtx, bool setfilter) tpSirWlanSetRxpFilters wlanRxpFilterParam = qdf_mem_malloc(sizeof(tSirWlanSetRxpFilters)); if (NULL == wlanRxpFilterParam) { - hddLog(QDF_TRACE_LEVEL_FATAL, - "%s: qdf_mem_malloc failed ", __func__); + hdd_alert("qdf_mem_malloc failed "); return; } - hddLog(QDF_TRACE_LEVEL_INFO, - "%s: Configuring Mcast/Bcast Filter Setting. setfilter %d", - __func__, setfilter); + hdd_notice("Configuring Mcast/Bcast Filter Setting. setfilter %d", setfilter); if (true == setfilter) { hdd_mcbc_filter_modification(pHddCtx, &wlanRxpFilterParam-> @@ -933,8 +902,7 @@ void hdd_conf_mcastbcast_filter(hdd_context_t *pHddCtx, bool setfilter) if (setfilter && (QDF_STATUS_SUCCESS == qdf_ret_status)) pHddCtx->hdd_mcastbcast_filter_set = true; - hddLog(LOG1, - FL("%s to post set/reset filter to lower mac with status %d configuredMcstBcstFilterSetting = %d setMcstBcstFilter = %d"), + hdd_notice("%s to post set/reset filter to lower mac with status %d configuredMcstBcstFilterSetting = %d setMcstBcstFilter = %d", (QDF_STATUS_SUCCESS != qdf_ret_status) ? "Failed" : "Success", qdf_ret_status, wlanRxpFilterParam->configuredMcstBcstFilterSetting, @@ -958,28 +926,26 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set) hdd_context_t *pHddCtx = (hdd_context_t *) pAdapter->pHddCtx; if (NULL == pHddCtx) { - hddLog(QDF_TRACE_LEVEL_ERROR, FL("HDD CTX is NULL")); + hdd_err("HDD CTX is NULL"); return; } hHal = pHddCtx->hHal; if (NULL == hHal) { - hddLog(QDF_TRACE_LEVEL_ERROR, FL("HAL Handle is NULL")); + hdd_err("HAL Handle is NULL"); return; } /* Check if INI is enabled or not, other wise just return */ if (!pHddCtx->config->fEnableMCAddrList) { - hddLog(QDF_TRACE_LEVEL_INFO, - FL("gMCAddrListEnable is not enabled in INI")); + hdd_notice("gMCAddrListEnable is not enabled in INI"); return; } pMulticastAddrs = qdf_mem_malloc(sizeof(tSirRcvFltMcAddrList)); if (NULL == pMulticastAddrs) { - hddLog(QDF_TRACE_LEVEL_ERROR, - FL("Could not allocate Memory")); + hdd_err("Could not allocate Memory"); return; } qdf_mem_zero(pMulticastAddrs, sizeof(tSirRcvFltMcAddrList)); @@ -1031,8 +997,7 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set) } /* MAddrCnt is MulticastAddrCnt */ - hddLog(QDF_TRACE_LEVEL_INFO, - "smeSessionId:%d; set:%d; MCAdddrCnt :%d", + hdd_notice("smeSessionId:%d; set:%d; MCAdddrCnt :%d", pAdapter->sessionId, set, pMulticastAddrs->ulMulticastAddrCnt); @@ -1076,7 +1041,7 @@ static void hdd_send_suspend_ind(hdd_context_t *pHddCtx, { QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; - hdd_info("%s: send wlan suspend indication", __func__); + hdd_info("send wlan suspend indication"); qdf_ret_status = sme_configure_suspend_ind(pHddCtx->hHal, conn_state_mask, @@ -1085,8 +1050,7 @@ static void hdd_send_suspend_ind(hdd_context_t *pHddCtx, if (QDF_STATUS_SUCCESS == qdf_ret_status) { pHddCtx->hdd_mcastbcast_filter_set = true; } else { - hddLog(QDF_TRACE_LEVEL_ERROR, - FL("sme_configure_suspend_ind returned failure %d"), + hdd_err("sme_configure_suspend_ind returned failure %d", qdf_ret_status); } } @@ -1105,14 +1069,11 @@ static void hdd_conf_resume_ind(hdd_adapter_t *pAdapter) qdf_ret_status = sme_configure_resume_req(pHddCtx->hHal, NULL); if (QDF_STATUS_SUCCESS != qdf_ret_status) { - hddLog(QDF_TRACE_LEVEL_ERROR, - "%s: sme_configure_resume_req return failure %d", - __func__, qdf_ret_status); + hdd_err("sme_configure_resume_req return failure %d", qdf_ret_status); } - hddLog(QDF_TRACE_LEVEL_INFO, - "%s: send wlan resume indication", __func__); + hdd_notice("send wlan resume indication"); /* Disable supported OffLoads */ hdd_conf_hostoffload(pAdapter, false); pHddCtx->hdd_mcastbcast_filter_set = false; @@ -1123,9 +1084,8 @@ static void hdd_conf_resume_ind(hdd_adapter_t *pAdapter) pHddCtx->sus_res_mcastbcast_filter_valid = false; } - hddLog(QDF_TRACE_LEVEL_INFO, - "offload: in hdd_conf_resume_ind, restoring configuredMcastBcastFilter"); - hddLog(QDF_TRACE_LEVEL_INFO, "configuredMcastBcastFilter = %d", + hdd_notice("offload: in hdd_conf_resume_ind, restoring configuredMcastBcastFilter"); + hdd_notice("configuredMcastBcastFilter = %d", pHddCtx->configuredMcastBcastFilter); } @@ -1168,12 +1128,11 @@ hdd_suspend_wlan(void (*callback)(void *callbackContext, bool suspended), hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL; uint32_t conn_state_mask = 0; - hdd_info("%s: WLAN being suspended by OS", __func__); + hdd_info("WLAN being suspended by OS"); pHddCtx = cds_get_context(QDF_MODULE_ID_HDD); if (!pHddCtx) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: HDD context is Null", - __func__); + hdd_alert("HDD context is Null"); return; } @@ -1190,7 +1149,7 @@ hdd_suspend_wlan(void (*callback)(void *callbackContext, bool suspended), pAdapter = pAdapterNode->pAdapter; /* stop all TX queues before suspend */ - hddLog(LOG1, FL("Disabling queues")); + hdd_notice("Disabling queues"); wlan_hdd_netif_queue_control(pAdapter, WLAN_NETIF_TX_DISABLE, WLAN_CONTROL_PATH); @@ -1225,13 +1184,11 @@ static void hdd_resume_wlan(void) hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL; QDF_STATUS status; - hddLog(QDF_TRACE_LEVEL_INFO, "%s: WLAN being resumed by OS", - __func__); + hdd_notice("WLAN being resumed by OS"); pHddCtx = cds_get_context(QDF_MODULE_ID_HDD); if (!pHddCtx) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: HDD context is Null", - __func__); + hdd_alert("HDD context is Null"); return; } @@ -1251,7 +1208,7 @@ static void hdd_resume_wlan(void) pAdapter = pAdapterNode->pAdapter; /* wake the tx queues */ - hddLog(LOG1, FL("Enabling queues")); + hdd_notice("Enabling queues"); wlan_hdd_netif_queue_control(pAdapter, WLAN_WAKE_ALL_NETIF_QUEUE, WLAN_CONTROL_PATH); @@ -1305,7 +1262,7 @@ static void hdd_ssr_timer_del(void) */ static void hdd_ssr_timer_cb(unsigned long data) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: HDD SSR timer expired!", __func__); + hdd_alert("HDD SSR timer expired!"); QDF_BUG(0); } @@ -1318,9 +1275,7 @@ static void hdd_ssr_timer_cb(unsigned long data) static void hdd_ssr_timer_start(int msec) { if (ssr_timer_started) { - hddLog(QDF_TRACE_LEVEL_FATAL, - "%s: Trying to start SSR timer when " "it's running!", - __func__); + hdd_alert("Trying to start SSR timer when " "it's running!"); } ssr_timer.expires = jiffies + msecs_to_jiffies(msec); ssr_timer.function = hdd_ssr_timer_cb; @@ -1343,8 +1298,7 @@ QDF_STATUS hdd_wlan_shutdown(void) hdd_context_t *pHddCtx; p_cds_sched_context cds_sched_context = NULL; - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: WLAN driver shutting down!", - __func__); + hdd_alert("WLAN driver shutting down!"); wlan_hdd_send_status_pkg(NULL, NULL, 0, 0); @@ -1355,16 +1309,14 @@ QDF_STATUS hdd_wlan_shutdown(void) /* Get the global CDS context. */ p_cds_context = cds_get_global_context(); if (!p_cds_context) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: Global CDS context is Null", - __func__); + hdd_alert("Global CDS context is Null"); return QDF_STATUS_E_FAILURE; } /* Get the HDD context. */ pHddCtx = cds_get_context(QDF_MODULE_ID_HDD); if (!pHddCtx) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: HDD context is Null", - __func__); + hdd_alert("HDD context is Null"); return QDF_STATUS_E_FAILURE; } @@ -1395,7 +1347,7 @@ QDF_STATUS hdd_wlan_shutdown(void) * gracefully. */ /* Wait for MC to exit */ - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: Shutting down MC thread", __func__); + hdd_alert("Shutting down MC thread"); set_bit(MC_SHUTDOWN_EVENT_MASK, &cds_sched_context->mcEventFlag); set_bit(MC_POST_EVENT_MASK, &cds_sched_context->mcEventFlag); wake_up_interruptible(&cds_sched_context->mcWaitQueue); @@ -1403,8 +1355,7 @@ QDF_STATUS hdd_wlan_shutdown(void) #ifdef QCA_CONFIG_SMP /* Wait for OL RX to exit */ - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: Shutting down OL RX thread", - __func__); + hdd_alert("Shutting down OL RX thread"); unregister_hotcpu_notifier(cds_sched_context->cpu_hot_plug_notifier); set_bit(RX_SHUTDOWN_EVENT_MASK, &cds_sched_context->ol_rx_event_flag); set_bit(RX_POST_EVENT_MASK, &cds_sched_context->ol_rx_event_flag); @@ -1415,44 +1366,44 @@ QDF_STATUS hdd_wlan_shutdown(void) cds_free_ol_rx_pkt_freeq(cds_sched_context); #endif - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: Doing WMA STOP", __func__); + hdd_alert("Doing WMA STOP"); qdf_status = wma_stop(p_cds_context, HAL_STOP_TYPE_RF_KILL); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, + QDF_TRACE(QDF_MODULE_ID_QDF, LOGE, "%s: Failed to stop WMA", __func__); QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status)); wma_setneedshutdown(p_cds_context); } - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: Doing SME STOP", __func__); + hdd_alert("Doing SME STOP"); /* Stop SME - Cannot invoke cds_disable as cds_disable relies * on threads being running to process the SYS Stop */ qdf_status = sme_stop(pHddCtx->hHal, HAL_STOP_TYPE_SYS_RESET); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, + QDF_TRACE(QDF_MODULE_ID_QDF, LOGE, "%s: Failed to stop sme %d", __func__, qdf_status); QDF_ASSERT(0); } - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: Doing MAC STOP", __func__); + hdd_alert("Doing MAC STOP"); /* Stop MAC (PE and HAL) */ qdf_status = mac_stop(pHddCtx->hHal, HAL_STOP_TYPE_SYS_RESET); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, + QDF_TRACE(QDF_MODULE_ID_QDF, LOGE, "%s: Failed to stop mac %d", __func__, qdf_status); QDF_ASSERT(0); } - hddLog(QDF_TRACE_LEVEL_INFO, "%s: Flush Queues", __func__); + hdd_notice("Flush Queues"); /* Clean up message queues of TX, RX and MC thread */ cds_sched_flush_mc_mqs(cds_sched_context); /* Deinit all the TX, RX and MC queues */ cds_sched_deinit_mqs(cds_sched_context); - hddLog(QDF_TRACE_LEVEL_INFO, "%s: Doing CDS Shutdown", __func__); + hdd_notice("Doing CDS Shutdown"); /* shutdown CDS */ cds_shutdown(p_cds_context); @@ -1462,8 +1413,7 @@ QDF_STATUS hdd_wlan_shutdown(void) wlansap_global_deinit(); - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: WLAN driver shutdown complete", - __func__); + hdd_alert("WLAN driver shutdown complete"); return QDF_STATUS_SUCCESS; } @@ -1489,21 +1439,19 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) /* Get the CDS context */ p_cds_context = cds_get_global_context(); if (p_cds_context == NULL) { - hddLog(QDF_TRACE_LEVEL_FATAL, - "%s: Failed cds_get_global_context", __func__); + hdd_alert("Failed cds_get_global_context"); goto err_re_init; } /* Get the HDD context */ pHddCtx = cds_get_context(QDF_MODULE_ID_HDD); if (!pHddCtx) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: HDD context is Null", - __func__); + hdd_alert("HDD context is Null"); goto err_re_init; } if (!hif_sc) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: hif_sc is NULL", __func__); + hdd_alert("hif_sc is NULL"); goto err_re_init; } @@ -1515,15 +1463,14 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) /* Re-open CDS, it is a re-open b'se control transport was never closed. */ qdf_status = cds_open(); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: cds_open failed", __func__); + hdd_alert("cds_open failed"); goto err_re_init; } /* Save the hal context in Adapter */ pHddCtx->hHal = cds_get_context(QDF_MODULE_ID_SME); if (NULL == pHddCtx->hHal) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: HAL context is null", - __func__); + hdd_alert("HAL context is null"); goto err_cds_close; } @@ -1549,15 +1496,13 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) qdf_status = hdd_set_sme_chan_list(pHddCtx); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(QDF_TRACE_LEVEL_FATAL, - "%s: Failed to init channel list", __func__); + hdd_alert("Failed to init channel list"); goto err_cds_close; } /* Apply the cfg.ini to cfg.dat */ if (false == hdd_update_config_dat(pHddCtx)) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: config update failed", - __func__); + hdd_alert("config update failed"); goto err_cds_close; } @@ -1568,8 +1513,8 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) intfMacAddr[0], sizeof(pHddCtx->config->intfMacAddr[0])); if (!QDF_IS_STATUS_SUCCESS(qdf_ret_status)) { - hddLog(QDF_TRACE_LEVEL_ERROR, "%s: Failed to set MAC Address. " - "HALStatus is %08d [x%08x]", __func__, qdf_ret_status, + hdd_err("Failed to set MAC Address. " + "HALStatus is %08d [x%08x]", qdf_ret_status, qdf_ret_status); goto err_cds_close; } @@ -1578,14 +1523,13 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) Note: Firmware image will be read and downloaded inside cds_enable API */ qdf_status = cds_enable(p_cds_context); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(QDF_TRACE_LEVEL_FATAL, "%s: cds_enable failed", __func__); + hdd_alert("cds_enable failed"); goto err_cds_close; } qdf_status = hdd_post_cds_enable_config(pHddCtx); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(QDF_TRACE_LEVEL_FATAL, - "%s: hdd_post_cds_enable_config failed", __func__); + hdd_alert("hdd_post_cds_enable_config failed"); goto err_cds_disable; } @@ -1596,8 +1540,7 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) if (!pAdapter) { pAdapter = hdd_get_adapter(pHddCtx, QDF_IBSS_MODE); if (!pAdapter) { - hddLog(QDF_TRACE_LEVEL_FATAL, - "%s: Failed to get Adapter!", __func__); + hdd_alert("Failed to get Adapter!"); } } } @@ -1606,7 +1549,7 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) qdf_dp_trace_init(); if (hdd_ipa_uc_ssr_reinit()) - hddLog(LOGE, "%s: HDD IPA UC reinit failed", __func__); + hdd_err("HDD IPA UC reinit failed"); /* Get WLAN Host/FW/HW version */ if (pAdapter) @@ -1686,8 +1629,7 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) if (QDF_IS_STATUS_ERROR(qdf_status)) goto err_cds_disable; - hddLog(LOGE, - "%s: WLAN host driver reinitiation completed!", __func__); + hdd_err("WLAN host driver reinitiation completed!"); goto success; err_cds_disable: @@ -1741,23 +1683,22 @@ wlan_hdd_set_powersave(hdd_adapter_t *adapter, enum hdd_power_mode mode) hdd_context_t *hdd_ctx; if (NULL == adapter) { - hddLog(QDF_TRACE_LEVEL_FATAL, FL("Adapter NULL")); + hdd_alert("Adapter NULL"); return -ENODEV; } hdd_ctx = WLAN_HDD_GET_CTX(adapter); if (!hdd_ctx) { - hdd_err(FL("hdd context is NULL")); + hdd_err("hdd context is NULL"); return -EINVAL; } - hddLog(QDF_TRACE_LEVEL_INFO_HIGH, FL("power mode=%d"), mode); + hdd_info("power mode=%d", mode); hal = WLAN_HDD_GET_HAL_CTX(adapter); if (DRIVER_POWER_MODE_ACTIVE == mode) { - hddLog(QDF_TRACE_LEVEL_INFO_HIGH, - FL("Wlan driver Entering Full Power")); + hdd_info("Wlan driver Entering Full Power"); /* * Enter Full power command received from GUI @@ -1767,13 +1708,13 @@ wlan_hdd_set_powersave(hdd_adapter_t *adapter, enum hdd_power_mode mode) } else if (DRIVER_POWER_MODE_AUTO == mode) { if ((QDF_STA_MODE == adapter->device_mode) || (QDF_P2P_CLIENT_MODE == adapter->device_mode)) { - hddLog(LOG1, FL("Disabling Auto Power save timer")); + hdd_notice("Disabling Auto Power save timer"); sme_ps_disable_auto_ps_timer(WLAN_HDD_GET_HAL_CTX (adapter), adapter->sessionId); } if (hdd_ctx->config && hdd_ctx->config->is_ps_enabled) { - hddLog(LOG1, FL("Wlan driver Entering Power save")); + hdd_notice("Wlan driver Entering Power save"); /* * Enter Power Save command received from GUI @@ -1782,8 +1723,7 @@ wlan_hdd_set_powersave(hdd_adapter_t *adapter, enum hdd_power_mode mode) sme_ps_enable_disable(hal, adapter->sessionId, SME_PS_ENABLE); } else { - hddLog(QDF_TRACE_LEVEL_INFO_HIGH, - FL("Power Save is not enabled in the cfg")); + hdd_info("Power Save is not enabled in the cfg"); } } return 0; @@ -1810,7 +1750,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) ENTER(); if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hddLog(LOGE, FL("Command not allowed in FTM mode")); + hdd_err("Command not allowed in FTM mode"); return -EINVAL; } @@ -1840,7 +1780,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) pHddCtx->isWiphySuspended = false; if (true != pHddCtx->isSchedScanUpdatePending) { qdf_spin_unlock(&pHddCtx->sched_scan_lock); - hddLog(LOG1, FL("Return resume is not due to PNO indication")); + hdd_notice("Return resume is not due to PNO indication"); return 0; } /* Reset flag to avoid updatating cfg80211 data old results again */ @@ -1856,7 +1796,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) if (0 != wlan_hdd_cfg80211_update_bss(pHddCtx->wiphy, pAdapter, 0)) { - hddLog(LOGW, FL("NO SCAN result")); + hdd_warn("NO SCAN result"); } else { /* Acquire wakelock to handle the case where * APP's tries to suspend immediately after @@ -1869,8 +1809,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) cfg80211_sched_scan_results(pHddCtx->wiphy); } - hddLog(LOG1, - FL("cfg80211 scan result database updated")); + hdd_notice("cfg80211 scan result database updated"); EXIT(); return result; } @@ -1878,7 +1817,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) pAdapterNode = pNext; } - hddLog(LOG1, FL("Failed to find Adapter")); + hdd_notice("Failed to find Adapter"); EXIT(); return result; } @@ -1944,7 +1883,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, ENTER(); if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hddLog(LOGE, FL("Command not allowed in FTM mode")); + hdd_err("Command not allowed in FTM mode"); return -EINVAL; } @@ -1965,15 +1904,13 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, true == WLAN_HDD_GET_AP_CTX_PTR(pAdapter)-> dfs_cac_block_tx) { - hddLog(LOG1, - FL("RADAR detection in progress, do not allow suspend")); + hdd_notice("RADAR detection in progress, do not allow suspend"); return -EAGAIN; } else if (!pHddCtx->config->enableSapSuspend) { /* return -EOPNOTSUPP if SAP does not support * suspend */ - hddLog(LOGE, - FL("SAP does not support suspend!!")); + hdd_err("SAP does not support suspend!!"); return -EOPNOTSUPP; } } else if (QDF_P2P_GO_MODE == pAdapter->device_mode) { @@ -1981,8 +1918,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, /* return -EOPNOTSUPP if GO does not support * suspend */ - hddLog(LOGE, - FL("GO does not support suspend!!")); + hdd_err("GO does not support suspend!!"); return -EOPNOTSUPP; } } @@ -1998,8 +1934,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, if (sme_sta_in_middle_of_roaming (pHddCtx->hHal, pAdapter->sessionId)) { - hddLog(LOG1, - FL("Roaming in progress, do not allow suspend")); + hdd_notice("Roaming in progress, do not allow suspend"); return -EAGAIN; } @@ -2013,8 +1948,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, abortscan_event_var, msecs_to_jiffies(WLAN_WAIT_TIME_ABORTSCAN)); if (!status) { - hddLog(LOGE, - FL("Timeout occurred while waiting for abort scan")); + hdd_err("Timeout occurred while waiting for abort scan"); return -ETIME; } } @@ -2027,7 +1961,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, * firmware to avoid any race conditions. */ if (hdd_ipa_suspend(pHddCtx)) { - hddLog(LOG1, FL("IPA not ready to suspend!")); + hdd_notice("IPA not ready to suspend!"); return -EAGAIN; } @@ -2039,12 +1973,12 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, rc = wait_for_completion_timeout(&pHddCtx->ready_to_suspend, msecs_to_jiffies(WLAN_WAIT_TIME_READY_TO_SUSPEND)); if (!rc) { - hddLog(LOGE, FL("Failed to get ready to suspend")); + hdd_err("Failed to get ready to suspend"); goto resume_tx; } if (!pHddCtx->suspended) { - hddLog(LOGE, FL("Faied as suspend_status is wrong:%d"), + hdd_err("Faied as suspend_status is wrong:%d", pHddCtx->suspended); goto resume_tx; } @@ -2059,7 +1993,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, if (!rc) { clear_bit(MC_SUSPEND_EVENT_MASK, &cds_sched_context->mcEventFlag); - hddLog(LOGE, FL("Failed to stop mc thread")); + hdd_err("Failed to stop mc thread"); goto resume_tx; } @@ -2076,7 +2010,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy, if (!rc) { clear_bit(RX_SUSPEND_EVENT_MASK, &cds_sched_context->ol_rx_event_flag); - hddLog(LOGE, FL("Failed to stop tl_shim rx thread")); + hdd_err("Failed to stop tl_shim rx thread"); goto resume_all; } pHddCtx->is_ol_rx_thread_suspended = true; @@ -2147,7 +2081,7 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy, ENTER(); if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hddLog(LOGE, FL("Command not allowed in FTM mode")); + hdd_err("Command not allowed in FTM mode"); return -EINVAL; } @@ -2167,12 +2101,10 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy, (eConnectionState_Associated == (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState)) { - hddLog(LOG1, - FL("offload: in cfg80211_set_power_mgmt, calling arp offload")); + hdd_notice("offload: in cfg80211_set_power_mgmt, calling arp offload"); qdf_status = hdd_conf_arp_offload(pAdapter, true); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - hddLog(LOG1, - FL("Failed to enable ARPOFFLOAD Feature %d"), + hdd_notice("Failed to enable ARPOFFLOAD Feature %d", qdf_status); } } @@ -2180,12 +2112,12 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy, status = wlan_hdd_set_powersave(pAdapter, !mode); if (!mode) { - hddLog(LOGE, FL("DHCP start indicated through power save")); + hdd_err("DHCP start indicated through power save"); sme_dhcp_start_ind(pHddCtx->hHal, pAdapter->device_mode, pAdapter->macAddressCurrent.bytes, pAdapter->sessionId); } else { - hddLog(LOGW, FL("DHCP stop indicated through power save")); + hdd_warn("DHCP stop indicated through power save"); sme_dhcp_stop_ind(pHddCtx->hHal, pAdapter->device_mode, pAdapter->macAddressCurrent.bytes, pAdapter->sessionId); @@ -2240,7 +2172,7 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy, ENTER(); if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hddLog(LOGE, FL("Command not allowed in FTM mode")); + hdd_err("Command not allowed in FTM mode"); return -EINVAL; } @@ -2255,12 +2187,12 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy, hHal = pHddCtx->hHal; if (0 != sme_cfg_set_int(hHal, WNI_CFG_CURRENT_TX_POWER_LEVEL, dbm)) { - hddLog(LOGE, FL("sme_cfg_set_int failed for tx power %hu"), + hdd_err("sme_cfg_set_int failed for tx power %hu", dbm); return -EIO; } - hddLog(LOG2, FL("Set tx power level %d dbm"), dbm); + hdd_info("Set tx power level %d dbm", dbm); switch (type) { /* Automatically determine transmit power */ @@ -2269,18 +2201,18 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy, case NL80211_TX_POWER_LIMITED: /* Limit TX power by the mBm parameter */ if (sme_set_max_tx_power(hHal, bssid, selfMac, dbm) != QDF_STATUS_SUCCESS) { - hddLog(LOGE, FL("Setting maximum tx power failed")); + hdd_err("Setting maximum tx power failed"); return -EIO; } break; case NL80211_TX_POWER_FIXED: /* Fix TX power to the mBm parameter */ - hddLog(LOGE, FL("NL80211_TX_POWER_FIXED not supported")); + hdd_err("NL80211_TX_POWER_FIXED not supported"); return -EOPNOTSUPP; break; default: - hddLog(LOGE, FL("Invalid power setting type %d"), type); + hdd_err("Invalid power setting type %d", type); return -EIO; } @@ -2332,7 +2264,7 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy, ENTER(); if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hddLog(LOGE, FL("Command not allowed in FTM mode")); + hdd_err("Command not allowed in FTM mode"); return -EINVAL; } @@ -2344,7 +2276,7 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy, pAdapter = hdd_get_adapter(pHddCtx, QDF_STA_MODE); if (NULL == pAdapter) { - hddLog(LOGE, FL("pAdapter is NULL")); + hdd_err("pAdapter is NULL"); return -ENOENT; } -- cgit v1.2.3 From b6045f60c430cddee1d3c1957df8c00b79d857b1 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Mon, 11 Jul 2016 12:58:34 -0700 Subject: qcacld-3.0: Increase bus suspend/resume log levels Bus suspend/resume log messages are logged with info log level which is by default not logged in kernel log buffer. Increase bus suspend/resume log level to error such that this critical log message is logged in kernel message. Once wlan suspend/resume feature becomes more stable this log message can be reduced back to info log level. Change-Id: Ic78900d5b111637d4d8d1b26e18fa298fbbd893f CRs-Fixed: 1041335 --- core/hdd/src/wlan_hdd_driver_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 50cc62b4eeeb..c80913a21ed4 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -560,7 +560,7 @@ static int __wlan_hdd_bus_suspend(pm_message_t state) if (err) goto resume_wma; - hdd_info("suspend done, status = %d", err); + hdd_err("suspend done, status = %d", err); return err; resume_wma: @@ -626,7 +626,7 @@ static int __wlan_hdd_bus_resume(void) status = ol_txrx_bus_resume(); QDF_BUG(!status); - hdd_info("resume done"); + hdd_err("resume done"); return status; } -- cgit v1.2.3 From 823e9c2e0d1a34242f05419b051e59b44e55ca1b Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Thu, 7 Jul 2016 17:38:44 -0700 Subject: qcacld-3.0: Fix incorrect channel list passed to firmware Fix the occupied channel list that is being passed from CSR to WMA to WMI to firmware.There is a conversion happening in WMA from channel number to frequency which is the root of the issue. CRs-Fixed: 1039020 Change-Id: I8e10df6dd4d09b12ff700ab865f6722f4fbfaf8d --- core/wma/src/wma_scan_roam.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 28f198c84a66..f9ec557416a0 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -973,29 +973,29 @@ QDF_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle, { QDF_STATUS status; int i; - uint8_t *chan_list_hz; + uint32_t *chan_list_mhz; if (chan_count == 0) { WMA_LOGD("%s : invalid number of channels %d", __func__, chan_count); return QDF_STATUS_E_EMPTY; } - chan_list_hz = qdf_mem_malloc(chan_count * sizeof(uint8_t)); - if (chan_list_hz == NULL) { + chan_list_mhz = qdf_mem_malloc(chan_count * sizeof(*chan_list_mhz)); + if (chan_list_mhz == NULL) { WMA_LOGE("%s : Memory allocation failed", __func__); return QDF_STATUS_E_NOMEM; } for (i = 0; ((i < chan_count) && (i < SIR_ROAM_MAX_CHANNELS)); i++) { - chan_list_hz[i] = cds_chan_to_freq(chan_list[i]); - WMA_LOGI("%d,", chan_list_hz[i]); + chan_list_mhz[i] = cds_chan_to_freq(chan_list[i]); + WMA_LOGI("%d,", chan_list_mhz[i]); } status = wmi_unified_roam_scan_offload_chan_list_cmd(wma_handle->wmi_handle, - chan_count, chan_list_hz, + chan_count, chan_list_mhz, list_type, vdev_id); - qdf_mem_free(chan_list_hz); + qdf_mem_free(chan_list_mhz); return status; } -- cgit v1.2.3 From 037bbf6a0da6b46be90b1a20132913a94caf248d Mon Sep 17 00:00:00 2001 From: Vishwajith Upendra Date: Thu, 14 Jul 2016 12:31:42 -0700 Subject: Release 5.1.0.22A Release 5.1.0.22A Change-Id: I599796f0e1c018908f13f3be9aac7d688e7b12c2 CRs-Fixed: 688141 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 4909fc5993e3..8ccd0886c670 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -41,9 +41,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 0 -#define QWLAN_VERSION_EXTRA "" +#define QWLAN_VERSION_EXTRA "A" #define QWLAN_VERSION_BUILD 22 -#define QWLAN_VERSIONSTR "5.1.0.22" +#define QWLAN_VERSIONSTR "5.1.0.22A" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From a1679b62b9173bae6889c05a4781fcc7b6b4b3b4 Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Mon, 11 Jul 2016 15:58:12 -0700 Subject: qcacld-3.0: Return correct failure code Return correct failure code for pld_register_driver. Change-Id: I2f441db9a817ffce9d278c4672a0f68476c11b5c CRs-Fixed: 1039663 --- core/pld/src/pld_common.c | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 92b73cad63a8..7b0fc45c8f3b 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -48,7 +48,6 @@ #define PLD_PCIE_REGISTERED BIT(0) #define PLD_SNOC_REGISTERED BIT(1) #define PLD_SDIO_REGISTERED BIT(2) -#define PLD_BUS_MASK 0x7 static struct pld_context *pld_ctx; @@ -210,7 +209,7 @@ enum pld_bus_type pld_get_bus_type(struct device *dev) * device is online. * * Return: 0 for success - * pld_driver_state for errors + * Non zero failure code for errors */ int pld_register_driver(struct pld_driver_ops *ops) { @@ -240,19 +239,36 @@ int pld_register_driver(struct pld_driver_ops *ops) pld_context->ops = ops; - if (0 == pld_pcie_register_driver()) - pld_context->pld_driver_state |= PLD_PCIE_REGISTERED; - if (0 == pld_snoc_register_driver()) - pld_context->pld_driver_state |= PLD_SNOC_REGISTERED; - if (0 == pld_sdio_register_driver()) - pld_context->pld_driver_state |= PLD_SDIO_REGISTERED; - - if ((PLD_BUS_MASK & pld_context->pld_driver_state) != PLD_BUS_MASK) { - pr_err("driver falied to register, state %x\n", - pld_context->pld_driver_state); - ret = pld_context->pld_driver_state; + ret = pld_pcie_register_driver(); + if (ret) { + pr_err("Fail to register pcie driver\n"); + goto fail_pcie; + } + pld_context->pld_driver_state |= PLD_PCIE_REGISTERED; + + ret = pld_snoc_register_driver(); + if (ret) { + pr_err("Fail to register snoc driver\n"); + goto fail_snoc; } + pld_context->pld_driver_state |= PLD_SNOC_REGISTERED; + ret = pld_sdio_register_driver(); + if (ret) { + pr_err("Fail to register sdio driver\n"); + goto fail_sdio; + } + pld_context->pld_driver_state |= PLD_SDIO_REGISTERED; + + return ret; + +fail_sdio: + pld_snoc_unregister_driver(); +fail_snoc: + pld_pcie_unregister_driver(); +fail_pcie: + pld_context->pld_driver_state = 0; + pld_context->ops = NULL; out: return ret; } -- cgit v1.2.3 From 90fd18c1418b46f56c30eedfa16a7dbfd68a318f Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Thu, 23 Jun 2016 11:21:34 -0700 Subject: qcacld-3.0: Fix null qdf_dev pointer in ramdump handler Container_of returns invalid ol_ctx pointer which leads to a null pointer of qdf_dev. Fix this by directly request qdf_dev pointer from cds. Change-Id: I08910bb798b7992d550c9e061eed04a9b6f140d1 CRs-Fixed: 1033518 --- core/bmi/src/ol_fw.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c index ee7f9401fa5f..f654c9674ed7 100644 --- a/core/bmi/src/ol_fw.c +++ b/core/bmi/src/ol_fw.c @@ -473,17 +473,13 @@ static inline void ol_get_ramdump_mem(struct device *dev, int ol_copy_ramdump(struct hif_opaque_softc *scn) { int ret = -1; - struct hif_opaque_softc **ol_ctx_ptr = &scn; - struct ol_context *ol_ctx; - qdf_device_t qdf_dev; struct ramdump_info *info; + qdf_device_t qdf_dev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE); - ol_ctx = container_of(ol_ctx_ptr, struct ol_context , scn); - if (!ol_ctx) { - BMI_ERR("%s: Invalid ol_ctx\n", __func__); + if (!qdf_dev) { + BMI_ERR("%s qdf_dev is NULL", __func__); return -EINVAL; } - qdf_dev = ol_ctx->qdf_dev; if (hif_get_bus_type(scn) == QDF_BUS_TYPE_SDIO) return 0; -- cgit v1.2.3 From fbf5068ddd8397d817f98e527f2505d0510096a2 Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Wed, 15 Jun 2016 12:57:43 -0700 Subject: qcacld-3.0: Fix uninitialised variable use Initialize packet pointer with NULL to avoid wild pointer dereferencing. Change-Id: Iff756659ed463e15796350d0a73486923b92e19f CRs-Fixed: 1027693 --- core/mac/src/pe/lim/lim_send_management_frames.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index daa44fd0b6ee..5b83e39742a9 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -516,7 +516,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, uint32_t cfg, payload, bytes, status; tpSirMacMgmtHdr mac_hdr; uint8_t *frame; - void *packet; + void *packet = NULL; QDF_STATUS qdf_status; uint32_t addn_ie_present = false; -- cgit v1.2.3 From a395d25d534f5cd6818cfbc8faf6ea465aa899f2 Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Wed, 15 Jun 2016 11:07:24 -0700 Subject: qcacld-3.0: Fix NULL pointer dereference in csr_roam_join_next_bss Add NULL pointer check for "result" after call to csr_roam_select_bss. This function can return a NULL value for variable "result", which is later dereference in the function csr_roam_join_handle_profile. Change-Id: I5e1f017de49301a14b899692b888f7694e979bf1 CRs-Fixed: 1027725 --- core/sme/src/csr/csr_api_roam.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index ae83a030c6b0..dadf022d33f8 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -5266,8 +5266,15 @@ static eCsrJoinState csr_roam_join_next_bss(tpAniSirGlobal mac_ctx, if (!roam_info_ptr) roam_info_ptr = &roam_info; roam_info_ptr->u.pConnectedProfile = &session->connectedProfile; - csr_roam_join_handle_profile(mac_ctx, session_id, cmd, roam_info_ptr, - &roam_state, result, scan_result); + + /* + * result will be null if passed pRoamBssEntry is NULL, which + * indicates we are done with all BSSs in list. + */ + if (result != NULL) + csr_roam_join_handle_profile(mac_ctx, session_id, cmd, + roam_info_ptr, &roam_state, + result, scan_result); end: if ((eCsrStopRoaming == roam_state) && CSR_IS_INFRASTRUCTURE(profile) && (session->bRefAssocStartCnt > 0)) { -- cgit v1.2.3 From 696a930c25f7acbe5d14e68404b8e16a79ba30f8 Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Wed, 15 Jun 2016 11:07:24 -0700 Subject: qcacld-3.0: Fix start BSS failure In function csr_roam_join_handle_profile, add NULL pointer check for "result" after call to csr_roam_select_bss rather than before csr_roam_join_handle_profile, since it is called for BSS role as well. Change-Id: I800891fd66d5c851537968515e43eadbe38a2ae8 CRs-Fixed: 1038237 --- core/sme/src/csr/csr_api_roam.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index dadf022d33f8..a6e6cb86358a 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -5073,7 +5073,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, else ies_local = scan_result->Result.pvIes; - if (scan_result && !ies_local && + if (scan_result && !ies_local && result && (!QDF_IS_STATUS_SUCCESS( csr_get_parsed_bss_description_ies( mac_ctx, @@ -5083,20 +5083,22 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, *roam_state = eCsrStopRoaming; return; } - roam_info_ptr->pBssDesc = &result->BssDescriptor; + if (result) + roam_info_ptr->pBssDesc = &result->BssDescriptor; cmd->u.roamCmd.pLastRoamBss = roam_info_ptr->pBssDesc; /* dont put uapsd_mask if BSS doesn't support uAPSD */ if (scan_result && cmd->u.roamCmd.roamProfile.uapsd_mask && CSR_IS_QOS_BSS(ies_local) && CSR_IS_UAPSD_BSS(ies_local)) { #ifndef WLAN_MDM_CODE_REDUCTION_OPT - acm_mask = sme_qos_get_acm_mask(mac_ctx, + if (result) + acm_mask = sme_qos_get_acm_mask(mac_ctx, &result->BssDescriptor, ies_local); #endif /* WLAN_MDM_CODE_REDUCTION_OPT */ } else { cmd->u.roamCmd.roamProfile.uapsd_mask = 0; } - if (ies_local && !result->pvIes) + if (ies_local && result && !result->pvIes) qdf_mem_free(ies_local); roam_info_ptr->pProfile = profile; session->bRefAssocStartCnt++; @@ -5267,14 +5269,8 @@ static eCsrJoinState csr_roam_join_next_bss(tpAniSirGlobal mac_ctx, roam_info_ptr = &roam_info; roam_info_ptr->u.pConnectedProfile = &session->connectedProfile; - /* - * result will be null if passed pRoamBssEntry is NULL, which - * indicates we are done with all BSSs in list. - */ - if (result != NULL) - csr_roam_join_handle_profile(mac_ctx, session_id, cmd, - roam_info_ptr, &roam_state, - result, scan_result); + csr_roam_join_handle_profile(mac_ctx, session_id, cmd, roam_info_ptr, + &roam_state, result, scan_result); end: if ((eCsrStopRoaming == roam_state) && CSR_IS_INFRASTRUCTURE(profile) && (session->bRefAssocStartCnt > 0)) { -- cgit v1.2.3 From 5de8d176710439d69e9123885a7fce6423c71b2c Mon Sep 17 00:00:00 2001 From: Anurag Chouhan Date: Wed, 13 Jul 2016 14:44:28 +0530 Subject: qcacld-3.0: Add BSS status caching Add BSS status caching to get the BSS Information when disconnect happens. Change-Id: I41b74700b161277bc454d8bb8978f4e1e92faea8 CRs-Fixed: 1013475 --- core/cds/inc/cds_api.h | 26 ++ core/hdd/inc/wlan_hdd_assoc.h | 74 +++ core/hdd/src/wlan_hdd_assoc.c | 532 +++++++++++++++++++++- core/hdd/src/wlan_hdd_cfg80211.c | 4 + core/hdd/src/wlan_hdd_stats.c | 9 + core/mac/inc/ani_global.h | 6 - core/mac/inc/sir_api.h | 13 + core/mac/src/pe/include/lim_session.h | 4 + core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c | 6 + core/mac/src/pe/lim/lim_send_sme_rsp_messages.c | 20 +- core/sme/inc/csr_api.h | 6 + core/sme/src/csr/csr_api_roam.c | 13 +- 12 files changed, 702 insertions(+), 11 deletions(-) diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 9e9774fe99a1..8c3932be2109 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -90,6 +90,32 @@ void cds_set_driver_state(enum cds_driver_state); void cds_clear_driver_state(enum cds_driver_state); enum cds_driver_state cds_get_driver_state(void); +/** + * cds_get_u16()- get 16 bit data in little endian + * @ptr: buffer that holds data + * + * Return: uint16_t data in little endian format + */ +static inline uint16_t cds_get_u16(uint8_t *ptr) +{ + return ((uint16_t) (*(ptr+1) << 8)) | + ((uint16_t) (*ptr)); +} + +/** + * cds_get_u32()- get 32 bit data in little endian + * @ptr: buffer that holds data + * + * Return: uint32_t data in little endian format + */ +static inline uint32_t cds_get_u32(uint8_t *ptr) +{ + return (*(ptr+3) << 24) | + (*(ptr+2) << 16) | + (*(ptr+1) << 8) | + (*(ptr)); +} + /** * cds_is_driver_loading() - Is driver load in progress * diff --git a/core/hdd/inc/wlan_hdd_assoc.h b/core/hdd/inc/wlan_hdd_assoc.h index 78f9005f1d93..24b28711d78e 100644 --- a/core/hdd/inc/wlan_hdd_assoc.h +++ b/core/hdd/inc/wlan_hdd_assoc.h @@ -39,6 +39,8 @@ #include #include "ol_txrx_ctrl_api.h" #include "cdp_txrx_peer_ops.h" +#include +#include /* Preprocessor Definitions and Constants */ #ifdef FEATURE_WLAN_TDLS @@ -92,6 +94,56 @@ typedef enum { ePeerDisconnected } ePeerStatus; +/** + * struct hdd_conn_flag - connection flags + * @ht_present: ht element present or not + * @vht_present: vht element present or not + * @hs20_present: hs20 element present or not + */ +struct hdd_conn_flag { + uint8_t ht_present:1; + uint8_t vht_present:1; + uint8_t hs20_present:1; + uint8_t ht_op_present:1; + uint8_t vht_op_present:1; + uint8_t reserved:3; +}; + +/*defines for tx_BF_cap_info */ +#define TX_BF_CAP_INFO_TX_BF 0x00000001 +#define TX_BF_CAP_INFO_RX_STAG_RED_SOUNDING 0x00000002 +#define TX_BF_CAP_INFO_TX_STAG_RED_SOUNDING 0x00000004 +#define TX_BF_CAP_INFO_RX_ZFL 0x00000008 +#define TX_BF_CAP_INFO_TX_ZFL 0x00000010 +#define TX_BF_CAP_INFO_IMP_TX_BF 0x00000020 +#define TX_BF_CAP_INFO_CALIBRATION 0x000000c0 +#define TX_BF_CAP_INFO_CALIBRATION_SHIFT 6 +#define TX_BF_CAP_INFO_EXP_CSIT_BF 0x00000100 +#define TX_BF_CAP_INFO_EXP_UNCOMP_STEER_MAT 0x00000200 +#define TX_BF_CAP_INFO_EXP_BF_CSI_FB 0x00001c00 +#define TX_BF_CAP_INFO_EXP_BF_CSI_FB_SHIFT 10 +#define TX_BF_CAP_INFO_EXP_UNCMP_STEER_MAT 0x0000e000 +#define TX_BF_CAP_INFO_EXP_UNCMP_STEER_MAT_SHIFT 13 +#define TX_BF_CAP_INFO_EXP_CMP_STEER_MAT_FB 0x00070000 +#define TX_BF_CAP_INFO_EXP_CMP_STEER_MAT_FB_SHIFT 16 +#define TX_BF_CAP_INFO_CSI_NUM_BF_ANT 0x00180000 +#define TX_BF_CAP_INFO_CSI_NUM_BF_ANT_SHIFT 18 +#define TX_BF_CAP_INFO_UNCOMP_STEER_MAT_BF_ANT 0x00600000 +#define TX_BF_CAP_INFO_UNCOMP_STEER_MAT_BF_ANT_SHIFT 20 +#define TX_BF_CAP_INFO_COMP_STEER_MAT_BF_ANT 0x01800000 +#define TX_BF_CAP_INFO_COMP_STEER_MAT_BF_ANT_SHIFT 22 +#define TX_BF_CAP_INFO_RSVD 0xfe000000 + +/* defines for antenna selection info */ +#define ANTENNA_SEL_INFO 0x01 +#define ANTENNA_SEL_INFO_EXP_CSI_FB_TX 0x02 +#define ANTENNA_SEL_INFO_ANT_ID_FB_TX 0x04 +#define ANTENNA_SEL_INFO_EXP_CSI_FB 0x08 +#define ANTENNA_SEL_INFO_ANT_ID_FB 0x10 +#define ANTENNA_SEL_INFO_RX_AS 0x20 +#define ANTENNA_SEL_INFO_TX_SOUNDING_PPDU 0x40 +#define ANTENNA_SEL_INFO_RSVD 0x80 + /** * typedef connection_info_t - structure to store connection information * @connState: connection state of the NIC @@ -115,6 +167,16 @@ typedef enum { * @gtk_installed: gtk installed state * @nss: number of spatial streams negotiated * @rate_flags: rate flags for current connection + * @freq: channel frequency + * @txrate: txrate structure holds nss & datarate info + * @noise: holds noise information + * @ht_caps: holds ht capabilities info + * @vht_caps: holds vht capabilities info + * @hs20vendor_ie: holds passpoint/hs20 info + * @hdd_conn_flag: flag conn info params is present or not + * @roam_count: roaming counter + * @signal: holds rssi info + * @assoc_status_code: holds assoc fail reason */ typedef struct connection_info_s { eConnectionState connState; @@ -135,6 +197,18 @@ typedef struct connection_info_s { bool gtk_installed; uint8_t nss; uint32_t rate_flags; + uint32_t freq; + struct rate_info txrate; + int8_t noise; + struct ieee80211_ht_cap ht_caps; + struct ieee80211_vht_cap vht_caps; + struct hdd_conn_flag conn_flag; + tDot11fIEhs20vendor_ie hs20vendor_ie; + struct ieee80211_ht_operation ht_operation; + struct ieee80211_vht_operation vht_operation; + uint32_t roam_count; + int8_t signal; + int32_t assoc_status_code; } connection_info_t; /* Forward declarations */ diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 06cd0c488df3..103a369d8b14 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -53,6 +53,7 @@ #include "wlan_hdd_lpass.h" #include #include "cds_concurrency.h" +#include #include "sme_power_save_api.h" #include "ol_txrx_ctrl_api.h" #include "ol_txrx_types.h" @@ -375,6 +376,485 @@ static int hdd_add_beacon_filter(hdd_adapter_t *adapter) return 0; } +/** + * hdd_copy_vht_caps()- copy vht caps info from roam info to + * hdd station context. + * @hdd_sta_ctx: pointer to hdd station context + * @roam_info: pointer to roam info + * + * Return: None + */ +static void hdd_copy_ht_caps(hdd_station_ctx_t *hdd_sta_ctx, + tCsrRoamInfo *roam_info) +{ + tDot11fIEHTCaps *roam_ht_cap = &roam_info->ht_caps; + struct ieee80211_ht_cap *hdd_ht_cap = &hdd_sta_ctx->conn_info.ht_caps; + uint32_t i, temp_ht_cap; + + qdf_mem_zero(hdd_ht_cap, sizeof(struct ieee80211_ht_cap)); + + if (roam_ht_cap->advCodingCap) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_LDPC_CODING; + if (roam_ht_cap->supportedChannelWidthSet) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; + temp_ht_cap = roam_ht_cap->mimoPowerSave & + (IEEE80211_HT_CAP_SM_PS >> IEEE80211_HT_CAP_SM_PS_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->cap_info |= + temp_ht_cap << IEEE80211_HT_CAP_SM_PS_SHIFT; + if (roam_ht_cap->greenField) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_GRN_FLD; + if (roam_ht_cap->shortGI20MHz) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_SGI_20; + if (roam_ht_cap->shortGI40MHz) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_SGI_40; + if (roam_ht_cap->txSTBC) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_TX_STBC; + temp_ht_cap = roam_ht_cap->rxSTBC & (IEEE80211_HT_CAP_RX_STBC >> + IEEE80211_HT_CAP_RX_STBC_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->cap_info |= + temp_ht_cap << IEEE80211_HT_CAP_RX_STBC_SHIFT; + if (roam_ht_cap->delayedBA) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_DELAY_BA; + if (roam_ht_cap->maximalAMSDUsize) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_MAX_AMSDU; + if (roam_ht_cap->dsssCckMode40MHz) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_DSSSCCK40; + if (roam_ht_cap->psmp) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_RESERVED; + if (roam_ht_cap->stbcControlFrame) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_40MHZ_INTOLERANT; + if (roam_ht_cap->lsigTXOPProtection) + hdd_ht_cap->cap_info |= IEEE80211_HT_CAP_LSIG_TXOP_PROT; + + /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ + if (roam_ht_cap->maxRxAMPDUFactor) + hdd_ht_cap->ampdu_params_info |= + IEEE80211_HT_AMPDU_PARM_FACTOR; + temp_ht_cap = roam_ht_cap->mpduDensity & + (IEEE80211_HT_AMPDU_PARM_DENSITY >> + IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->ampdu_params_info |= + temp_ht_cap << IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT; + + /* 802.11n HT extended capabilities masks */ + if (roam_ht_cap->pco) + hdd_ht_cap->extended_ht_cap_info |= + IEEE80211_HT_EXT_CAP_PCO; + temp_ht_cap = roam_ht_cap->transitionTime & + (IEEE80211_HT_EXT_CAP_PCO_TIME >> + IEEE80211_HT_EXT_CAP_PCO_TIME_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->extended_ht_cap_info |= + temp_ht_cap << IEEE80211_HT_EXT_CAP_PCO_TIME_SHIFT; + temp_ht_cap = roam_ht_cap->mcsFeedback & + (IEEE80211_HT_EXT_CAP_MCS_FB >> IEEE80211_HT_EXT_CAP_MCS_FB_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->extended_ht_cap_info |= + temp_ht_cap << IEEE80211_HT_EXT_CAP_MCS_FB_SHIFT; + + /* tx_bf_cap_info capabilities */ + if (roam_ht_cap->txBF) + hdd_ht_cap->tx_BF_cap_info |= TX_BF_CAP_INFO_TX_BF; + if (roam_ht_cap->rxStaggeredSounding) + hdd_ht_cap->tx_BF_cap_info |= + TX_BF_CAP_INFO_RX_STAG_RED_SOUNDING; + if (roam_ht_cap->txStaggeredSounding) + hdd_ht_cap->tx_BF_cap_info |= + TX_BF_CAP_INFO_TX_STAG_RED_SOUNDING; + if (roam_ht_cap->rxZLF) + hdd_ht_cap->tx_BF_cap_info |= TX_BF_CAP_INFO_RX_ZFL; + if (roam_ht_cap->txZLF) + hdd_ht_cap->tx_BF_cap_info |= TX_BF_CAP_INFO_TX_ZFL; + if (roam_ht_cap->implicitTxBF) + hdd_ht_cap->tx_BF_cap_info |= TX_BF_CAP_INFO_IMP_TX_BF; + temp_ht_cap = roam_ht_cap->calibration & + (TX_BF_CAP_INFO_CALIBRATION >> TX_BF_CAP_INFO_CALIBRATION_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->tx_BF_cap_info |= + temp_ht_cap << TX_BF_CAP_INFO_CALIBRATION_SHIFT; + if (roam_ht_cap->explicitCSITxBF) + hdd_ht_cap->tx_BF_cap_info |= TX_BF_CAP_INFO_EXP_CSIT_BF; + if (roam_ht_cap->explicitUncompressedSteeringMatrix) + hdd_ht_cap->tx_BF_cap_info |= + TX_BF_CAP_INFO_EXP_UNCOMP_STEER_MAT; + temp_ht_cap = roam_ht_cap->explicitBFCSIFeedback & + (TX_BF_CAP_INFO_EXP_BF_CSI_FB >> + TX_BF_CAP_INFO_EXP_BF_CSI_FB_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->tx_BF_cap_info |= + temp_ht_cap << TX_BF_CAP_INFO_EXP_BF_CSI_FB_SHIFT; + temp_ht_cap = + roam_ht_cap->explicitUncompressedSteeringMatrixFeedback & + (TX_BF_CAP_INFO_EXP_UNCMP_STEER_MAT >> + TX_BF_CAP_INFO_EXP_UNCMP_STEER_MAT_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->tx_BF_cap_info |= + temp_ht_cap << + TX_BF_CAP_INFO_EXP_UNCMP_STEER_MAT_SHIFT; + temp_ht_cap = + roam_ht_cap->explicitCompressedSteeringMatrixFeedback & + (TX_BF_CAP_INFO_EXP_CMP_STEER_MAT_FB >> + TX_BF_CAP_INFO_EXP_CMP_STEER_MAT_FB_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->tx_BF_cap_info |= + temp_ht_cap << + TX_BF_CAP_INFO_EXP_CMP_STEER_MAT_FB_SHIFT; + temp_ht_cap = roam_ht_cap->csiNumBFAntennae & + (TX_BF_CAP_INFO_CSI_NUM_BF_ANT >> + TX_BF_CAP_INFO_CSI_NUM_BF_ANT_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->tx_BF_cap_info |= + temp_ht_cap << TX_BF_CAP_INFO_CSI_NUM_BF_ANT_SHIFT; + temp_ht_cap = roam_ht_cap->uncompressedSteeringMatrixBFAntennae & + (TX_BF_CAP_INFO_UNCOMP_STEER_MAT_BF_ANT >> + TX_BF_CAP_INFO_UNCOMP_STEER_MAT_BF_ANT_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->tx_BF_cap_info |= + temp_ht_cap << + TX_BF_CAP_INFO_UNCOMP_STEER_MAT_BF_ANT_SHIFT; + temp_ht_cap = roam_ht_cap->compressedSteeringMatrixBFAntennae & + (TX_BF_CAP_INFO_COMP_STEER_MAT_BF_ANT >> + TX_BF_CAP_INFO_COMP_STEER_MAT_BF_ANT_SHIFT); + if (temp_ht_cap) + hdd_ht_cap->tx_BF_cap_info |= + temp_ht_cap << + TX_BF_CAP_INFO_COMP_STEER_MAT_BF_ANT_SHIFT; + + /* antenna selection */ + if (roam_ht_cap->antennaSelection) + hdd_ht_cap->antenna_selection_info |= ANTENNA_SEL_INFO; + if (roam_ht_cap->explicitCSIFeedbackTx) + hdd_ht_cap->antenna_selection_info |= + ANTENNA_SEL_INFO_EXP_CSI_FB_TX; + if (roam_ht_cap->antennaIndicesFeedbackTx) + hdd_ht_cap->antenna_selection_info |= + ANTENNA_SEL_INFO_ANT_ID_FB_TX; + if (roam_ht_cap->explicitCSIFeedback) + hdd_ht_cap->antenna_selection_info |= + ANTENNA_SEL_INFO_EXP_CSI_FB; + if (roam_ht_cap->antennaIndicesFeedback) + hdd_ht_cap->antenna_selection_info |= + ANTENNA_SEL_INFO_ANT_ID_FB; + if (roam_ht_cap->rxAS) + hdd_ht_cap->antenna_selection_info |= + ANTENNA_SEL_INFO_RX_AS; + if (roam_ht_cap->txSoundingPPDUs) + hdd_ht_cap->antenna_selection_info |= + ANTENNA_SEL_INFO_TX_SOUNDING_PPDU; + + /* mcs data rate */ + for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; ++i) + hdd_ht_cap->mcs.rx_mask[i] = + roam_ht_cap->supportedMCSSet[i]; + hdd_ht_cap->mcs.rx_highest = + ((short) (roam_ht_cap->supportedMCSSet[11]) << 8) | + ((short) (roam_ht_cap->supportedMCSSet[10])); + hdd_ht_cap->mcs.tx_params = + roam_ht_cap->supportedMCSSet[12]; +} + +#define VHT_CAP_MAX_MPDU_LENGTH_MASK 0x00000003 +#define VHT_CAP_SUPP_CHAN_WIDTH_MASK_SHIFT 2 +#define VHT_CAP_RXSTBC_MASK_SHIFT 8 +#define VHT_CAP_BEAMFORMEE_STS_SHIFT 13 +#define VHT_CAP_BEAMFORMEE_STS_MASK \ + (0x0000e000 >> VHT_CAP_BEAMFORMEE_STS_SHIFT) +#define VHT_CAP_SOUNDING_DIMENSIONS_SHIFT 16 +#define VHT_CAP_SOUNDING_DIMENSIONS_MASK \ + (0x00070000 >> VHT_CAP_SOUNDING_DIMENSIONS_SHIFT) +#define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK_SHIFT 23 +#define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK \ + (0x03800000 >> VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK_SHIFT) +#define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB_SHIFT 26 + +/** + * hdd_copy_ht_caps()- copy ht caps info from roam info to + * hdd station context. + * @hdd_sta_ctx: pointer to hdd station context + * @roam_info: pointer to roam info + * + * Return: None + */ +static void hdd_copy_vht_caps(hdd_station_ctx_t *hdd_sta_ctx, + tCsrRoamInfo *roam_info) +{ + tDot11fIEVHTCaps *roam_vht_cap = &roam_info->vht_caps; + struct ieee80211_vht_cap *hdd_vht_cap = + &hdd_sta_ctx->conn_info.vht_caps; + uint32_t temp_vht_cap; + + qdf_mem_zero(hdd_vht_cap, sizeof(struct ieee80211_vht_cap)); + + temp_vht_cap = roam_vht_cap->maxMPDULen & VHT_CAP_MAX_MPDU_LENGTH_MASK; + hdd_vht_cap->vht_cap_info |= temp_vht_cap; + temp_vht_cap = roam_vht_cap->supportedChannelWidthSet & + (IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK >> + VHT_CAP_SUPP_CHAN_WIDTH_MASK_SHIFT); + if (temp_vht_cap) + if (roam_vht_cap->supportedChannelWidthSet & + (IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ >> + VHT_CAP_SUPP_CHAN_WIDTH_MASK_SHIFT)) + hdd_vht_cap->vht_cap_info |= + temp_vht_cap << + IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ; + if (roam_vht_cap->supportedChannelWidthSet & + (IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ >> + VHT_CAP_SUPP_CHAN_WIDTH_MASK_SHIFT)) + hdd_vht_cap->vht_cap_info |= + temp_vht_cap << + IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; + if (roam_vht_cap->ldpcCodingCap) + hdd_vht_cap->vht_cap_info |= IEEE80211_VHT_CAP_RXLDPC; + if (roam_vht_cap->shortGI80MHz) + hdd_vht_cap->vht_cap_info |= IEEE80211_VHT_CAP_SHORT_GI_80; + if (roam_vht_cap->shortGI160and80plus80MHz) + hdd_vht_cap->vht_cap_info |= IEEE80211_VHT_CAP_SHORT_GI_160; + if (roam_vht_cap->txSTBC) + hdd_vht_cap->vht_cap_info |= IEEE80211_VHT_CAP_TXSTBC; + temp_vht_cap = roam_vht_cap->rxSTBC & (IEEE80211_VHT_CAP_RXSTBC_MASK >> + VHT_CAP_RXSTBC_MASK_SHIFT); + if (temp_vht_cap) + hdd_vht_cap->vht_cap_info |= + temp_vht_cap << VHT_CAP_RXSTBC_MASK_SHIFT; + if (roam_vht_cap->suBeamFormerCap) + hdd_vht_cap->vht_cap_info |= + IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE; + if (roam_vht_cap->suBeamformeeCap) + hdd_vht_cap->vht_cap_info |= + IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE; + temp_vht_cap = roam_vht_cap->csnofBeamformerAntSup & + (VHT_CAP_BEAMFORMEE_STS_MASK); + if (temp_vht_cap) + hdd_vht_cap->vht_cap_info |= + temp_vht_cap << VHT_CAP_BEAMFORMEE_STS_SHIFT; + temp_vht_cap = roam_vht_cap->numSoundingDim & + (VHT_CAP_SOUNDING_DIMENSIONS_MASK); + if (temp_vht_cap) + hdd_vht_cap->vht_cap_info |= + temp_vht_cap << VHT_CAP_SOUNDING_DIMENSIONS_SHIFT; + if (roam_vht_cap->muBeamformerCap) + hdd_vht_cap->vht_cap_info |= + IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE; + if (roam_vht_cap->muBeamformeeCap) + hdd_vht_cap->vht_cap_info |= + IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE; + if (roam_vht_cap->vhtTXOPPS) + hdd_vht_cap->vht_cap_info |= + IEEE80211_VHT_CAP_VHT_TXOP_PS; + if (roam_vht_cap->htcVHTCap) + hdd_vht_cap->vht_cap_info |= + IEEE80211_VHT_CAP_HTC_VHT; + temp_vht_cap = roam_vht_cap->maxAMPDULenExp & + (VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK); + if (temp_vht_cap) + hdd_vht_cap->vht_cap_info |= + temp_vht_cap << + VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK_SHIFT; + temp_vht_cap = roam_vht_cap->vhtLinkAdaptCap & + (IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB >> + VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB_SHIFT); + if (temp_vht_cap) + hdd_vht_cap->vht_cap_info |= temp_vht_cap << + VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB_SHIFT; + if (roam_vht_cap->rxAntPattern) + hdd_vht_cap->vht_cap_info |= + IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN; + if (roam_vht_cap->txAntPattern) + hdd_vht_cap->vht_cap_info |= + IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN; + hdd_vht_cap->supp_mcs.rx_mcs_map = roam_vht_cap->rxMCSMap; + hdd_vht_cap->supp_mcs.rx_highest = + ((uint16_t)roam_vht_cap->rxHighSupDataRate); + hdd_vht_cap->supp_mcs.tx_mcs_map = roam_vht_cap->txMCSMap; + hdd_vht_cap->supp_mcs.tx_highest = + ((uint16_t)roam_vht_cap->txSupDataRate); +} + +/* ht param */ +#define HT_PARAM_CONTROLLED_ACCESS_ONLY 0x10 +#define HT_PARAM_SERVICE_INT_GRAN 0xe0 +#define HT_PARAM_SERVICE_INT_GRAN_SHIFT 5 + +/* operatinon mode */ +#define HT_OP_MODE_TX_BURST_LIMIT 0x0008 + +/* stbc_param */ +#define HT_STBC_PARAM_MCS 0x007f + +/** + * hdd_copy_ht_operation()- copy HT operation element from roam info to + * hdd station context. + * @hdd_sta_ctx: pointer to hdd station context + * @roam_info: pointer to roam info + * + * Return: None + */ +static void hdd_copy_ht_operation(hdd_station_ctx_t *hdd_sta_ctx, + tCsrRoamInfo *roam_info) +{ + tDot11fIEHTInfo *roam_ht_ops = &roam_info->ht_operation; + struct ieee80211_ht_operation *hdd_ht_ops = + &hdd_sta_ctx->conn_info.ht_operation; + uint32_t i, temp_ht_ops; + + qdf_mem_zero(hdd_ht_ops, sizeof(struct ieee80211_ht_operation)); + + hdd_ht_ops->primary_chan = roam_ht_ops->primaryChannel; + + /* HT_PARAMS */ + temp_ht_ops = roam_ht_ops->secondaryChannelOffset & + IEEE80211_HT_PARAM_CHA_SEC_OFFSET; + if (temp_ht_ops) + hdd_ht_ops->ht_param |= temp_ht_ops; + else + hdd_ht_ops->ht_param = IEEE80211_HT_PARAM_CHA_SEC_NONE; + if (roam_ht_ops->recommendedTxWidthSet) + hdd_ht_ops->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY; + if (roam_ht_ops->rifsMode) + hdd_ht_ops->ht_param |= IEEE80211_HT_PARAM_RIFS_MODE; + if (roam_ht_ops->controlledAccessOnly) + hdd_ht_ops->ht_param |= HT_PARAM_CONTROLLED_ACCESS_ONLY; + temp_ht_ops = roam_ht_ops->serviceIntervalGranularity & + (HT_PARAM_SERVICE_INT_GRAN >> HT_PARAM_SERVICE_INT_GRAN_SHIFT); + if (temp_ht_ops) + hdd_ht_ops->ht_param |= temp_ht_ops << + HT_PARAM_SERVICE_INT_GRAN_SHIFT; + + /* operation mode */ + temp_ht_ops = roam_ht_ops->opMode & + IEEE80211_HT_OP_MODE_PROTECTION; + switch (temp_ht_ops) { + case IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER: + hdd_ht_ops->operation_mode |= + IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER; + break; + case IEEE80211_HT_OP_MODE_PROTECTION_20MHZ: + hdd_ht_ops->operation_mode |= + IEEE80211_HT_OP_MODE_PROTECTION_20MHZ; + break; + case IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED: + hdd_ht_ops->operation_mode |= + IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED; + break; + case IEEE80211_HT_OP_MODE_PROTECTION_NONE: + default: + hdd_ht_ops->operation_mode |= + IEEE80211_HT_OP_MODE_PROTECTION_NONE; + } + if (roam_ht_ops->nonGFDevicesPresent) + hdd_ht_ops->operation_mode |= + IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT; + if (roam_ht_ops->transmitBurstLimit) + hdd_ht_ops->operation_mode |= + HT_OP_MODE_TX_BURST_LIMIT; + if (roam_ht_ops->obssNonHTStaPresent) + hdd_ht_ops->operation_mode |= + IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT; + + /* stbc_param */ + temp_ht_ops = roam_ht_ops->basicSTBCMCS & + HT_STBC_PARAM_MCS; + if (temp_ht_ops) + hdd_ht_ops->stbc_param |= temp_ht_ops; + if (roam_ht_ops->dualCTSProtection) + hdd_ht_ops->stbc_param |= + IEEE80211_HT_STBC_PARAM_DUAL_CTS_PROT; + if (roam_ht_ops->secondaryBeacon) + hdd_ht_ops->stbc_param |= + IEEE80211_HT_STBC_PARAM_STBC_BEACON; + if (roam_ht_ops->lsigTXOPProtectionFullSupport) + hdd_ht_ops->stbc_param |= + IEEE80211_HT_STBC_PARAM_LSIG_TXOP_FULLPROT; + if (roam_ht_ops->pcoActive) + hdd_ht_ops->stbc_param |= + IEEE80211_HT_STBC_PARAM_PCO_ACTIVE; + if (roam_ht_ops->pcoPhase) + hdd_ht_ops->stbc_param |= + IEEE80211_HT_STBC_PARAM_PCO_PHASE; + + /* basic MCs set */ + for (i = 0; i < 16; ++i) + hdd_ht_ops->basic_set[i] = + roam_ht_ops->basicMCSSet[i]; +} + +/** + * hdd_copy_vht_operation()- copy VHT operations element from roam info to + * hdd station context. + * @hdd_sta_ctx: pointer to hdd station context + * @roam_info: pointer to roam info + * + * Return: None + */ +static void hdd_copy_vht_operation(hdd_station_ctx_t *hdd_sta_ctx, + tCsrRoamInfo *roam_info) +{ + tDot11fIEVHTOperation *roam_vht_ops = &roam_info->vht_operation; + struct ieee80211_vht_operation *hdd_vht_ops = + &hdd_sta_ctx->conn_info.vht_operation; + + qdf_mem_zero(hdd_vht_ops, sizeof(struct ieee80211_vht_operation)); + + hdd_vht_ops->chan_width = roam_vht_ops->chanWidth; + hdd_vht_ops->center_freq_seg1_idx = roam_vht_ops->chanCenterFreqSeg1; + hdd_vht_ops->center_freq_seg2_idx = roam_vht_ops->chanCenterFreqSeg2; + hdd_vht_ops->basic_mcs_set = roam_vht_ops->basicMCSSet; +} + + +/** + * hdd_save_bss_info() - save connection info in hdd sta ctx + * @adapter: Pointer to adapter + * @roam_info: pointer to roam info + * + * Return: None + */ +static void hdd_save_bss_info(hdd_adapter_t *adapter, + tCsrRoamInfo *roam_info) +{ + hdd_station_ctx_t *hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + + hdd_sta_ctx->conn_info.freq = cds_chan_to_freq( + hdd_sta_ctx->conn_info.operationChannel); + if (roam_info->vht_caps.present) { + hdd_sta_ctx->conn_info.conn_flag.vht_present = true; + hdd_copy_vht_caps(hdd_sta_ctx, roam_info); + } else { + hdd_sta_ctx->conn_info.conn_flag.vht_present = false; + } + if (roam_info->ht_caps.present) { + hdd_sta_ctx->conn_info.conn_flag.ht_present = true; + hdd_copy_ht_caps(hdd_sta_ctx, roam_info); + } else { + hdd_sta_ctx->conn_info.conn_flag.ht_present = false; + } + if (roam_info->reassoc) + hdd_sta_ctx->conn_info.roam_count++; + if (roam_info->hs20vendor_ie.present) { + hdd_sta_ctx->conn_info.conn_flag.hs20_present = true; + qdf_mem_copy(&hdd_sta_ctx->conn_info.hs20vendor_ie, + &roam_info->hs20vendor_ie, + sizeof(roam_info->hs20vendor_ie)); + } else { + hdd_sta_ctx->conn_info.conn_flag.hs20_present = false; + } + if (roam_info->ht_operation.present) { + hdd_sta_ctx->conn_info.conn_flag.ht_op_present = true; + hdd_copy_ht_operation(hdd_sta_ctx, roam_info); + } else { + hdd_sta_ctx->conn_info.conn_flag.ht_op_present = false; + } + if (roam_info->vht_operation.present) { + hdd_sta_ctx->conn_info.conn_flag.vht_op_present = true; + hdd_copy_vht_operation(hdd_sta_ctx, roam_info); + } else { + hdd_sta_ctx->conn_info.conn_flag.vht_op_present = false; + } +} + /** * hdd_conn_save_connect_info() - save current connection information * @pAdapter: pointer to adapter @@ -459,6 +939,7 @@ hdd_conn_save_connect_info(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, pHddStaCtx->conn_info.rate_flags = pRoamInfo->chan_info.rate_flags; } + hdd_save_bss_info(pAdapter, pRoamInfo); } /* save the connected BssType */ hdd_conn_save_connected_bss_type(pHddStaCtx, eBssType); @@ -1013,6 +1494,51 @@ QDF_STATUS hdd_roam_deregister_sta(hdd_adapter_t *pAdapter, uint8_t staId) return qdf_status; } +/** + * hdd_print_bss_info() - print bss info + * @hdd_sta_ctx: pointer to hdd station context + * + * Return: None + */ +void hdd_print_bss_info(hdd_station_ctx_t *hdd_sta_ctx) +{ + uint32_t *cap_info; + + hdd_info("WIFI DATA LOGGER"); + hdd_info("channel: %d", + hdd_sta_ctx->conn_info.freq); + hdd_info("dot11mode: %d", + hdd_sta_ctx->conn_info.dot11Mode); + hdd_info("AKM: %d", + hdd_sta_ctx->conn_info.authType); + hdd_info("ssid: %.*s", + hdd_sta_ctx->conn_info.SSID.SSID.length, + hdd_sta_ctx->conn_info.SSID.SSID.ssId); + hdd_info("roam count: %d", + hdd_sta_ctx->conn_info.roam_count); + hdd_info("ant_info: %d", + hdd_sta_ctx->conn_info.txrate.nss); + hdd_info("datarate legacy %d", + hdd_sta_ctx->conn_info.txrate.legacy); + hdd_info("datarate mcs: %d", + hdd_sta_ctx->conn_info.txrate.mcs); + if (hdd_sta_ctx->conn_info.conn_flag.ht_present) { + cap_info = (uint32_t *)&hdd_sta_ctx->conn_info.ht_caps; + hdd_info("ht caps: %x", *cap_info); + } + if (hdd_sta_ctx->conn_info.conn_flag.vht_present) { + cap_info = (uint32_t *)&hdd_sta_ctx->conn_info.vht_caps; + hdd_info("vht caps: %x", *cap_info); + } + if (hdd_sta_ctx->conn_info.conn_flag.hs20_present) + hdd_info("hs20 info: %x", + hdd_sta_ctx->conn_info.hs20vendor_ie.release_num); + hdd_info("signal: %d", + hdd_sta_ctx->conn_info.signal); + hdd_info("noise: %d", + hdd_sta_ctx->conn_info.noise); +} + /** * hdd_dis_connect_handler() - disconnect event handler * @pAdapter: pointer to adapter @@ -1220,6 +1746,7 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter, } /* Unblock anyone waiting for disconnect to complete */ complete(&pAdapter->disconnect_comp_var); + hdd_print_bss_info(pHddStaCtx); return status; } @@ -2287,7 +2814,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, */ if (eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus && !hddDisconInProgress) { - if (pRoamInfo) + if (pRoamInfo) { hddLog(LOGE, FL("send connect failure to nl80211: for bssid " MAC_ADDRESS_STR @@ -2295,6 +2822,9 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, MAC_ADDR_ARRAY(pRoamInfo->bssid.bytes), roamResult, roamStatus, pRoamInfo->reasonCode); + pHddStaCtx->conn_info.assoc_status_code = + pRoamInfo->statusCode; + } else hddLog(LOGE, FL("connect failed: for bssid " diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index e27a1a3b803f..d6b5046b4f33 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -8905,6 +8905,7 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, int status = 0; hdd_wext_state_t *pWextState; hdd_context_t *pHddCtx; + hdd_station_ctx_t *hdd_sta_ctx; uint32_t roamId; tCsrRoamProfile *pRoamProfile; eCsrAuthType RSNAuthType; @@ -8914,6 +8915,7 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter); pHddCtx = WLAN_HDD_GET_CTX(pAdapter); + hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); status = wlan_hdd_validate_context(pHddCtx); if (status) @@ -8925,6 +8927,8 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, } pRoamProfile = &pWextState->roamProfile; + qdf_mem_zero(&hdd_sta_ctx->conn_info, + sizeof(hdd_sta_ctx->conn_info)); if (pRoamProfile) { hdd_station_ctx_t *pHddStaCtx; diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 52643ccb58ba..c91d516226a2 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -1657,6 +1657,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, uint8_t MCSRates[SIZE_OF_BASIC_MCS_SET]; uint32_t MCSLeng = SIZE_OF_BASIC_MCS_SET; uint16_t maxRate = 0; + int8_t snr = 0; uint16_t myRate; uint16_t currentRate = 0; uint8_t maxSpeedMCS = 0; @@ -1697,6 +1698,11 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, return status; wlan_hdd_get_rssi(pAdapter, &sinfo->signal); + wlan_hdd_get_snr(pAdapter, &snr); + pHddStaCtx->conn_info.signal = sinfo->signal; + pHddStaCtx->conn_info.noise = + pHddStaCtx->conn_info.signal - snr; + #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS) sinfo->filled |= STATION_INFO_SIGNAL; #else @@ -2110,6 +2116,9 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, sinfo->rx_bytes = pAdapter->stats.rx_bytes; sinfo->rx_packets = pAdapter->stats.rx_packets; + qdf_mem_copy(&pHddStaCtx->conn_info.txrate, + &sinfo->txrate, sizeof(sinfo->txrate)); + #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS) sinfo->filled |= STATION_INFO_TX_BITRATE | STATION_INFO_TX_BYTES | diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index 8807263bf80d..cd786eac3f21 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -28,12 +28,6 @@ #ifndef _ANIGLOBAL_H #define _ANIGLOBAL_H -/* Take care to avoid redefinition of this type, if it is */ -/* already defined in "halWmmApi.h" */ -#if !defined(_HALMAC_WMM_API_H) -typedef struct sAniSirGlobal *tpAniSirGlobal; -#endif - #include "qdf_types.h" #include "sir_common.h" #include "ani_system_defs.h" diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 210550560588..a7e85efd5185 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -38,6 +38,13 @@ #ifndef __SIR_API_H #define __SIR_API_H + +/* Take care to avoid redefinition of this type, if it is */ +/* already defined in "halWmmApi.h" */ +#if !defined(_HALMAC_WMM_API_H) +typedef struct sAniSirGlobal *tpAniSirGlobal; +#endif + #include "qdf_types.h" #include "cds_reg_service.h" #include "cds_regdomain.h" @@ -47,6 +54,7 @@ #include "sir_params.h" #include "cds_regdomain.h" #include "wmi_unified_param.h" +#include #define OFFSET_OF(structType, fldName) (&((structType *)0)->fldName) @@ -1163,6 +1171,11 @@ typedef struct sSirSmeJoinRsp { tSirSmeHTProfile HTProfile; #endif bool supported_nss_1x1; + tDot11fIEHTCaps ht_caps; + tDot11fIEVHTCaps vht_caps; + tDot11fIEHTInfo ht_operation; + tDot11fIEVHTOperation vht_operation; + tDot11fIEhs20vendor_ie hs20vendor_ie; uint8_t frames[1]; } tSirSmeJoinRsp, *tpSirSmeJoinRsp; diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index 8f3f118cd429..aeb7d5f33e74 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -479,6 +479,10 @@ typedef struct sPESession /* Added to Support BT-AMP */ /* Supported NSS is intersection of self and peer NSS */ bool supported_nss_1x1; bool is_ext_caps_present; + tDot11fIEHTCaps ht_caps; + tDot11fIEVHTCaps vht_caps; + tDot11fIEHTInfo ht_operation; + tDot11fIEVHTOperation vht_operation; } tPESession, *tpPESession; /*------------------------------------------------------------------------- diff --git a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c index c6d9d70a9a25..573a2884da00 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c @@ -973,6 +973,12 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, ie_len, beacon); + session_entry->vht_caps = beacon->VHTCaps; + session_entry->ht_caps = beacon->HTCaps; + session_entry->hs20vendor_ie = beacon->hs20vendor_ie; + session_entry->ht_operation = beacon->HTInfo; + session_entry->vht_operation = beacon->VHTOperation; + if (mac_ctx->lim.gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE) lim_decide_sta_protection_on_assoc(mac_ctx, beacon, diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c index eab94390b401..9f6413fdec0d 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c @@ -388,6 +388,24 @@ static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx, #endif } } + +/** + * lim_add_bss_info() - copy data from session entry to join rsp + * @session_entry: PE Session Info + * @sme_join_rsp: Join response buffer to be filled up + * + * Return: None + */ +void lim_add_bss_info(tpPESession session_entry, + tpSirSmeJoinRsp sme_join_rsp) +{ + sme_join_rsp->hs20vendor_ie = session_entry->hs20vendor_ie; + sme_join_rsp->vht_caps = session_entry->vht_caps; + sme_join_rsp->ht_caps = session_entry->ht_caps; + sme_join_rsp->ht_operation = session_entry->ht_operation; + sme_join_rsp->vht_operation = session_entry->vht_operation; +} + /** * lim_send_sme_join_reassoc_rsp() - Send Response to Upper Layers * @mac_ctx: Pointer to Global MAC structure @@ -489,7 +507,7 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type, #ifdef FEATURE_WLAN_ESE sme_join_rsp->tspecIeLen = 0; #endif - + lim_add_bss_info(session_entry, sme_join_rsp); lim_handle_join_rsp_status(mac_ctx, session_entry, result_code, sme_join_rsp); diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index de7d011d7a98..266e5a0337bf 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1393,6 +1393,12 @@ typedef struct tagCsrRoamInfo { struct ndi_delete_rsp ndi_delete_params; } ndp; #endif + tDot11fIEHTCaps ht_caps; + tDot11fIEVHTCaps vht_caps; + tDot11fIEhs20vendor_ie hs20vendor_ie; + tDot11fIEVHTOperation vht_operation; + tDot11fIEHTInfo ht_operation; + bool reassoc; } tCsrRoamInfo; typedef struct tagCsrFreqScanInfo { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index a6e6cb86358a..6b1628ca7572 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -6509,10 +6509,13 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, session = CSR_GET_SESSION(mac_ctx, session_id); conn_profile = &session->connectedProfile; - if (eCsrReassocSuccess == res) + if (eCsrReassocSuccess == res) { + roam_info.reassoc = true; ind_qos = SME_QOS_CSR_REASSOC_COMPLETE; - else + } else { + roam_info.reassoc = false; ind_qos = SME_QOS_CSR_ASSOC_COMPLETE; + } sms_log(mac_ctx, LOGW, FL("receives association indication")); qdf_mem_set(&roam_info, sizeof(roam_info), 0); /* always free the memory here */ @@ -6760,6 +6763,11 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, csr_roam_copy_ht_profile(dst_profile, src_profile); #endif + roam_info.vht_caps = join_rsp->vht_caps; + roam_info.ht_caps = join_rsp->ht_caps; + roam_info.hs20vendor_ie = join_rsp->hs20vendor_ie; + roam_info.ht_operation = join_rsp->ht_operation; + roam_info.vht_operation = join_rsp->vht_operation; } else { if (cmd->u.roamCmd.fReassoc) { roam_info.fReassocReq = @@ -6774,7 +6782,6 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, session->connectedInfo.pbFrames; } } - /* * Update the staId from the previous connected profile info * as the reassociation is triggred at SME/HDD -- cgit v1.2.3 From 96919486f610eda5f96cb65c88e51b1025f14524 Mon Sep 17 00:00:00 2001 From: Anurag Chouhan Date: Wed, 13 Jul 2016 16:36:57 +0530 Subject: qcacld-3.0: Add vendor command for extra BSS information Add Vendor Commands to send BSS Information and ASSOC failure to supplicant. Change-Id: I5b64d9942a54d35eac0f08b4d8fbed9d1d66a504 CRs-Fixed: 1042226 --- core/hdd/src/wlan_hdd_cfg80211.c | 538 +++++++++++++++++++++++++++++++++++++++ core/hdd/src/wlan_hdd_cfg80211.h | 146 +++++++++++ 2 files changed, 684 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index d6b5046b4f33..af6bd9b9bc32 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -2880,6 +2880,536 @@ static int wlan_hdd_cfg80211_handle_wisa_cmd(struct wiphy *wiphy, return ret; } +/* + * define short names for the global vendor params + * used by __wlan_hdd_cfg80211_get_station_cmd() + */ +#define STATION_INVALID \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INVALID +#define STATION_INFO \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO +#define STATION_ASSOC_FAIL_REASON \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_ASSOC_FAIL_REASON +#define STATION_MAX \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_MAX + +static const struct nla_policy +hdd_get_station_policy[STATION_MAX + 1] = { + [STATION_INFO] = {.type = NLA_FLAG}, + [STATION_ASSOC_FAIL_REASON] = {.type = NLA_FLAG}, +}; + +/** + * hdd_get_station_assoc_fail() - Handle get station assoc fail + * @hdd_ctx: HDD context within host driver + * @wdev: wireless device + * + * Handles QCA_NL80211_VENDOR_SUBCMD_GET_STATION_ASSOC_FAIL. + * Validate cmd attributes and send the station info to upper layers. + * + * Return: Success(0) or reason code for failure + */ +static int hdd_get_station_assoc_fail(hdd_context_t *hdd_ctx, + hdd_adapter_t *adapter) +{ + struct sk_buff *skb = NULL; + uint32_t nl_buf_len; + hdd_station_ctx_t *hdd_sta_ctx; + + nl_buf_len = NLMSG_HDRLEN; + nl_buf_len += sizeof(uint32_t); + skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len); + + if (!skb) { + hdd_err("cfg80211_vendor_cmd_alloc_reply_skb failed"); + return -ENOMEM; + } + + hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + + if (nla_put_u32(skb, INFO_ASSOC_FAIL_REASON, + hdd_sta_ctx->conn_info.assoc_status_code)) { + hdd_err("put fail"); + goto fail; + } + return cfg80211_vendor_cmd_reply(skb); +fail: + if (skb) + kfree_skb(skb); + return -EINVAL; +} + +/** + * hdd_map_auth_type() - transform auth type specific to + * vendor command + * @auth_type: csr auth type + * + * Return: Success(0) or reason code for failure + */ +static int hdd_convert_auth_type(uint32_t auth_type) +{ + uint32_t ret_val; + + switch (auth_type) { + case eCSR_AUTH_TYPE_OPEN_SYSTEM: + ret_val = QCA_WLAN_AUTH_TYPE_OPEN; + break; + case eCSR_AUTH_TYPE_SHARED_KEY: + ret_val = QCA_WLAN_AUTH_TYPE_SHARED; + break; + case eCSR_AUTH_TYPE_WPA: + ret_val = QCA_WLAN_AUTH_TYPE_WPA; + break; + case eCSR_AUTH_TYPE_WPA_PSK: + ret_val = QCA_WLAN_AUTH_TYPE_WPA_PSK; + break; + case eCSR_AUTH_TYPE_AUTOSWITCH: + ret_val = QCA_WLAN_AUTH_TYPE_AUTOSWITCH; + break; + case eCSR_AUTH_TYPE_WPA_NONE: + ret_val = QCA_WLAN_AUTH_TYPE_WPA_NONE; + break; + case eCSR_AUTH_TYPE_RSN: + ret_val = QCA_WLAN_AUTH_TYPE_RSN; + break; + case eCSR_AUTH_TYPE_RSN_PSK: + ret_val = QCA_WLAN_AUTH_TYPE_RSN_PSK; + break; + case eCSR_AUTH_TYPE_FT_RSN: + ret_val = QCA_WLAN_AUTH_TYPE_FT; + break; + case eCSR_AUTH_TYPE_FT_RSN_PSK: + ret_val = QCA_WLAN_AUTH_TYPE_FT_PSK; + break; + case eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE: + ret_val = QCA_WLAN_AUTH_TYPE_WAI; + break; + case eCSR_AUTH_TYPE_WAPI_WAI_PSK: + ret_val = QCA_WLAN_AUTH_TYPE_WAI_PSK; + break; + case eCSR_AUTH_TYPE_CCKM_WPA: + ret_val = QCA_WLAN_AUTH_TYPE_CCKM_WPA; + break; + case eCSR_AUTH_TYPE_CCKM_RSN: + ret_val = QCA_WLAN_AUTH_TYPE_CCKM_RSN; + break; + case eCSR_AUTH_TYPE_RSN_PSK_SHA256: + ret_val = QCA_WLAN_AUTH_TYPE_SHA256_PSK; + break; + case eCSR_AUTH_TYPE_RSN_8021X_SHA256: + ret_val = QCA_WLAN_AUTH_TYPE_SHA256; + break; + case eCSR_NUM_OF_SUPPORT_AUTH_TYPE: + case eCSR_AUTH_TYPE_FAILED: + case eCSR_AUTH_TYPE_NONE: + default: + ret_val = QCA_WLAN_AUTH_TYPE_INVALID; + break; + } + return ret_val; +} + +/** + * hdd_map_dot_11_mode() - transform dot11mode type specific to + * vendor command + * @dot11mode: dot11mode + * + * Return: Success(0) or reason code for failure + */ +static int hdd_convert_dot11mode(uint32_t dot11mode) +{ + uint32_t ret_val; + + switch (dot11mode) { + case eCSR_CFG_DOT11_MODE_11A: + ret_val = QCA_WLAN_802_11_MODE_11A; + break; + case eCSR_CFG_DOT11_MODE_11B: + ret_val = QCA_WLAN_802_11_MODE_11B; + break; + case eCSR_CFG_DOT11_MODE_11G: + ret_val = QCA_WLAN_802_11_MODE_11G; + break; + case eCSR_CFG_DOT11_MODE_11N: + ret_val = QCA_WLAN_802_11_MODE_11N; + break; + case eCSR_CFG_DOT11_MODE_11AC: + ret_val = QCA_WLAN_802_11_MODE_11AC; + break; + case eCSR_CFG_DOT11_MODE_AUTO: + case eCSR_CFG_DOT11_MODE_ABG: + default: + ret_val = QCA_WLAN_802_11_MODE_INVALID; + } + return ret_val; +} + +/** + * hdd_add_tx_bitrate() - add tx bitrate attribute + * @skb: pointer to sk buff + * @hdd_sta_ctx: pointer to hdd station context + * @idx: attribute index + * + * Return: Success(0) or reason code for failure + */ +static int32_t hdd_add_tx_bitrate(struct sk_buff *skb, + hdd_station_ctx_t *hdd_sta_ctx, + int idx) +{ + struct nlattr *nla_attr; + uint32_t bitrate, bitrate_compat; + + nla_attr = nla_nest_start(skb, idx); + if (!nla_attr) + goto fail; + /* cfg80211_calculate_bitrate will return 0 for mcs >= 32 */ + bitrate = cfg80211_calculate_bitrate(&hdd_sta_ctx->conn_info.txrate); + + /* report 16-bit bitrate only if we can */ + bitrate_compat = bitrate < (1UL << 16) ? bitrate : 0; + if (bitrate > 0 && + nla_put_u32(skb, NL80211_RATE_INFO_BITRATE32, bitrate)) { + hdd_err("put fail"); + goto fail; + } + if (bitrate_compat > 0 && + nla_put_u16(skb, NL80211_RATE_INFO_BITRATE, bitrate_compat)) { + hdd_err("put fail"); + goto fail; + } + if (nla_put_u8(skb, NL80211_RATE_INFO_VHT_NSS, + hdd_sta_ctx->conn_info.txrate.nss)) { + hdd_err("put fail"); + goto fail; + } + nla_nest_end(skb, nla_attr); + return 0; +fail: + return -EINVAL; +} + +/** + * hdd_add_sta_info() - add station info attribute + * @skb: pointer to sk buff + * @hdd_sta_ctx: pointer to hdd station context + * @idx: attribute index + * + * Return: Success(0) or reason code for failure + */ +static int32_t hdd_add_sta_info(struct sk_buff *skb, + hdd_station_ctx_t *hdd_sta_ctx, int idx) +{ + struct nlattr *nla_attr; + + nla_attr = nla_nest_start(skb, idx); + if (!nla_attr) + goto fail; + if (nla_put_u8(skb, NL80211_STA_INFO_SIGNAL, + (hdd_sta_ctx->conn_info.signal + 100))) { + hdd_err("put fail"); + goto fail; + } + if (hdd_add_tx_bitrate(skb, hdd_sta_ctx, NL80211_STA_INFO_TX_BITRATE)) + goto fail; + nla_nest_end(skb, nla_attr); + return 0; +fail: + return -EINVAL; +} + +/** + * hdd_add_survey_info() - add survey info attribute + * @skb: pointer to sk buff + * @hdd_sta_ctx: pointer to hdd station context + * @idx: attribute index + * + * Return: Success(0) or reason code for failure + */ +static int32_t hdd_add_survey_info(struct sk_buff *skb, + hdd_station_ctx_t *hdd_sta_ctx, + int idx) +{ + struct nlattr *nla_attr; + + nla_attr = nla_nest_start(skb, idx); + if (!nla_attr) + goto fail; + if (nla_put_u32(skb, NL80211_SURVEY_INFO_FREQUENCY, + hdd_sta_ctx->conn_info.freq) || + nla_put_u8(skb, NL80211_SURVEY_INFO_NOISE, + (hdd_sta_ctx->conn_info.noise + 100))) { + hdd_err("put fail"); + goto fail; + } + nla_nest_end(skb, nla_attr); + return 0; +fail: + return -EINVAL; +} + +/** + * hdd_add_link_standard_info() - add link info attribute + * @skb: pointer to sk buff + * @hdd_sta_ctx: pointer to hdd station context + * @idx: attribute index + * + * Return: Success(0) or reason code for failure + */ +static int32_t +hdd_add_link_standard_info(struct sk_buff *skb, + hdd_station_ctx_t *hdd_sta_ctx, int idx) +{ + struct nlattr *nla_attr; + + nla_attr = nla_nest_start(skb, idx); + if (!nla_attr) + goto fail; + if (nla_put(skb, + NL80211_ATTR_SSID, + hdd_sta_ctx->conn_info.SSID.SSID.length, + hdd_sta_ctx->conn_info.SSID.SSID.ssId)) { + hdd_err("put fail"); + goto fail; + } + if (hdd_add_survey_info(skb, hdd_sta_ctx, NL80211_ATTR_SURVEY_INFO)) + goto fail; + if (hdd_add_sta_info(skb, hdd_sta_ctx, NL80211_ATTR_STA_INFO)) + goto fail; + nla_nest_end(skb, nla_attr); + return 0; +fail: + return -EINVAL; +} + +/** + * hdd_add_ap_standard_info() - add ap info attribute + * @skb: pointer to sk buff + * @hdd_sta_ctx: pointer to hdd station context + * @idx: attribute index + * + * Return: Success(0) or reason code for failure + */ +static int32_t +hdd_add_ap_standard_info(struct sk_buff *skb, + hdd_station_ctx_t *hdd_sta_ctx, int idx) +{ + struct nlattr *nla_attr; + + nla_attr = nla_nest_start(skb, idx); + if (!nla_attr) + goto fail; + if (hdd_sta_ctx->conn_info.conn_flag.vht_present) + if (nla_put(skb, NL80211_ATTR_VHT_CAPABILITY, + sizeof(hdd_sta_ctx->conn_info.vht_caps), + &hdd_sta_ctx->conn_info.vht_caps)) { + hdd_err("put fail"); + goto fail; + } + if (hdd_sta_ctx->conn_info.conn_flag.ht_present) + if (nla_put(skb, NL80211_ATTR_HT_CAPABILITY, + sizeof(hdd_sta_ctx->conn_info.ht_caps), + &hdd_sta_ctx->conn_info.ht_caps)) { + hdd_err("put fail"); + goto fail; + } + nla_nest_end(skb, nla_attr); + return 0; +fail: + return -EINVAL; +} + +/** + * hdd_get_station_info() - send BSS information to supplicant + * @hdd_ctx: pointer to hdd context + * @adapter: pointer to adapter + * + * Return: 0 if success else error status + */ +static int hdd_get_station_info(hdd_context_t *hdd_ctx, + hdd_adapter_t *adapter) +{ + struct sk_buff *skb = NULL; + uint8_t *tmp_hs20 = NULL; + uint32_t nl_buf_len; + hdd_station_ctx_t *hdd_sta_ctx; + + hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); + + nl_buf_len = NLMSG_HDRLEN; + nl_buf_len += sizeof(hdd_sta_ctx->conn_info.SSID.SSID.length) + + sizeof(hdd_sta_ctx->conn_info.freq) + + sizeof(hdd_sta_ctx->conn_info.noise) + + sizeof(hdd_sta_ctx->conn_info.signal) + + (sizeof(uint32_t) * 2) + + sizeof(hdd_sta_ctx->conn_info.txrate.nss) + + sizeof(hdd_sta_ctx->conn_info.roam_count) + + sizeof(hdd_sta_ctx->conn_info.authType) + + sizeof(hdd_sta_ctx->conn_info.dot11Mode); + if (hdd_sta_ctx->conn_info.conn_flag.vht_present) + nl_buf_len += sizeof(hdd_sta_ctx->conn_info.vht_caps); + if (hdd_sta_ctx->conn_info.conn_flag.ht_present) + nl_buf_len += sizeof(hdd_sta_ctx->conn_info.ht_caps); + if (hdd_sta_ctx->conn_info.conn_flag.hs20_present) { + tmp_hs20 = (uint8_t *)&(hdd_sta_ctx->conn_info.hs20vendor_ie); + nl_buf_len += (sizeof(hdd_sta_ctx->conn_info.hs20vendor_ie) - + 1); + } + if (hdd_sta_ctx->conn_info.conn_flag.ht_op_present) + nl_buf_len += sizeof(hdd_sta_ctx->conn_info.ht_operation); + if (hdd_sta_ctx->conn_info.conn_flag.vht_op_present) + nl_buf_len += sizeof(hdd_sta_ctx->conn_info.vht_operation); + + + skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len); + if (!skb) { + hdd_err(FL("cfg80211_vendor_cmd_alloc_reply_skb failed")); + return -ENOMEM; + } + + if (hdd_add_link_standard_info(skb, hdd_sta_ctx, + LINK_INFO_STANDARD_NL80211_ATTR)) { + hdd_err("put fail"); + goto fail; + } + if (hdd_add_ap_standard_info(skb, hdd_sta_ctx, + AP_INFO_STANDARD_NL80211_ATTR)) { + hdd_err("put fail"); + goto fail; + } + if (nla_put_u32(skb, INFO_ROAM_COUNT, + hdd_sta_ctx->conn_info.roam_count) || + nla_put_u32(skb, INFO_AKM, + hdd_convert_auth_type( + hdd_sta_ctx->conn_info.authType)) || + nla_put_u32(skb, WLAN802_11_MODE, + hdd_convert_dot11mode( + hdd_sta_ctx->conn_info.dot11Mode))) { + hdd_err("put fail"); + goto fail; + } + if (hdd_sta_ctx->conn_info.conn_flag.ht_op_present) + if (nla_put(skb, HT_OPERATION, + (sizeof(hdd_sta_ctx->conn_info.ht_operation)), + &hdd_sta_ctx->conn_info.ht_operation)) { + hdd_err("put fail"); + goto fail; + } + if (hdd_sta_ctx->conn_info.conn_flag.vht_op_present) + if (nla_put(skb, VHT_OPERATION, + (sizeof(hdd_sta_ctx->conn_info.vht_operation)), + &hdd_sta_ctx->conn_info.vht_operation)) { + hdd_err("put fail"); + goto fail; + } + if (hdd_sta_ctx->conn_info.conn_flag.hs20_present) + if (nla_put(skb, AP_INFO_HS20_INDICATION, + (sizeof(hdd_sta_ctx->conn_info.hs20vendor_ie) - 1), + tmp_hs20 + 1)) { + hdd_err("put fail"); + goto fail; + } + + return cfg80211_vendor_cmd_reply(skb); +fail: + if (skb) + kfree_skb(skb); + return -EINVAL; +} + +/** + * __hdd_cfg80211_get_station_cmd() - Handle get station vendor cmd + * @wiphy: corestack handler + * @wdev: wireless device + * @data: data + * @data_len: data length + * + * Handles QCA_NL80211_VENDOR_SUBCMD_GET_STATION. + * Validate cmd attributes and send the station info to upper layers. + * + * Return: Success(0) or reason code for failure + */ +static int32_t +__hdd_cfg80211_get_station_cmd(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, + int data_len) +{ + hdd_context_t *hdd_ctx = wiphy_priv(wiphy); + struct net_device *dev = wdev->netdev; + hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev); + struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_GET_STATION_MAX + 1]; + int32_t status; + + ENTER_DEV(dev); + if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { + hdd_err("Command not allowed in FTM mode"); + status = -EPERM; + goto out; + } + + status = wlan_hdd_validate_context(hdd_ctx); + if (0 != status) + goto out; + + + status = nla_parse(tb, QCA_WLAN_VENDOR_ATTR_GET_STATION_MAX, + data, data_len, NULL); + if (status) { + hdd_err("Invalid ATTR"); + goto out; + } + + /* Parse and fetch Command Type*/ + if (tb[STATION_INFO]) { + status = hdd_get_station_info(hdd_ctx, adapter); + } else if (tb[STATION_ASSOC_FAIL_REASON]) { + status = hdd_get_station_assoc_fail(hdd_ctx, adapter); + } else { + hdd_err("get station info cmd type failed"); + status = -EINVAL; + goto out; + } + EXIT(); +out: + return status; +} + +/** + * wlan_hdd_cfg80211_get_station_cmd() - Handle get station vendor cmd + * @wiphy: corestack handler + * @wdev: wireless device + * @data: data + * @data_len: data length + * + * Handles QCA_NL80211_VENDOR_SUBCMD_GET_STATION. + * Validate cmd attributes and send the station info to upper layers. + * + * Return: Success(0) or reason code for failure + */ +static int32_t +hdd_cfg80211_get_station_cmd(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, + int data_len) +{ + int ret; + + cds_ssr_protect(__func__); + ret = __hdd_cfg80211_get_station_cmd(wiphy, wdev, data, data_len); + cds_ssr_unprotect(__func__); + + return ret; +} + +/* + * undef short names defined for get station command + * used by __wlan_hdd_cfg80211_get_station_cmd() + */ +#undef STATION_INVALID +#undef STATION_INFO +#undef STATION_ASSOC_FAIL_REASON +#undef STATION_MAX + #ifdef WLAN_FEATURE_ROAM_OFFLOAD /** * __wlan_hdd_cfg80211_keymgmt_set_key() - Store the Keys in the driver session @@ -5916,6 +6446,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = { WIPHY_VENDOR_CMD_NEED_NETDEV, .doit = wlan_hdd_cfg80211_handle_wisa_cmd }, + { + .info.vendor_id = QCA_NL80211_VENDOR_ID, + .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_STATION, + .flags = WIPHY_VENDOR_CMD_NEED_WDEV | + WIPHY_VENDOR_CMD_NEED_NETDEV | + WIPHY_VENDOR_CMD_NEED_RUNNING, + .doit = hdd_cfg80211_get_station_cmd + }, { .info.vendor_id = QCA_NL80211_VENDOR_ID, .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DO_ACS, diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index d99cd9cc59c4..d6e53b7118d2 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -269,6 +269,7 @@ typedef enum { * indicate stop request/response of the P2P Listen Offload function in * device. As an event, it indicates either the feature stopped after it * was already running or feature has actually failed to start. + * @QCA_NL80211_VENDOR_SUBCMD_GET_STATION: send BSS Information */ enum qca_nl80211_vendor_subcmds { @@ -392,10 +393,155 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_SET_SAP_CONFIG = 118, QCA_NL80211_VENDOR_SUBCMD_TSF = 119, QCA_NL80211_VENDOR_SUBCMD_WISA = 120, + QCA_NL80211_VENDOR_SUBCMD_GET_STATION = 121, QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_START = 122, QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_STOP = 123, }; +/** + * enum qca_wlan_vendor_attr_get_station - Sub commands used by + * QCA_NL80211_VENDOR_SUBCMD_GET_STATION to get the corresponding + * station information. The information obtained through these + * commands signify the current info in connected state and + * latest cached information during the connected state , if queried + * when in disconnected state. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO: bss info + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_ASSOC_FAIL_REASON: assoc fail reason + */ +enum qca_wlan_vendor_attr_get_station { + QCA_WLAN_VENDOR_ATTR_GET_STATION_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO, + QCA_WLAN_VENDOR_ATTR_GET_STATION_ASSOC_FAIL_REASON, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_GET_STATION_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_GET_STATION_MAX = + QCA_WLAN_VENDOR_ATTR_GET_STATION_AFTER_LAST - 1, +}; + +/** + * enum qca_wlan_802_11_mode - dot11 mode + * @QCA_WLAN_802_11_MODE_INVALID: Invalid dot11 mode + * @QCA_WLAN_802_11_MODE_11A: mode A + * @QCA_WLAN_802_11_MODE_11B: mode B + * @QCA_WLAN_802_11_MODE_11G: mode G + * @QCA_WLAN_802_11_MODE_11N: mode N + * @QCA_WLAN_802_11_MODE_11AC: mode AC + */ +enum qca_wlan_802_11_mode { + QCA_WLAN_802_11_MODE_INVALID, + QCA_WLAN_802_11_MODE_11A, + QCA_WLAN_802_11_MODE_11B, + QCA_WLAN_802_11_MODE_11G, + QCA_WLAN_802_11_MODE_11N, + QCA_WLAN_802_11_MODE_11AC, +}; + +/** + * enum qca_wlan_auth_type - Authentication key management type + * @QCA_WLAN_AUTH_TYPE_INVALID: Invalid key management type + * @QCA_WLAN_AUTH_TYPE_OPEN: Open key + * @QCA_WLAN_AUTH_TYPE_SHARED: shared key + * @QCA_WLAN_AUTH_TYPE_WPA: wpa key + * @QCA_WLAN_AUTH_TYPE_WPA_PSK: wpa psk key + * @QCA_WLAN_AUTH_TYPE_WPA_NONE: wpa none key + * @QCA_WLAN_AUTH_TYPE_RSN: rsn key + * @QCA_WLAN_AUTH_TYPE_RSN_PSK: rsn psk key + * @QCA_WLAN_AUTH_TYPE_FT: ft key + * @QCA_WLAN_AUTH_TYPE_FT_PSK: ft psk key + * @QCA_WLAN_AUTH_TYPE_SHA256: shared 256 key + * @QCA_WLAN_AUTH_TYPE_SHA256_PSK: shared 256 psk + * @QCA_WLAN_AUTH_TYPE_WAI: wai key + * @QCA_WLAN_AUTH_TYPE_WAI_PSK wai psk key + * @QCA_WLAN_AUTH_TYPE_CCKM_WPA: cckm wpa key + * @QCA_WLAN_AUTH_TYPE_CCKM_RSN: cckm rsn key + */ +enum qca_wlan_auth_type { + QCA_WLAN_AUTH_TYPE_INVALID, + QCA_WLAN_AUTH_TYPE_OPEN, + QCA_WLAN_AUTH_TYPE_SHARED, + QCA_WLAN_AUTH_TYPE_WPA, + QCA_WLAN_AUTH_TYPE_WPA_PSK, + QCA_WLAN_AUTH_TYPE_WPA_NONE, + QCA_WLAN_AUTH_TYPE_RSN, + QCA_WLAN_AUTH_TYPE_RSN_PSK, + QCA_WLAN_AUTH_TYPE_FT, + QCA_WLAN_AUTH_TYPE_FT_PSK, + QCA_WLAN_AUTH_TYPE_SHA256, + QCA_WLAN_AUTH_TYPE_SHA256_PSK, + QCA_WLAN_AUTH_TYPE_WAI, + QCA_WLAN_AUTH_TYPE_WAI_PSK, + QCA_WLAN_AUTH_TYPE_CCKM_WPA, + QCA_WLAN_AUTH_TYPE_CCKM_RSN, + QCA_WLAN_AUTH_TYPE_AUTOSWITCH, +}; + +/** + * enum qca_wlan_vendor_attr_get_station_info - Station Info queried + * through QCA_NL80211_VENDOR_SUBCMD_GET_STATION. + * + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_INVALID: Invalid Attribute + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_LINK_STANDARD_NL80211_ATTR: + * Get the standard NL attributes Nested with this attribute. + * Ex : Query BW , BITRATE32 , NSS , Signal , Noise of the Link - + * NL80211_ATTR_SSID / NL80211_ATTR_SURVEY_INFO (Connected Channel) / + * NL80211_ATTR_STA_INFO + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AP_STANDARD_NL80211_ATTR: + * Get the standard NL attributes Nested with this attribute. + * Ex : Query HT/VHT Capability advertized by the AP. + * NL80211_ATTR_VHT_CAPABILITY / NL80211_ATTR_HT_CAPABILITY + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ROAM_COUNT: + * Number of successful Roam attempts before a + * disconnect, Unsigned 32 bit value + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AKM: + * Authentication Key Management Type used for the connected session. + * Signified by enum qca_wlan_auth_type + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_802_11_MODE: 802.11 Mode of the + * connected Session, signified by enum qca_wlan_802_11_mode + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AP_HS20_INDICATION: + * HS20 Indication Element + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ASSOC_FAIL_REASON: + * Status Code Corresponding to the Association Failure. + * Unsigned 32 bit value. + */ +enum qca_wlan_vendor_attr_get_station_info { + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_LINK_STANDARD_NL80211_ATTR, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AP_STANDARD_NL80211_ATTR, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ROAM_COUNT, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AKM, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_802_11_MODE, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AP_HS20_INDICATION, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_HT_OPERATION, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_VHT_OPERATION, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ASSOC_FAIL_REASON, + /* keep last */ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_MAX = + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AFTER_LAST - 1, +}; + +/* define short names for get station info attributes */ +#define LINK_INFO_STANDARD_NL80211_ATTR \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_LINK_STANDARD_NL80211_ATTR +#define AP_INFO_STANDARD_NL80211_ATTR \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AP_STANDARD_NL80211_ATTR +#define INFO_ROAM_COUNT \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ROAM_COUNT +#define INFO_AKM \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AKM +#define WLAN802_11_MODE \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_802_11_MODE +#define AP_INFO_HS20_INDICATION \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AP_HS20_INDICATION +#define HT_OPERATION \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_HT_OPERATION +#define VHT_OPERATION \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_VHT_OPERATION +#define INFO_ASSOC_FAIL_REASON \ + QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ASSOC_FAIL_REASON + /** * enum qca_nl80211_vendor_subcmds_index - vendor sub commands index * -- cgit v1.2.3 From 1969ec8bc94bc8967e38fd690c3e6325392c5496 Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Fri, 8 Jul 2016 10:37:01 -0700 Subject: qcacld-3.0: change dfs_radar_found to atomic variable Instead of using separate lock to protect dfs_radar_found, change variable itself to atomic. Change-Id: If95e2ce5a0c837f36a92673312ea4d2fc7b96abe CRs-Fixed: 1039447 --- core/hdd/inc/wlan_hdd_main.h | 9 ++------- core/hdd/src/wlan_hdd_hostapd.c | 27 ++++++++------------------- core/hdd/src/wlan_hdd_main.c | 7 ++----- 3 files changed, 12 insertions(+), 31 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 7730006e6441..bc5dd3d002e9 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1323,7 +1323,7 @@ struct hdd_context_s { /* defining the firmware version */ uint32_t target_fw_version; - uint32_t dfs_radar_found; + qdf_atomic_t dfs_radar_found; /* defining the chip/rom version */ uint32_t target_hw_version; @@ -1415,12 +1415,7 @@ struct hdd_context_s { uint16_t hdd_txrx_hist_idx; struct hdd_tx_rx_histogram *hdd_txrx_hist; - /* - * Dfs lock used to syncronize on sap channel switch during - * radar found indication and application triggered channel - * switch. - */ - qdf_spinlock_t dfs_lock; + /* * place to store FTM capab of target. This allows changing of FTM capab * at runtime and intersecting it with target capab before updating. diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index c17461656c2f..bb0ab6110ee0 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -119,7 +119,7 @@ int hdd_sap_context_init(hdd_context_t *hdd_ctx) qdf_wake_lock_create(&hdd_ctx->sap_wake_lock, "qcom_sap_wakelock"); qdf_spinlock_create(&hdd_ctx->sap_update_info_lock); - qdf_spinlock_create(&hdd_ctx->dfs_lock); + qdf_atomic_init(&hdd_ctx->dfs_radar_found); return 0; } @@ -220,8 +220,6 @@ void hdd_sap_context_destroy(hdd_context_t *hdd_ctx) mutex_destroy(&hdd_ctx->sap_lock); qdf_wake_lock_destroy(&hdd_ctx->sap_wake_lock); - qdf_spinlock_destroy(&hdd_ctx->dfs_lock); - qdf_spinlock_destroy(&hdd_ctx->sap_update_info_lock); } @@ -986,9 +984,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, } } - qdf_spin_lock_bh(&pHddCtx->dfs_lock); - pHddCtx->dfs_radar_found = false; - qdf_spin_unlock_bh(&pHddCtx->dfs_lock); + qdf_atomic_set(&pHddCtx->dfs_radar_found, 0); wlansap_get_dfs_ignore_cac(pHddCtx->hHal, &ignoreCAC); @@ -1102,9 +1098,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, hdd_info("Sent CAC start to user space"); } - qdf_spin_lock_bh(&pHddCtx->dfs_lock); - pHddCtx->dfs_radar_found = false; - qdf_spin_unlock_bh(&pHddCtx->dfs_lock); + qdf_atomic_set(&pHddCtx->dfs_radar_found, 0); break; case eSAP_DFS_CAC_INTERRUPTED: /* @@ -1977,9 +1971,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, } } - qdf_spin_lock_bh(&pHddCtx->dfs_lock); - if (pHddCtx->dfs_radar_found == true) { - qdf_spin_unlock_bh(&pHddCtx->dfs_lock); + if (qdf_atomic_read(&pHddCtx->dfs_radar_found)) { hdd_err("Channel switch in progress!!"); return -EBUSY; } @@ -1992,8 +1984,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, * once the channel change is completed and SAP will * post eSAP_START_BSS_EVENT success event to HDD. */ - pHddCtx->dfs_radar_found = true; - qdf_spin_unlock_bh(&pHddCtx->dfs_lock); + qdf_atomic_set(&pHddCtx->dfs_radar_found, 1); /* * Post the Channel Change request to SAP. */ @@ -2016,9 +2007,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, * radar found flag and also restart the netif * queues. */ - qdf_spin_lock_bh(&pHddCtx->dfs_lock); - pHddCtx->dfs_radar_found = false; - qdf_spin_unlock_bh(&pHddCtx->dfs_lock); + qdf_atomic_set(&pHddCtx->dfs_radar_found, 0); ret = -EINVAL; } @@ -2811,13 +2800,13 @@ static __iw_softap_setparam(struct net_device *dev, hdd_notice("Set QCASAP_SET_RADAR_CMD val %d", set_value); - if (!pHddCtx->dfs_radar_found && isDfsch) { + if (!qdf_atomic_read(&pHddCtx->dfs_radar_found) && isDfsch) { ret = wma_cli_set_command(pHostapdAdapter->sessionId, WMA_VDEV_DFS_CONTROL_CMDID, set_value, VDEV_CMD); } else { hdd_err("Ignore, radar_found: %d, dfs_channel: %d", - pHddCtx->dfs_radar_found, isDfsch); + qdf_atomic_read(&pHddCtx->dfs_radar_found), isDfsch); } break; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 411982e2177f..efe11c71335d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1425,18 +1425,15 @@ bool hdd_dfs_indicate_radar(void *context, void *param) return true; if (true == hdd_radar_event->dfs_radar_status) { - qdf_spin_lock_bh(&hdd_ctx->dfs_lock); - if (hdd_ctx->dfs_radar_found) { + if (qdf_atomic_read(&hdd_ctx->dfs_radar_found)) { /* * Application already triggered channel switch * on current channel, so return here. */ - qdf_spin_unlock_bh(&hdd_ctx->dfs_lock); return false; } - hdd_ctx->dfs_radar_found = true; - qdf_spin_unlock_bh(&hdd_ctx->dfs_lock); + qdf_atomic_set(&hdd_ctx->dfs_radar_found, 1); status = hdd_get_front_adapter(hdd_ctx, &adapterNode); while (NULL != adapterNode && QDF_STATUS_SUCCESS == status) { -- cgit v1.2.3 From e7a00119ff5d6be7b3dc22127f893a370401703b Mon Sep 17 00:00:00 2001 From: Kabilan Kannan Date: Sat, 9 Jul 2016 09:13:35 -0700 Subject: qcacld-3.0: Teardown TDLS links when second vdev comes up qcacld-2.0 to qcacld-3.0 propagation Teardown all TDLS links before second VDEV comes up Change-Id: I0561dcef8f9a3143f420c196d805adecadf0ab6c CRs-Fixed: 951482 --- core/hdd/src/wlan_hdd_tdls.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 299b9e4f4666..5b107bb50b9d 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -265,8 +265,7 @@ void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx) */ void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter, hdd_context_t *hddctx) { - if (adapter->device_mode != QDF_STA_MODE) - wlan_hdd_tdls_disable_offchan_and_teardown_links(hddctx); + wlan_hdd_tdls_disable_offchan_and_teardown_links(hddctx); } -- cgit v1.2.3 From 8ac9be9077e57d7b18925c943f58727cb49c4a69 Mon Sep 17 00:00:00 2001 From: Vishwajith Upendra Date: Fri, 15 Jul 2016 15:14:06 -0700 Subject: Release 5.1.0.22B Release 5.1.0.22B Change-Id: Icb3a8fd57f498f7d44fa48d6258e4a0ef99ff64e CRs-Fixed: 688141 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index 8ccd0886c670..a1b8466626c9 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -41,9 +41,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 0 -#define QWLAN_VERSION_EXTRA "A" +#define QWLAN_VERSION_EXTRA "B" #define QWLAN_VERSION_BUILD 22 -#define QWLAN_VERSIONSTR "5.1.0.22A" +#define QWLAN_VERSIONSTR "5.1.0.22B" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3 From b86f62603032b7d6e1314987a9a29366202910a3 Mon Sep 17 00:00:00 2001 From: Manjunathappa Prakash Date: Fri, 8 Jul 2016 11:31:33 -0700 Subject: qcacld-3.0: Check for NULL adapter returned from open_interface Add check for NULL adapter returned from open_interface. Change-Id: I942dd046bdb402c7fa00d2726b8771a18efc2f22 CRs-Fixed: 1039491 --- core/hdd/src/wlan_hdd_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index efe11c71335d..50a49085632f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6001,9 +6001,15 @@ static inline int hdd_open_p2p_interface(struct hdd_context_t *hdd_ctx, static hdd_adapter_t *hdd_open_monitor_interface(hdd_context_t *hdd_ctx, bool rtnl_held) { - return hdd_open_adapter(hdd_ctx, QDF_MONITOR_MODE, "wlan%d", + hdd_adapter_t *adapter; + + adapter = hdd_open_adapter(hdd_ctx, QDF_MONITOR_MODE, "wlan%d", wlan_hdd_get_intf_addr(hdd_ctx), NET_NAME_UNKNOWN, rtnl_held); + if (adapter == NULL) + return ERR_PTR(-ENOSPC); + + return adapter; } /** @@ -6648,6 +6654,8 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc) adapter = hdd_open_interfaces(hdd_ctx, rtnl_held); if (IS_ERR(adapter)) { + hddLog(QDF_TRACE_LEVEL_FATAL, + FL("Failed to open interface, adapter is NULL")); ret = PTR_ERR(adapter); goto err_cds_disable; } -- cgit v1.2.3 From fd85ba612bf1291689cdd935af3ba2732d9eed61 Mon Sep 17 00:00:00 2001 From: Krunal Soni Date: Mon, 11 Jul 2016 08:18:53 -0700 Subject: qcacld-3.0: Fix assert in wma_rx_service_ready_ext_event API In case of legacy/old platform, extended caps are not provided and number of supported hw modes is expected to come as zero. Due to bug in a code, driver is going ahead and try to allocated memory with size of 0 bytes which is causing the assert. Change-Id: I37adf5ba4e1b1100af06da0a37466a5531be5880 CRs-Fixed: 1040063 --- core/wma/src/wma_main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index a0d9e9439805..b1811221c8fd 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -4570,16 +4570,20 @@ static void wma_populate_soc_caps(t_wma_handle *wma_handle, * first thing to do is to get how many number of hw modes are * supported and populate in wma_handle global structure */ + if (NULL == param_buf->soc_hw_mode_caps) { + WMA_LOGE("%s: Invalid number of hw modes", __func__); + return; + } + qdf_mem_copy(&phy_caps->num_hw_modes, param_buf->soc_hw_mode_caps, sizeof(WMI_SOC_MAC_PHY_HW_MODE_CAPS)); if (0 == phy_caps->num_hw_modes.num_hw_modes) { - WMA_LOGE("%s: Invalid number of hw modes", __func__); + WMA_LOGE("%s: Number of hw modes is zero", __func__); return; - } else { - WMA_LOGI("%s: Given number of hw modes[%d]", - __func__, phy_caps->num_hw_modes.num_hw_modes); } + WMA_LOGI("%s: Given number of hw modes[%d]", + __func__, phy_caps->num_hw_modes.num_hw_modes); /* * next thing is to allocate the memory to map hw mode to phy/mac caps -- cgit v1.2.3 From 8cb6a3d20fea6d6daa447f5bc8f4628222f98837 Mon Sep 17 00:00:00 2001 From: Nitesh Shah Date: Fri, 8 Jul 2016 11:38:02 +0530 Subject: qcacld-3.0: CL 1546483 - update fw common interface files Propagation from qcacld-2.0 to qcacld-3.0 Add WMI command to set GPIO numbers that are used to wakeup host and wakeup target. Changes to disable dynamic bandwidth RTS. Add swol_assist_enable field to WMI extwow_set_app_type1_params cmd to enable IoT mode WMI enums for CCK and OFDM max tx rates. Change-Id: I26873873d7a355c179babaa7cc56e187e9771c92 CRs-fixed: 865207 --- target/inc/wmi_tlv_defs.h | 10 ++++-- target/inc/wmi_unified.h | 82 +++++++++++++++++++++++++++++++++++++---------- target/inc/wmi_version.h | 2 +- 3 files changed, 74 insertions(+), 20 deletions(-) diff --git a/target/inc/wmi_tlv_defs.h b/target/inc/wmi_tlv_defs.h index bf35bacd3c3b..1ba64b490c97 100644 --- a/target/inc/wmi_tlv_defs.h +++ b/target/inc/wmi_tlv_defs.h @@ -722,6 +722,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param, WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param, + WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param, } WMITLV_TAG_ID; /* @@ -1017,6 +1018,7 @@ typedef enum { OP(WMI_READ_DATA_FROM_FLASH_CMDID) \ OP(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID) \ OP(WMI_PEER_SET_RX_BLOCKSIZE_CMDID) \ + OP(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID) \ /* add new CMD_LIST elements above this line */ /* @@ -1779,9 +1781,13 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_UTF_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_QVIT_CMDID); +#define WMITLV_TABLE_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param, WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID); + /* Vdev Set keep alive Cmd */ -#define WMITLV_TABLE_WMI_VDEV_SET_KEEPALIVE_CMDID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param, wmi_vdev_set_keepalive_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +#define WMITLV_TABLE_WMI_VDEV_SET_KEEPALIVE_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param, wmi_vdev_set_keepalive_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_KEEPALIVE_CMDID); /* Vdev Get keep alive Cmd */ diff --git a/target/inc/wmi_unified.h b/target/inc/wmi_unified.h index 85537be7add0..4237f64097ec 100644 --- a/target/inc/wmi_unified.h +++ b/target/inc/wmi_unified.h @@ -347,6 +347,8 @@ typedef enum { WMI_PDEV_WAL_POWER_DEBUG_CMDID, /** set per-AC rx reorder timeouts */ WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID, + /** WMI command for WOW gpio and type */ + WMI_PDEV_SET_WAKEUP_CONFIG_CMDID, /* VDEV (virtual device) specific commands */ /** vdev create */ @@ -4195,6 +4197,32 @@ typedef struct { A_UINT32 enable_override; } wmi_vdev_set_dscp_tid_map_cmd_fixed_param; +enum WMI_WAKE_GPIO_TYPE { + WMI_WAKE_GPIO_LOW = 1, + WMI_WAKE_GPIO_HIGH = 2, + WMI_WAKE_GPIO_RISING_EDGE = 3, + WMI_WAKE_GPIO_FALLING_EDGE = 4, +}; + +/** + * Set GPIO numbers used to wakeup host and wakeup target. + */ +typedef struct { + /** + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param + */ + A_UINT32 tlv_header; + /* gpio num used to wakeup host, 0xff disable wakeup gpio */ + A_UINT32 host_wakeup_gpio; + /* refer to WMI_WAKE_GPIO_TYPE */ + A_UINT32 host_wakeup_type; + /* gpio num used to wakeup target, 0xff disable wakeup gpio */ + A_UINT32 target_wakeup_gpio; + /* refer to WMI_WAKE_GPIO_TYPE */ + A_UINT32 target_wakeup_type; +} WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param; + /** Fixed rate (rate-code) for broadcast/ multicast data frames */ /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames * @details @@ -5635,6 +5663,9 @@ typedef enum { */ WMI_VDEV_PARAM_AGG_SW_RETRY_TH, + /** disable dynamic bw RTS **/ + WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, + /* * === ADD NEW VDEV PARAM TYPES ABOVE THIS LINE === * The below vdev param types are used for prototyping, and are @@ -6906,27 +6937,43 @@ typedef union { /* * CCK max/min tx Rate description - * tx_rate = 0: 1Mbps, - * tx_rate = 1: 2Mbps - * tx_rate = 2: 5.5Mbps - * tx_rate = 3: 11Mbps - * tx_rate = else : invalid. + * tx_rate = 0: 1 Mbps + * tx_rate = 1: 2 Mbps + * tx_rate = 2: 5.5 Mbps + * tx_rate = 3: 11 Mbps + * tx_rate = else: invalid */ -#define WMI_MAX_CCK_TX_RATE 0x03 +enum { + WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */ + WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */ + WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */ + WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */ + WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M, +}; /* * OFDM max/min tx Rate description - * tx_rate = 0: 6Mbps, - * tx_rate = 1: 9Mbps - * tx_rate = 2: 12Mbps - * tx_rate = 3: 18Mbps - * tx_rate = 4: 24Mbps - * tx_rate = 5: 32Mbps - * tx_rate = 6: 48Mbps - * tx_rate = 7: 54Mbps - * tx_rate = else : invalid. - */ -#define WMI_MAX_OFDM_TX_RATE 0x07 + * tx_rate = 0: 6 Mbps + * tx_rate = 1: 9 Mbps + * tx_rate = 2: 12 Mbps + * tx_rate = 3: 18 Mbps + * tx_rate = 4: 24 Mbps + * tx_rate = 5: 32 Mbps + * tx_rate = 6: 48 Mbps + * tx_rate = 7: 54 Mbps + * tx_rate = else: invalid + */ +enum { + WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */ + WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */ + WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */ + WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */ + WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */ + WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */ + WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */ + WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */ + WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M, +}; /* * HT max/min tx rate description @@ -8878,6 +8925,7 @@ typedef struct { A_UINT32 swol_indoor_pattern; /* wakeup pattern */ A_UINT32 swol_indoor_exception; /* wakeup when exception happens */ A_UINT32 swol_indoor_exception_app; + A_UINT32 swol_assist_enable; /* whether to enable IoT mode */ } wmi_extwow_set_app_type1_params_cmd_fixed_param; typedef struct { diff --git a/target/inc/wmi_version.h b/target/inc/wmi_version.h index 9bda8c027465..1686b6f5dcf7 100644 --- a/target/inc/wmi_version.h +++ b/target/inc/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_ 271 +#define __WMI_REVISION_ 274 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From e5aa26be8b7790fd0dc2c93a4f1aa68c11d697cb Mon Sep 17 00:00:00 2001 From: Nitesh Shah Date: Fri, 8 Jul 2016 12:03:44 +0530 Subject: qcacld-3.0: CL 1546701 - update fw common interface files Propagation from qcacld-2.0 to qcacld-3.0 Adding connect_ie interface for Roaming offload. Change-Id: I8263688aec3895af57555a5db14d4459848c0cc5 CRs-fixed: 865207 --- target/inc/wmi_tlv_defs.h | 5 ++++- target/inc/wmi_unified.h | 35 ++++++++++++++++++++++++++++++++--- target/inc/wmi_version.h | 2 +- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/target/inc/wmi_tlv_defs.h b/target/inc/wmi_tlv_defs.h index 1ba64b490c97..2dbe1edd3a66 100644 --- a/target/inc/wmi_tlv_defs.h +++ b/target/inc/wmi_tlv_defs.h @@ -723,6 +723,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param, WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param, + WMITLV_TAG_STRUC_wmi_tlv_buf_len_param, } WMITLV_TAG_ID; /* @@ -1290,7 +1291,9 @@ WMITLV_CREATE_PARAM_STRUC(WMI_RMV_BCN_FILTER_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_offload_tlv_param, offload_param, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_11i_offload_tlv_param, offload_11i_param, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_11r_offload_tlv_param, offload_11r_param, WMITLV_SIZE_VAR) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_ese_offload_tlv_param, offload_ese_param, WMITLV_SIZE_VAR) + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_ese_offload_tlv_param, offload_ese_param, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_tlv_buf_len_param, assoc_ie_len_param, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, assoc_ie_buf, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SCAN_MODE); diff --git a/target/inc/wmi_unified.h b/target/inc/wmi_unified.h index 4237f64097ec..ee856a6f66e1 100644 --- a/target/inc/wmi_unified.h +++ b/target/inc/wmi_unified.h @@ -539,7 +539,7 @@ typedef enum { /** configure thresholds for MAWC */ WMI_ROAM_CONFIGURE_MAWC_CMDID, /** configure MultiBand Operation(refer WFA MBO spec) parameter */ - WMI_ROAM_SET_MBO_PARAM_CMDID, + WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */ /** offload scan specific commands */ /** set offload scan AP profile */ @@ -2489,6 +2489,24 @@ typedef struct { A_UINT32 ie_data[1]; } wmi_ie_data; +/** + * TLV used for length/buffer + */ +typedef struct { + /** + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_tlv_buf_len_param + */ + A_UINT32 tlv_header; + A_UINT32 buf_len; /** Length of buf */ + /** + * Following this structure is the TLV byte stream of buf + * of length buf_len: + * A_UINT8 buf[]; + * + */ +} wmi_tlv_buf_len_param; + typedef struct { /** Len of the SSID */ A_UINT32 ssid_len; @@ -14234,6 +14252,15 @@ typedef struct { A_UINT32 qtimer_high; } wmi_vdev_tsf_report_event_fixed_param; +/** + * ie_id values: + * 0 to 255 are used for individual IEEE802.11 Information Element types + */ +#define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256 + +/* source values: */ +#define WMI_SET_VDEV_IE_SOURCE_HOST 0x0 + typedef struct { /** TLV tag and len; tag equals * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */ @@ -14244,6 +14271,8 @@ typedef struct { A_UINT32 ie_id; /* ie_len corresponds to num of bytes in ie_data[] */ A_UINT32 ie_len; + /** source of this command */ + A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */ /* * Following this structure is the TLV byte stream of ie data of length * buf_len: @@ -14681,7 +14710,7 @@ typedef struct { * 1 - Allow to connect to MBO AP only * Bit 1-31 : reserved. */ -#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) +#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */ typedef struct { /* @@ -14695,7 +14724,7 @@ typedef struct { A_UINT32 enable; /** MBO flags, refer to definition of MBO flags*/ A_UINT32 flags; -} wmi_roam_set_mbo_fixed_param; +} wmi_roam_set_mbo_fixed_param; /* DEPRECATED */ typedef struct { /* diff --git a/target/inc/wmi_version.h b/target/inc/wmi_version.h index 1686b6f5dcf7..298387df02b3 100644 --- a/target/inc/wmi_version.h +++ b/target/inc/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_ 274 +#define __WMI_REVISION_ 275 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From 36e5aa00be78baa5c4294ef23a46c9ea2135655a Mon Sep 17 00:00:00 2001 From: Krishna Kumaar Natarajan Date: Sat, 2 Jul 2016 17:44:25 -0700 Subject: qcacld-3.0: Update handling of WOW packet buffer Update handling of WOW packet buffer. Change-Id: If3ba082bb862a7c9d81e9b9f619f805420c83860 CRs-Fixed: 1042616 --- core/wma/src/wma_features.c | 288 +++++++++++++++++++++++++++++-------------- core/wma/src/wma_scan_roam.c | 101 ++------------- 2 files changed, 208 insertions(+), 181 deletions(-) diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 8b92c7826877..c0bb0ff209c9 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -2732,6 +2732,138 @@ static void wma_wow_wake_up_stats(tp_wma_handle wma, uint8_t *data, return; } +#ifdef FEATURE_WLAN_EXTSCAN +/** + * wma_extscan_get_eventid_from_tlvtag() - map tlv tag to corresponding event id + * @tag: WMI TLV tag + * + * Return: + * 0 if TLV tag is invalid + * else return corresponding WMI event id + */ +static int wma_extscan_get_eventid_from_tlvtag(uint32_t tag) +{ + uint32_t event_id; + + switch (tag) { + case WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param: + event_id = WMI_EXTSCAN_START_STOP_EVENTID; + break; + + case WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param: + event_id = WMI_EXTSCAN_OPERATION_EVENTID; + break; + + case WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param: + event_id = WMI_EXTSCAN_TABLE_USAGE_EVENTID; + break; + + case WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param: + event_id = WMI_EXTSCAN_CACHED_RESULTS_EVENTID; + break; + + case WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param: + event_id = WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID; + break; + + case WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param: + event_id = WMI_EXTSCAN_HOTLIST_MATCH_EVENTID; + break; + + case WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param: + event_id = WMI_EXTSCAN_CAPABILITIES_EVENTID; + break; + + case WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param: + event_id = WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID; + break; + + default: + event_id = 0; + WMA_LOGE("%s: Unknown tag: %d", __func__, tag); + break; + } + + WMA_LOGI("%s: For tag %d WMI event 0x%x", __func__, tag, event_id); + return event_id; +} +#else +static int wma_extscan_get_eventid_from_tlvtag(uint32_t tag) +{ + return 0; +} +#endif + +/** + * wow_get_wmi_eventid() - map reason or tlv tag to corresponding event id + * @tag: WMI TLV tag + * @reason: WOW reason + * + * WOW reason type is primarily used to find the ID. If there could be + * multiple events that can be sent as a WOW event with same reason + * then tlv tag is used to identify the corresponding event. + * + * Return: + * 0 if TLV tag/reason is invalid + * else return corresponding WMI event id + */ +static int wow_get_wmi_eventid(int32_t reason, uint32_t tag) +{ + uint32_t event_id; + + switch (reason) { + case WOW_REASON_NLO_SCAN_COMPLETE: + event_id = WMI_NLO_SCAN_COMPLETE_EVENTID; + break; + case WOW_REASON_CSA_EVENT: + event_id = WMI_CSA_HANDLING_EVENTID; + break; + case WOW_REASON_LOW_RSSI: + event_id = WMI_ROAM_EVENTID; + break; + case WOW_REASON_CLIENT_KICKOUT_EVENT: + event_id = WMI_PEER_STA_KICKOUT_EVENTID; + break; + case WOW_REASON_EXTSCAN: + event_id = wma_extscan_get_eventid_from_tlvtag(tag); + break; + case WOW_REASON_RSSI_BREACH_EVENT: + event_id = WMI_RSSI_BREACH_EVENTID; + break; + case WOW_REASON_NAN_EVENT: + event_id = WMI_NAN_EVENTID; + break; + default: + WMA_LOGD(FL("Unexpected WOW reason : %s(%d)"), + wma_wow_wake_reason_str(reason), reason); + event_id = 0; + break; + } + + return event_id; +} + +/** + * tlv_check_required() - tells whether to check the wow packet buffer + * for proper TLV structure. + * @reason: WOW reason + * + * In most cases, wow wake up event carries the actual event buffer in + * wow_packet_buffer with some exceptions. This function is used to + * determine when to check for the TLVs in wow_packet_buffer. + * + * Return: true if check is required and false otherwise. + */ +static bool tlv_check_required(int32_t reason) +{ + switch (reason) { + case WOW_REASON_PATTERN_MATCH_FOUND: + return false; + default: + return true; + } +} + /** * wma_wow_wakeup_host_event() - wakeup host event handler * @handle: wma handle @@ -2753,7 +2885,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, struct wma_txrx_node *node; #endif /* FEATURE_WLAN_SCAN_PNO */ uint32_t wake_lock_duration = 0; - uint32_t wow_buf_pkt_len = 0; + void *wmi_cmd_struct_ptr = NULL; + uint32_t tlv_hdr, tag, wow_buf_pkt_len = 0, event_id = 0; + int tlv_ok_status; param_buf = (WMI_WOW_WAKEUP_HOST_EVENTID_param_tlvs *) event; if (!param_buf) { @@ -2769,6 +2903,35 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, qdf_event_set(&wma->wma_resume_event); + if (param_buf->wow_packet_buffer && + tlv_check_required(wake_info->wake_reason)) { + /* + * In case of wow_packet_buffer, first 4 bytes is the length. + * Following the length is the actual buffer. + */ + wow_buf_pkt_len = *(uint32_t *)param_buf->wow_packet_buffer; + tlv_hdr = WMITLV_GET_HDR( + (uint8_t *)param_buf->wow_packet_buffer + 4); + + tag = WMITLV_GET_TLVTAG(tlv_hdr); + event_id = wow_get_wmi_eventid(wake_info->wake_reason, tag); + if (!event_id) { + WMA_LOGE(FL("Unable to find matching ID")); + return -EINVAL; + } + + tlv_ok_status = wmitlv_check_and_pad_event_tlvs( + handle, param_buf->wow_packet_buffer + 4, + wow_buf_pkt_len, event_id, + &wmi_cmd_struct_ptr); + + if (tlv_ok_status != 0) { + WMA_LOGE(FL("Invalid TLVs, Length:%d event_id:%d status: %d"), + wow_buf_pkt_len, event_id, tlv_ok_status); + return -EINVAL; + } + } + switch (wake_info->wake_reason) { case WOW_REASON_AUTH_REQ_RECV: wake_lock_duration = WMA_AUTH_REQ_RECV_WAKE_LOCK_TIMEOUT; @@ -2819,34 +2982,19 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, break; case WOW_REASON_NLO_SCAN_COMPLETE: - { - WMI_NLO_SCAN_COMPLETE_EVENTID_param_tlvs param; - - WMA_LOGD("Host woken up due to pno scan complete reason"); - - /* First 4-bytes of wow_packet_buffer is the length */ - if (param_buf->wow_packet_buffer) { - param.fixed_param = (wmi_nlo_event *) - (param_buf->wow_packet_buffer + 4); - wma_nlo_scan_cmp_evt_handler(handle, - (u_int8_t *)¶m, sizeof(param)); - } else - WMA_LOGD("No wow_packet_buffer present"); - } + WMA_LOGD("Host woken up due to pno scan complete reason"); + if (param_buf->wow_packet_buffer) + wma_nlo_scan_cmp_evt_handler(handle, + wmi_cmd_struct_ptr, wow_buf_pkt_len); + else + WMA_LOGD("No wow_packet_buffer present"); break; #endif /* FEATURE_WLAN_SCAN_PNO */ case WOW_REASON_CSA_EVENT: - { - WMI_CSA_HANDLING_EVENTID_param_tlvs param; WMA_LOGD("Host woken up because of CSA IE"); - param.fixed_param = (wmi_csa_event_fixed_param *) - (((uint8_t *) wake_info) - + sizeof(WOW_EVENT_INFO_fixed_param) - + WOW_CSA_EVENT_OFFSET); - wma_csa_offload_handler(handle, (uint8_t *) ¶m, - sizeof(param)); - } + wma_csa_offload_handler(handle, wmi_cmd_struct_ptr, + wow_buf_pkt_len); break; #ifdef FEATURE_WLAN_LPHB @@ -2878,115 +3026,69 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, break; case WOW_REASON_LOW_RSSI: - { /* WOW_REASON_LOW_RSSI is used for all roaming events. * WMI_ROAM_REASON_BETTER_AP, WMI_ROAM_REASON_BMISS, * WMI_ROAM_REASON_SUITABLE_AP will be handled by * wma_roam_event_callback(). */ - WMI_ROAM_EVENTID_param_tlvs param; wma_wow_wake_up_stats(wma, NULL, 0, WOW_REASON_LOW_RSSI); + WMA_LOGD("Host woken up because of roam event"); if (param_buf->wow_packet_buffer) { /* Roam event is embedded in wow_packet_buffer */ - WMA_LOGD("Host woken up because of roam event"); - qdf_mem_copy((uint8_t *) &wow_buf_pkt_len, - param_buf->wow_packet_buffer, 4); WMA_LOGD("wow_packet_buffer dump"); qdf_trace_hex_dump(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_DEBUG, param_buf->wow_packet_buffer, wow_buf_pkt_len); - if (wow_buf_pkt_len >= sizeof(param)) { - param.fixed_param = - (wmi_roam_event_fixed_param *) - (param_buf->wow_packet_buffer + 4); - wma_roam_event_callback(handle, - (uint8_t *) & - param, - sizeof(param)); - } else { - WMA_LOGE("Wrong length for roam event = %d bytes", - wow_buf_pkt_len); - } + wma_roam_event_callback(handle, wmi_cmd_struct_ptr, + wow_buf_pkt_len); } else { - /* No wow_packet_buffer means a better AP beacon + /* + * No wow_packet_buffer means a better AP beacon * will follow in a later event. */ WMA_LOGD("Host woken up because of better AP beacon"); } break; - } case WOW_REASON_CLIENT_KICKOUT_EVENT: - { - WMI_PEER_STA_KICKOUT_EVENTID_param_tlvs param; + WMA_LOGD("Host woken up because of sta_kickout event"); if (param_buf->wow_packet_buffer) { - /* station kickout event embedded in wow_packet_buffer */ - WMA_LOGD("Host woken up because of sta_kickout event"); - qdf_mem_copy((u_int8_t *) &wow_buf_pkt_len, - param_buf->wow_packet_buffer, 4); - WMA_LOGD("wow_packet_buffer dump"); - qdf_trace_hex_dump(QDF_MODULE_ID_WMA, + WMA_LOGD("wow_packet_buffer dump"); + qdf_trace_hex_dump(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_DEBUG, param_buf->wow_packet_buffer, wow_buf_pkt_len); - if (wow_buf_pkt_len >= sizeof(param)) { - param.fixed_param = (wmi_peer_sta_kickout_event_fixed_param *) - (param_buf->wow_packet_buffer + 4); wma_peer_sta_kickout_event_handler(handle, - (u_int8_t *)¶m, sizeof(param)); - } else { - WMA_LOGE("Wrong length for sta_kickout event = %d bytes", - wow_buf_pkt_len); - } + wmi_cmd_struct_ptr, wow_buf_pkt_len); } else { WMA_LOGD("No wow_packet_buffer present"); } break; - } #ifdef FEATURE_WLAN_EXTSCAN case WOW_REASON_EXTSCAN: WMA_LOGD("Host woken up because of extscan reason"); wma_wow_wake_up_stats(wma, NULL, 0, WOW_REASON_EXTSCAN); - if (param_buf->wow_packet_buffer) { - wow_buf_pkt_len = - *(uint32_t *)param_buf->wow_packet_buffer; + if (param_buf->wow_packet_buffer) wma_extscan_wow_event_callback(handle, - (u_int8_t *)(param_buf->wow_packet_buffer + 4), - wow_buf_pkt_len); - } else + wmi_cmd_struct_ptr, wow_buf_pkt_len); + else WMA_LOGE("wow_packet_buffer is empty"); break; #endif case WOW_REASON_RSSI_BREACH_EVENT: - { - WMI_RSSI_BREACH_EVENTID_param_tlvs param; - - wma_wow_wake_up_stats(wma, NULL, 0, + wma_wow_wake_up_stats(wma, NULL, 0, WOW_REASON_RSSI_BREACH_EVENT); - WMA_LOGD("Host woken up because of rssi breach reason"); - /* rssi breach event is embedded in wow_packet_buffer */ - if (param_buf->wow_packet_buffer) { - qdf_mem_copy((u_int8_t *) &wow_buf_pkt_len, - param_buf->wow_packet_buffer, 4); - if (wow_buf_pkt_len >= sizeof(param)) { - param.fixed_param = - (wmi_rssi_breach_event_fixed_param *) - (param_buf->wow_packet_buffer + 4); - wma_rssi_breached_event_handler(handle, - (u_int8_t *)¶m, - sizeof(param)); - } else { - WMA_LOGE("%s: Wrong length: %d bytes", - __func__, wow_buf_pkt_len); - } - } else - WMA_LOGD("No wow_packet_buffer present"); - } + WMA_LOGD("Host woken up because of rssi breach reason"); + /* rssi breach event is embedded in wow_packet_buffer */ + if (param_buf->wow_packet_buffer) + wma_rssi_breached_event_handler(handle, + wmi_cmd_struct_ptr, wow_buf_pkt_len); + else + WMA_LOGD("No wow_packet_buffer present"); break; case WOW_REASON_NAN_EVENT: WMA_LOGA("Host woken up due to NAN event reason"); wma_nan_rsp_event_handler(handle, - (uint8_t *)param_buf->wow_packet_buffer, - sizeof(WMI_NAN_EVENTID_param_tlvs)); + wmi_cmd_struct_ptr, wow_buf_pkt_len); break; case WOW_REASON_NAN_DATA: WMA_LOGD(FL("Host woken up for NAN data path event from FW")); @@ -3006,6 +3108,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, } break; default: + WMA_LOGE(FL("WOW reason %s(%d)- not handled"), + wma_wow_wake_reason_str(wake_info->wake_reason), + wake_info->wake_reason); break; } @@ -3016,6 +3121,7 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, WMA_LOGA("Holding %d msec wake_lock", wake_lock_duration); } + wmitlv_free_allocated_event_tlvs(event_id, &wmi_cmd_struct_ptr); return 0; } diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index f9ec557416a0..0bd344a38af6 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -3259,61 +3259,6 @@ void wma_scan_cache_updated_ind(tp_wma_handle wma, uint8_t sessionId) } #ifdef FEATURE_WLAN_EXTSCAN -/** - * wma_extscan_get_eventid_from_tlvtag() - map tlv tag to corresponding event id - * @tag: WMI TLV tag - * - * Return: - * 0 if TLV tag is invalid - * else return corresponding WMI event id - */ -static int wma_extscan_get_eventid_from_tlvtag(uint32_t tag) -{ - uint32_t event_id; - - switch (tag) { - case WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param: - event_id = WMI_EXTSCAN_START_STOP_EVENTID; - break; - - case WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param: - event_id = WMI_EXTSCAN_OPERATION_EVENTID; - break; - - case WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param: - event_id = WMI_EXTSCAN_TABLE_USAGE_EVENTID; - break; - - case WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param: - event_id = WMI_EXTSCAN_CACHED_RESULTS_EVENTID; - break; - - case WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param: - event_id = WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID; - break; - - case WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param: - event_id = WMI_EXTSCAN_HOTLIST_MATCH_EVENTID; - break; - - case WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param: - event_id = WMI_EXTSCAN_CAPABILITIES_EVENTID; - break; - - case WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param: - event_id = WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID; - break; - - default: - event_id = 0; - WMA_LOGE("%s: Unknown tag: %d", __func__, tag); - break; - } - - WMA_LOGI("%s: For tag %d WMI event 0x%x", __func__, tag, event_id); - return event_id; -} - /** * wma_extscan_wow_event_callback() - extscan wow event callback * @handle: WMA handle @@ -3326,77 +3271,53 @@ static int wma_extscan_get_eventid_from_tlvtag(uint32_t tag) * of event buffer is common tlv header, which is a combination * of tag (higher 2 bytes) and length (lower 2 bytes). The tag is used to * identify the event which triggered wow event. + * Payload is extracted and converted into generic tlv structure before + * being passed to this function. * * @Return: none */ void wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len) { - uint32_t id; - int tlv_ok_status = 0; - void *wmi_cmd_struct_ptr = NULL; uint32_t tag = WMITLV_GET_TLVTAG(WMITLV_GET_HDR(event)); - id = wma_extscan_get_eventid_from_tlvtag(tag); - if (!id) { - WMA_LOGE("%s: Invalid Tag: %d", __func__, tag); - return; - } - - tlv_ok_status = wmitlv_check_and_pad_event_tlvs( - handle, event, len, id, - &wmi_cmd_struct_ptr); - if (tlv_ok_status != 0) { - WMA_LOGE("%s: Invalid Tag: %d could not check and pad tlvs", - __func__, tag); - return; - } - switch (tag) { case WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param: - wma_extscan_start_stop_event_handler(handle, - wmi_cmd_struct_ptr, len); + wma_extscan_start_stop_event_handler(handle, event, len); break; case WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param: - wma_extscan_operations_event_handler(handle, - wmi_cmd_struct_ptr, len); + wma_extscan_operations_event_handler(handle, event, len); break; case WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param: - wma_extscan_table_usage_event_handler(handle, - wmi_cmd_struct_ptr, len); + wma_extscan_table_usage_event_handler(handle, event, len); break; case WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param: - wma_extscan_cached_results_event_handler(handle, - wmi_cmd_struct_ptr, len); + wma_extscan_cached_results_event_handler(handle, event, len); break; case WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param: - wma_extscan_change_results_event_handler(handle, - wmi_cmd_struct_ptr, len); + wma_extscan_change_results_event_handler(handle, event, len); break; case WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param: - wma_extscan_hotlist_match_event_handler(handle, - wmi_cmd_struct_ptr, len); + wma_extscan_hotlist_match_event_handler(handle, event, len); break; case WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param: - wma_extscan_capabilities_event_handler(handle, - wmi_cmd_struct_ptr, len); + wma_extscan_capabilities_event_handler(handle, event, len); break; case WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param: wma_extscan_hotlist_ssid_match_event_handler(handle, - wmi_cmd_struct_ptr, len); + event, len); break; default: - WMA_LOGE("%s: Unknown tag: %d", __func__, tag); + WMA_LOGE(FL("Unknown tag: %d"), tag); break; } - wmitlv_free_allocated_event_tlvs(id, &wmi_cmd_struct_ptr); return; } -- cgit v1.2.3 From beeacb1071bba3e915526d380ddfa4747f5b8a3c Mon Sep 17 00:00:00 2001 From: Manjunathappa Prakash Date: Fri, 17 Jun 2016 18:18:32 -0700 Subject: qcacld-3.0: Kbuild: Enable LRO Enable LRO. Depends on kernel LRO feature is enabled. Change-Id: Idee37eb664046961c26d8619f7eb18c57ac0fb32 CRs-Fixed: 1035499 --- Kbuild | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Kbuild b/Kbuild index 36c5673575d9..d2474d828a14 100644 --- a/Kbuild +++ b/Kbuild @@ -168,12 +168,10 @@ ifneq ($(CONFIG_ROME_IF),sdio) endif # Flag to enable LRO (Large Receive Offload) - ifeq ($(CONFIG_CNSS_EOS), y) - ifeq ($(CONFIG_INET_LRO), y) - CONFIG_WLAN_LRO := y - else - CONFIG_WLAN_LRO := n - endif + ifeq ($(CONFIG_INET_LRO), y) + CONFIG_WLAN_LRO := y + else + CONFIG_WLAN_LRO := n endif endif -- cgit v1.2.3 From 9efd05dcd18f9e396368a51a0dbac2649464787a Mon Sep 17 00:00:00 2001 From: Manjunathappa Prakash Date: Sat, 18 Jun 2016 06:37:36 -0700 Subject: qcacld-3.0: Enable LRO, NAPI, Fastpath Enable LRO, NAPI and Fastpath. Moving datapath features together at one place in INI. Change-Id: I3996ce76a0fa386b5cb7eeb00548db9dea54d390 CRs-Fixed: 1035499 --- config/WCNSS_qcom_cfg.ini | 88 ++++++++++++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/config/WCNSS_qcom_cfg.ini b/config/WCNSS_qcom_cfg.ini index e30773ce54e6..e3d506db0387 100644 --- a/config/WCNSS_qcom_cfg.ini +++ b/config/WCNSS_qcom_cfg.ini @@ -442,16 +442,6 @@ gEnablePowerSaveOffload=2 #Enable firmware uart print gEnablefwprint=0 -#IPA config -gIPAConfig=0 -gIPADescSize=800 -gIPAPreFilterEnable=1 -gIPARMEnable=1 -gIPAIPv6Enable=1 - -IpaUcOffloadEnabled=0 -gIpaUcStaOffload=0 - #P2P Listen offload gEnableP2pListenOffload=1 @@ -479,12 +469,6 @@ gEnableMCCAdaptiveScheduler=1 #Enable or Disable p2p device address administered isP2pDeviceAddrAdministrated=0 -#Enable Rx thread -gEnableRxThread=1 - -#Enable NAPI -gEnableNAPI=1 - # Set Thermal Power limit TxPower2g=10 TxPower5g=10 @@ -511,14 +495,6 @@ ssdp = 0 #Enable Memory Deep Sleep gEnableMemDeepSleep=1 -# Bus bandwidth threshold values in terms of number of packets -gBusBandwidthHighThreshold=2000 -gBusBandwidthMediumThreshold=500 -gBusBandwidthLowThreshold=150 - -# Bus bandwidth compute timeout value in ms -gBusBandwidthComputeInterval=100 - # Regulatory Setting; 0=STRICT; 1=CUSTOM gRegulatoryChangeCountry=1 # RA filtering rate limit param, the current value would not @@ -600,20 +576,70 @@ gEnableTDLSOffChannel=1 # 1=Enable, 0=Disable (default) gEnableMacAddrSpoof=0 +################ Datapath feature set Begin ################ +# Bus bandwidth threshold values in terms of number of packets +gBusBandwidthHighThreshold=2000 +gBusBandwidthMediumThreshold=500 +gBusBandwidthLowThreshold=150 + +# Bus bandwidth compute timeout value in ms +gBusBandwidthComputeInterval=100 + +# VHT Tx/Rx MCS values +# Valid values are 0,1,2. If commented out, the default value is 0. +# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9 +gVhtRxMCS=2 +gVhtTxMCS=2 + +# VHT Tx/Rx MCS values for 2x2 +# Valid values are 0,1,2. If commented out, the default value is 0. +# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9 +gEnable2x2=1 +gVhtRxMCS2x2=2 +gVhtTxMCS2x2=2 + +#IPA config +gIPAConfig=0 +gIPADescSize=800 +gIPAPreFilterEnable=1 +gIPARMEnable=1 +gIPAIPv6Enable=1 + +IpaUcOffloadEnabled=0 +gIpaUcStaOffload=0 + +# Enable/Disable RX full reorder offload +gReorderOffloadSupported=1 + +# Enable CE classification +# 1 - enable(default) 0 - disable +gCEClassifyEnable=1 + +#Enable Rx thread +# 1 - enable 0 - disable(default) +gEnableRxThread=0 + # Enable(Tx) fastpath for data traffic. -# 0 - disable -# 1 - enable +# 1 - enable(default) 0 - disable gEnableFastPath=1 +# This flag enables IP, TCP and UDP checksum offload +# 1 - enable(default) 0 - disable +gEnableIpTcpUdpChecksumOffload=1 + +# Enable NAPI +# 1 - enable(default) 0 - disable +gEnableNAPI=1 + # Enable TCP Segmentation Offload -# 0 - disable -# 1 - enable +# 1 - enable(default) 0 - disable TSOEnable=1 -# Enable Large Receive Offload -# 0 - disable -# 1 - enable +# Enable Large Recieve Offload +# 1 - enable(default) 0 - disable LROEnable=1 +################ Datapath feature set End ################ + END # Note: Configuration parser would not read anything past the END marker -- cgit v1.2.3 From 204899725296c292ff4974d645b3b7f22244202e Mon Sep 17 00:00:00 2001 From: Nirav Shah Date: Thu, 16 Jun 2016 19:20:28 +0530 Subject: qcacld-3.0: Changes to support wmi tx bundle completion Changes to support wmi tx bundle completion. Change-Id: I4c8d9b284d4616ce48b48f0a3424a03459dbefb0 CRs-fixed: 1023818 --- core/wma/inc/wma.h | 2 + core/wma/src/wma_main.c | 12 ++++++ core/wma/src/wma_mgmt.c | 108 ++++++++++++++++++++++++++++++++++-------------- 3 files changed, 91 insertions(+), 31 deletions(-) diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 323b8a384da4..9c80a51de544 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -2077,6 +2077,8 @@ struct wmi_desc_t *wmi_desc_get(tp_wma_handle wma_handle); void wmi_desc_put(tp_wma_handle wma_handle, struct wmi_desc_t *wmi_desc); int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params, uint32_t len); +int wma_mgmt_tx_bundle_completion_handler(void *handle, + uint8_t *cmpl_event_params, uint32_t len); void wma_set_dfs_region(tp_wma_handle wma, uint8_t dfs_region); uint32_t wma_get_vht_ch_width(void); QDF_STATUS diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index b1811221c8fd..95d86df2c2af 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -238,6 +238,8 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle) tgt_cfg.num_tids = (2 * (no_of_peers_supported + CFG_TGT_NUM_VDEV + 2)); tgt_cfg.scan_max_pending_req = wma_handle->max_scan; + WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(tgt_cfg.flag1, 1); + WMITLV_SET_HDR(&tgt_cfg.tlv_header, WMITLV_TAG_STRUC_wmi_resource_config, WMITLV_GET_STRUCT_TLVLEN(wmi_resource_config)); @@ -4318,6 +4320,16 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info, return -EINVAL; } + status = wmi_unified_register_event_handler( + wma_handle->wmi_handle, + WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID, + wma_mgmt_tx_bundle_completion_handler, + WMA_RX_SERIALIZER_CTX); + if (status) { + WMA_LOGE("Failed to register MGMT over WMI completion handler"); + return -EINVAL; + } + } else { WMA_LOGE("FW doesnot support WMI_SERVICE_MGMT_TX_WMI, Use HTT interface for Management Tx"); } diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 5d037b8b668e..a5cf5b8f88e1 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -2452,46 +2452,28 @@ void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id) } /** - * wma_mgmt_tx_completion_handler() - wma mgmt Tx completion event handler - * @handle: wma handle - * @cmpl_event_params: completion event handler data - * @len: length of @cmpl_event_params + * wma_process_mgmt_tx_completion() - process mgmt completion + * @wma_handle: wma handle + * @desc_id: descriptor id + * @status: status * - * Return: 0 on success; error number otherwise + * Return: 0 for success or error code */ - -int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params, - uint32_t len) +int wma_process_mgmt_tx_completion(tp_wma_handle wma_handle, + uint32_t desc_id, uint32_t status) { - tp_wma_handle wma_handle = (tp_wma_handle)handle; - WMI_MGMT_TX_COMPLETION_EVENTID_param_tlvs *param_buf; - wmi_mgmt_tx_compl_event_fixed_param *cmpl_params; struct wmi_desc_t *wmi_desc; - ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX); - if (!pdev) { - WMA_LOGE("%s: txrx pdev is NULL", __func__); - return -EINVAL; - } if (pdev == NULL) { WMA_LOGE("%s: NULL pdev pointer", __func__); return -EINVAL; } - param_buf = (WMI_MGMT_TX_COMPLETION_EVENTID_param_tlvs *) - cmpl_event_params; - if (!param_buf || !wma_handle) { - WMA_LOGE("%s: Invalid mgmt Tx completion event", __func__); - return -EINVAL; - } - cmpl_params = param_buf->fixed_param; - - WMA_LOGI("%s: status:%d wmi_desc_id:%d", __func__, cmpl_params->status, - cmpl_params->desc_id); + WMA_LOGI("%s: status:%d wmi_desc_id:%d", __func__, status, desc_id); wmi_desc = (struct wmi_desc_t *) - (&wma_handle->wmi_desc_pool.array[cmpl_params->desc_id]); + (&wma_handle->wmi_desc_pool.array[desc_id]); if (!wmi_desc) { WMA_LOGE("%s: Invalid wmi desc", __func__); @@ -2500,18 +2482,82 @@ int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params, if (wmi_desc->nbuf) qdf_nbuf_unmap_single(pdev->osdev, wmi_desc->nbuf, - QDF_DMA_TO_DEVICE); + QDF_DMA_TO_DEVICE); if (wmi_desc->tx_cmpl_cb) wmi_desc->tx_cmpl_cb(wma_handle->mac_context, - wmi_desc->nbuf, 1); + wmi_desc->nbuf, 1); if (wmi_desc->ota_post_proc_cb) wmi_desc->ota_post_proc_cb((tpAniSirGlobal) - wma_handle->mac_context, - cmpl_params->status); + wma_handle->mac_context, + status); wmi_desc_put(wma_handle, wmi_desc); + return 0; +} + +/** + * wma_mgmt_tx_completion_handler() - wma mgmt Tx completion event handler + * @handle: wma handle + * @cmpl_event_params: completion event handler data + * @len: length of @cmpl_event_params + * + * Return: 0 on success; error number otherwise + */ + +int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params, + uint32_t len) +{ + tp_wma_handle wma_handle = (tp_wma_handle)handle; + WMI_MGMT_TX_COMPLETION_EVENTID_param_tlvs *param_buf; + wmi_mgmt_tx_compl_event_fixed_param *cmpl_params; + + param_buf = (WMI_MGMT_TX_COMPLETION_EVENTID_param_tlvs *) + cmpl_event_params; + if (!param_buf || !wma_handle) { + WMA_LOGE("%s: Invalid mgmt Tx completion event", __func__); + return -EINVAL; + } + cmpl_params = param_buf->fixed_param; + + wma_process_mgmt_tx_completion(wma_handle, + cmpl_params->desc_id, cmpl_params->status); + + return 0; +} + +/** + * wma_mgmt_tx_bundle_completion_handler() - mgmt bundle comp handler + * @handle: wma handle + * @buf: buffer + * @len: length + * + * Return: 0 for success or error code + */ +int wma_mgmt_tx_bundle_completion_handler(void *handle, uint8_t *buf, + uint32_t len) +{ + tp_wma_handle wma_handle = (tp_wma_handle)handle; + WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID_param_tlvs *param_buf; + wmi_mgmt_tx_compl_bundle_event_fixed_param *cmpl_params; + uint32_t num_reports; + uint32_t *desc_ids; + uint32_t *status; + int i; + + param_buf = (WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID_param_tlvs *)buf; + if (!param_buf && !wma_handle) { + WMA_LOGE("%s: Invalid mgmt Tx completion event", __func__); + return -EINVAL; + } + cmpl_params = param_buf->fixed_param; + num_reports = cmpl_params->num_reports; + desc_ids = (uint32_t *)(param_buf->desc_ids); + status = (uint32_t *)(param_buf->status); + for (i = 0; i < num_reports; i++) + wma_process_mgmt_tx_completion(wma_handle, + desc_ids[i], status[i]); return 0; } -- cgit v1.2.3 From d939d3decdaa954df63636edc6f07859041b9871 Mon Sep 17 00:00:00 2001 From: Anurag Chouhan Date: Wed, 20 Jul 2016 17:45:48 +0530 Subject: qcacld-3.0: Update correct authtype during connect Currently the authtype is not getting updated properly in case of wpa2psk security mode, this change will update the correct auth type Change-Id: I11d15457b375ed2803420cfd08070a7bbc181029 CRs-Fixed: 1044021 --- core/cds/inc/cds_api.h | 26 -------------------------- core/hdd/inc/wlan_hdd_assoc.h | 4 +++- core/hdd/src/wlan_hdd_cfg80211.c | 6 +++--- core/hdd/src/wlan_hdd_cfg80211.h | 3 +++ 4 files changed, 9 insertions(+), 30 deletions(-) diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 8c3932be2109..9e9774fe99a1 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -90,32 +90,6 @@ void cds_set_driver_state(enum cds_driver_state); void cds_clear_driver_state(enum cds_driver_state); enum cds_driver_state cds_get_driver_state(void); -/** - * cds_get_u16()- get 16 bit data in little endian - * @ptr: buffer that holds data - * - * Return: uint16_t data in little endian format - */ -static inline uint16_t cds_get_u16(uint8_t *ptr) -{ - return ((uint16_t) (*(ptr+1) << 8)) | - ((uint16_t) (*ptr)); -} - -/** - * cds_get_u32()- get 32 bit data in little endian - * @ptr: buffer that holds data - * - * Return: uint32_t data in little endian format - */ -static inline uint32_t cds_get_u32(uint8_t *ptr) -{ - return (*(ptr+3) << 24) | - (*(ptr+2) << 16) | - (*(ptr+1) << 8) | - (*(ptr)); -} - /** * cds_is_driver_loading() - Is driver load in progress * diff --git a/core/hdd/inc/wlan_hdd_assoc.h b/core/hdd/inc/wlan_hdd_assoc.h index 24b28711d78e..c71450f3e6e9 100644 --- a/core/hdd/inc/wlan_hdd_assoc.h +++ b/core/hdd/inc/wlan_hdd_assoc.h @@ -99,6 +99,8 @@ typedef enum { * @ht_present: ht element present or not * @vht_present: vht element present or not * @hs20_present: hs20 element present or not + * @ht_op_present: ht operation present or not + * @vht_op_present: vht operation present or not */ struct hdd_conn_flag { uint8_t ht_present:1; @@ -173,7 +175,7 @@ struct hdd_conn_flag { * @ht_caps: holds ht capabilities info * @vht_caps: holds vht capabilities info * @hs20vendor_ie: holds passpoint/hs20 info - * @hdd_conn_flag: flag conn info params is present or not + * @conn_flag: flag conn info params is present or not * @roam_count: roaming counter * @signal: holds rssi info * @assoc_status_code: holds assoc fail reason diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index af6bd9b9bc32..913c2359c1a7 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -3328,7 +3328,7 @@ fail: * * Return: Success(0) or reason code for failure */ -static int32_t +static int __hdd_cfg80211_get_station_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, const void *data, @@ -9465,8 +9465,8 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, } pRoamProfile = &pWextState->roamProfile; - qdf_mem_zero(&hdd_sta_ctx->conn_info, - sizeof(hdd_sta_ctx->conn_info)); + qdf_mem_zero(&hdd_sta_ctx->conn_info.conn_flag, + sizeof(hdd_sta_ctx->conn_info.conn_flag)); if (pRoamProfile) { hdd_station_ctx_t *pHddStaCtx; diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index d6e53b7118d2..81a968209364 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -406,8 +406,10 @@ enum qca_nl80211_vendor_subcmds { * latest cached information during the connected state , if queried * when in disconnected state. * + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INVALID: Invalid attribute * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO: bss info * @QCA_WLAN_VENDOR_ATTR_GET_STATION_ASSOC_FAIL_REASON: assoc fail reason + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_AFTER_LAST: After last */ enum qca_wlan_vendor_attr_get_station { QCA_WLAN_VENDOR_ATTR_GET_STATION_INVALID = 0, @@ -504,6 +506,7 @@ enum qca_wlan_auth_type { * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ASSOC_FAIL_REASON: * Status Code Corresponding to the Association Failure. * Unsigned 32 bit value. + * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AFTER_LAST: After last */ enum qca_wlan_vendor_attr_get_station_info { QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_INVALID = 0, -- cgit v1.2.3 From 74da41bcc2cea822aa99a5406b74605389129224 Mon Sep 17 00:00:00 2001 From: Vishwajith Upendra Date: Wed, 20 Jul 2016 09:20:09 -0700 Subject: Release 5.1.0.22C Release 5.1.0.22C Change-Id: I87f9c706dad7271b5f21579df71a644abc120257 CRs-Fixed: 688141 --- core/mac/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index a1b8466626c9..05002a9595d6 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -41,9 +41,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 0 -#define QWLAN_VERSION_EXTRA "B" +#define QWLAN_VERSION_EXTRA "C" #define QWLAN_VERSION_BUILD 22 -#define QWLAN_VERSIONSTR "5.1.0.22B" +#define QWLAN_VERSIONSTR "5.1.0.22C" #endif /* QWLAN_VERSION_H */ -- cgit v1.2.3