On Tue, 2023-04-18 at 17:37 +0800, Wen Gong wrote: > > > the sdata->u.mgd.assoc_data is NOT empty, > > > > > > and the sdata->u.mgd.assoc_data->link[link_id].addr is valid, > > > > > > it is addr by eth_random_addr(assoc_data->link[i].addr) in > > > ieee80211_mgd_assoc(). > > > > > Exactly, so we've already decided on the address long before we actually > > 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? > > For the 2nd link, is it OK for me to use the random addr which is set in > ieee80211_mgd_assoc(). > > I only need to set the 1st assoc link in low driver. > 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