> > Maybe we can find a clever way with a macro to specify only the PHY OUI
> > and compute a suitable mask automatically?
> > 
> I don't think so. For Realtek each driver is specific even to a model
> revision (therefore mask 0xffffffff). Same applies to intel-xway.
> In broadcom.c we have masks 0xfffffff0, so for each model, independent
> of revision number. There is no general rule.
> Also we can't simply check for the first-bit-set to derive a mask.

I'm crystal ball gazing, but i think Florian was meaning something like

#define PHY_ID_UNIQUE(_id) \
        .phy_id = _id_; \
        .phy_id_mask = 0xffffffff;

It is the boilerplate setting .phy_id_mask which you don't like. This removes 
that boilerplate.

        Andrew

Reply via email to