Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1438618rwb; Wed, 26 Jul 2023 12:30:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlGuXqzTmlSlPC35qosE45dF6lhzKDAL5RjLm7HV0uTcZ/E5A7P04f5mP9mAyP4w0fPcayRO X-Received: by 2002:a17:902:d503:b0:1b6:8863:8c9f with SMTP id b3-20020a170902d50300b001b688638c9fmr2580080plg.6.1690399821109; Wed, 26 Jul 2023 12:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690399821; cv=none; d=google.com; s=arc-20160816; b=mUmCaUe5mLoaNKnBNaXvaU2d+yQja8m2tS2v+NR9gJcNnB37ytv7mQTNH0ZvOO1kFd urTSKtplR29ii3Rw4Y8iTDs80MBbuiq8HEQdI+vkZXvETvGtAx4oqve30g8soQ177yF/ KOT4xouzy4CVVL23iW024RvW8cRp2fECCXHSPCbxUXHCWOzOk0VzAZNSIv7DJnj/x3R5 LaeBQBF/1hZDGvuZiNxz1+W8Hld5oYWIojo/a1al7FVER0yzK4SN9ac0eew/4zvHiBF/ UeDeoI+xqeDu7nTCWdTxBWKiR4KihR7PhEi5k6DXs3jOyG9xg82QZD10SHTHntKwLiBO 9sEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=nGY1Y8YDTCvpGTH5yPcBwP6MljJng/vDUghgetlD5sg=; fh=1wn0G9tO2KnZlkCWaY/ACGrfN42qgLI7hXZhfsPfmgk=; b=RjPt+0rqGKIN/4b/6ilmtySr2dvkugiFnstLzeUaSVHUMouNzymiu9M1CQ2nwgEgPX SafCSGkBiUTY6ZrFRwFRrZq8XrMq5f5jQZEn4/1NL5EFuePQALzLBBcbkE4MwinpqtjZ hGl5YxzAuM4dJBRfm34MvTryYZGUw2uCS4YIcPZloinooQP0prsczXvPkfXnVxdCygi2 tK/lOaOTrztfn2QRJ6RG4QJ26uNr/HAoEGmy6L8LSXce+r7/iAfzIhXI6RApn351O4JJ WZ1fd97mEhYVMahtlALVJPvD/iYGxnroKHK2gyzvlFngbxrbHdB3px5JOFIKTb30URg/ 4JJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=EtupNhVs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq11-20020a17090b380b00b00262e5a82047si1565186pjb.44.2023.07.26.12.30.06; Wed, 26 Jul 2023 12:30:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=EtupNhVs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbjGZSfZ (ORCPT + 58 others); Wed, 26 Jul 2023 14:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjGZSfY (ORCPT ); Wed, 26 Jul 2023 14:35:24 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B14512691 for ; Wed, 26 Jul 2023 11:35:15 -0700 (PDT) X-UUID: 2680d37c2be311ee9cb5633481061a41-20230727 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=nGY1Y8YDTCvpGTH5yPcBwP6MljJng/vDUghgetlD5sg=; b=EtupNhVseKlJ3+ZWMb+a4v7JRVzROHS5I9jAM50iN6NER45Jx/BruV75SeIpjDrwasKzWK/6iVJt9pJ2i3lnb/4eZ0743lSPSehs8rsOqTqByrxTkB6UMEC+0qVlLybnByiOuhoKuUtKaR/TLJPQo05d5V6txg5m8s6QO9MprR8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.29,REQID:244cb3dd-59e7-4663-bfbb-0b5cc1a116dd,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:95 X-CID-INFO: VERSION:1.1.29,REQID:244cb3dd-59e7-4663-bfbb-0b5cc1a116dd,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTION :quarantine,TS:95 X-CID-META: VersionHash:e7562a7,CLOUDID:c6ced2b3-a467-4aa9-9e04-f584452e3794,B ulkID:230727023512RTUYBNVS,BulkQuantity:0,Recheck:0,SF:38|29|28|17|19|48,T C:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_SNR,TF_CID_SPAM_SDM, TF_CID_SPAM_ASC X-UUID: 2680d37c2be311ee9cb5633481061a41-20230727 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 513442223; Thu, 27 Jul 2023 02:35:09 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 27 Jul 2023 02:35:08 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 27 Jul 2023 02:35:08 +0800 From: Ryder Lee To: Felix Fietkau , CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , , Ryder Lee Subject: [PATCH 1/2] wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info Date: Thu, 27 Jul 2023 02:35:05 +0800 Message-ID: <6fa87074b9cce5037af35d870d8670bb29481a53.1690396305.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Correct per-device TLV lengths to avoid invalid operation in firmware. ( 64.040375:28:STATS-E)statsGetSingleHWCounter: MIB counter index = 65472 not supported. This happens on mt7916/mt7986. Fixes: b0bfa00595be ("wifi: mt76: mt7915: improve accuracy of time_busy calculation") Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index bb8ec0d1d01c..a318487c1e84 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -3035,7 +3035,7 @@ int mt7915_mcu_get_chan_mib_info(struct mt7915_phy *phy, bool chan_switch) } ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD(GET_MIB_INFO), - req, sizeof(req), true, &skb); + req, len * sizeof(req[0]), true, &skb); if (ret) return ret; -- 2.18.0