Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp648668rdh; Thu, 23 Nov 2023 14:28:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRg3rdXf11dm4TkKucduV/y25GK4WDpEikLBvLSveLJ0qLKFE7zRBLptS5/NVlbq+rqcBb X-Received: by 2002:a05:6871:3a22:b0:1ea:fd4:58fb with SMTP id pu34-20020a0568713a2200b001ea0fd458fbmr752774oac.52.1700778501703; Thu, 23 Nov 2023 14:28:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700778501; cv=none; d=google.com; s=arc-20160816; b=xmLZ4kKbvkzZ3lXLx6mmMRTnHdCi5Hev1PWwAggtMgaiX9TCpq/cfdMxSo2hb3I55P Bcbq6MgT4vIwUXP0rFxK6+tV+hSp0PcmPfmUrSnqp8W6Jv57k2GecAzwHciv+i1xYLXW PT2e/d9O2y3eT/Jn/q/x/R1BeF21VKUT3bOfgk1P9n7NRADtmfz3wQzv/gdcgMhfnnqu o9RQ29JffTpBPqNB8FmxT0cRa8XTv1zpGro30VHpWAE6MsYQEU4/FMn79aTfz++KScfX J9NZbB3ReF2l8j8o4c0hUddsaNPUSs1KsZOzC5Z1Zs53fyYG/t9WnnrUWxh/t4XlcY11 biMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=otmmcFLnOKUc8cSls2Dv7CYsJv5mMEEslURXO+VqiEU=; fh=QCRMbNmxBrwEohLjUHQ8w4lzVnBUUFoRxUspyxOIxFc=; b=JCaKpIUBVP9xWBg/FDEULxLDP0ZmfeO7LUNdAnhW7Pvo4Vo2ZvJ9JkxG0PoN09KHij eCOO79zZf59uQn94qKVaCZ9OznwgStmRpLngRb8atfQWLi7GC1vai1EZoVwmuIOkaRT3 kG1nBjSNGoRTaJsqQIjHG6ebLonpy3ERH0TKl24oPWG9i0L62YUEra5JpPIoo3+k6YFU SSecSJOYX/sMCRggZN6uHh6JEcLeYZq4waG0pErQcmPtxDU5xTmoZ639+AnOJIJqwyxd f7Z5pWxieQl0OgwdVwNDlBqfPp6gMODLxhLFOzAlWgETQYr+osPdjCeyLLNlsVYQxt3b rGBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=c8Wu3P6n; spf=pass (google.com: domain of linux-wireless+bounces-12-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-12-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ka9-20020a056a00938900b006bd0842622asi2062132pfb.239.2023.11.23.14.28.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:28:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-12-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=c8Wu3P6n; spf=pass (google.com: domain of linux-wireless+bounces-12-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-12-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 747ED28194E for ; Thu, 23 Nov 2023 22:28:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69BE24A9BE; Thu, 23 Nov 2023 22:28:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="c8Wu3P6n" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4310BD60 for ; Thu, 23 Nov 2023 14:27:56 -0800 (PST) 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=otmmcFLnOKUc8cSls2Dv7CYsJv5mMEEslURXO+VqiEU=; t=1700778476; x=1701988076; b=c8Wu3P6nAt6dU8X14DteKH2ZhSx0KJFwGJmiPgR3ht5hRiN EWgzmj0Q0oJVBGh1xWzYiF8oodEJUQFNBSXbL6l4H/vJHwAI1F6bjWJ1C7ZfFMMYaLm8uaNoBiLlN ijdLPGZd0jp5uxpgNSSxCmFkuA1FIMZKPQUUbg9cmuRRVq6AK6kyvaZPFd2FM+4W3fR0jcr5bvbVY jaanFmg3ueU+A5UObIZ49eL1OJ/hqpyOiN4772dfayGhN5tq5RAI4O78k5kMrkbiXSvzcBgRNBsm/ psXWehxI21EEiVYRB1lVL+o0svIvWag2MrblIpkvSV7ZLxBHGjY65GOM5qi0jA/Q==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1r6IAq-00000001Y53-44vE; Thu, 23 Nov 2023 23:27:53 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [RFC PATCH v2 01/13] wifi: mac80211: simplify ieee80211_config_bw() prototype Date: Thu, 23 Nov 2023 23:14:38 +0100 Message-ID: <20231123231436.d16617c03e0f.I8bd5ee848074029a9f0495c95e4339546ad8fe15@changeid> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231123221436.143254-14-johannes@sipsolutions.net> References: <20231123221436.143254-14-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg The only user of this function passes a lot of pointers directly from the parsed elements, so it's simpler to just pass the entire elements parsing struct. This also shows that the ht_cap is actually unused. Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 887b496f2b81..778eef2f06f1 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -481,15 +481,15 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, } static int ieee80211_config_bw(struct ieee80211_link_data *link, - const struct ieee80211_ht_cap *ht_cap, - const struct ieee80211_vht_cap *vht_cap, - const struct ieee80211_ht_operation *ht_oper, - const struct ieee80211_vht_operation *vht_oper, - const struct ieee80211_he_operation *he_oper, - const struct ieee80211_eht_operation *eht_oper, - const struct ieee80211_s1g_oper_ie *s1g_oper, + struct ieee802_11_elems *elems, const u8 *bssid, u64 *changed) { + const struct ieee80211_vht_cap *vht_cap = elems->vht_cap_elem; + const struct ieee80211_ht_operation *ht_oper = elems->ht_operation; + const struct ieee80211_vht_operation *vht_oper = elems->vht_operation; + const struct ieee80211_he_operation *he_oper = elems->he_operation; + const struct ieee80211_eht_operation *eht_oper = elems->eht_operation; + const struct ieee80211_s1g_oper_ie *s1g_oper = elems->s1g_oper; struct ieee80211_sub_if_data *sdata = link->sdata; struct ieee80211_local *local = sdata->local; struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; @@ -6340,11 +6340,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link, changed |= ieee80211_recalc_twt_req(sdata, sband, link, link_sta, elems); - if (ieee80211_config_bw(link, elems->ht_cap_elem, - elems->vht_cap_elem, elems->ht_operation, - elems->vht_operation, elems->he_operation, - elems->eht_operation, - elems->s1g_oper, bssid, &changed)) { + if (ieee80211_config_bw(link, elems, bssid, &changed)) { sdata_info(sdata, "failed to follow AP %pM bandwidth change, disconnect\n", bssid); -- 2.42.0