Compare commits

..

6 Commits

Author SHA1 Message Date
Slavic Dragovtev
dd1828adc6 Merge 4e8d492b1e into 9624bd8943 2025-05-26 14:00:00 +03:00
Slavic Dragovtev
4e8d492b1e Update README.md 2025-05-26 13:58:41 +03:00
Slavic Dragovtev
daf03e4717 Updates readme grammar. 2025-05-26 13:55:25 +03:00
Slavic Dragovtev
ccbedaf417 Merge branch 'RinCat:master' into master 2025-05-26 13:50:17 +03:00
Slavic Dragovtev
a4bb5c8589 Merge pull request #1 from slavicd/slavicd-patch-1
Update README.md
2024-12-10 15:21:01 +02:00
Slavic Dragovtev
890503ad08 Update README.md
Fixes grammar.
2024-12-10 15:20:05 +02:00
10 changed files with 413 additions and 430 deletions

776
Makefile

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
# REALTEK RTL88x2B USB Linux Driver # REALTEK RTL88x2B USB Linux Driver
**Current Driver Version**: 5.13.1-30 **Current Driver Version**: 5.13.1-30
**Support Kernel**: 2.6.24 ~ 6.18 (with unofficial patches) **Support Kernel**: 2.6.24 ~ 6.14 (with unofficial patches)
Linux in-tree rtw8822bu driver is a work in progress. Check [this](https://lore.kernel.org/lkml/20220518082318.3898514-1-s.hauer@pengutronix.de/) patchset. Linux in-tree rtw8822bu driver is a work in progress. Check [this](https://lore.kernel.org/lkml/20220518082318.3898514-1-s.hauer@pengutronix.de/) patchset.
@@ -8,8 +8,6 @@ For official release notes please check ReleaseNotes.pdf.
**Note:** if you believe your device is **RTL8812BU** or **RTL8822BU** but after loading the module no NIC shows up, the device ID maybe not be in the driver whitelist. In this case, please submit a new issue with `lsusb` result, and your device name, brand, website, etc. **Note:** if you believe your device is **RTL8812BU** or **RTL8822BU** but after loading the module no NIC shows up, the device ID maybe not be in the driver whitelist. In this case, please submit a new issue with `lsusb` result, and your device name, brand, website, etc.
This driver does *NOT* support newer Realtek 802.11ax (Wi-Fi 6) chipsets such as RTL8852BU.
## Linux 5.18+ and RTW88 Driver ## Linux 5.18+ and RTW88 Driver
Starting from Linux 5.18, some distributions have added experimental RTW88 USB support (include RTW88x2BU support). Starting from Linux 5.18, some distributions have added experimental RTW88 USB support (include RTW88x2BU support).
It is not yet stable but if it works well on your system, then you no longer need this driver. It is not yet stable but if it works well on your system, then you no longer need this driver.

View File

@@ -86,3 +86,19 @@ int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
_len[1] = SHA256_MAC_LEN; _len[1] = SHA256_MAC_LEN;
return sha256_vector(2, _addr, _len, mac); return sha256_vector(2, _addr, _len, mac);
} }
/**
* hmac_sha256 - HMAC-SHA256 over data buffer (RFC 2104)
* @key: Key for HMAC operations
* @key_len: Length of the key in bytes
* @data: Pointers to the data area
* @data_len: Length of the data area
* @mac: Buffer for the hash (32 bytes)
* Returns: 0 on success, -1 on failure
*/
int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
size_t data_len, u8 *mac)
{
return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac);
}

View File

@@ -13,6 +13,8 @@
int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
const u8 *addr[], const size_t *len, u8 *mac); const u8 *addr[], const size_t *len, u8 *mac);
int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
size_t data_len, u8 *mac);
int sha256_prf(const u8 *key, size_t key_len, const char *label, int sha256_prf(const u8 *key, size_t key_len, const char *label,
const u8 *data, size_t data_len, u8 *buf, size_t buf_len); const u8 *data, size_t data_len, u8 *buf, size_t buf_len);
int sha256_prf_bits(const u8 *key, size_t key_len, const char *label, int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,

View File

@@ -1,4 +1,4 @@
ccflags-y += -I$(src)/hal/phydm EXTRA_CFLAGS += -I$(src)/hal/phydm
_PHYDM_FILES := hal/phydm/phydm_debug.o \ _PHYDM_FILES := hal/phydm/phydm_debug.o \
hal/phydm/phydm_antdiv.o\ hal/phydm/phydm_antdiv.o\

View File

@@ -725,23 +725,11 @@ void odm_initialize_timer(struct dm_struct *dm, struct phydm_timer_list *timer,
void odm_cancel_timer(struct dm_struct *dm, struct phydm_timer_list *timer) void odm_cancel_timer(struct dm_struct *dm, struct phydm_timer_list *timer)
{ {
#if (DM_ODM_SUPPORT_TYPE & ODM_AP) #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
timer_delete(timer);
#else
del_timer(timer); del_timer(timer);
#endif
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
timer_delete(timer);
#else
del_timer(timer); del_timer(timer);
#endif
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
timer_delete(&timer->timer);
#else
del_timer(&timer->timer); del_timer(&timer->timer);
#endif
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
_cancel_timer_ex(timer); _cancel_timer_ex(timer);
#elif (DM_ODM_SUPPORT_TYPE & ODM_WIN) #elif (DM_ODM_SUPPORT_TYPE & ODM_WIN)

View File

@@ -1,4 +1,4 @@
ccflags-y += -I$(src)/hal/phydm EXTRA_CFLAGS += -I$(src)/hal/phydm
_PHYDM_FILES := hal/phydm/phydm_debug.o \ _PHYDM_FILES := hal/phydm/phydm_debug.o \
hal/phydm/phydm_interface.o\ hal/phydm/phydm_interface.o\

View File

@@ -357,9 +357,7 @@ static inline void timer_hdl(struct timer_list *in_timer)
static inline void timer_hdl(unsigned long cntx) static inline void timer_hdl(unsigned long cntx)
#endif #endif
{ {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
_timer *ptimer = timer_container_of(ptimer, in_timer, timer);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
_timer *ptimer = from_timer(ptimer, in_timer, timer); _timer *ptimer = from_timer(ptimer, in_timer, timer);
#else #else
_timer *ptimer = (_timer *)cntx; _timer *ptimer = (_timer *)cntx;
@@ -389,20 +387,12 @@ __inline static void _set_timer(_timer *ptimer, u32 delay_time)
__inline static void _cancel_timer(_timer *ptimer, u8 *bcancelled) __inline static void _cancel_timer(_timer *ptimer, u8 *bcancelled)
{ {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
*bcancelled = timer_delete_sync(&ptimer->timer) == 1 ? 1 : 0;
#else
*bcancelled = del_timer_sync(&ptimer->timer) == 1 ? 1 : 0; *bcancelled = del_timer_sync(&ptimer->timer) == 1 ? 1 : 0;
#endif
} }
__inline static void _cancel_timer_async(_timer *ptimer) __inline static void _cancel_timer_async(_timer *ptimer)
{ {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
timer_delete(&ptimer->timer);
#else
del_timer(&ptimer->timer); del_timer(&ptimer->timer);
#endif
} }
static inline void _init_workitem(_workitem *pwork, void *pfunc, void *cntx) static inline void _init_workitem(_workitem *pwork, void *pfunc, void *cntx)

View File

@@ -3592,12 +3592,7 @@ static void cfg80211_rtw_abort_scan(struct wiphy *wiphy,
} }
#endif #endif
static int cfg80211_rtw_set_wiphy_params( static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
int radio_idx,
#endif
u32 changed)
{ {
#if 0 #if 0
struct iwm_priv *iwm = wiphy_to_iwm(wiphy); struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
@@ -4602,9 +4597,6 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
struct wireless_dev *wdev, struct wireless_dev *wdev,
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
int radio_idx,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)) || defined(COMPAT_KERNEL_RELEASE)
enum nl80211_tx_power_setting type, int mbm) enum nl80211_tx_power_setting type, int mbm)
#else #else
@@ -4667,9 +4659,6 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
struct wireless_dev *wdev, struct wireless_dev *wdev,
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
int radio_idx,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0))
unsigned int link_id, unsigned int link_id,
#endif #endif

View File

@@ -1,8 +1,8 @@
ccflags-y += -DCONFIG_RTL8822B EXTRA_CFLAGS += -DCONFIG_RTL8822B
ifeq ($(CONFIG_MP_INCLUDED), y) ifeq ($(CONFIG_MP_INCLUDED), y)
### 8822B Default Enable VHT MP HW TX MODE ### ### 8822B Default Enable VHT MP HW TX MODE ###
#ccflags-y += -DCONFIG_MP_VHT_HW_TX_MODE #EXTRA_CFLAGS += -DCONFIG_MP_VHT_HW_TX_MODE
#CONFIG_MP_VHT_HW_TX_MODE = y #CONFIG_MP_VHT_HW_TX_MODE = y
endif endif