Messages in this thread | | | Date | Tue, 10 Mar 2020 14:24:02 +0100 | From | Andrew Lunn <> | Subject | Re: [PATCH net-next 2/3] net: phy: mscc: split the driver into separate files |
| |
On Tue, Mar 10, 2020 at 10:07:19AM +0100, Antoine Tenart wrote: > +++ b/drivers/net/phy/mscc/mscc.h > @@ -0,0 +1,451 @@ > +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ > +/* > + * Driver for Microsemi VSC85xx PHYs > + * > + * Copyright (c) 2016 Microsemi Corporation > + */ > + > +#ifndef _MSCC_PHY_H_ > +#define _MSCC_PHY_H_ > + > +#if IS_ENABLED(CONFIG_MACSEC) > +#include <net/macsec.h> > +#include "mscc_macsec.h" > +#endif
> +#if IS_ENABLED(CONFIG_MACSEC) > +struct macsec_flow { > + struct list_head list; > + enum mscc_macsec_destination_ports port; > + enum macsec_bank bank; > + u32 index; > + int assoc_num; > + bool has_transformation; > + > + /* Highest takes precedence [0..15] */ > + u8 priority; > + > + u8 key[MACSEC_KEYID_LEN]; > + > + union { > + struct macsec_rx_sa *rx_sa; > + struct macsec_tx_sa *tx_sa; > + }; > + > + /* Matching */ > + struct { > + u8 sci:1; > + u8 tagged:1; > + u8 untagged:1; > + u8 etype:1; > + } match; > + > + u16 etype; > + > + /* Action */ > + struct { > + u8 bypass:1; > + u8 drop:1; > + } action; > + > +}; > +#endif
Could some of this be moved into mscc_macsec.h? It would reduce the number of #ifdefs.
Andrew
| |