Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp508558imw; Wed, 13 Jul 2022 02:48:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ufEslqzvckdEYl6pA/tDaoRDkK0KQOk9k4OaH/12ygSurpKEud+wvuOcAn9+v9eMd85ALE X-Received: by 2002:a17:902:f381:b0:16b:db6e:aed with SMTP id f1-20020a170902f38100b0016bdb6e0aedmr2654973ple.19.1657705719584; Wed, 13 Jul 2022 02:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705719; cv=none; d=google.com; s=arc-20160816; b=OqTYOT7cjsU/SYBXQ5UTGZQxBFK1qxoNi2Tbond10xL85GZtw0YUmRxFDEtTM93cYP JTBhamy3vv/lcNt+5URtWzUDLqQ4s+b4kGafUY3A5hlln4Yc/jRn+/jYg/vDrR+UwML2 /BY8mO/erHbS1ISx4TleIrUzApe1kPdYN6a9LlLiP4IZBqQFthV1wZxgY7D0T5vsC1eD pdrNR5W3HMVpkh60FX4XbK2Ry96aToNcBeTqVHOdGetZbr1rA5uWJL6zLf3axDQNOBxp mwYfmhrY4r4OGjVnfBxwPVnGcdZMr/VcDUj/kPz/mB2b+LE671eAdEpokdkvbDS+Otx9 MMFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tenSZWeuOGMdi7jW7hKWhy9SodxPJDG05UmrTfBIZgo=; b=TNfOU7dhCJguWrJoZtgFt+GdF4rKfAtWzNzrWdRzqWJZFr9f42XwWlzyll6QS2YW+A ndprqv67PPg2BbmYBt1huIXscVshAT8FrSwSwSxtMIl+X/5WOEm4c08eegfwW37dXkM6 hLpaM4jSJ8r0dII7Xm84ckfT/rBml0wfGeCTlWafhlO99omLubO5xlGrTboOLDv9qgft 8Rd3lNBZM4KkZ9U049Ogn565zJbA7lBbGMpQvL7TPqGElnuqthhiswWimhFeWXa8OABA +aGF4VREgd8GyeHAh+Q+Yl4P/IaUVuYL0XDRenXLzBmhQmSvHFDhdYQoP9yc0co+NT+y hC2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=MYnCJWEY; 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=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x9-20020a634849000000b00415c8d8e482si16511994pgk.742.2022.07.13.02.48.32; Wed, 13 Jul 2022 02:48:39 -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=@sipsolutions.net header.s=mail header.b=MYnCJWEY; 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=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235367AbiGMJqh (ORCPT + 65 others); Wed, 13 Jul 2022 05:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236235AbiGMJpe (ORCPT ); Wed, 13 Jul 2022 05:45:34 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EB0EBFAEB for ; Wed, 13 Jul 2022 02:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=tenSZWeuOGMdi7jW7hKWhy9SodxPJDG05UmrTfBIZgo=; t=1657705526; x=1658915126; b=MYnCJWEYgoORZLiaoeIcjJ0qJ2lfJI7e+Iucjd2A+9GUyEI OY4UpP2FOGpDCJzTDKBghnFYunzKBIw1nx84A/A9yk52uwmjFkRhw1WQGErhaPkp8W7qO0rXgn6SC +v5wxQRXpaZZZjrouKSqrQiE+SzADZotfJz6n9sRQxIJ/3tA7tDlMhaxoKnm08GeaYF2iLkI19/tx zInQwbR+hU5BONYcK3LGxSmcSsVZHa3z9qS4vjbpLEaNKdaZf6ZxWiPMY4j98bGth2QWsy+1/a2GN kGE//iw4my4D3FM4AeFYteb64c4g9X7US7g5hP9D03a2bK/BvoCSGzLy+Jb7qiMQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1oBYvs-00EgvB-KU; Wed, 13 Jul 2022 11:45:24 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 56/76] wifi: mac80211: consider EHT element size in assoc request Date: Wed, 13 Jul 2022 11:44:42 +0200 Message-Id: <20220713114425.1002d927b883.Id031d730eddd29d80c86071d5c3b548c1a81ca61@changeid> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220713094502.163926-1-johannes@sipsolutions.net> References: <20220713094502.163926-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Johannes Berg We need to consider the (maximum) size of the EHT element we'll add for the association request, otherwise we may run out of space. Fixes: 820acc810fb6 ("mac80211: Add EHT capabilities to association/probe request") Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b56f2cefee44..f83d361ad50d 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -987,6 +987,9 @@ static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) sizeof(struct ieee80211_he_mcs_nss_supp) + IEEE80211_HE_PPE_THRES_MAX_LEN + 2 + 1 + sizeof(struct ieee80211_he_6ghz_capa) + + 2 + 1 + sizeof(struct ieee80211_eht_cap_elem) + /* EHT */ + sizeof(struct ieee80211_eht_mcs_nss_supp) + + IEEE80211_EHT_PPE_THRES_MAX_LEN + assoc_data->ie_len + /* extra IEs */ (assoc_data->fils_kek_len ? 16 /* AES-SIV */ : 0) + 9 + /* WMM */ -- 2.36.1