Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1989484ybk; Mon, 11 May 2020 09:10:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsMMUnicebYdJMIIhCWqsth/M3jjeA4OsIl3o96FRrwU8z/g4xYY2ci8WkcFrx8O/oeW0L X-Received: by 2002:aa7:dc49:: with SMTP id g9mr3306096edu.62.1589213415326; Mon, 11 May 2020 09:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589213415; cv=none; d=google.com; s=arc-20160816; b=Cl3JZxiDAs2lhpCJ1uLJyi8PCLb9F9jURRLLiYJEZQvKsEbvoG30KWSlEfnZiSTpJj UtTrjwMaLmdepfPPnY7RDDAt4s2ukPxMGf6bnSGA7Xt/koR437KB+41d4DNA7I4n5HAf Sm571GdL8i1P2owlcYAZcsU0aM9yFZbO4g5CdVf0G8ojsLNI1BUvBqHXP7UKvlD8aWsT AIviy0EdERsoX361d+00UqhJ+XegXPvxkVdjyLl6hki5+T0PFYGurNEogKWqyQRLmlOS 0gLXSeqadD6I/pvp9CMJUJYUybeWo11omH3pbube8HGzznQyUtooRLKsh6tLasQ/55Ew sP5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Wq5vNatoLxOl6u7ea0lqUPIpt436Lkik0iyxAITq0lQ=; b=f5Pvysk62yx0zgEJVsvRXtT36BVwFe+FpGxzoVMc5KU1jCZLsCartGU1u5AA3db7JE OIriYGmM7cEe4TwZ94s81MElZye2v4n4ulvMVkRj1QLEt87VeBMKPL8y7H1V/NeqfxMs 4aq+C7d32oAZF9alo9+dZziVhaItnOhYzdk5vWSjhqAJ16mhvreDuye05GBMOK20xzKk PM8YgiN3dxp+2wNG4CTlsh3A/OVJhZwOd5RIUbaoYRVLBPBj+K3NHI6UeMCmk5h8GSHK teFRDbd/ljlsiwWehhJNU0PH9G1l0wkYj2QzZi3SEDHjoT6VMjX9XL0uUxGAOLY9/4dq gAcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=dLE8vyDv; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si6699122edq.88.2020.05.11.09.09.50; Mon, 11 May 2020 09:10:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=dLE8vyDv; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730635AbgEKQGt (ORCPT + 99 others); Mon, 11 May 2020 12:06:49 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:42083 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730627AbgEKQGs (ORCPT ); Mon, 11 May 2020 12:06:48 -0400 X-UUID: c8f74522345a4f9686a976f2769e5237-20200512 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:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Wq5vNatoLxOl6u7ea0lqUPIpt436Lkik0iyxAITq0lQ=; b=dLE8vyDvcHmU/59gDORDAbVRxzDTLbBBFrKjbv/hJlO8GL772Dp6q0rJabbraGd7pUGK0HfT3mIFq98GDOozndlNn6OgvcjEBD2xnuAlbOukSdD7Gwi3BTlzZWGyZupvdrMGu7teIrsyLSSwW3sDkhYq2DrdhgYqKxkIDR76TmE=; X-UUID: c8f74522345a4f9686a976f2769e5237-20200512 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 12457636; Tue, 12 May 2020 00:06:45 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 12 May 2020 00:06:40 +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.1497.2 via Frontend Transport; Tue, 12 May 2020 00:06:41 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , Sean Wang , , , Ryder Lee Subject: [PATCH 6/7] mt76: mt7915: allocate proper size for tlv tags Date: Tue, 12 May 2020 00:06:37 +0800 Message-ID: <2952abbe3b1f47fdf48de37b36af5aed34c03c05.1589212457.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: AD9E4E709F0B02E3936059A6C03D0ADDD4AA97E3B1F282A1A87AB3FEC3CDAC802000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org QWxsb2NhdGluZyBwcm9wZXIgbWVtb3J5IHNpemUgYWNjb3JkaW5nIHRvIHRsdiB1c2FnZS4NCg0K U2lnbmVkLW9mZi1ieTogUnlkZXIgTGVlIDxyeWRlci5sZWVAbWVkaWF0ZWsuY29tPg0KLS0tDQog ZHJpdmVycy9uZXQvd2lyZWxlc3MvbWVkaWF0ZWsv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