Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3173919rwl; Mon, 27 Mar 2023 10:10:58 -0700 (PDT) X-Google-Smtp-Source: AKy350YyRVV6cAGumG0RCgu0PPWpDqAESC8+JxszqTjRQIB0wE0dvnDW8/U2TtigxNthXWB83nUL X-Received: by 2002:a17:906:9f0b:b0:8f3:9ee9:f1bc with SMTP id fy11-20020a1709069f0b00b008f39ee9f1bcmr13442013ejc.13.1679937057940; Mon, 27 Mar 2023 10:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679937057; cv=none; d=google.com; s=arc-20160816; b=Rh/UD3NcZP4jXW4L1xes8L4xhke2hsJ9zqkxOfPoYx1UvODKYZheY3TMQH1U5fJCA5 FUHJAS4YdnI/8YiQdkaAzVS3ZuFISN153+ELEASWx8sAwS72XmMzeiVKxkG9M9LKaUpI rYf8LIyggquS7DYXo460INTblTPza17lJg9qfFe5MC9QtPwQ7IZmCaBcfHWm5vk26fR9 6zRyL2IUnHrOuxcPUVSPVqY6mzLU3mOYD8JUMbLOhuPmuT2iuWzTG8iHDq57p+FWP5P9 +pZUCwGQ8xgslMir1/OSb/DkbJIFg2LjnGwhfyNfweJ+KbYJjSWT0JaRMaIAYli5DiBX th/A== 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=bzmxqryW8yHEoTUTCYpFa+mgBgQ/H7EBQFSpqP5Rbiw=; b=Orqcj4zBtUa1zwNp96P//F7LiCO8dyWs3/N1iZKtgCnxKnWVlGJEuzvjPJ8vxhxyE3 L+X6UguncW2nEPhuWD+wW3EYyG/LJQmRJfT86mA11fdQ1Is+Qj4TSPXAA4ktp4zFNgxj MsbBZx56RNcWouMYVH/Yl0DpWNli3J0ViKRzBfL61eLyKUYJnEy5GtzbVtMW9/iVT5KN ld/T73pQcN6iUS3zOkEfQHMD8wGQSkxVpQpakHBmCyu3cG8Er4ibng8SDIYmObGJWw8s VOA0QYE1n8Fd+MKKHdPv63W9ihxiSwdahn/j1lcVtkLI7wOCwfu7WEbK/tjGuJHdyACf fp5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ldV8SH4f; 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 i14-20020a170906a28e00b00930e86db8fdsi29040514ejz.938.2023.03.27.10.10.37; Mon, 27 Mar 2023 10:10:57 -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=ldV8SH4f; 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 S232916AbjC0RKS (ORCPT + 60 others); Mon, 27 Mar 2023 13:10:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232156AbjC0RKC (ORCPT ); Mon, 27 Mar 2023 13:10:02 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B82240C9 for ; Mon, 27 Mar 2023 10:09:29 -0700 (PDT) X-UUID: 1f8c2e70ccc211edb6b9f13eb10bd0fe-20230328 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=bzmxqryW8yHEoTUTCYpFa+mgBgQ/H7EBQFSpqP5Rbiw=; b=ldV8SH4fpPzNLu7WeuvXoPPfeIy1SqRF8HJ+n6+USQyl6cVuuxf3Eb+rObuK9hBZW35sP/Gzhvp8FEk7HZWGAeFpCpk23a8pC1fqN7pO6fh/Or6qBqOM6jd9HoNEo9rhkSm625ny8i0YLgxX4NKmbz0EVeV/+0atYzsz3jh07m0=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:27cfb7be-2c73-4fe3-accd-ba1296244b3f,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:120426c,CLOUDID:ceb2a329-564d-42d9-9875-7c868ee415ec,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 1f8c2e70ccc211edb6b9f13eb10bd0fe-20230328 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 535167402; Tue, 28 Mar 2023 01:09:24 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Tue, 28 Mar 2023 01:09:11 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Tue, 28 Mar 2023 01:09:11 +0800 From: Ryder Lee To: Johannes Berg CC: Shayne Chen , Evelyn Tsai , , , Ryder Lee Subject: [PATCH v2 1/2] wifi: mac80211: fix the size calculation of ieee80211_ie_len_eht_cap() Date: Tue, 28 Mar 2023 01:07:41 +0800 Message-ID: <06c13635fc03bcff58a647b8e03e9f01a74294bd.1679935259.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=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable 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 Here should return the size of ieee80211_eht_cap_elem_fixed, so fix it. Fixes: 820acc810fb6 ("mac80211: Add EHT capabilities to association/probe request") Signed-off-by: Ryder Lee --- net/mac80211/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 1a28fe5cb614..210fdca7ff48 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -4903,7 +4903,7 @@ u8 ieee80211_ie_len_eht_cap(struct ieee80211_sub_if_data *sdata, u8 iftype) &eht_cap->eht_cap_elem, is_ap); return 2 + 1 + - sizeof(he_cap->he_cap_elem) + n + + sizeof(eht_cap->eht_cap_elem) + n + ieee80211_eht_ppe_size(eht_cap->eht_ppe_thres[0], eht_cap->eht_cap_elem.phy_cap_info); return 0; -- 2.18.0