From patchwork Thu Feb 15 14:16:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Vandeputte X-Patchwork-Id: 873892 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="t76ysOL6"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ncentric.com header.i=@ncentric.com header.b="n25Djsvi"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zhz2T5FVJz9sRm for ; Fri, 16 Feb 2018 01:20:33 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xbVgjKPJcM7ibjOoepZiStgqKjF+BCV8ILRbyS10t60=; b=t76ysOL6jdaQUl SdRNjzDzAJNAUy0GfJqusMq8/kYLY5cViDMu272EVV6B+Y00vQPHvWWn4sMR8l8UUrJ43o8ZDv7gr 8LZhbm+ePk/nRbPC9IYVe74561ET0C+tHtNwSp61gF/MFOrmB8O/SU+uRiNhZAOVYc9fekcx18DR9 DnAVM+shNWNbGEKcC160RdJ+x8I/0ifSTJ8HdV2IF18UslEs4mm/k2QF5TqC4VnxsZPay69KtxaH1 Ro1X1PG+CGBI4utwpVLPPQD1FhffGG0XIF89RF4u/H40+04qoq3hVY2tSUpkiwQQpvnI1C9L6mZDv mRevFpNW2CnSMu3j7R8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1emKOj-0001xh-9F; Thu, 15 Feb 2018 14:20:29 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1emKLH-00074d-8d for lede-dev@lists.infradead.org; Thu, 15 Feb 2018 14:17:01 +0000 Received: by mail-wm0-x242.google.com with SMTP id v123so1085441wmd.5 for ; Thu, 15 Feb 2018 06:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3jp9fTY8gz5PDJHg2jTYvOR9St8qHhDRyW5e0L4v56U=; b=n25Djsvi5b8PiIQ51tfOTZWFCmvgalMJ9Af0wMlcnnYbyg7PFNkcLg3tGfhjX2UGEg F7+iA/YywKAvmC7JpXXr0qaEJHKe7OpsTMw3h7m4Bkq0wEQsvogCePQOYRcrcaDtToCz L70qzVrKkUVzWkn0bkMRLqiHQ3QbnK5gyQP18= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3jp9fTY8gz5PDJHg2jTYvOR9St8qHhDRyW5e0L4v56U=; b=n3oECXvMZ+IkJrXErdpwc8F8g7++Mk5x53/71E7st16Jw+jJdjF/HOAY7JkbLAgbBo +PVmKgTlZz4GuLrQuFGR6EZJdg5u52T5fOa0rc46wAbTn3LrGRceuruys0GXtrriaqAz XgQnpDq/mFiyyd+rvn6v2r6EGj30dQSDVrpBwNUpdoeEa4oZHQ6h2aVBJbx2GEUsVmLX 0l367Iz8/6AgR3nmxbBOIdMhSHoU/zavwjn3xQdokMlVtNgTwUOMdi4SINmA7tXl44bN yZ1DPqexqyF4NnRsUX/EO2O7IJM/hSvNysH/hOaIxOE6gw1KNoa8TZJFpuJuR1rsZwzL t3PA== X-Gm-Message-State: APf1xPA80DwVkiB0UIICc8CJra3zGqPTkI/cUANuJRR1guy/StNUcPUH XcsucIcTOr22yjkeAeQBW4JMP+lTvRM= X-Google-Smtp-Source: AH8x227ZPYlWY6ba/VGBF+/onGWRfru2pbR+qBF1EgJQ5PNn8ABgrP/jrYRSiXDYrEuqqR4W2C0VSg== X-Received: by 10.80.240.2 with SMTP id r2mr3596117edl.91.1518704206113; Thu, 15 Feb 2018 06:16:46 -0800 (PST) Received: from localhost.localdomain (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.googlemail.com with ESMTPSA id d6sm3462692edm.52.2018.02.15.06.16.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 06:16:45 -0800 (PST) From: Koen Vandeputte To: lede-dev@lists.infradead.org Date: Thu, 15 Feb 2018 15:16:01 +0100 Message-Id: <1518704164-22198-7-git-send-email-koen.vandeputte@ncentric.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518704164-22198-1-git-send-email-koen.vandeputte@ncentric.com> References: <1518704164-22198-1-git-send-email-koen.vandeputte@ncentric.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180215_061655_426877_D64FE1C2 X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH 6/9] uqmi: use general method for state cleaning X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leventelist@gmail.com, lynxis@fe80.eu, Koen Vandeputte , john@phrozen.org, bjorn@mork.no, nbd@nbd.name MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Debugging shows that using the general method properly cleans on each run, while the method specifying the client-ID shows "No effect" even while in connected state. Fixes several connectivity issues seen on specific modems. Signed-off-by: Koen Vandeputte --- package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 1619c2b35eb9..eba0922e57de 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -97,6 +97,10 @@ proto_qmi_setup() { } } + # Cleanup current state if any + uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect + + # Set IP format uqmi -s -d "$device" --set-data-format 802.3 uqmi -s -d "$device" --wda-set-data-format 802.3 dataformat="$(uqmi -s -d "$device" --wda-get-data-format)" @@ -144,11 +148,6 @@ proto_qmi_setup() { uqmi -s -d "$device" --set-client-id wds,"$cid_4" --set-ip-family ipv4 > /dev/null - # try to clear previous autoconnect state - uqmi -s -d "$device" --set-client-id wds,"$cid_4" \ - --stop-network 0xffffffff \ - --autoconnect > /dev/null - pdh_4=$(uqmi -s -d "$device" --set-client-id wds,"$cid_4" \ --start-network \ ${apn:+--apn $apn} \ @@ -175,11 +174,6 @@ proto_qmi_setup() { uqmi -s -d "$device" --set-client-id wds,"$cid_6" --set-ip-family ipv6 > /dev/null - # try to clear previous autoconnect state - uqmi -s -d "$device" --set-client-id wds,"$cid_6" \ - --stop-network 0xffffffff \ - --autoconnect > /dev/null - pdh_6=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" \ --start-network \ ${apn:+--apn $apn} \