net: realtek: Add option to disable drivers

The RealTek drivers do not build against all Linux distributions because
some Linux distributions have back-ported upstream changes and so the
KERNEL_VERSION checks in the driver do not work for these distributions.

Add compilation flags for these drivers so that we can skip the building
of these drivers for certain Linux distributions.

Please note that the RealTek drivers build fine against Linux v5.14 and
so we should not prevent these driver being built against all Linux
v5.14 kernels.

Bug 4729493

Change-Id: I004d61a884c6f01b4629de56ecc17b55d4fa2cd1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171274
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2024-05-30 09:48:25 +01:00
committed by mobile promotions
parent 537492a880
commit 408ef72fb9
2 changed files with 11 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
ifneq ($(NV_OOT_REALTEK_R8168_SKIP_BUILD),y)
obj-m += r8168/
obj-m += r8126/
endif
ifneq ($(NV_OOT_REALTEK_R8126_SKIP_BUILD),y)
obj-m += r8126/
endif

View File

@@ -1,8 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
ifeq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),)
ifeq ($(VERSION).$(PATCHLEVEL),5.15)
ifneq ($(NV_OOT_REALTEK_RTL8822CE_SKIP_BUILD),y)
obj-m += rtl8822ce/
endif
endif
endif