Re: [PATCH net-next v16 5/5] net: rnpgbe: Add register_netdev
From: Jakub Kicinski
Date: Thu Oct 30 2025 - 22:06:04 EST
On Fri, 31 Oct 2025 09:44:10 +0800 Yibo Dong wrote:
> > > It is for 'u8 perm_addr[ETH_ALEN];'
> > > Maybe I should just "#include <linux/if_ether.h>" for this patch.
> >
> > I see, that's fine. Then again, I'm not sure why you store the perm
> > addr in the struct in the first place. It's already stored in netdevice.
> >
>
> I get 'mac_addr' from fw, and store it to hw->perm_addr 'before'
> registe netdev (rnpgbe_get_permanent_mac in rnpgbe_chip.c).
> You mean I can use a local variable to store mac_addr from fw,
> and then use it to registe netdev?
>
> Maybe like this?
> int rnpgbe_get_permanent_mac(struct mucse_hw *hw, u8 *perm_addr)
> ...
> u8 perm_addr[ETH_ALEN]
> ...
> err = rnpgbe_get_permanent_mac(hw, perm_addr);
> if (!err) {
> eth_hw_addr_set(netdev, perm_addr);
Yes, LGTM.