initial upload
This commit is contained in:
commit
a1ead36047
106
88x2bu.conf
Normal file
106
88x2bu.conf
Normal file
File diff suppressed because it is too large
Load Diff
755
Bridged_Wireless_Access_Point.md
Normal file
755
Bridged_Wireless_Access_Point.md
Normal file
File diff suppressed because it is too large
Load Diff
7
Kconfig
Normal file
7
Kconfig
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
config RTL8822BU
|
||||||
|
tristate "Realtek 8822B USB WiFi"
|
||||||
|
depends on USB
|
||||||
|
select WIRELESS_EXT
|
||||||
|
help
|
||||||
|
Help message of RTL8822BU
|
||||||
|
|
14
LICENSE
Normal file
14
LICENSE
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2007 - 2021 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
211
core/crypto/aes-ccm.c
Normal file
211
core/crypto/aes-ccm.c
Normal file
File diff suppressed because it is too large
Load Diff
70
core/crypto/aes-ctr.c
Normal file
70
core/crypto/aes-ctr.c
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* AES-128/192/256 CTR
|
||||||
|
*
|
||||||
|
* Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
|
||||||
|
*
|
||||||
|
* This software may be distributed under the terms of the BSD license.
|
||||||
|
* See README for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "rtw_crypto_wrap.h"
|
||||||
|
|
||||||
|
#include "aes.h"
|
||||||
|
#include "aes_wrap.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* aes_ctr_encrypt - AES-128/192/256 CTR mode encryption
|
||||||
|
* @key: Key for encryption (key_len bytes)
|
||||||
|
* @key_len: Length of the key (16, 24, or 32 bytes)
|
||||||
|
* @nonce: Nonce for counter mode (16 bytes)
|
||||||
|
* @data: Data to encrypt in-place
|
||||||
|
* @data_len: Length of data in bytes
|
||||||
|
* Returns: 0 on success, -1 on failure
|
||||||
|
*/
|
||||||
|
int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce,
|
||||||
|
u8 *data, size_t data_len)
|
||||||
|
{
|
||||||
|
void *ctx;
|
||||||
|
size_t j, len, left = data_len;
|
||||||
|
int i;
|
||||||
|
u8 *pos = data;
|
||||||
|
u8 counter[AES_BLOCK_SIZE], buf[AES_BLOCK_SIZE];
|
||||||
|
|
||||||
|
ctx = aes_encrypt_init(key, key_len);
|
||||||
|
if (ctx == NULL)
|
||||||
|
return -1;
|
||||||
|
os_memcpy(counter, nonce, AES_BLOCK_SIZE);
|
||||||
|
|
||||||
|
while (left > 0) {
|
||||||
|
aes_encrypt(ctx, counter, buf);
|
||||||
|
|
||||||
|
len = (left < AES_BLOCK_SIZE) ? left : AES_BLOCK_SIZE;
|
||||||
|
for (j = 0; j < len; j++)
|
||||||
|
pos[j] ^= buf[j];
|
||||||
|
pos += len;
|
||||||
|
left -= len;
|
||||||
|
|
||||||
|
for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) {
|
||||||
|
counter[i]++;
|
||||||
|
if (counter[i])
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
aes_encrypt_deinit(ctx);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* aes_128_ctr_encrypt - AES-128 CTR mode encryption
|
||||||
|
* @key: Key for encryption (key_len bytes)
|
||||||
|
* @nonce: Nonce for counter mode (16 bytes)
|
||||||
|
* @data: Data to encrypt in-place
|
||||||
|
* @data_len: Length of data in bytes
|
||||||
|
* Returns: 0 on success, -1 on failure
|
||||||
|
*/
|
||||||
|
int aes_128_ctr_encrypt(const u8 *key, const u8 *nonce,
|
||||||
|
u8 *data, size_t data_len)
|
||||||
|
{
|
||||||
|
return aes_ctr_encrypt(key, 16, nonce, data, data_len);
|
||||||
|
}
|
326
core/crypto/aes-gcm.c
Normal file
326
core/crypto/aes-gcm.c
Normal file
File diff suppressed because it is too large
Load Diff
129
core/crypto/aes-internal-enc.c
Normal file
129
core/crypto/aes-internal-enc.c
Normal file
File diff suppressed because it is too large
Load Diff
843
core/crypto/aes-internal.c
Normal file
843
core/crypto/aes-internal.c
Normal file
File diff suppressed because it is too large
Load Diff
172
core/crypto/aes-omac1.c
Normal file
172
core/crypto/aes-omac1.c
Normal file
File diff suppressed because it is too large
Load Diff
207
core/crypto/aes-siv.c
Normal file
207
core/crypto/aes-siv.c
Normal file
File diff suppressed because it is too large
Load Diff
21
core/crypto/aes.h
Normal file
21
core/crypto/aes.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* AES functions
|
||||||
|
* Copyright (c) 2003-2006, Jouni Malinen <j@w1.fi>
|
||||||
|
*
|
||||||
|
* This software may be distributed under the terms of the BSD license.
|
||||||
|
* See README for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AES_H
|
||||||
|
#define AES_H
|
||||||
|
|
||||||
|
#define AES_BLOCK_SIZE 16
|
||||||
|
|
||||||
|
void * aes_encrypt_init(const u8 *key, size_t len);
|
||||||
|
int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt);
|
||||||
|
void aes_encrypt_deinit(void *ctx);
|
||||||
|
void * aes_decrypt_init(const u8 *key, size_t len);
|
||||||
|
int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
|
||||||
|
void aes_decrypt_deinit(void *ctx);
|
||||||
|
|
||||||
|
#endif /* AES_H */
|
125
core/crypto/aes_i.h
Normal file
125
core/crypto/aes_i.h
Normal file
File diff suppressed because it is too large
Load Diff
21
core/crypto/aes_siv.h
Normal file
21
core/crypto/aes_siv.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* AES SIV (RFC 5297)
|
||||||
|
* Copyright (c) 2013 Cozybit, Inc.
|
||||||
|
*
|
||||||
|
* This software may be distributed under the terms of the BSD license.
|
||||||
|
* See README for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AES_SIV_H
|
||||||
|
#define AES_SIV_H
|
||||||
|
|
||||||
|
int aes_siv_encrypt(const u8 *key, size_t key_len,
|
||||||
|
const u8 *pw, size_t pwlen,
|
||||||
|
size_t num_elem, const u8 *addr[], const size_t *len,
|
||||||
|
u8 *out);
|
||||||
|
int aes_siv_decrypt(const u8 *key, size_t key_len,
|
||||||
|
const u8 *iv_crypt, size_t iv_c_len,
|
||||||
|
size_t num_elem, const u8 *addr[], const size_t *len,
|
||||||
|
u8 *out);
|
||||||
|
|
||||||
|
#endif /* AES_SIV_H */
|
73
core/crypto/aes_wrap.h
Normal file
73
core/crypto/aes_wrap.h
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* AES-based functions
|
||||||
|
*
|
||||||
|
* - AES Key Wrap Algorithm (RFC3394)
|
||||||
|
* - One-Key CBC MAC (OMAC1) hash with AES-128 and AES-256
|
||||||
|
* - AES-128/192/256 CTR mode encryption
|
||||||
|
* - AES-128 EAX mode encryption/decryption
|
||||||
|
* - AES-128 CBC
|
||||||
|
* - AES-GCM
|
||||||
|
* - AES-CCM
|
||||||
|
*
|
||||||
|
* Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi>
|
||||||
|
*
|
||||||
|
* This software may be distributed under the terms of the BSD license.
|
||||||
|
* See README for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AES_WRAP_H
|
||||||
|
#define AES_WRAP_H
|
||||||
|
|
||||||
|
int __must_check aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain,
|
||||||
|
u8 *cipher);
|
||||||
|
int __must_check aes_unwrap(const u8 *kek, size_t kek_len, int n,
|
||||||
|
const u8 *cipher, u8 *plain);
|
||||||
|
int __must_check omac1_aes_vector(const u8 *key, size_t key_len,
|
||||||
|
size_t num_elem, const u8 *addr[],
|
||||||
|
const size_t *len, u8 *mac);
|
||||||
|
int __must_check omac1_aes_128_vector(const u8 *key, size_t num_elem,
|
||||||
|
const u8 *addr[], const size_t *len,
|
||||||
|
u8 *mac);
|
||||||
|
int __must_check omac1_aes_128(const u8 *key, const u8 *data, size_t data_len,
|
||||||
|
u8 *mac);
|
||||||
|
int __must_check omac1_aes_256(const u8 *key, const u8 *data, size_t data_len,
|
||||||
|
u8 *mac);
|
||||||
|
int __must_check aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out);
|
||||||
|
int __must_check aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce,
|
||||||
|
u8 *data, size_t data_len);
|
||||||
|
int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce,
|
||||||
|
u8 *data, size_t data_len);
|
||||||
|
int __must_check aes_128_eax_encrypt(const u8 *key,
|
||||||
|
const u8 *nonce, size_t nonce_len,
|
||||||
|
const u8 *hdr, size_t hdr_len,
|
||||||
|
u8 *data, size_t data_len, u8 *tag);
|
||||||
|
int __must_check aes_128_eax_decrypt(const u8 *key,
|
||||||
|
const u8 *nonce, size_t nonce_len,
|
||||||
|
const u8 *hdr, size_t hdr_len,
|
||||||
|
u8 *data, size_t data_len, const u8 *tag);
|
||||||
|
int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data,
|
||||||
|
size_t data_len);
|
||||||
|
int __must_check aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data,
|
||||||
|
size_t data_len);
|
||||||
|
int __must_check aes_gcm_ae(const u8 *key, size_t key_len,
|
||||||
|
const u8 *iv, size_t iv_len,
|
||||||
|
const u8 *plain, size_t plain_len,
|
||||||
|
const u8 *aad, size_t aad_len,
|
||||||
|
u8 *crypt, u8 *tag);
|
||||||
|
int __must_check aes_gcm_ad(const u8 *key, size_t key_len,
|
||||||
|
const u8 *iv, size_t iv_len,
|
||||||
|
const u8 *crypt, size_t crypt_len,
|
||||||
|
const u8 *aad, size_t aad_len, const u8 *tag,
|
||||||
|
u8 *plain);
|
||||||
|
int __must_check aes_gmac(const u8 *key, size_t key_len,
|
||||||
|
const u8 *iv, size_t iv_len,
|
||||||
|
const u8 *aad, size_t aad_len, u8 *tag);
|
||||||
|
int __must_check aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce,
|
||||||
|
size_t M, const u8 *plain, size_t plain_len,
|
||||||
|
const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth);
|
||||||
|
int __must_check aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
|
||||||
|
size_t M, const u8 *crypt, size_t crypt_len,
|
||||||
|
const u8 *aad, size_t aad_len, const u8 *auth,
|
||||||
|
u8 *plain);
|
||||||
|
|
||||||
|
#endif /* AES_WRAP_H */
|
385
core/crypto/ccmp.c
Normal file
385
core/crypto/ccmp.c
Normal file
File diff suppressed because it is too large
Load Diff
194
core/crypto/gcmp.c
Normal file
194
core/crypto/gcmp.c
Normal file
File diff suppressed because it is too large
Load Diff
85
core/crypto/rtw_crypto_wrap.c
Normal file
85
core/crypto/rtw_crypto_wrap.c
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#include "rtw_crypto_wrap.h"
|
||||||
|
|
||||||
|
#ifndef DEBUG_CRYPTO
|
||||||
|
#define DEBUG_CRYPTO 0
|
||||||
|
#endif /* DEBUG_CRYTO */
|
||||||
|
|
||||||
|
int os_memcmp(const void *s1, const void *s2, size_t n)
|
||||||
|
{
|
||||||
|
return _rtw_memcmp2(s1, s2, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
int os_memcmp_const(const void *a, const void *b, size_t len)
|
||||||
|
{
|
||||||
|
const u8 *aa = a;
|
||||||
|
const u8 *bb = b;
|
||||||
|
size_t i;
|
||||||
|
u8 res;
|
||||||
|
|
||||||
|
for (res = 0, i = 0; i < len; i++)
|
||||||
|
res |= aa[i] ^ bb[i];
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* os_memdup(const void *src, u32 sz)
|
||||||
|
{
|
||||||
|
void *r = rtw_malloc(sz);
|
||||||
|
|
||||||
|
if (r && src)
|
||||||
|
_rtw_memcpy(r, src, sz);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t os_strlen(const char *s)
|
||||||
|
{
|
||||||
|
const char *p = s;
|
||||||
|
while (*p)
|
||||||
|
p++;
|
||||||
|
return p - s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void forced_memzero(void *ptr, size_t len)
|
||||||
|
{
|
||||||
|
_rtw_memset(ptr, 0, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
void bin_clear_free(void *bin, size_t len)
|
||||||
|
{
|
||||||
|
if (bin) {
|
||||||
|
forced_memzero(bin, len);
|
||||||
|
rtw_mfree(bin, len);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void wpa_printf(int level, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
#if DEBUG_CRYPTO
|
||||||
|
#define MSG_LEN 100
|
||||||
|
va_list args;
|
||||||
|
u8 buf[MSG_LEN] = { 0 };
|
||||||
|
int err;
|
||||||
|
|
||||||
|
va_start(args, fmt);
|
||||||
|
err = vsnprintf(buf, MSG_LEN, fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
RTW_INFO("%s", buf);
|
||||||
|
#undef MSG_LEN
|
||||||
|
#endif /* DEBUG_CRYPTO */
|
||||||
|
}
|
||||||
|
|
||||||
|
void wpa_hexdump(int level, const char *title, const void *buf, size_t len)
|
||||||
|
{
|
||||||
|
#if DEBUG_CRYPTO
|
||||||
|
RTW_INFO_DUMP((u8 *)title, buf, len);
|
||||||
|
#endif /* DEBUG_CRYPTO */
|
||||||
|
}
|
||||||
|
|
||||||
|
void wpa_hexdump_key(int level, const char *title, const void *buf, size_t len)
|
||||||
|
{
|
||||||
|
#if DEBUG_CRYPTO
|
||||||
|
RTW_INFO_DUMP((u8 *)title, buf, len);
|
||||||
|
#endif /* DEBUG_CRYPTO */
|
||||||
|
}
|
64
core/crypto/rtw_crypto_wrap.h
Normal file
64
core/crypto/rtw_crypto_wrap.h
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
#ifndef RTW_CRYTO_WRAP_H
|
||||||
|
#define RTW_CRYTO_WRAP_H
|
||||||
|
|
||||||
|
#include <drv_types.h>
|
||||||
|
|
||||||
|
#define TEST_FAIL() 0
|
||||||
|
|
||||||
|
#define os_memset _rtw_memset
|
||||||
|
#define os_memcpy _rtw_memcpy
|
||||||
|
#define os_malloc rtw_malloc
|
||||||
|
|
||||||
|
#define le_to_host16 le16_to_cpu
|
||||||
|
#define host_to_le16 cpu_to_le16
|
||||||
|
|
||||||
|
#define WPA_PUT_LE16 RTW_PUT_LE16
|
||||||
|
#define WPA_GET_LE16 RTW_GET_LE16
|
||||||
|
#define WPA_PUT_LE32 RTW_PUT_LE32
|
||||||
|
#define WPA_GET_LE32 RTW_GET_LE32
|
||||||
|
#define WPA_PUT_LE64 RTW_PUT_LE64
|
||||||
|
#define WPA_GET_LE64 RTW_GET_LE64
|
||||||
|
#define WPA_PUT_BE16 RTW_PUT_BE16
|
||||||
|
#define WPA_GET_BE16 RTW_GET_BE16
|
||||||
|
#define WPA_PUT_BE32 RTW_PUT_BE32
|
||||||
|
#define WPA_GET_BE32 RTW_GET_BE32
|
||||||
|
#define WPA_PUT_BE64 RTW_PUT_BE64
|
||||||
|
#define WPA_GET_BE64 RTW_GET_BE64
|
||||||
|
|
||||||
|
#ifndef MAC2STR
|
||||||
|
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
|
||||||
|
#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define WLAN_FC_PVER 0x0003
|
||||||
|
#define WLAN_FC_TODS 0x0100
|
||||||
|
#define WLAN_FC_FROMDS 0x0200
|
||||||
|
#define WLAN_FC_MOREFRAG 0x0400
|
||||||
|
#define WLAN_FC_RETRY 0x0800
|
||||||
|
#define WLAN_FC_PWRMGT 0x1000
|
||||||
|
#define WLAN_FC_MOREDATA 0x2000
|
||||||
|
#define WLAN_FC_ISWEP 0x4000
|
||||||
|
#define WLAN_FC_ORDER 0x8000
|
||||||
|
|
||||||
|
#define WLAN_FC_TYPE_DATA RTW_IEEE80211_FTYPE_DATA
|
||||||
|
#define WLAN_FC_TYPE_MGMT RTW_IEEE80211_FTYPE_MGMT
|
||||||
|
|
||||||
|
#define WLAN_FC_STYPE_QOS_DATA RTW_IEEE80211_STYPE_QOS_DATA
|
||||||
|
|
||||||
|
enum {
|
||||||
|
_MSG_EXCESSIVE_, _MSG_MSGDUMP_, _MSG_DEBUG_, _MSG_INFO_, _MSG_WARNING_, _MSG_ERROR_
|
||||||
|
};
|
||||||
|
|
||||||
|
int os_memcmp(const void *s1, const void *s2, size_t n);
|
||||||
|
int os_memcmp_const(const void *a, const void *b, size_t len);
|
||||||
|
void* os_memdup(const void *src, u32 sz);
|
||||||
|
size_t os_strlen(const char *s);
|
||||||
|
|
||||||
|
void forced_memzero(void *ptr, size_t len);
|
||||||
|
void bin_clear_free(void *bin, size_t len);
|
||||||
|
|
||||||
|
void wpa_printf(int level, const char *fmt, ...);
|
||||||
|
void wpa_hexdump(int level, const char *title, const void *buf, size_t len);
|
||||||
|
void wpa_hexdump_key(int level, const char *title, const void *buf, size_t len);
|
||||||
|
|
||||||
|
#endif /* RTW_CRYTO_WRAP_H */
|
230
core/crypto/sha256-internal.c
Normal file
230
core/crypto/sha256-internal.c
Normal file
File diff suppressed because it is too large
Load Diff
109
core/crypto/sha256-prf.c
Normal file
109
core/crypto/sha256-prf.c
Normal file
File diff suppressed because it is too large
Load Diff
104
core/crypto/sha256.c
Normal file
104
core/crypto/sha256.c
Normal file
File diff suppressed because it is too large
Load Diff
30
core/crypto/sha256.h
Normal file
30
core/crypto/sha256.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* SHA256 hash implementation and interface functions
|
||||||
|
* Copyright (c) 2003-2016, Jouni Malinen <j@w1.fi>
|
||||||
|
*
|
||||||
|
* This software may be distributed under the terms of the BSD license.
|
||||||
|
* See README for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SHA256_H
|
||||||
|
#define SHA256_H
|
||||||
|
|
||||||
|
#define SHA256_MAC_LEN 32
|
||||||
|
|
||||||
|
int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
const u8 *data, size_t data_len, u8 *buf,
|
||||||
|
size_t buf_len_bits);
|
||||||
|
void tls_prf_sha256(const u8 *secret, size_t secret_len,
|
||||||
|
const char *label, const u8 *seed, size_t seed_len,
|
||||||
|
u8 *out, size_t outlen);
|
||||||
|
int hmac_sha256_kdf(const u8 *secret, size_t secret_len,
|
||||||
|
const char *label, const u8 *seed, size_t seed_len,
|
||||||
|
u8 *out, size_t outlen);
|
||||||
|
|
||||||
|
#endif /* SHA256_H */
|
25
core/crypto/sha256_i.h
Normal file
25
core/crypto/sha256_i.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* SHA-256 internal definitions
|
||||||
|
* Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
|
||||||
|
*
|
||||||
|
* This software may be distributed under the terms of the BSD license.
|
||||||
|
* See README for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SHA256_I_H
|
||||||
|
#define SHA256_I_H
|
||||||
|
|
||||||
|
#define SHA256_BLOCK_SIZE 64
|
||||||
|
|
||||||
|
struct _sha256_state {
|
||||||
|
u64 length;
|
||||||
|
u32 state[8], curlen;
|
||||||
|
u8 buf[SHA256_BLOCK_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
void _sha256_init(struct _sha256_state *md);
|
||||||
|
int sha256_process(struct _sha256_state *md, const unsigned char *in,
|
||||||
|
unsigned long inlen);
|
||||||
|
int sha256_done(struct _sha256_state *md, unsigned char *out);
|
||||||
|
|
||||||
|
#endif /* SHA256_I_H */
|
34
core/crypto/wlancrypto_wrap.h
Normal file
34
core/crypto/wlancrypto_wrap.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* wlantest - IEEE 802.11 protocol monitoring and testing tool
|
||||||
|
* Copyright (c) 2010-2013, Jouni Malinen <j@w1.fi>
|
||||||
|
*
|
||||||
|
* This software may be distributed under the terms of the BSD license.
|
||||||
|
* See README for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WLANCRYPTO_WRAP_H
|
||||||
|
#define WLANCRYPTO_WRAP_H
|
||||||
|
|
||||||
|
int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len,
|
||||||
|
u8 *mac);
|
||||||
|
|
||||||
|
u8* ccmp_decrypt(_adapter *padapter, const u8 *tk, const struct ieee80211_hdr *hdr,
|
||||||
|
const u8 *data, size_t data_len, size_t *decrypted_len);
|
||||||
|
u8* ccmp_encrypt(_adapter *padapter, const u8 *tk, u8 *frame, size_t len, size_t hdrlen, u8 *qos,
|
||||||
|
u8 *pn, int keyid, size_t *encrypted_len);
|
||||||
|
u8* ccmp_encrypt_pv1(const u8 *tk, const u8 *a1, const u8 *a2, const u8 *a3,
|
||||||
|
const u8 *frame, size_t len,
|
||||||
|
size_t hdrlen, const u8 *pn, int keyid,
|
||||||
|
size_t *encrypted_len);
|
||||||
|
u8* ccmp_256_decrypt(_adapter *padapter, const u8 *tk, const struct ieee80211_hdr *hdr,
|
||||||
|
const u8 *data, size_t data_len, size_t *decrypted_len);
|
||||||
|
u8* ccmp_256_encrypt(_adapter *padapter, const u8 *tk, u8 *frame, size_t len, size_t hdrlen,
|
||||||
|
u8 *qos, u8 *pn, int keyid, size_t *encrypted_len);
|
||||||
|
|
||||||
|
u8* gcmp_decrypt(_adapter *padapter, const u8 *tk, size_t tk_len, const struct ieee80211_hdr *hdr,
|
||||||
|
const u8 *data, size_t data_len, size_t *decrypted_len);
|
||||||
|
u8* gcmp_encrypt(_adapter *padapter, const u8 *tk, size_t tk_len, const u8 *frame, size_t len,
|
||||||
|
size_t hdrlen, const u8 *qos,
|
||||||
|
const u8 *pn, int keyid, size_t *encrypted_len);
|
||||||
|
|
||||||
|
#endif /* WLANCRYPTO_WRAP_H */
|
3604
core/efuse/rtw_efuse.c
Normal file
3604
core/efuse/rtw_efuse.c
Normal file
File diff suppressed because it is too large
Load Diff
4392
core/mesh/rtw_mesh.c
Normal file
4392
core/mesh/rtw_mesh.c
Normal file
File diff suppressed because it is too large
Load Diff
537
core/mesh/rtw_mesh.h
Normal file
537
core/mesh/rtw_mesh.h
Normal file
File diff suppressed because it is too large
Load Diff
1518
core/mesh/rtw_mesh_hwmp.c
Normal file
1518
core/mesh/rtw_mesh_hwmp.c
Normal file
File diff suppressed because it is too large
Load Diff
60
core/mesh/rtw_mesh_hwmp.h
Normal file
60
core/mesh/rtw_mesh_hwmp.h
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#ifndef __RTW_MESH_HWMP_H_
|
||||||
|
#define __RTW_MESH_HWMP_H_
|
||||||
|
|
||||||
|
#ifndef DBG_RTW_HWMP
|
||||||
|
#define DBG_RTW_HWMP 0
|
||||||
|
#endif
|
||||||
|
#if DBG_RTW_HWMP
|
||||||
|
#define RTW_HWMP_DBG(fmt, arg...) RTW_PRINT(fmt, ##arg)
|
||||||
|
#else
|
||||||
|
#define RTW_HWMP_DBG(fmt, arg...) RTW_DBG(fmt, ##arg)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef INFO_RTW_HWMP
|
||||||
|
#define INFO_RTW_HWMP 0
|
||||||
|
#endif
|
||||||
|
#if INFO_RTW_HWMP
|
||||||
|
#define RTW_HWMP_INFO(fmt, arg...) RTW_PRINT(fmt, ##arg)
|
||||||
|
#else
|
||||||
|
#define RTW_HWMP_INFO(fmt, arg...) RTW_INFO(fmt, ##arg)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
void rtw_ewma_err_rate_init(struct rtw_ewma_err_rate *e);
|
||||||
|
unsigned long rtw_ewma_err_rate_read(struct rtw_ewma_err_rate *e);
|
||||||
|
void rtw_ewma_err_rate_add(struct rtw_ewma_err_rate *e, unsigned long val);
|
||||||
|
int rtw_mesh_path_error_tx(_adapter *adapter,
|
||||||
|
u8 ttl, const u8 *target, u32 target_sn,
|
||||||
|
u16 target_rcode, const u8 *ra);
|
||||||
|
void rtw_ieee80211s_update_metric(_adapter *adapter, u8 mac_id,
|
||||||
|
u8 per, u8 rate,
|
||||||
|
u8 bw, u8 total_pkt);
|
||||||
|
void rtw_mesh_rx_path_sel_frame(_adapter *adapter, union recv_frame *rframe);
|
||||||
|
void rtw_mesh_queue_preq(struct rtw_mesh_path *mpath, u8 flags);
|
||||||
|
void rtw_mesh_path_start_discovery(_adapter *adapter);
|
||||||
|
void rtw_mesh_path_timer(void *ctx);
|
||||||
|
void rtw_mesh_path_tx_root_frame(_adapter *adapter);
|
||||||
|
void rtw_mesh_work_hdl(_workitem *work);
|
||||||
|
void rtw_ieee80211_mesh_path_timer(void *ctx);
|
||||||
|
void rtw_ieee80211_mesh_path_root_timer(void *ctx);
|
||||||
|
BOOLEAN rtw_ieee80211_mesh_root_setup(_adapter *adapter);
|
||||||
|
void rtw_mesh_work(_workitem *work);
|
||||||
|
void rtw_mesh_atlm_param_req_timer(void *ctx);
|
||||||
|
|
||||||
|
#endif /* __RTW_MESH_HWMP_H_ */
|
||||||
|
|
||||||
|
|
1242
core/mesh/rtw_mesh_pathtbl.c
Normal file
1242
core/mesh/rtw_mesh_pathtbl.c
Normal file
File diff suppressed because it is too large
Load Diff
211
core/mesh/rtw_mesh_pathtbl.h
Normal file
211
core/mesh/rtw_mesh_pathtbl.h
Normal file
File diff suppressed because it is too large
Load Diff
615
core/monitor/rtw_radiotap.c
Normal file
615
core/monitor/rtw_radiotap.c
Normal file
File diff suppressed because it is too large
Load Diff
63
core/monitor/rtw_radiotap.h
Normal file
63
core/monitor/rtw_radiotap.h
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#ifndef __RTW_RADIOTAP_H_
|
||||||
|
#define __RTW_RADIOTAP_H_
|
||||||
|
|
||||||
|
struct mon_reg_backup {
|
||||||
|
/* flags */
|
||||||
|
u8 known_rcr:1;
|
||||||
|
u8 known_drvinfo:1;
|
||||||
|
u8 known_rxfilter:1;
|
||||||
|
u8 known_misc0:1;
|
||||||
|
/* data */
|
||||||
|
u8 drvinfo;
|
||||||
|
u16 rxfilter0;
|
||||||
|
u16 rxfilter1;
|
||||||
|
u16 rxfilter2;
|
||||||
|
u32 rcr;
|
||||||
|
u32 misc0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct moinfo {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
u32 sgi:1;
|
||||||
|
u32 ldpc:1;
|
||||||
|
u32 stbc:2;
|
||||||
|
u32 not_sounding:1;
|
||||||
|
u32 ofdm_bw:2;
|
||||||
|
u32 vht_group_id:2;
|
||||||
|
u32 vht_nsts_aid:12;
|
||||||
|
u32 vht_txop_not_allow:1;
|
||||||
|
u32 vht_nsym_dis:1;
|
||||||
|
u32 vht_ldpc_extra:1;
|
||||||
|
u32 vht_su_mcs:12;
|
||||||
|
u32 vht_beamformed:1;
|
||||||
|
}snif_info;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
u32 A;
|
||||||
|
u32 B;
|
||||||
|
u32 C;
|
||||||
|
}plcp_info;
|
||||||
|
}u;
|
||||||
|
};
|
||||||
|
|
||||||
|
sint rtw_fill_radiotap_hdr(_adapter *padapter, struct rx_pkt_attrib *a, u8 *buf);
|
||||||
|
|
||||||
|
void rx_query_moinfo(struct rx_pkt_attrib *a, u8 *desc);
|
||||||
|
|
||||||
|
#endif /* __RTW_RADIOTAP_H_ */
|
||||||
|
|
5998
core/rtw_ap.c
Normal file
5998
core/rtw_ap.c
Normal file
File diff suppressed because it is too large
Load Diff
2194
core/rtw_beamforming.c
Normal file
2194
core/rtw_beamforming.c
Normal file
File diff suppressed because it is too large
Load Diff
1581
core/rtw_br_ext.c
Normal file
1581
core/rtw_br_ext.c
Normal file
File diff suppressed because it is too large
Load Diff
1575
core/rtw_bt_mp.c
Normal file
1575
core/rtw_bt_mp.c
Normal file
File diff suppressed because it is too large
Load Diff
1817
core/rtw_btcoex.c
Normal file
1817
core/rtw_btcoex.c
Normal file
File diff suppressed because it is too large
Load Diff
47
core/rtw_btcoex_wifionly.c
Normal file
47
core/rtw_btcoex_wifionly.c
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2013 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#include <drv_types.h>
|
||||||
|
#include <hal_btcoex_wifionly.h>
|
||||||
|
#include <hal_data.h>
|
||||||
|
|
||||||
|
void rtw_btcoex_wifionly_switchband_notify(PADAPTER padapter)
|
||||||
|
{
|
||||||
|
hal_btcoex_wifionly_switchband_notify(padapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtw_btcoex_wifionly_scan_notify(PADAPTER padapter)
|
||||||
|
{
|
||||||
|
hal_btcoex_wifionly_scan_notify(padapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtw_btcoex_wifionly_connect_notify(PADAPTER padapter)
|
||||||
|
{
|
||||||
|
hal_btcoex_wifionly_connect_notify(padapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtw_btcoex_wifionly_hw_config(PADAPTER padapter)
|
||||||
|
{
|
||||||
|
hal_btcoex_wifionly_hw_config(padapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtw_btcoex_wifionly_initialize(PADAPTER padapter)
|
||||||
|
{
|
||||||
|
hal_btcoex_wifionly_initlizevariables(padapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtw_btcoex_wifionly_AntInfoSetting(PADAPTER padapter)
|
||||||
|
{
|
||||||
|
hal_btcoex_wifionly_AntInfoSetting(padapter);
|
||||||
|
}
|
2516
core/rtw_chplan.c
Normal file
2516
core/rtw_chplan.c
Normal file
File diff suppressed because it is too large
Load Diff
95
core/rtw_chplan.h
Normal file
95
core/rtw_chplan.h
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2007 - 2018 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#ifndef __RTW_CHPLAN_H__
|
||||||
|
#define __RTW_CHPLAN_H__
|
||||||
|
|
||||||
|
#define RTW_CHPLAN_UNSPECIFIED 0xFF
|
||||||
|
|
||||||
|
u8 rtw_chplan_get_default_regd(u8 id);
|
||||||
|
bool rtw_chplan_is_empty(u8 id);
|
||||||
|
bool rtw_is_channel_plan_valid(u8 id);
|
||||||
|
bool rtw_regsty_is_excl_chs(struct registry_priv *regsty, u8 ch);
|
||||||
|
|
||||||
|
enum regd_src_t {
|
||||||
|
REGD_SRC_RTK_PRIV = 0, /* Regulatory settings from Realtek framework (Realtek defined or customized) */
|
||||||
|
REGD_SRC_OS = 1, /* Regulatory settings from OS */
|
||||||
|
REGD_SRC_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define regd_src_is_valid(src) ((src) < REGD_SRC_NUM)
|
||||||
|
|
||||||
|
extern const char *_regd_src_str[];
|
||||||
|
#define regd_src_str(src) ((src) >= REGD_SRC_NUM ? _regd_src_str[REGD_SRC_NUM] : _regd_src_str[src])
|
||||||
|
|
||||||
|
struct _RT_CHANNEL_INFO;
|
||||||
|
u8 init_channel_set(_adapter *adapter);
|
||||||
|
bool rtw_chset_is_dfs_range(struct _RT_CHANNEL_INFO *chset, u32 hi, u32 lo);
|
||||||
|
bool rtw_chset_is_dfs_ch(struct _RT_CHANNEL_INFO *chset, u8 ch);
|
||||||
|
bool rtw_chset_is_dfs_chbw(struct _RT_CHANNEL_INFO *chset, u8 ch, u8 bw, u8 offset);
|
||||||
|
u8 rtw_process_beacon_hint(_adapter *adapter, WLAN_BSSID_EX *bss);
|
||||||
|
|
||||||
|
#define IS_ALPHA2_NO_SPECIFIED(_alpha2) ((*((u16 *)(_alpha2))) == 0xFFFF)
|
||||||
|
#define IS_ALPHA2_WORLDWIDE(_alpha2) (strncmp(_alpha2, "00", 2) == 0)
|
||||||
|
|
||||||
|
#define RTW_MODULE_RTL8821AE_HMC_M2 BIT0 /* RTL8821AE(HMC + M.2) */
|
||||||
|
#define RTW_MODULE_RTL8821AU BIT1 /* RTL8821AU */
|
||||||
|
#define RTW_MODULE_RTL8812AENF_NGFF BIT2 /* RTL8812AENF(8812AE+8761)_NGFF */
|
||||||
|
#define RTW_MODULE_RTL8812AEBT_HMC BIT3 /* RTL8812AEBT(8812AE+8761)_HMC */
|
||||||
|
#define RTW_MODULE_RTL8188EE_HMC_M2 BIT4 /* RTL8188EE(HMC + M.2) */
|
||||||
|
#define RTW_MODULE_RTL8723BE_HMC_M2 BIT5 /* RTL8723BE(HMC + M.2) */
|
||||||
|
#define RTW_MODULE_RTL8723BS_NGFF1216 BIT6 /* RTL8723BS(NGFF1216) */
|
||||||
|
#define RTW_MODULE_RTL8192EEBT_HMC_M2 BIT7 /* RTL8192EEBT(8192EE+8761AU)_(HMC + M.2) */
|
||||||
|
#define RTW_MODULE_RTL8723DE_NGFF1630 BIT8 /* RTL8723DE(NGFF1630) */
|
||||||
|
#define RTW_MODULE_RTL8822BE BIT9 /* RTL8822BE */
|
||||||
|
#define RTW_MODULE_RTL8821CE BIT10 /* RTL8821CE */
|
||||||
|
#define RTW_MODULE_RTL8822CE BIT11 /* RTL8822CE */
|
||||||
|
|
||||||
|
enum rtw_dfs_regd {
|
||||||
|
RTW_DFS_REGD_NONE = 0,
|
||||||
|
RTW_DFS_REGD_FCC = 1,
|
||||||
|
RTW_DFS_REGD_MKK = 2,
|
||||||
|
RTW_DFS_REGD_ETSI = 3,
|
||||||
|
RTW_DFS_REGD_NUM,
|
||||||
|
RTW_DFS_REGD_AUTO = 0xFF, /* follow channel plan */
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const char *_rtw_dfs_regd_str[];
|
||||||
|
#define rtw_dfs_regd_str(region) (((region) >= RTW_DFS_REGD_NUM) ? _rtw_dfs_regd_str[RTW_DFS_REGD_NONE] : _rtw_dfs_regd_str[(region)])
|
||||||
|
|
||||||
|
struct country_chplan {
|
||||||
|
char alpha2[2]; /* "00" means worldwide */
|
||||||
|
u8 chplan;
|
||||||
|
#ifdef CONFIG_80211AC_VHT
|
||||||
|
u8 en_11ac;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_80211AC_VHT
|
||||||
|
#define COUNTRY_CHPLAN_EN_11AC(_ent) ((_ent)->en_11ac)
|
||||||
|
#else
|
||||||
|
#define COUNTRY_CHPLAN_EN_11AC(_ent) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const struct country_chplan *rtw_get_chplan_from_country(const char *country_code);
|
||||||
|
|
||||||
|
void dump_country_chplan(void *sel, const struct country_chplan *ent);
|
||||||
|
void dump_country_chplan_map(void *sel);
|
||||||
|
void dump_chplan_id_list(void *sel);
|
||||||
|
#ifdef CONFIG_RTW_DEBUG
|
||||||
|
void dump_chplan_test(void *sel);
|
||||||
|
#endif
|
||||||
|
void dump_chplan_ver(void *sel);
|
||||||
|
|
||||||
|
#endif /* __RTW_CHPLAN_H__ */
|
5710
core/rtw_cmd.c
Normal file
5710
core/rtw_cmd.c
Normal file
File diff suppressed because it is too large
Load Diff
8332
core/rtw_debug.c
Normal file
8332
core/rtw_debug.c
Normal file
File diff suppressed because it is too large
Load Diff
329
core/rtw_eeprom.c
Normal file
329
core/rtw_eeprom.c
Normal file
File diff suppressed because it is too large
Load Diff
668
core/rtw_ft.c
Normal file
668
core/rtw_ft.c
Normal file
File diff suppressed because it is too large
Load Diff
3217
core/rtw_ieee80211.c
Normal file
3217
core/rtw_ieee80211.c
Normal file
File diff suppressed because it is too large
Load Diff
952
core/rtw_io.c
Normal file
952
core/rtw_io.c
Normal file
File diff suppressed because it is too large
Load Diff
19
core/rtw_ioctl_query.c
Normal file
19
core/rtw_ioctl_query.c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#define _RTW_IOCTL_QUERY_C_
|
||||||
|
|
||||||
|
#include <drv_types.h>
|
||||||
|
|
||||||
|
|
929
core/rtw_ioctl_set.c
Normal file
929
core/rtw_ioctl_set.c
Normal file
File diff suppressed because it is too large
Load Diff
388
core/rtw_iol.c
Normal file
388
core/rtw_iol.c
Normal file
File diff suppressed because it is too large
Load Diff
803
core/rtw_mbo.c
Normal file
803
core/rtw_mbo.c
Normal file
File diff suppressed because it is too large
Load Diff
171
core/rtw_mem.c
Normal file
171
core/rtw_mem.c
Normal file
File diff suppressed because it is too large
Load Diff
1546
core/rtw_mi.c
Normal file
1546
core/rtw_mi.c
Normal file
File diff suppressed because it is too large
Load Diff
5978
core/rtw_mlme.c
Normal file
5978
core/rtw_mlme.c
Normal file
File diff suppressed because it is too large
Load Diff
16827
core/rtw_mlme_ext.c
Normal file
16827
core/rtw_mlme_ext.c
Normal file
File diff suppressed because it is too large
Load Diff
3991
core/rtw_mp.c
Normal file
3991
core/rtw_mp.c
Normal file
File diff suppressed because it is too large
Load Diff
600
core/rtw_odm.c
Normal file
600
core/rtw_odm.c
Normal file
File diff suppressed because it is too large
Load Diff
5017
core/rtw_p2p.c
Normal file
5017
core/rtw_p2p.c
Normal file
File diff suppressed because it is too large
Load Diff
2955
core/rtw_pwrctrl.c
Normal file
2955
core/rtw_pwrctrl.c
Normal file
File diff suppressed because it is too large
Load Diff
4959
core/rtw_recv.c
Normal file
4959
core/rtw_recv.c
Normal file
File diff suppressed because it is too large
Load Diff
2437
core/rtw_rf.c
Normal file
2437
core/rtw_rf.c
Normal file
File diff suppressed because it is too large
Load Diff
2825
core/rtw_rm.c
Normal file
2825
core/rtw_rm.c
Normal file
File diff suppressed because it is too large
Load Diff
1017
core/rtw_rm_fsm.c
Normal file
1017
core/rtw_rm_fsm.c
Normal file
File diff suppressed because it is too large
Load Diff
501
core/rtw_rm_util.c
Normal file
501
core/rtw_rm_util.c
Normal file
File diff suppressed because it is too large
Load Diff
591
core/rtw_roch.c
Normal file
591
core/rtw_roch.c
Normal file
File diff suppressed because it is too large
Load Diff
592
core/rtw_rson.c
Normal file
592
core/rtw_rson.c
Normal file
File diff suppressed because it is too large
Load Diff
157
core/rtw_sdio.c
Normal file
157
core/rtw_sdio.c
Normal file
File diff suppressed because it is too large
Load Diff
2872
core/rtw_security.c
Normal file
2872
core/rtw_security.c
Normal file
File diff suppressed because it is too large
Load Diff
320
core/rtw_sreset.c
Normal file
320
core/rtw_sreset.c
Normal file
File diff suppressed because it is too large
Load Diff
1383
core/rtw_sta_mgt.c
Normal file
1383
core/rtw_sta_mgt.c
Normal file
File diff suppressed because it is too large
Load Diff
296
core/rtw_swcrypto.c
Normal file
296
core/rtw_swcrypto.c
Normal file
File diff suppressed because it is too large
Load Diff
3516
core/rtw_tdls.c
Normal file
3516
core/rtw_tdls.c
Normal file
File diff suppressed because it is too large
Load Diff
1141
core/rtw_vht.c
Normal file
1141
core/rtw_vht.c
Normal file
File diff suppressed because it is too large
Load Diff
1320
core/rtw_wapi.c
Normal file
1320
core/rtw_wapi.c
Normal file
File diff suppressed because it is too large
Load Diff
922
core/rtw_wapi_sms4.c
Normal file
922
core/rtw_wapi_sms4.c
Normal file
File diff suppressed because it is too large
Load Diff
5664
core/rtw_wlan_util.c
Normal file
5664
core/rtw_wlan_util.c
Normal file
File diff suppressed because it is too large
Load Diff
1098
core/rtw_wnm.c
Normal file
1098
core/rtw_wnm.c
Normal file
File diff suppressed because it is too large
Load Diff
6671
core/rtw_xmit.c
Normal file
6671
core/rtw_xmit.c
Normal file
File diff suppressed because it is too large
Load Diff
786
core/wds/rtw_wds.c
Normal file
786
core/wds/rtw_wds.c
Normal file
File diff suppressed because it is too large
Load Diff
65
core/wds/rtw_wds.h
Normal file
65
core/wds/rtw_wds.h
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2007 - 2019 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#ifndef __RTW_WDS_H_
|
||||||
|
#define __RTW_WDS_H_
|
||||||
|
|
||||||
|
#ifdef CONFIG_AP_MODE
|
||||||
|
struct rtw_wds_path {
|
||||||
|
u8 dst[ETH_ALEN];
|
||||||
|
rtw_rhash_head rhash;
|
||||||
|
_adapter *adapter;
|
||||||
|
struct sta_info __rcu *next_hop;
|
||||||
|
rtw_rcu_head rcu;
|
||||||
|
systime last_update;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct rtw_wds_table {
|
||||||
|
rtw_rhashtable rhead;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define RTW_WDS_PATH_EXPIRE (600 * HZ)
|
||||||
|
|
||||||
|
/* Maximum number of paths per interface */
|
||||||
|
#define RTW_WDS_MAX_PATHS 1024
|
||||||
|
|
||||||
|
int rtw_wds_nexthop_lookup(_adapter *adapter, const u8 *da, u8 *ra);
|
||||||
|
|
||||||
|
struct rtw_wds_path *rtw_wds_path_lookup(_adapter *adapter, const u8 *dst);
|
||||||
|
void dump_wpath(void *sel, _adapter *adapter);
|
||||||
|
|
||||||
|
void rtw_wds_path_expire(_adapter *adapter);
|
||||||
|
|
||||||
|
struct rtw_wds_path *rtw_wds_path_add(_adapter *adapter, const u8 *dst, struct sta_info *next_hop);
|
||||||
|
void rtw_wds_path_assign_nexthop(struct rtw_wds_path *path, struct sta_info *sta);
|
||||||
|
|
||||||
|
int rtw_wds_pathtbl_init(_adapter *adapter);
|
||||||
|
void rtw_wds_pathtbl_unregister(_adapter *adapter);
|
||||||
|
|
||||||
|
void rtw_wds_path_flush_by_nexthop(struct sta_info *sta);
|
||||||
|
#endif /* CONFIG_AP_MODE */
|
||||||
|
|
||||||
|
struct rtw_wds_gptr_table {
|
||||||
|
rtw_rhashtable rhead;
|
||||||
|
};
|
||||||
|
|
||||||
|
void dump_wgptr(void *sel, _adapter *adapter);
|
||||||
|
bool rtw_rx_wds_gptr_check(_adapter *adapter, const u8 *src);
|
||||||
|
void rtw_tx_wds_gptr_update(_adapter *adapter, const u8 *src);
|
||||||
|
void rtw_wds_gptr_expire(_adapter *adapter);
|
||||||
|
int rtw_wds_gptr_tbl_init(_adapter *adapter);
|
||||||
|
void rtw_wds_gptr_tbl_unregister(_adapter *adapter);
|
||||||
|
|
||||||
|
#endif /* __RTW_WDSH_ */
|
||||||
|
|
7
dkms.conf
Normal file
7
dkms.conf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
PACKAGE_NAME="rtl88x2bu"
|
||||||
|
PACKAGE_VERSION="5.13.1"
|
||||||
|
BUILT_MODULE_NAME[0]="88x2bu"
|
||||||
|
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
|
||||||
|
MAKE="'make' -j$(nproc) KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build"
|
||||||
|
AUTOINSTALL="yes"
|
||||||
|
REMAKE_INITRD="no"
|
33
edit-options.sh
Executable file
33
edit-options.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
OPTIONS_FILE="88x2bu.conf"
|
||||||
|
|
||||||
|
SCRIPT_NAME="edit-options.sh"
|
||||||
|
#
|
||||||
|
# Purpose: Make it easier to edit the driver options file.
|
||||||
|
#
|
||||||
|
# To make this file executable:
|
||||||
|
#
|
||||||
|
# $ chmod +x edit-options.sh
|
||||||
|
#
|
||||||
|
# To execute this file:
|
||||||
|
#
|
||||||
|
# $ sudo ./edit-options.sh
|
||||||
|
#
|
||||||
|
if [[ $EUID -ne 0 ]]
|
||||||
|
then
|
||||||
|
echo "You must run this script with superuser (root) privileges."
|
||||||
|
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
nano /etc/modprobe.d/${OPTIONS_FILE}
|
||||||
|
|
||||||
|
read -p "Do you want to apply the new options by rebooting now? [y/N] " -n 1 -r
|
||||||
|
echo # move to a new line
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
185
hal/HalPwrSeqCmd.c
Normal file
185
hal/HalPwrSeqCmd.c
Normal file
File diff suppressed because it is too large
Load Diff
53
hal/btc/btc_basic_types.h
Normal file
53
hal/btc/btc_basic_types.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#ifndef __BTC_BASIC_TYPES_H__
|
||||||
|
#define __BTC_BASIC_TYPES_H__
|
||||||
|
|
||||||
|
#define IN
|
||||||
|
#define OUT
|
||||||
|
#define VOID void
|
||||||
|
typedef void *PVOID;
|
||||||
|
|
||||||
|
#define u1Byte u8
|
||||||
|
#define pu1Byte u8*
|
||||||
|
|
||||||
|
#define u2Byte u16
|
||||||
|
#define pu2Byte u16*
|
||||||
|
|
||||||
|
#define u4Byte u32
|
||||||
|
#define pu4Byte u32*
|
||||||
|
|
||||||
|
#define u8Byte u64
|
||||||
|
#define pu8Byte u64*
|
||||||
|
|
||||||
|
#define s1Byte s8
|
||||||
|
#define ps1Byte s8*
|
||||||
|
|
||||||
|
#define s2Byte s16
|
||||||
|
#define ps2Byte s16*
|
||||||
|
|
||||||
|
#define s4Byte s32
|
||||||
|
#define ps4Byte s32*
|
||||||
|
|
||||||
|
#define s8Byte s64
|
||||||
|
#define ps8Byte s64*
|
||||||
|
|
||||||
|
#define UCHAR u8
|
||||||
|
#define USHORT u16
|
||||||
|
#define UINT u32
|
||||||
|
#define ULONG u32
|
||||||
|
#define PULONG u32*
|
||||||
|
|
||||||
|
#endif /* __BTC_BASIC_TYPES_H__ */
|
5739
hal/btc/halbtc8822b1ant.c
Normal file
5739
hal/btc/halbtc8822b1ant.c
Normal file
File diff suppressed because it is too large
Load Diff
515
hal/btc/halbtc8822b1ant.h
Normal file
515
hal/btc/halbtc8822b1ant.h
Normal file
File diff suppressed because it is too large
Load Diff
5745
hal/btc/halbtc8822b2ant.c
Normal file
5745
hal/btc/halbtc8822b2ant.c
Normal file
File diff suppressed because it is too large
Load Diff
521
hal/btc/halbtc8822b2ant.h
Normal file
521
hal/btc/halbtc8822b2ant.h
Normal file
File diff suppressed because it is too large
Load Diff
78
hal/btc/halbtc8822bwifionly.c
Normal file
78
hal/btc/halbtc8822bwifionly.c
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2016 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#include "mp_precomp.h"
|
||||||
|
|
||||||
|
|
||||||
|
VOID
|
||||||
|
ex_hal8822b_wifi_only_hw_config(
|
||||||
|
IN struct wifi_only_cfg *pwifionlycfg
|
||||||
|
)
|
||||||
|
{
|
||||||
|
/*BB control*/
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0x4c, 0x01800000, 0x2);
|
||||||
|
/*SW control*/
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0xcb4, 0xff, 0x77);
|
||||||
|
/*antenna mux switch */
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0x974, 0x300, 0x3);
|
||||||
|
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0x1990, 0x300, 0x0);
|
||||||
|
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0xcbc, 0x80000, 0x0);
|
||||||
|
/*switch to WL side controller and gnt_wl gnt_bt debug signal */
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0x70, 0xff000000, 0x0e);
|
||||||
|
/*gnt_wl=1 , gnt_bt=0*/
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0x1704, 0xffffffff, 0x7700);
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0x1700, 0xffffffff, 0xc00f0038);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
ex_hal8822b_wifi_only_scannotify(
|
||||||
|
IN struct wifi_only_cfg *pwifionlycfg,
|
||||||
|
IN u1Byte is_5g
|
||||||
|
)
|
||||||
|
{
|
||||||
|
hal8822b_wifi_only_switch_antenna(pwifionlycfg, is_5g);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
ex_hal8822b_wifi_only_switchbandnotify(
|
||||||
|
IN struct wifi_only_cfg *pwifionlycfg,
|
||||||
|
IN u1Byte is_5g
|
||||||
|
)
|
||||||
|
{
|
||||||
|
hal8822b_wifi_only_switch_antenna(pwifionlycfg, is_5g);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
ex_hal8822b_wifi_only_connectnotify(
|
||||||
|
IN struct wifi_only_cfg *pwifionlycfg,
|
||||||
|
IN u1Byte is_5g
|
||||||
|
)
|
||||||
|
{
|
||||||
|
hal8822b_wifi_only_switch_antenna(pwifionlycfg, is_5g);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID
|
||||||
|
hal8822b_wifi_only_switch_antenna(IN struct wifi_only_cfg *pwifionlycfg,
|
||||||
|
IN u1Byte is_5g
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (is_5g)
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0xcbc, 0x300, 0x1);
|
||||||
|
else
|
||||||
|
halwifionly_phy_set_bb_reg(pwifionlycfg, 0xcbc, 0x300, 0x2);
|
||||||
|
}
|
41
hal/btc/halbtc8822bwifionly.h
Normal file
41
hal/btc/halbtc8822bwifionly.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2016 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
#ifndef __INC_HAL8822BWIFIONLYHWCFG_H
|
||||||
|
#define __INC_HAL8822BWIFIONLYHWCFG_H
|
||||||
|
|
||||||
|
VOID
|
||||||
|
ex_hal8822b_wifi_only_hw_config(
|
||||||
|
IN struct wifi_only_cfg *pwifionlycfg
|
||||||
|
);
|
||||||
|
VOID
|
||||||
|
ex_hal8822b_wifi_only_scannotify(
|
||||||
|
IN struct wifi_only_cfg *pwifionlycfg,
|
||||||
|
IN u1Byte is_5g
|
||||||
|
);
|
||||||
|
VOID
|
||||||
|
ex_hal8822b_wifi_only_switchbandnotify(
|
||||||
|
IN struct wifi_only_cfg *pwifionlycfg,
|
||||||
|
IN u1Byte is_5g
|
||||||
|
);
|
||||||
|
VOID
|
||||||
|
ex_hal8822b_wifi_only_connectnotify(
|
||||||
|
IN struct wifi_only_cfg *pwifionlycfg,
|
||||||
|
IN u1Byte is_5g
|
||||||
|
);
|
||||||
|
VOID
|
||||||
|
hal8822b_wifi_only_switch_antenna(IN struct wifi_only_cfg *pwifionlycfg,
|
||||||
|
IN u1Byte is_5g
|
||||||
|
);
|
||||||
|
#endif
|
2165
hal/btc/halbtcoutsrc.h
Normal file
2165
hal/btc/halbtcoutsrc.h
Normal file
File diff suppressed because it is too large
Load Diff
168
hal/btc/mp_precomp.h
Normal file
168
hal/btc/mp_precomp.h
Normal file
File diff suppressed because it is too large
Load Diff
188
hal/efuse/efuse_mask.h
Normal file
188
hal/efuse/efuse_mask.h
Normal file
File diff suppressed because it is too large
Load Diff
103
hal/efuse/rtl8822b/HalEfuseMask8822B_PCIE.c
Normal file
103
hal/efuse/rtl8822b/HalEfuseMask8822B_PCIE.c
Normal file
File diff suppressed because it is too large
Load Diff
26
hal/efuse/rtl8822b/HalEfuseMask8822B_PCIE.h
Normal file
26
hal/efuse/rtl8822b/HalEfuseMask8822B_PCIE.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2015 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* MPCIE.TXT
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
u16 EFUSE_GetArrayLen_MP_8822B_MPCIE(void);
|
||||||
|
|
||||||
|
void EFUSE_GetMaskArray_MP_8822B_MPCIE(u8 *Array);
|
||||||
|
|
||||||
|
BOOLEAN EFUSE_IsAddressMasked_MP_8822B_MPCIE(u16 Offset);
|
100
hal/efuse/rtl8822b/HalEfuseMask8822B_SDIO.c
Normal file
100
hal/efuse/rtl8822b/HalEfuseMask8822B_SDIO.c
Normal file
File diff suppressed because it is too large
Load Diff
27
hal/efuse/rtl8822b/HalEfuseMask8822B_SDIO.h
Normal file
27
hal/efuse/rtl8822b/HalEfuseMask8822B_SDIO.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright(c) 2015 - 2017 Realtek Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* MSDIO.TXT
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
u16 EFUSE_GetArrayLen_MP_8822B_MSDIO(void);
|
||||||
|
|
||||||
|
void EFUSE_GetMaskArray_MP_8822B_MSDIO(u8 *Array);
|
||||||
|
|
||||||
|
BOOLEAN EFUSE_IsAddressMasked_MP_8822B_MSDIO(u16 Offset);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user