Skip to content

Commit

Permalink
Merge pull request #1039 from spycat88/RTL8733BU
Browse files Browse the repository at this point in the history
RTL8733BU: introduce new package
  • Loading branch information
spycat88 authored Dec 29, 2024
2 parents 2816ab7 + da7235b commit 34da520
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/kernel/drivers/RTL8733BU/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX)

PKG_NAME="RTL8733BU"
PKG_VERSION="48ab87b8ffeb0a43dd2d0b108d3cda9112936522"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/wirenboard/rtl8733bu"
PKG_URL="https://github.com/wirenboard/rtl8733bu/archive/${PKG_VERSION}.tar.gz"
PKG_LONGDESC="RTL8733BU driver"
PKG_TOOLCHAIN="make"
PKG_IS_KERNEL_PKG="yes"

pre_make_target() {
unset LDFLAGS
}

make_target() {
make V=1 \
ARCH=${TARGET_KERNEL_ARCH} \
KSRC=$(kernel_path) \
CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \
CONFIG_POWER_SAVING=y
}

makeinstall_target() {
mkdir -p ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless
cp *.ko ${INSTALL}/$(get_full_module_dir)/kernel/drivers/net/wireless
}
41 changes: 41 additions & 0 deletions packages/kernel/drivers/RTL8733BU/patches/001-fix-building.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@
#EXTRA_CFLAGS += -Wno-unused-function
#EXTRA_CFLAGS += -Wno-unused
#EXTRA_CFLAGS += -Wno-uninitialized
+EXTRA_CFLAGS += -w

############ ANDROID COMMON KERNEL ############
# clang
--- a/os_dep/linux/ioctl_cfg80211.h
+++ b/os_dep/linux/ioctl_cfg80211.h
@@ -63,7 +63,7 @@

#if defined(CONFIG_DFS_MASTER) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0))
#ifndef CONFIG_RTW_CFG80211_CAC_EVENT
-#define CONFIG_RTW_CFG80211_CAC_EVENT 1
+#define CONFIG_RTW_CFG80211_CAC_EVENT 0
#endif
#else
#ifdef CONFIG_RTW_CFG80211_CAC_EVENT
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -204,7 +204,7 @@

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
if (started) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) || defined(CONFIG_ACK_5_15_LTS_KERNEL)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, punct_bitmap);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
@@ -229,7 +229,7 @@
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
goto exit;

-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) || defined(CONFIG_ACK_5_15_LTS_KERNEL)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, punct_bitmap);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);

0 comments on commit 34da520

Please sign in to comment.