mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Fix compilation
This commit is contained in:
parent
44562e8baa
commit
80835f6902
3 changed files with 59 additions and 0 deletions
|
@ -0,0 +1,55 @@
|
|||
From bdb6cfe7512f7a214815a3092f0be50963dcacbc Mon Sep 17 00:00:00 2001
|
||||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
||||
Date: Sat, 18 Jun 2022 11:28:32 +0100
|
||||
Subject: [PATCH] net: mii: add mii_bmcr_encode_fixed()
|
||||
|
||||
Add a function to encode a fixed speed/duplex to a BMCR value.
|
||||
|
||||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
include/linux/mii.h | 35 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
--- a/include/linux/mii.h
|
||||
+++ b/include/linux/mii.h
|
||||
@@ -595,4 +595,39 @@ static inline u8 mii_resolve_flowctrl_fd
|
||||
return cap;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * mii_bmcr_encode_fixed - encode fixed speed/duplex settings to a BMCR value
|
||||
+ * @speed: a SPEED_* value
|
||||
+ * @duplex: a DUPLEX_* value
|
||||
+ *
|
||||
+ * Encode the speed and duplex to a BMCR value. 2500, 1000, 100 and 10 Mbps are
|
||||
+ * supported. 2500Mbps is encoded to 1000Mbps. Other speeds are encoded as 10
|
||||
+ * Mbps. Unknown duplex values are encoded to half-duplex.
|
||||
+ */
|
||||
+static inline u16 mii_bmcr_encode_fixed(int speed, int duplex)
|
||||
+{
|
||||
+ u16 bmcr;
|
||||
+
|
||||
+ switch (speed) {
|
||||
+ case SPEED_2500:
|
||||
+ case SPEED_1000:
|
||||
+ bmcr = BMCR_SPEED1000;
|
||||
+ break;
|
||||
+
|
||||
+ case SPEED_100:
|
||||
+ bmcr = BMCR_SPEED100;
|
||||
+ break;
|
||||
+
|
||||
+ case SPEED_10:
|
||||
+ default:
|
||||
+ bmcr = BMCR_SPEED10;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (duplex == DUPLEX_FULL)
|
||||
+ bmcr |= BMCR_FULLDPLX;
|
||||
+
|
||||
+ return bmcr;
|
||||
+}
|
||||
+
|
||||
#endif /* __LINUX_MII_H__ */
|
|
@ -3110,6 +3110,7 @@ CONFIG_LINEAR_RANGES=y
|
|||
# CONFIG_LIQUIDIO_VF is not set
|
||||
# CONFIG_LIS3L02DQ is not set
|
||||
# CONFIG_LITEX_SOC_CONTROLLER is not set
|
||||
CONFIG_LIVEPATCH=y
|
||||
# CONFIG_LKDTM is not set
|
||||
CONFIG_LLC=y
|
||||
# CONFIG_LLC2 is not set
|
||||
|
|
|
@ -172,6 +172,7 @@ CONFIG_CRYPTO_CRC32C=y
|
|||
CONFIG_CRYPTO_CRCT10DIF=y
|
||||
CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_DEV_ROCKCHIP=y
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
|
@ -290,6 +291,7 @@ CONFIG_I2C_CHARDEV=y
|
|||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_RK3X=y
|
||||
# CONFIG_IIO_SCMI is not set
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_INDIRECT_PIO=y
|
||||
CONFIG_INPUT=y
|
||||
|
@ -299,6 +301,7 @@ CONFIG_INPUT_KEYBOARD=y
|
|||
CONFIG_INPUT_LEDS=y
|
||||
CONFIG_INPUT_MATRIXKMAP=y
|
||||
# CONFIG_INPUT_MISC is not set
|
||||
# CONFIG_INPUT_RK805_PWRKEY is not set
|
||||
CONFIG_IOMMU_API=y
|
||||
# CONFIG_IOMMU_DEBUGFS is not set
|
||||
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue