msm: ipa3: put ecm default as vlan in auto config

Made the change to put ecm as default in vlan mode
on auto configuration to resolve the issue where
usb connects to IPA faster than ipa-driver getting
vlan info from user-space.

Change-Id: I83d876e555e06eba762d98394e155df9b9797820
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This commit is contained in:
Skylar Chang 2020-07-22 23:25:35 -07:00
parent 52268d358e
commit 9ef4d26365
2 changed files with 15 additions and 0 deletions

View File

@ -6597,6 +6597,9 @@ static ssize_t ipa3_write(struct file *file, const char __user *buf,
/* Check MHI configuration on MDM devices */
if (!ipa3_is_msm_device()) {
/* reset ecm default as non-vlan mode */
if (!ipa3_ctx->vlan_mode_set && ipa3_ctx->ipa_config_is_auto)
ipa3_ctx->vlan_mode_iface[IPA_VLAN_IF_ECM] = false;
if (strnstr(dbg_buff, "vlan", strlen(dbg_buff))) {
if (strnstr(dbg_buff, "eth", strlen(dbg_buff)))
@ -6613,6 +6616,13 @@ static ssize_t ipa3_write(struct file *file, const char __user *buf,
* when vlan mode is passed to our dev we expect
* another write
*/
ipa3_ctx->vlan_mode_set = true;
IPAERR("emac vlan(%d)\n",
ipa3_ctx->vlan_mode_iface[IPA_VLAN_IF_EMAC]);
IPAERR("rndis vlan(%d)\n",
ipa3_ctx->vlan_mode_iface[IPA_VLAN_IF_RNDIS]);
IPAERR("ecm vlan(%d)\n",
ipa3_ctx->vlan_mode_iface[IPA_VLAN_IF_ECM]);
return count;
}
@ -7356,6 +7366,10 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
mutex_init(&ipa3_ctx->app_clock_vote.mutex);
/* put ecm default as vlan mode */
if (ipa3_ctx->ipa_config_is_auto)
ipa3_ctx->vlan_mode_iface[IPA_VLAN_IF_ECM] = true;
return 0;
fail_cdev_add:

View File

@ -1986,6 +1986,7 @@ struct ipa3_context {
int num_ipa_cne_evt_req;
struct mutex ipa_cne_evt_lock;
bool use_ipa_pm;
bool vlan_mode_set;
bool vlan_mode_iface[IPA_VLAN_IF_MAX];
bool wdi_over_pcie;
u32 entire_ipa_block_size;