Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --unified --recursive --no-dereference rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/core/rtw_br_ext.c rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/core/rtw_br_ext.c
- --- rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/core/rtw_br_ext.c 2022-04-18 10:20:02.000000000 +0800
- +++ rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/core/rtw_br_ext.c 2024-01-18 23:39:48.640286386 +0800
- @@ -17,7 +17,10 @@
- #ifdef __KERNEL__
- #include <linux/if_arp.h>
- #include <net/ip.h>
- + #include <linux/version.h>
- +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
- #include <net/ipx.h>
- +#endif
- #include <linux/atalk.h>
- #include <linux/udp.h>
- #include <linux/if_pppox.h>
- @@ -169,6 +172,7 @@
- }
- +#ifdef _NET_INET_IPX_H_
- static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
- unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr)
- {
- @@ -200,7 +204,7 @@
- memcpy(networkAddr + 1, (unsigned char *)network, 2);
- networkAddr[3] = *node;
- }
- -
- +#endif
- static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
- unsigned char *ac_mac, unsigned short *sid)
- @@ -330,6 +334,7 @@
- x = networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10];
- return x & (NAT25_HASH_SIZE - 1);
- +#ifdef _NET_INET_IPX_H_
- } else if (networkAddr[0] == NAT25_IPX) {
- unsigned long x;
- @@ -343,6 +348,7 @@
- x = networkAddr[1] ^ networkAddr[2] ^ networkAddr[3];
- return x & (NAT25_HASH_SIZE - 1);
- +#endif
- } else if (networkAddr[0] == NAT25_PPPOE) {
- unsigned long x;
- @@ -889,6 +895,7 @@
- }
- }
- +#ifdef _NET_INET_IPX_H_
- /*---------------------------------------------------*/
- /* Handle IPX and Apple Talk frame */
- /*---------------------------------------------------*/
- @@ -1109,6 +1116,7 @@
- return -1;
- }
- +#endif
- /*---------------------------------------------------*/
- /* Handle PPPoE frame */
- diff --unified --recursive --no-dereference rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/linux/ioctl_cfg80211.c rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/linux/ioctl_cfg80211.c
- --- rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/linux/ioctl_cfg80211.c 2022-04-18 10:20:02.000000000 +0800
- +++ rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/linux/ioctl_cfg80211.c 2024-01-18 20:02:39.718126034 +0800
- @@ -491,7 +491,10 @@
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
- if (started) {
- -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0))
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + /* new argument link_id for MLO, 802.11be, must be 0 for non-MLO */
- + cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
- +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0))
- /* --- cfg80211_ch_switch_started_notfiy() ---
- * A new parameter, bool quiet, is added from Linux kernel v5.11,
- @@ -512,7 +515,10 @@
- if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
- goto exit;
- - cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + /* new argument link_id for MLO, 802.11be, must be 0 for non-MLO */
- + cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
- +#endif
- #else
- int freq = rtw_ch2freq(ch);
- @@ -1179,7 +1185,11 @@
- #endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
- +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
- roam_info.bssid = cur_network->network.MacAddress;
- +#else
- + roam_info.links[0].bssid = cur_network->network.MacAddress;
- +#endif
- roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
- roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
- roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
- @@ -1943,6 +1953,9 @@
- }
- static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + , int link_id
- +#endif
- , u8 key_index
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
- , bool pairwise
- @@ -2105,6 +2118,9 @@
- }
- static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + , int link_id
- +#endif
- , u8 keyid
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
- , bool pairwise
- @@ -2293,7 +2309,9 @@
- }
- static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
- -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + int link_id, u8 key_index, bool pairwise, const u8 *mac_addr)
- +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
- u8 key_index, bool pairwise, const u8 *mac_addr)
- #else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */
- u8 key_index, const u8 *mac_addr)
- @@ -2313,7 +2331,11 @@
- }
- static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
- - struct net_device *ndev, u8 key_index
- + struct net_device *ndev
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + , int link_id
- +#endif
- + , u8 key_index
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
- , bool unicast, bool multicast
- #endif
- @@ -2361,7 +2383,11 @@
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
- int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
- - struct net_device *ndev, u8 key_index)
- + struct net_device *ndev
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + , int link_id
- +#endif
- + , u8 key_index)
- {
- #define SET_DEF_KEY_PARAM_FMT " key_index=%d"
- #define SET_DEF_KEY_PARAM_ARG , key_index
- @@ -5626,7 +5652,11 @@
- return ret;
- }
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
- +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)
- +#endif
- {
- _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
- @@ -7004,6 +7034,9 @@
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
- static int cfg80211_rtw_get_channel(struct wiphy *wiphy,
- struct wireless_dev *wdev,
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
- + unsigned int link_id,
- +#endif
- struct cfg80211_chan_def *chandef)
- {
- _adapter *padapter = wiphy_to_adapter(wiphy);
- @@ -11110,7 +11143,11 @@
- 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(6, 0, 0))
- + if (wdev->links[0].client.current_bss) {
- +#else
- if (wdev->current_bss) {
- +#endif
- RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
- rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
- }
- diff --unified --recursive --no-dereference rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/linux/os_intfs.c rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/linux/os_intfs.c
- --- rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/linux/os_intfs.c 2022-04-18 10:20:02.000000000 +0800
- +++ rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/linux/os_intfs.c 2024-01-18 19:01:54.643852516 +0800
- @@ -2198,7 +2198,11 @@
- u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
- #ifdef CONFIG_RTW_NAPI
- - netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
- +#else
- + netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
- +#endif
- #endif /* CONFIG_RTW_NAPI */
- #if defined(CONFIG_IOCTL_CFG80211)
- diff --unified --recursive --no-dereference rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/linux/rtw_proc.c rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/linux/rtw_proc.c
- --- rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/linux/rtw_proc.c 2022-04-18 10:20:02.000000000 +0800
- +++ rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/linux/rtw_proc.c 2024-01-18 20:15:56.908709696 +0800
- @@ -304,7 +304,11 @@
- static int rtw_drv_proc_open(struct inode *inode, struct file *file)
- {
- /* struct net_device *dev = proc_get_parent_data(inode); */
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + ssize_t index = (ssize_t)pde_data(inode);
- +#else
- ssize_t index = (ssize_t)PDE_DATA(inode);
- +#endif
- const struct rtw_proc_hdl *hdl = drv_proc_hdls + index;
- void *private = NULL;
- @@ -330,7 +334,11 @@
- static ssize_t rtw_drv_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
- {
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + ssize_t index = (ssize_t)pde_data(file_inode(file));
- +#else
- ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
- +#endif
- const struct rtw_proc_hdl *hdl = drv_proc_hdls + index;
- ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
- @@ -5853,7 +5861,11 @@
- static int rtw_adapter_proc_open(struct inode *inode, struct file *file)
- {
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + ssize_t index = (ssize_t)pde_data(inode);
- +#else
- ssize_t index = (ssize_t)PDE_DATA(inode);
- +#endif
- const struct rtw_proc_hdl *hdl = adapter_proc_hdls + index;
- void *private = proc_get_parent_data(inode);
- @@ -5879,7 +5891,11 @@
- static ssize_t rtw_adapter_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
- {
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + ssize_t index = (ssize_t)pde_data(file_inode(file));
- +#else
- ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
- +#endif
- const struct rtw_proc_hdl *hdl = adapter_proc_hdls + index;
- ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
- @@ -6042,7 +6058,11 @@
- static int rtw_odm_proc_open(struct inode *inode, struct file *file)
- {
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + ssize_t index = (ssize_t)pde_data(inode);
- +#else
- ssize_t index = (ssize_t)PDE_DATA(inode);
- +#endif
- const struct rtw_proc_hdl *hdl = odm_proc_hdls + index;
- void *private = proc_get_parent_data(inode);
- @@ -6068,7 +6088,11 @@
- static ssize_t rtw_odm_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
- {
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + ssize_t index = (ssize_t)pde_data(file_inode(file));
- +#else
- ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
- +#endif
- const struct rtw_proc_hdl *hdl = odm_proc_hdls + index;
- ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
- @@ -6207,7 +6231,11 @@
- static int rtw_mcc_proc_open(struct inode *inode, struct file *file)
- {
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + ssize_t index = (ssize_t)pde_data(inode);
- +#else
- ssize_t index = (ssize_t)PDE_DATA(inode);
- +#endif
- const struct rtw_proc_hdl *hdl = mcc_proc_hdls + index;
- void *private = proc_get_parent_data(inode);
- @@ -6233,7 +6261,11 @@
- static ssize_t rtw_mcc_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
- {
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + ssize_t index = (ssize_t)pde_data(file_inode(file));
- +#else
- ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
- +#endif
- const struct rtw_proc_hdl *hdl = mcc_proc_hdls + index;
- ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
- diff --unified --recursive --no-dereference rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/linux/wifi_regd.c rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/linux/wifi_regd.c
- --- rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/linux/wifi_regd.c 2022-04-18 10:20:02.000000000 +0800
- +++ rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/linux/wifi_regd.c 2024-01-27 21:23:39.479192231 +0800
- @@ -694,7 +694,12 @@
- wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS;
- #endif
- -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) \
- + && ((LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 39)) \
- + || (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0))) \
- + && ((LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 13)) \
- + || (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0))) \
- + && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 4))
- wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF;
- #endif
- diff --unified --recursive --no-dereference rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/osdep_service.c rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/osdep_service.c
- --- rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727/os_dep/osdep_service.c 2022-04-18 10:20:02.000000000 +0800
- +++ rtl88x2CU_WiFi_linux_v5.14.0.3-2-gba458274c.20220418_COEX20211210-2727.patched/os_dep/osdep_service.c 2024-01-18 19:56:46.367617065 +0800
- @@ -1505,7 +1505,11 @@
- inline void thread_exit(_completion *comp)
- {
- #ifdef PLATFORM_LINUX
- - complete_and_exit(comp, 0);
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
- + kthread_complete_and_exit(comp, 0);
- +#else
- + complete_and_exit(comp, 0);
- +#endif
- #endif
- #ifdef PLATFORM_FREEBSD
- @@ -3186,7 +3190,9 @@
- inline u32 rtw_random32(void)
- {
- #ifdef PLATFORM_LINUX
- -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
- +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
- + return get_random_u32();
- +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
- return prandom_u32();
- #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
- u32 random_int;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement