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: > > > > > > > > > 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? > Sorry, I am not sure how to solve this problem by remove the link conf > 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 >