From 63d736115248c99bdd953f849a900ceee22f110d Mon Sep 17 00:00:00 2001 From: Leo Chang Date: Tue, 18 Oct 2016 18:09:43 -0700 Subject: [PATCH] qcacld-3.0: enable ipa hw dynamic detection capabiliry Fix IPA V2 compile problem fix. MODEM included platform and non-MODEM platform should use the same binary. Then WLAN cannot disable IPA data path through INI nor compile time. WLAN host driver should dynamically detect IPA HW status and should enable or disable IPA data path based on IPA HW status. Change-Id: I2d34aaa9f1616e621ff9585c69c4618463e05c65 CRs-fixed: 1078825 --- core/hdd/src/wlan_hdd_ipa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 66ee27f6cc8f..4d361f8f4818 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -533,9 +533,12 @@ do { \ pipe_in.u.ul.rdy_comp_ring_wp_va = \ ipa_ctxt->ipa_resource.rx2_proc_done_idx_vaddr; \ } while (0) + +#define HDD_IPA_CHECK_HW() ipa_uc_reg_rdyCB(NULL) #else /* Do nothing */ #define HDD_IPA_WDI2_SET(pipe_in, ipa_ctxt) +#define HDD_IPA_CHECK_HW() 0 #endif /* IPA3 */ static struct hdd_ipa_adapter_2_client { @@ -2815,7 +2818,7 @@ static void hdd_ipa_send_pkt_to_tl( bool hdd_ipa_is_present(hdd_context_t *hdd_ctx) { /* Check if ipa hw is enabled */ - if (ipa_uc_reg_rdyCB(NULL) != -EPERM) + if (HDD_IPA_CHECK_HW() != -EPERM) return true; else return false;