From patchwork Wed Feb 5 03:46:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 216525 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 160DBC35249 for ; Wed, 5 Feb 2020 03:47:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFB99217BA for ; Wed, 5 Feb 2020 03:47:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="C8/L7eWe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727836AbgBEDrG (ORCPT ); Tue, 4 Feb 2020 22:47:06 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:49657 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727792AbgBEDrG (ORCPT ); Tue, 4 Feb 2020 22:47:06 -0500 X-UUID: 03a792a462a845d5ba9f81c332988a16-20200205 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=jz7BtOn/G8LT4mRItKKrIs0A5WhRRkjr2DQoea+nrDY=; b=C8/L7eWez7bOK7N4a1RyxMHK9c3kyXxeNf27NgmhSrou12Ei4OYlO32IrnN/GaMtRAsRJMsI6xH2iKX1HfxTMY21a+6F+QCGDN2t/lkgckOSQLSPtY1N/1BrFjOXZBDcn8G6UATm/06YlUoxlknKnV/1CFmcLzADgJltp9Omzf8=; X-UUID: 03a792a462a845d5ba9f81c332988a16-20200205 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 991039202; Wed, 05 Feb 2020 11:46:59 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 5 Feb 2020 11:47:59 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 5 Feb 2020 11:46:33 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , Sean Wang , Josh Boyer , , , Ryder Lee Subject: [PATCH] mt76: mt7615: fix wrong length in strncmp Date: Wed, 5 Feb 2020 11:46:54 +0800 Message-ID: X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix it to proper length. Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0 diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 6639f9291721..fbda56342d11 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -491,7 +491,7 @@ static int mt7615_load_ram(struct mt7615_dev *dev) goto out; } - if (!strncmp(hdr->fw_ver, "2.0", 6)) + if (!strncmp(hdr->fw_ver, "2.0", 3)) dev->fw_ver = MT7615_FIRMWARE_V2; else dev->fw_ver = MT7615_FIRMWARE_V1;