qcacld-3.0: WLAN host changes for SDM845

1. To allow WLAN IPA module built for Napali msm-4.9, add to set
   CONFIG_IPA_OFFLOAD build flag 1 when CONFIG_IPA3 is defined
2. Reduce HDD_IPA_MAX_IFACE to 2
3. Rename WDI structure variable num_bam_int_in_non_running_state,
   which is corrected in msm-4.9

Change-Id: I0a58ada19177ab4127e0b4f2e14240c683613192
CRs-Fixed: 2057936
diff --git a/Kbuild b/Kbuild
index ff8798f..5ee9a01 100644
--- a/Kbuild
+++ b/Kbuild
@@ -357,6 +357,9 @@
 ifeq ($(CONFIG_IPA), y)
 #CONFIG_IPA_OFFLOAD := 1
 endif
+ifeq ($(CONFIG_IPA3), y)
+CONFIG_IPA_OFFLOAD := 1
+endif
 
 #Enable Signed firmware support for split binary format
 CONFIG_QCA_SIGNED_SPLIT_BINARY_SUPPORT := 0
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index f6953ce..7aa9089 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -2219,6 +2219,11 @@
 }
 #endif
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0))
+/* older versions had a typo */
+#define num_bam_int_in_non_running_state num_bam_int_in_non_runnning_state
+#endif
+
 /**
  * hdd_ipa_uc_op_cb() - IPA uC operation callback
  * @op_msg: operation message received from firmware
@@ -2424,7 +2429,7 @@
 			  ipa_stat.tx_ch_stats.num_unexpected_db,
 			  ipa_stat.tx_ch_stats.num_bam_int_handled,
 			  ipa_stat.tx_ch_stats.
-			  num_bam_int_in_non_runnning_state,
+			  num_bam_int_in_non_running_state,
 			  ipa_stat.tx_ch_stats.num_qmb_int_handled);
 
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,