qcacmn: Fix wrong register window access

In register select window if the register offset falls
in the last stored register window in driver, register
window remap is not done. There is a case if platform
driver accesses the hardware registers and remaps the
register window, then driver wont be aware of this and
have the wrong cached register window. So when driver
tries to write or read it selects the wrong register
window and accesses wrong register address. So fix this
by always doing the register window remap.

Change-Id: Ic38cc8cc3d9d82a3534f5ea356027db324c9fe13
CRs-Fixed: 2477771
diff --git a/hal/wifi3.0/hal_api.h b/hal/wifi3.0/hal_api.h
index b373f34..6b22a4a 100644
--- a/hal/wifi3.0/hal_api.h
+++ b/hal/wifi3.0/hal_api.h
@@ -90,6 +90,16 @@
 }
 #endif
 
+#ifdef PCIE_REG_WINDOW_LOCAL_NO_CACHE
+static inline void hal_select_window(struct hal_soc *hal_soc, uint32_t offset)
+{
+	uint32_t window = (offset >> WINDOW_SHIFT) & WINDOW_VALUE_MASK;
+
+	qdf_iowrite32(hal_soc->dev_base_addr + WINDOW_REG_ADDRESS,
+		      WINDOW_ENABLE_BIT | window);
+	hal_soc->register_window = window;
+}
+#else
 static inline void hal_select_window(struct hal_soc *hal_soc, uint32_t offset)
 {
 	uint32_t window = (offset >> WINDOW_SHIFT) & WINDOW_VALUE_MASK;
@@ -99,6 +109,7 @@
 		hal_soc->register_window = window;
 	}
 }
+#endif
 
 /**
  * note1: WINDOW_RANGE_MASK = (1 << WINDOW_SHIFT) -1