On 6/1/2024 1:26 AM, Jeff Johnson wrote: > On 5/30/2024 10:11 PM, Baochen Qiang wrote: >> >> >> On 5/31/2024 11:42 AM, Baochen Qiang wrote: >>>>> +static void ath12k_wow_prepare_ns_offload(struct ath12k_vif *arvif, >>>>> + struct wmi_arp_ns_offload_arg *offload) >>>>> +{ >>>>> + struct inet6_dev *idev = arvif->idev; >>>> as noted above does it make more sense to get the netdev associated with the >>>> arvif and then use in6_dev_get(net_device) to get the inet6_dev rather than >>>> caching the pointer from the ipv6_addr_changed() callback? >>> Ah.. I didn't note that we can get inet6_dev in such a way, just thought the only way is to cache it in ipv6_changed() callback. >>> >>> will get it using the following in next version: >>> struct ieee80211_vif *vif = container_of(arvif) >>> struct ieee80211_sub_if_data *sub_if_data = container_of(vif) >>> struct net_dev *ndev = sub_if_data->dev >>> struct inet6_dev *idev = in6_dev_get(ndev) >> Just found that ieee80211_sub_if_data is internal to mac80211, so not possible to get netdev in this way. >> >> any other ideas on how to get netdev? > > Thinking about this some more, it seems like you'd want to send these down to > firmware immediately so that they'd be available for NS offload. Does firmware > support NS offload even when host is awake (I think the downstream Android > driver supports that)? And really curious about the use case in Android scenario. > > So perhaps an alternative approach is to collect the information you need from > the notification and then schedule a workqueue to actually send the > information to firmware?