Skip to content

Commit 3c083ed

Browse files
Denis Kirjanovdavem330
authored andcommitted
ns83820: Add copper device settings
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7457e91 commit 3c083ed

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

drivers/net/ns83820.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,13 +1270,21 @@ static int ns83820_get_settings(struct net_device *ndev,
12701270

12711271
cmd->supported = SUPPORTED_Autoneg;
12721272

1273-
/* we have optical interface */
12741273
if (dev->CFG_cache & CFG_TBI_EN) {
1274+
/* we have optical interface */
12751275
cmd->supported |= SUPPORTED_1000baseT_Half |
12761276
SUPPORTED_1000baseT_Full |
12771277
SUPPORTED_FIBRE;
12781278
cmd->port = PORT_FIBRE;
1279-
} /* TODO: else copper related support */
1279+
} else {
1280+
/* we have copper */
1281+
cmd->supported |= SUPPORTED_10baseT_Half |
1282+
SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Half |
1283+
SUPPORTED_100baseT_Full | SUPPORTED_1000baseT_Half |
1284+
SUPPORTED_1000baseT_Full |
1285+
SUPPORTED_MII;
1286+
cmd->port = PORT_MII;
1287+
}
12801288

12811289
cmd->duplex = fullduplex ? DUPLEX_FULL : DUPLEX_HALF;
12821290
switch (cfg / CFG_SPDSTS0 & 3) {

0 commit comments

Comments
 (0)