Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fb98e0f authored by Amir Levy's avatar Amir Levy Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: Add dummy API to check if NAPI LAN rx is enabled



For clients who use IPA LAN rx data path we added our API
to see if we have NAPI enabled. This feature is only enabled
in later versions of the kernel but the API is to support it
moving forward.

Change-Id: I6cdac1d2aa01fc28916a6adad8ecfc8a2bcc7b65
Acked-by: default avatarTal Gelbard <tgelbard@qti.qualcomm.com>
Signed-off-by: default avatarAmir Levy <alevy@codeaurora.org>
parent c88445d6
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -3403,6 +3403,19 @@ int ipa_disable_wdi_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
	return ret;
}

/**
 * ipa_get_lan_rx_napi() - returns if NAPI is enabled in LAN RX
 */
bool ipa_get_lan_rx_napi(void)
{
	bool ret;

	IPA_API_DISPATCH_RETURN_BOOL(ipa_get_lan_rx_napi);

	return ret;
}
EXPORT_SYMBOL(ipa_get_lan_rx_napi);

/**
 * ipa_tz_unlock_reg() - Allow AP access to memory regions controlled by TZ
 */
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -433,6 +433,8 @@ struct ipa_api_controller {
	int (*ipa_is_vlan_mode)(enum ipa_vlan_ifaces iface, bool *res);

	bool (*ipa_pm_is_used)(void);

	bool (*ipa_get_lan_rx_napi)(void);
};

#ifdef CONFIG_IPA
+5 −0
Original line number Diff line number Diff line
@@ -6913,6 +6913,11 @@ struct ipa3_context *ipa3_get_ctx(void)
	return ipa3_ctx;
}

bool ipa3_get_lan_rx_napi(void)
{
	return false;
}

static void ipa_gsi_notify_cb(struct gsi_per_notify *notify)
{
	switch (notify->evt_id) {
+2 −0
Original line number Diff line number Diff line
@@ -2293,6 +2293,8 @@ u8 ipa3_get_qmb_master_sel(enum ipa_client_type client);
int ipa3_get_smmu_params(struct ipa_smmu_in_params *in,
	struct ipa_smmu_out_params *out);

bool ipa3_get_lan_rx_napi(void);

/* internal functions */

int ipa3_bind_api_controller(enum ipa_hw_type ipa_hw_type,
+1 −0
Original line number Diff line number Diff line
@@ -5132,6 +5132,7 @@ int ipa3_bind_api_controller(enum ipa_hw_type ipa_hw_type,
	api_ctrl->ipa_get_smmu_params = ipa3_get_smmu_params;
	api_ctrl->ipa_is_vlan_mode = ipa3_is_vlan_mode;
	api_ctrl->ipa_pm_is_used = ipa3_pm_is_used;
	api_ctrl->ipa_get_lan_rx_napi = ipa3_get_lan_rx_napi;

	return 0;
}
Loading