diff options
| author | Varun Reddy Yeturu <varunreddy.yeturu@codeaurora.org> | 2017-09-26 22:54:30 -0700 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-09-27 18:39:36 -0700 |
| commit | 8b6a371cab71c3e44dac7d77dcbdfe893b2fc57b (patch) | |
| tree | f29294e964cd93633b447d506152cc046d34d824 | |
| parent | 7d0738418f83504a6fa1874b7b669e777ef02f30 (diff) | |
qcacld-3.0: Check firmware MAWC capability
Check for the target capability for MAWC(Motion Aided Wireless
Connectivity) feature before sending the roaming or PNO based
MAWC WMI commands to the firmware
Change-Id: I0cc344d8307cf43996c2eede835bf9069790fa56
CRs-Fixed: 2117825
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 1 | ||||
| -rw-r--r-- | core/wma/inc/wma_tgt_cfg.h | 4 | ||||
| -rw-r--r-- | core/wma/src/wma_main.c | 5 | ||||
| -rw-r--r-- | core/wma/src/wma_scan_roam.c | 21 |
4 files changed, 27 insertions, 4 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 87858cf66631..6566e5bdd915 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -954,6 +954,7 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx, config->isRoamOffloadEnabled &= cfg->en_roam_offload; #endif config->sap_get_peer_info &= cfg->get_peer_info_enabled; + config->MAWCEnabled &= cfg->is_fw_mawc_capable; sme_update_tgt_services(hdd_ctx->hHal, cfg); } diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h index 32d641c8237e..f6e4f45a4d30 100644 --- a/core/wma/inc/wma_tgt_cfg.h +++ b/core/wma/inc/wma_tgt_cfg.h @@ -43,6 +43,9 @@ * @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf * @en_tdls_uapsd_sleep_sta: enable sta tdls uapsd sleep * @en_roam_offload: enable roam offload + * @get_peer_info_enabled: PEER info feature + * @is_fils_roaming_supported: Fast Initial Link Setup feature + * @is_fw_mawc_capable: Motion Aided Wireless Connectivity feature */ struct wma_tgt_services { uint32_t sta_power_save; @@ -67,6 +70,7 @@ struct wma_tgt_services { #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ bool get_peer_info_enabled; bool is_fils_roaming_supported; + bool is_fw_mawc_capable; }; /** diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index c0c8d9a3450f..6a039880b0d3 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -4220,6 +4220,11 @@ static inline void wma_update_target_services(tp_wma_handle wh, wh->wmi_service_ext_bitmap, WMI_SERVICE_FILS_SUPPORT)) cfg->is_fils_roaming_supported = true; + + if (WMI_SERVICE_EXT_IS_ENABLED(wh->wmi_service_bitmap, + wh->wmi_service_ext_bitmap, + WMI_SERVICE_MAWC_SUPPORT)) + cfg->is_fw_mawc_capable = true; } /** diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index e22a7213c560..61ee4ae81b0c 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -2014,10 +2014,17 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle, roam_req->sessionId); if (qdf_status != QDF_STATUS_SUCCESS) break; - qdf_status = wma_roam_scan_mawc_params(wma_handle, roam_req); - if (qdf_status != QDF_STATUS_SUCCESS) { - WMA_LOGE("Sending roaming MAWC params failed"); - break; + if (WMI_SERVICE_EXT_IS_ENABLED(wma_handle->wmi_service_bitmap, + wma_handle->wmi_service_ext_bitmap, + WMI_SERVICE_MAWC_SUPPORT)) { + qdf_status = + wma_roam_scan_mawc_params(wma_handle, roam_req); + if (qdf_status != QDF_STATUS_SUCCESS) { + WMA_LOGE("Sending roaming MAWC params failed"); + break; + } + } else { + WMA_LOGD("MAWC roaming not supported by firmware"); } qdf_status = wma_roam_scan_filter(wma_handle, roam_req); if (qdf_status != QDF_STATUS_SUCCESS) { @@ -3504,6 +3511,12 @@ QDF_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno) WMA_LOGD("PNO start request sent successfully for vdev %d", pno->sessionId); } + if (!WMI_SERVICE_EXT_IS_ENABLED(wma->wmi_service_bitmap, + wma->wmi_service_ext_bitmap, + WMI_SERVICE_MAWC_SUPPORT)) { + WMA_LOGD("PNO MAWC not supported by firmware"); + goto exit_pno_start; + } mawc_params = qdf_mem_malloc(sizeof(*mawc_params)); if (mawc_params == NULL) { WMA_LOGE("%s : MAWC Memory allocation failed", __func__); |
