summaryrefslogtreecommitdiff
path: root/drivers/net/wan/hdlc_fr.c
diff options
context:
space:
mode:
authorPeng Li <lipeng321@huawei.com>2021-05-28 03:12:41 +0300
committerJakub Kicinski <kuba@kernel.org>2021-05-29 00:08:10 +0300
commit4a9ab454ae9bda262802179cae4f5700736e8bd6 (patch)
tree1feb6dfbd6f774e9df6ea9252e282b7bf9d8c978 /drivers/net/wan/hdlc_fr.c
parentb11faec368704d5e18e345e67ea3ba0d58628113 (diff)
downloadlinux-4a9ab454ae9bda262802179cae4f5700736e8bd6.tar.xz
net: hdlc_fr: add blank line after declarations
This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/wan/hdlc_fr.c')
-rw-r--r--drivers/net/wan/hdlc_fr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
index 0b6e133de4ad..96e4a89fa923 100644
--- a/drivers/net/wan/hdlc_fr.c
+++ b/drivers/net/wan/hdlc_fr.c
@@ -329,6 +329,7 @@ static int pvc_open(struct net_device *dev)
if (pvc->open_count++ == 0) {
hdlc_device *hdlc = dev_to_hdlc(pvc->frad);
+
if (state(hdlc)->settings.lmi == LMI_NONE)
pvc->state.active = netif_carrier_ok(pvc->frad);
@@ -344,6 +345,7 @@ static int pvc_close(struct net_device *dev)
if (--pvc->open_count == 0) {
hdlc_device *hdlc = dev_to_hdlc(pvc->frad);
+
if (state(hdlc)->settings.lmi == LMI_NONE)
pvc->state.active = 0;
@@ -1143,6 +1145,7 @@ static void fr_destroy(struct net_device *frad)
{
hdlc_device *hdlc = dev_to_hdlc(frad);
struct pvc_device *pvc = state(hdlc)->first_pvc;
+
state(hdlc)->first_pvc = NULL; /* All PVCs destroyed */
state(hdlc)->dce_pvc_count = 0;
state(hdlc)->dce_changed = 1;