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 21C97C77B75 for ; Tue, 18 Apr 2023 09:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231387AbjDRJjb (ORCPT ); Tue, 18 Apr 2023 05:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231472AbjDRJjN (ORCPT ); Tue, 18 Apr 2023 05:39:13 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BADE872B7 for ; Tue, 18 Apr 2023 02:39:00 -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=M5Qtz6TP1ENIxoBnHcXZ0OmyvDVWJWQ9A1C/xTKJeRE=; t=1681810740; x=1683020340; b=hHlGv9rB2CSb+gQ7nDTjZoBjdD0XQWStXifigpcASzcA3wZ XFadBHqGGceL0FMLJJkiz97L3YJNAV/CTDX9C+1WeS8GV6z5M1+cdZyj1b8yVxUll53C/pJsdI46W ZjwfvyzNpxTEXCom9yohynsAzWpONEIKmf+TcBTdo/WgIky6HE5SrvocVuOFEj3MRO9iMiS3GGm7u 5DuKeFxm7n5J8uCO7aUpT7hFkeMNeUcYOFgDG2if2ryYcmupixOryhfGwfyI0hxrp9/6dRDndfrSW nOlEi+EHE87u1Au74826NtdWyJ25ZSzl08ebZjgpXRVOTaF7YnGxXM9aBOTExG3Q==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1pohne-001ZI2-1K; Tue, 18 Apr 2023 11:38:58 +0200 Message-ID: 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 11:38:57 +0200 In-Reply-To: <13980456-11a6-384c-7be2-63c005410267@quicinc.com> References: <20220902141259.377789-1-johannes@sipsolutions.net> <545227cf18baac94ea8aa24dc08b250c47949541.camel@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:37 +0800, Wen Gong wrote: > > > 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 actuall= y > > add the link data structure, so your callback would be much too late. > > We'd need to have it called from ieee80211_mgd_assoc() already? >=20 > For the 2nd link, is it OK for me to use the random addr which is set in= =20 > 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? Then your driver just has to call eth_radnom_addr() when it's "don't care", but that's OK? johannes