summaryrefslogtreecommitdiff
path: root/drivers/rmnet/shs
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2019-07-03 15:09:41 -0600
committerGerrit - the friendly Code Review server <code-review@localhost>2019-07-03 16:23:21 -0700
commitfb652f1bf8474ea91dd4e4fe7dee8b80fe03f7bf (patch)
tree63150fc612285fa16e8b81a72a56c5fd344b9810 /drivers/rmnet/shs
parent91d8d047e30b902a668437f1ea3de6641ef7e406 (diff)
downloaddata-kernel-fb652f1bf8474ea91dd4e4fe7dee8b80fe03f7bf.tar.gz
rmnet_shs: Fix vnd delete handling
Previously shs would mark a vnd deleted by using the ep struct passed from rmnet. However rmnet driver frees the ep struct before the shs vnd_del notification callback. This causes shs to incorrectly no invalidate freed vnds. This change adds a internal struct to check for vnd match in order for rmnet_shs to correctly invalidate vnds. Change-Id: I1e4e86ad0ab5abe2abd569e33fba65198badb17c Acked-by: Raul Martinez <mraul@qti.qualcomm.com> Signed-off-by: Conner Huff <chuff@codeaurora.org>
Diffstat (limited to 'drivers/rmnet/shs')
-rw-r--r--drivers/rmnet/shs/rmnet_shs_wq.c9
-rw-r--r--drivers/rmnet/shs/rmnet_shs_wq.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/rmnet/shs/rmnet_shs_wq.c b/drivers/rmnet/shs/rmnet_shs_wq.c
index 9265289..bc601fe 100644
--- a/drivers/rmnet/shs/rmnet_shs_wq.c
+++ b/drivers/rmnet/shs/rmnet_shs_wq.c
@@ -1277,8 +1277,10 @@ void rmnet_shs_wq_reset_ep_active(struct net_device *dev)
if (!ep)
continue;
- if (ep->ep->egress_dev == dev)
+ if (ep->netdev == dev){
ep->is_ep_active = 0;
+ ep->netdev = NULL;
+ }
}
}
@@ -1291,8 +1293,11 @@ void rmnet_shs_wq_set_ep_active(struct net_device *dev)
if (!ep)
continue;
- if (ep->ep->egress_dev == dev)
+ if (ep->ep->egress_dev == dev){
ep->is_ep_active = 1;
+ ep->netdev = dev;
+
+ }
}
}
diff --git a/drivers/rmnet/shs/rmnet_shs_wq.h b/drivers/rmnet/shs/rmnet_shs_wq.h
index da85906..b0bbd9c 100644
--- a/drivers/rmnet/shs/rmnet_shs_wq.h
+++ b/drivers/rmnet/shs/rmnet_shs_wq.h
@@ -33,6 +33,7 @@
struct rmnet_shs_wq_ep_s {
struct list_head ep_list_id;
struct rmnet_endpoint *ep;
+ struct net_device *netdev;
int new_lo_core[MAX_CPUS];
int new_hi_core[MAX_CPUS];
u16 default_core_msk;