# Re: \[PATCH net-next v8 09/11\] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling

- From: Linus Walleij \<linusw@kernel.org\>
- Date: 2026-11-05 09:18:32 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/11/17869090
- Thread: https://ratatoskr.run/netdev/2026/11/17856818/t.md

```text
On Wed, Nov 4, 2026 at 12:35 AM Mieczyslaw Nalewaj [ref] wrote:

> Move the L2 MAC pack/unpack helpers above the family C serializers
> and use them there instead of open-coding the byte packing, since the
> layout of the MAC address words is the same for both families. The
> now unused per-field MAC masks are dropped.
>
> Rename the family C serializers to rtl8365mb_c_l2_*() and keep
> rtl8365mb_l2_{data_to_uc,uc_to_data,data_to_mc,mc_to_data}() as thin
> dispatchers taking priv, so that a following patch can add the family
> D layout without touching the family C code again.
>
> No functional change.
>
> Signed-off-by: Mieczyslaw Nalewaj <redacted>

Looks reasonable:
Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij
```
