|
@@ -524,6 +524,26 @@ static void hdd_soc_load_unlock(struct device *dev)
|
|
|
hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_INIT);
|
|
|
}
|
|
|
|
|
|
+#ifdef DP_MEM_PRE_ALLOC
|
|
|
+/**
|
|
|
+ * hdd_init_dma_mask() - Set the DMA mask for dma memory pre-allocation
|
|
|
+ * @dev: device handle
|
|
|
+ * @bus_type: Bus type for which init is being done
|
|
|
+ *
|
|
|
+ * Return: 0 - success, non-zero on failure
|
|
|
+ */
|
|
|
+static int hdd_init_dma_mask(struct device *dev, enum qdf_bus_type bus_type)
|
|
|
+{
|
|
|
+ return hif_init_dma_mask(dev, bus_type);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline int
|
|
|
+hdd_init_dma_mask(struct device *dev, enum qdf_bus_type bus_type)
|
|
|
+{
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
static int __hdd_soc_probe(struct device *dev,
|
|
|
void *bdev,
|
|
|
const struct hif_bus_id *bid,
|
|
@@ -544,6 +564,10 @@ static int __hdd_soc_probe(struct device *dev,
|
|
|
if (errno)
|
|
|
goto unlock;
|
|
|
|
|
|
+ errno = hdd_init_dma_mask(dev, bus_type);
|
|
|
+ if (errno)
|
|
|
+ goto unlock;
|
|
|
+
|
|
|
status = dp_prealloc_init();
|
|
|
|
|
|
if (status != QDF_STATUS_SUCCESS) {
|