From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F0EBC77B78 for ; Tue, 18 Apr 2023 10:19:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231148AbjDRKTG (ORCPT ); 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 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