From patchwork Mon Dec 18 14:00:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 850078 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=65.50.211.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="G5fiW/cD"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.b="hKoDqldH"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3z0jxB0ZvWz9s7m for ; Tue, 19 Dec 2017 01:25:18 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version: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=nwEOsIhSGzSvnMok4B5Z9wMzu250blYyr8/B+9ivX5U=; b=G5fiW/cDO3oxk+ xaPZaRJbyXckvjO6yW3L/3+d5M/D6iiPqyOnAGAwMAH1e+uV9uoxfl7yKxd2aniwNCq97QdbrJFYM uFjFGoQbP81Gz272y7QSLpk2ORdQZb1I3OLPGM49HH8HNnzswb0JmBZGHJhzfdn/0PCLS8GiXxUHJ eZyHGNKNBFAKgpIlDu0+I9LUh4M4xK3M1RuskCGVSjuSs4XVhQe7zDlZQNc+Jj82+jAgsobQWGTgF 0WjHWKeiVtd39Bq2goTI9wV43cLgiS5Zbo+EzAUtY2RotFA2EMNpLrSB1O57V4hkuHo1zxfwos1hg 82qsz2rpdovo4jh7cbTA==; 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 1eQwLq-0004fg-2p; Mon, 18 Dec 2017 14:25:06 +0000 Received: from canardo.mork.no ([2001:4641::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eQwLN-0004X9-3p for lede-dev@lists.infradead.org; Mon, 18 Dec 2017 14:24:41 +0000 Received: from miraculix.mork.no ([IPv6:2a02:2121:280:af8e:a0c6:9dff:fee9:c413]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id vBIEOHdt006283 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 18 Dec 2017 15:24:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1513607058; bh=pYtskUVmdOIsv2zy1pFZd0QRVVITUXIcDp/A05smhTA=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=hKoDqldHAHxYe8nTnDDFLO2Xvs+u8jfxoAFoxPjfbTYVc8UptqQM1iRrydCTuEIPo DK0RbEuQwvJufTcKWx25LPg65SvrwM2/TVJbGRN8ylziLDWj0ybsswz83L9ozt+t18 9Rhs+JbgUbwU1FRhzqszPQZhnon3kx80VIA1zhIw= Received: from bjorn by miraculix.mork.no with local (Exim 4.89) (envelope-from ) id 1eQvye-00031L-UZ; Mon, 18 Dec 2017 15:01:08 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: Felix Fietkau Date: Mon, 18 Dec 2017 15:00:54 +0100 Message-Id: <20171218140056.11551-2-bjorn@mork.no> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171218140056.11551-1-bjorn@mork.no> References: <20171218140056.11551-1-bjorn@mork.no> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171218_062437_843607_2F281633 X-CRM114-Status: UNSURE ( 8.78 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.3 (----) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-4.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [2001:4641:0:0:0:0:0:1 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -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_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH 1/3] fix support for Option modems 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: lede-dev@lists.infradead.org, Jo-Philipp Wich , =?utf-8?q?Bj=C3=B8rn_Mork?= Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org USB_ModeSwitch version 2.3.0 introduced "OptionMode". Signed-off-by: Bjørn Mork --- convert-modeswitch.pl | 1 + switch.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/convert-modeswitch.pl b/convert-modeswitch.pl index 6930e5f8d668..71c2b7950cb5 100755 --- a/convert-modeswitch.pl +++ b/convert-modeswitch.pl @@ -62,6 +62,7 @@ my %options = ( MBIM => $mode_option, HuaweiMode => $mode_option, HuaweiNewMode => $mode_option, + OptionMode => $mode_option, SierraMode => $mode_option, SonyMode => $mode_option, QisdaMode => $mode_option, diff --git a/switch.c b/switch.c index 587a2af05c53..b3f62fa0da29 100644 --- a/switch.c +++ b/switch.c @@ -152,6 +152,20 @@ static void handle_huaweinew(struct usbdev_data *data, struct blob_attr **tb) send_messages(data, msgs, ARRAY_SIZE(msgs)); } +static void handle_option(struct usbdev_data *data, struct blob_attr **tb) +{ + static struct msg_entry msgs[] = { + { + "\x55\x53\x42\x43\x12\x34\x56\x78\x00\x00\x00\x00\x00\x00\x06\x01" + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 31 + } + }; + + detach_driver(data); + data->need_response = false; + send_messages(data, msgs, ARRAY_SIZE(msgs)); +} + static void handle_standardeject(struct usbdev_data *data, struct blob_attr **tb) { static struct msg_entry msgs[] = { @@ -384,6 +398,7 @@ enum { MODE_MOBILE_ACTION, MODE_CISCO, MODE_MBIM, + MODE_OPTION, __MODE_MAX }; @@ -404,6 +419,7 @@ static const struct { [MODE_MOBILE_ACTION] = { "MobileAction", handle_mobile_action }, [MODE_CISCO] = { "Cisco", handle_cisco }, [MODE_MBIM] = { "MBIM", handle_mbim }, + [MODE_OPTION] = { "Option", handle_option }, }; void handle_switch(struct usbdev_data *data)