forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
139 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ PKG_RELEASE=1 | |
PKG_LICENSE:=GPLv2 | ||
PKG_LICENSE_FILES:= | ||
|
||
PKG_SOURCE_URL:=https://github.com/openlumi/rtl8822bs-aml.git | ||
PKG_MIRROR_HASH:=skip | ||
PKG_SOURCE_URL:=https://github.com/openlumi/rtl8723bs.git | ||
PKG_MIRROR_HASH:=ea8c042faf5488f1b1cd0df774a44f62cad5e677d573f464596bf2a9d1fc2567 | ||
PKG_SOURCE_PROTO:=git | ||
PKG_SOURCE_DATE:=2023-05-08 | ||
PKG_SOURCE_VERSION:=4754406f9304959fc0dd1602be1c74eb940bd3c0 | ||
PKG_SOURCE_DATE:=2023-06-13 | ||
PKG_SOURCE_VERSION:=04a0bd2edd1ca95b30f8ff47f59624e1277fadf1 | ||
|
||
PKG_MAINTAINER:=Ivan Belokobylskiy <[email protected]> | ||
PKG_BUILD_PARALLEL:=1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -14,6 +14,7 @@ EXTRA_CFLAGS += -Wno-unused-label | ||
EXTRA_CFLAGS += -Wno-unused-parameter | ||
EXTRA_CFLAGS += -Wno-unused-function | ||
EXTRA_CFLAGS += -Wno-unused | ||
+EXTRA_CFLAGS += -Wno-address | ||
#EXTRA_CFLAGS += -Wno-uninitialized | ||
|
||
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc ) | ||
--- a/os_dep/linux/ioctl_cfg80211.c | ||
+++ b/os_dep/linux/ioctl_cfg80211.c | ||
@@ -331,9 +331,7 @@ static const struct ieee80211_txrx_stype | ||
static u64 rtw_get_systime_us(void) | ||
{ | ||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) | ||
- ktime_t ts; | ||
- ts = ktime_get_boottime(); | ||
- return do_div(ts, 1000); | ||
+ return (u64)ktime_to_us(ktime_get_boottime()); | ||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) | ||
struct timespec ts; | ||
get_monotonic_boottime(&ts); | ||
@@ -744,7 +742,7 @@ check_bss: | ||
#endif | ||
|
||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) | ||
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) | ||
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)) | ||
roam_info.links[0].bssid = cur_network->network.MacAddress; | ||
#else | ||
roam_info.bssid = cur_network->network.MacAddress; | ||
@@ -1390,7 +1388,7 @@ exit: | ||
} | ||
|
||
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, | ||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) | ||
int link_id, | ||
#endif | ||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) | ||
@@ -1530,7 +1528,7 @@ addkey_end: | ||
} | ||
|
||
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev, | ||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) | ||
int link_id, | ||
#endif | ||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) | ||
@@ -1565,7 +1563,7 @@ static int cfg80211_rtw_get_key(struct w | ||
} | ||
|
||
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, | ||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) | ||
int link_id, | ||
#endif | ||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) | ||
@@ -1589,7 +1587,7 @@ static int cfg80211_rtw_del_key(struct w | ||
|
||
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, | ||
struct net_device *ndev | ||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) | ||
, int link_id | ||
#endif | ||
, u8 key_index | ||
@@ -4243,7 +4241,7 @@ static int cfg80211_rtw_change_beacon(st | ||
return ret; | ||
} | ||
|
||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) | ||
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id) | ||
#else | ||
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev) | ||
@@ -7356,7 +7354,7 @@ void rtw_wdev_unregister(struct wireless | ||
rtw_cfg80211_indicate_scan_done(adapter, _TRUE); | ||
|
||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE) | ||
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) | ||
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) | ||
if (wdev->links[0].client.current_bss) { | ||
#else | ||
if (wdev->current_bss) { | ||
--- a/os_dep/linux/os_intfs.c | ||
+++ b/os_dep/linux/os_intfs.c | ||
@@ -1584,8 +1584,8 @@ int rtw_os_ndev_register(_adapter *adapt | ||
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj); | ||
|
||
#ifdef CONFIG_RTW_NAPI | ||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) | ||
- netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) | ||
+ netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll); | ||
#else | ||
netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); | ||
#endif |
29 changes: 29 additions & 0 deletions
29
package/kernel/rtl8723bs-ol/patches/003-fix-build-on-linux-6.7-kernel.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- a/os_dep/linux/ioctl_cfg80211.c | ||
+++ b/os_dep/linux/ioctl_cfg80211.c | ||
@@ -4020,6 +4020,18 @@ static int cfg80211_rtw_start_ap(struct | ||
return ret; | ||
} | ||
|
||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))|| defined(BUILD_OPENWRT) | ||
+static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, | ||
+ struct cfg80211_ap_update *info) | ||
+{ | ||
+ int ret = 0; | ||
+ _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); | ||
+ | ||
+ RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); | ||
+ | ||
+ ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len, | ||
+ info->beacon.tail, info->beacon.tail_len); | ||
+#else | ||
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, | ||
struct cfg80211_beacon_data *info) | ||
{ | ||
@@ -4029,6 +4041,7 @@ static int cfg80211_rtw_change_beacon(st | ||
RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); | ||
|
||
ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len); | ||
+#endif | ||
|
||
return ret; | ||
} |