Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5185666rwe; Tue, 18 Apr 2023 03:25:05 -0700 (PDT) X-Google-Smtp-Source: AKy350a58ujttZPCsWF5Dph7yMfk6A3VtQXDFOrDpla22t/jWFwaM3VhaEDYOpktto7O5/7dbung X-Received: by 2002:a05:6a20:a11f:b0:ee:f632:1fdd with SMTP id q31-20020a056a20a11f00b000eef6321fddmr11904366pzk.62.1681813505753; Tue, 18 Apr 2023 03:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681813505; cv=none; d=google.com; s=arc-20160816; b=ZLLWOP+Rd6uLmk0+sY4gVmpoNbN6lg0JqR4sDifwzpDWeQkLKv8lkpCnjwuhQDP7xl 5gvYnRHtDVll/0dYXIbYcj4LL7JAAiUxXcHNNFfnudWwM02H7roQM3nz1n/+ikhb5ZQ+ Pxq6QjJhLwozhWBBZIH4GQzzwuW/l0wYiUK6NtDtS0OYc59i8mLSXMoPK6feFUR5uu2e U2/nCfwtwTwZZagD6R9ZIGu28tWVx3LEZvbyGdOEE/hFAVwAyt7TeVEvbStHIsZxOgFK T7RRNeP32JUpC0marVcSj23qFycEFoyn26rCGofoW1sJKNjHNBx0r3kd4GK7nH3OnmAh yPag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=F5GtC/Ug8FVHmzGkdMDsWJgCnt1hLX/XyGMcykgns/M=; b=PgrJsU6Xqx1aG4D4xprDRvbHdIogdfUrGvh0/Pdz6hhGW7klHWvvLJvtnGjgq9E2X4 F3WLpKair3NWqQMt1yd1dFIs5l96ktXQoQw8C//dTo1+kqK7cF1z0JIjPdsbU9ny3gez PY2nBeZAyCYNCrHJGXm6YHg4gOldyvgMP6+EXgqxSUnjRvjqHI+jYVsPVjtZJo65tVN6 c2oAS0++O2qV4we+kbZT6FKP/S0TEHrzCfDgTQJKXLQyzhuZVDKwltz8QYIGvw0qrb5i zf+BT28UNFcqEfIbklobMgkKa+0OMXFFOhFnkiT730beSgOu0Ym82JdVZzTGC9kBYxN9 0kZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=joDVo1JK; 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 a32-20020a631a20000000b0051b554df1c2si12928955pga.497.2023.04.18.03.24.49; Tue, 18 Apr 2023 03:25:05 -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=joDVo1JK; 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 S231148AbjDRKTG (ORCPT + 63 others); Tue, 18 Apr 2023 06:19:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbjDRKTA (ORCPT ); Tue, 18 Apr 2023 06:19:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F19D6EBD for ; Tue, 18 Apr 2023 03:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=F5GtC/Ug8FVHmzGkdMDsWJgCnt1hLX/XyGMcykgns/M=; t=1681813139; x=1683022739; b=joDVo1JK7xXsc4AGxcGzfHzZM2M7FCyjpzTdwAIC8QWu6xp xeHuhpQaUraDRO0HZaAWXRszaFchOhLAARng7gJIDHsUZbMstlJBwdgP9dvKtu6IJ5fsjmM2kYZML ei6LvdWGcZpWKX1cKRvYmpbNI6dh1eQOhGXww/kJu+FoSTEl3QycDbRJ1zikB5vPyiQwrh0pI7EK6 b+rwIzKN1eaGR2G4YB6dFGDnhrKiy4N5ePjjnwvRxUiy7fBQZg9kvKZzmhGUYu6zq/wB3vHu3ZjwZ Vq5RR3VKM/LA3Z57gGObHXREkj4FaEtKmYp/NFsIwbJXIdu3FyfFPR5vn+AcbMCw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1poiQK-001aBp-0x; Tue, 18 Apr 2023 12:18:56 +0200 Message-ID: <949040e5e573acef1a56269983a0e930951986ca.camel@sipsolutions.net> Subject: Re: [PATCH 10/27] wifi: mac80211: isolate driver from inactive links From: Johannes Berg To: Wen Gong , linux-wireless@vger.kernel.org Cc: ath11k@lists.infradead.org Date: Tue, 18 Apr 2023 12:18:55 +0200 In-Reply-To: References: <20220902141259.377789-1-johannes@sipsolutions.net> <868131d13ed7c4c8b5d4938adcd71cf1ff8e9677.camel@sipsolutions.net> <5765e3c5-46d4-e92b-a93b-4a2649acff2a@quicinc.com> <37958ca93039114b98909d730ff57dd1d10bb68d.camel@sipsolutions.net> <91577d586475d290e08dee9e535cb6b4896e06d4.camel@sipsolutions.net> <61268d31f8a6dd4eea10fcb6048d39244bc584e2.camel@sipsolutions.net> <870ce439-85b1-f02c-70e5-2d424fd73372@quicinc.com> <34ed0938b69ead648da1aa250a2e081054fb49d4.camel@sipsolutions.net> <34212873-0b71-7f39-b064-6b50d8e514b4@quicinc.com> <09b156b1ef05377ca7fa0db35e8e13beb5c60e2c.camel@sipsolutions.net> <13980456-11a6-384c-7be2-63c005410267@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-malware-bazaar: not-scanned 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,URIBL_BLOCKED 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 On Tue, 2023-04-18 at 17:44 +0800, Wen Gong wrote: > On 4/18/2023 5:38 PM, Johannes Berg wrote: > > On Tue, 2023-04-18 at 17:37 +0800, Wen Gong wrote: > >=20 > >=20 > > > > > the sdata->u.mgd.assoc_data is NOT empty, > > > > >=20 > > > > > and the sdata->u.mgd.assoc_data->link[link_id].addr is valid, > > > > >=20 > > > > > it is addr by eth_random_addr(assoc_data->link[i].addr) in > > > > > ieee80211_mgd_assoc(). > > > > >=20 > > > > Exactly, so we've already decided on the address long before we act= ually > > > > add the link data structure, so your callback would be much too lat= e. > > > > We'd need to have it called from ieee80211_mgd_assoc() already? > > > For the 2nd link, is it OK for me to use the random addr which is set= in > > > ieee80211_mgd_assoc(). > > >=20 > > > I only need to set the 1st assoc link in low driver. > > >=20 > > Ah. But does it make sense to restrict the API for that? I mean, if you > > just change the prototype a little bit and call it without the link > > conf, you can easily solve this problem too, no? > Sorry, I am not sure how to solve this problem by remove the link conf= =20 > in prototype. Why, then you can have an output parameter for the address, and call it in mac80211 wherever it calls eth_random_addr() today, no? johannes >=20