Skip to content

Commit

Permalink
net: phy: mscc: split the driver into separate files
Browse files Browse the repository at this point in the history
This patch splits the MSCC driver into separate files, per
functionality, to improve readability and maintenance as the codebase
grew a lot. The MACsec code is moved to a dedicated mscc_macsec.c file,
the mscc.c file is renamed to mscc_main.c to keep the driver binary to
be named mscc and common definition are put into a new mscc.h header.

Most of the code was just moved around, except for a few exceptions:
- Header inclusions were reworked to only keep what's needed.
- Three helpers were created in the MACsec code, to avoid #ifdef's in
  the main C file: vsc8584_macsec_init, vsc8584_handle_macsec_interrupt
  and vsc8584_config_macsec_intr.

The patch should not introduce any functional modification.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Antoine Tenart authored and David S. Miller committed Mar 15, 2020
1 parent da80aa5 commit fa164e4
Show file tree
Hide file tree
Showing 5 changed files with 1,515 additions and 1,462 deletions.
7 changes: 6 additions & 1 deletion drivers/net/phy/mscc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
#
# Makefile for MSCC networking PHY driver

obj-$(CONFIG_MICROSEMI_PHY) += mscc.o
obj-$(CONFIG_MICROSEMI_PHY) := mscc.o
mscc-objs := mscc_main.o

ifdef CONFIG_MACSEC
mscc-objs += mscc_macsec.o
endif
Loading

0 comments on commit fa164e4

Please sign in to comment.