Skip to content

Commit d76e2d4

Browse files
committed
Add Linux kernel 6.18 compatibility
- Replace EXTRA_CFLAGS with ccflags-y (removed in 6.15) - Replace del_timer_sync with timer_delete_sync (removed in 6.15) - Replace from_timer with timer_container_of (renamed in 6.16) - Rename hmac_sha256 to rtw_hmac_sha256 (kernel symbol conflict) - Add radio_idx parameter to cfg80211 callbacks (6.14+) - Fix halrf/ include paths for phydm_precomp.h - Add D-Link DWA-182 device ID (2001:3321) Tested on Fedora 43 with kernel 6.18.3-200.fc43.x86_64
1 parent 250cdad commit d76e2d4

28 files changed

Lines changed: 518 additions & 507 deletions

Makefile

Lines changed: 408 additions & 408 deletions
Large diffs are not rendered by default.

core/crypto/sha256-prf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
7979
plen = buf_len - pos;
8080
WPA_PUT_LE16(counter_le, counter);
8181
if (plen >= SHA256_MAC_LEN) {
82-
if (hmac_sha256_vector(key, key_len, 4, addr, len,
82+
if (rtw_hmac_sha256_vector(key, key_len, 4, addr, len,
8383
&buf[pos]) < 0)
8484
return -1;
8585
pos += SHA256_MAC_LEN;
8686
} else {
87-
if (hmac_sha256_vector(key, key_len, 4, addr, len,
87+
if (rtw_hmac_sha256_vector(key, key_len, 4, addr, len,
8888
hash) < 0)
8989
return -1;
9090
os_memcpy(&buf[pos], hash, plen);

core/crypto/sha256.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
/**
17-
* hmac_sha256_vector - HMAC-SHA256 over data vector (RFC 2104)
17+
* rtw_hmac_sha256_vector - HMAC-SHA256 over data vector (RFC 2104)
1818
* @key: Key for HMAC operations
1919
* @key_len: Length of the key in bytes
2020
* @num_elem: Number of elements in the data vector
@@ -23,7 +23,7 @@
2323
* @mac: Buffer for the hash (32 bytes)
2424
* Returns: 0 on success, -1 on failure
2525
*/
26-
int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
26+
int rtw_hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
2727
const u8 *addr[], const size_t *len, u8 *mac)
2828
{
2929
unsigned char k_pad[64]; /* padding - key XORd with ipad/opad */
@@ -89,16 +89,16 @@ int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
8989

9090

9191
/**
92-
* hmac_sha256 - HMAC-SHA256 over data buffer (RFC 2104)
92+
* rtw_hmac_sha256 - HMAC-SHA256 over data buffer (RFC 2104)
9393
* @key: Key for HMAC operations
9494
* @key_len: Length of the key in bytes
9595
* @data: Pointers to the data area
9696
* @data_len: Length of the data area
9797
* @mac: Buffer for the hash (32 bytes)
9898
* Returns: 0 on success, -1 on failure
9999
*/
100-
int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
100+
int rtw_hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
101101
size_t data_len, u8 *mac)
102102
{
103-
return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac);
103+
return rtw_hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac);
104104
}

core/crypto/sha256.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
#define SHA256_MAC_LEN 32
1313

14-
int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
14+
int rtw_hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
1515
const u8 *addr[], const size_t *len, u8 *mac);
16-
int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
16+
int rtw_hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
1717
size_t data_len, u8 *mac);
1818
int sha256_prf(const u8 *key, size_t key_len, const char *label,
1919
const u8 *data, size_t data_len, u8 *buf, size_t buf_len);
@@ -23,7 +23,7 @@ int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
2323
void tls_prf_sha256(const u8 *secret, size_t secret_len,
2424
const char *label, const u8 *seed, size_t seed_len,
2525
u8 *out, size_t outlen);
26-
int hmac_sha256_kdf(const u8 *secret, size_t secret_len,
26+
int rtw_hmac_sha256_kdf(const u8 *secret, size_t secret_len,
2727
const char *label, const u8 *seed, size_t seed_len,
2828
u8 *out, size_t outlen);
2929

hal/phydm/halrf/halphyrf_ap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*****************************************************************************/
1515

1616
#include "mp_precomp.h"
17-
#include "phydm_precomp.h"
17+
#include "../phydm_precomp.h"
1818

1919
#ifndef index_mapping_NUM_88E
2020
#define index_mapping_NUM_88E 15

hal/phydm/halrf/halphyrf_ap.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,49 @@
1616
#ifndef __HALPHYRF_H__
1717
#define __HALPHYRF_H__
1818

19-
#include "halrf/halrf_powertracking_ap.h"
20-
#include "halrf/halrf_kfree.h"
19+
#include "halrf_powertracking_ap.h"
20+
#include "halrf_kfree.h"
2121

2222
#if (RTL8814A_SUPPORT == 1)
23-
#include "halrf/rtl8814a/halrf_iqk_8814a.h"
23+
#include "rtl8814a/halrf_iqk_8814a.h"
2424
#endif
2525

2626
#if (RTL8822B_SUPPORT == 1)
27-
#include "halrf/rtl8822b/halrf_iqk_8822b.h"
27+
#include "rtl8822b/halrf_iqk_8822b.h"
2828
#endif
2929

3030
#if (RTL8821C_SUPPORT == 1)
31-
#include "halrf/rtl8821c/halrf_iqk_8821c.h"
31+
#include "rtl8821c/halrf_iqk_8821c.h"
3232
#endif
3333

3434
#if (RTL8195B_SUPPORT == 1)
35-
// #include "halrf/rtl8195b/halrf.h"
36-
#include "halrf/rtl8195b/halrf_iqk_8195b.h"
37-
#include "halrf/rtl8195b/halrf_txgapk_8195b.h"
38-
#include "halrf/rtl8195b/halrf_dpk_8195b.h"
35+
// #include "rtl8195b/halrf.h"
36+
#include "rtl8195b/halrf_iqk_8195b.h"
37+
#include "rtl8195b/halrf_txgapk_8195b.h"
38+
#include "rtl8195b/halrf_dpk_8195b.h"
3939
#endif
4040

4141
#if (RTL8198F_SUPPORT == 1)
42-
#include "halrf/rtl8198f/halrf_iqk_8198f.h"
43-
#include "halrf/rtl8198f/halrf_dpk_8198f.h"
42+
#include "rtl8198f/halrf_iqk_8198f.h"
43+
#include "rtl8198f/halrf_dpk_8198f.h"
4444
#endif
4545

4646
#if (RTL8812F_SUPPORT == 1)
47-
#include "halrf/rtl8812f/halrf_iqk_8812f.h"
48-
#include "halrf/rtl8812f/halrf_dpk_8812f.h"
49-
#include "halrf/rtl8812f/halrf_tssi_8812f.h"
47+
#include "rtl8812f/halrf_iqk_8812f.h"
48+
#include "rtl8812f/halrf_dpk_8812f.h"
49+
#include "rtl8812f/halrf_tssi_8812f.h"
5050
#endif
5151

5252
#if (RTL8814B_SUPPORT == 1)
53-
#include "halrf/rtl8814b/halrf_iqk_8814b.h"
54-
#include "halrf/rtl8814b/halrf_dpk_8814b.h"
55-
#include "halrf/rtl8814b/halrf_txgapk_8814b.h"
53+
#include "rtl8814b/halrf_iqk_8814b.h"
54+
#include "rtl8814b/halrf_dpk_8814b.h"
55+
#include "rtl8814b/halrf_txgapk_8814b.h"
5656
#endif
5757

5858
#if (RTL8197G_SUPPORT == 1)
59-
#include "halrf/rtl8197g/halrf_iqk_8197g.h"
60-
#include "halrf/rtl8197g/halrf_dpk_8197g.h"
61-
#include "halrf/rtl8197g/halrf_tssi_8197g.h"
59+
#include "rtl8197g/halrf_iqk_8197g.h"
60+
#include "rtl8197g/halrf_dpk_8197g.h"
61+
#include "rtl8197g/halrf_tssi_8197g.h"
6262
#endif
6363

6464
enum pwrtrack_method {

hal/phydm/halrf/halphyrf_ce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*****************************************************************************/
2525

2626
#include "mp_precomp.h"
27-
#include "phydm_precomp.h"
27+
#include "../phydm_precomp.h"
2828

2929
#define CALCULATE_SWINGTALBE_OFFSET(_offset, _direction, _size, _delta_thermal)\
3030
do { \

hal/phydm/halrf/halphyrf_ce.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,33 @@
2626
#ifndef __HALPHYRF_H__
2727
#define __HALPHYRF_H__
2828

29-
#include "halrf/halrf_kfree.h"
29+
#include "halrf_kfree.h"
3030
#if (RTL8814A_SUPPORT == 1)
31-
#include "halrf/rtl8814a/halrf_iqk_8814a.h"
31+
#include "rtl8814a/halrf_iqk_8814a.h"
3232
#endif
3333

3434
#if (RTL8822B_SUPPORT == 1)
35-
#include "halrf/rtl8822b/halrf_iqk_8822b.h"
35+
#include "rtl8822b/halrf_iqk_8822b.h"
3636
#endif
3737

3838
#if (RTL8821C_SUPPORT == 1)
39-
#include "halrf/rtl8821c/halrf_iqk_8821c.h"
39+
#include "rtl8821c/halrf_iqk_8821c.h"
4040
#endif
4141

4242
#if (RTL8195B_SUPPORT == 1)
43-
/* #include "halrf/rtl8195b/halrf.h" */
44-
#include "halrf/rtl8195b/halrf_iqk_8195b.h"
45-
#include "halrf/rtl8195b/halrf_txgapk_8195b.h"
46-
#include "halrf/rtl8195b/halrf_dpk_8195b.h"
43+
/* #include "rtl8195b/halrf.h" */
44+
#include "rtl8195b/halrf_iqk_8195b.h"
45+
#include "rtl8195b/halrf_txgapk_8195b.h"
46+
#include "rtl8195b/halrf_dpk_8195b.h"
4747
#endif
4848

4949
#if (RTL8814B_SUPPORT == 1)
50-
#include "halrf/rtl8814b/halrf_iqk_8814b.h"
51-
#include "halrf/rtl8814b/halrf_dpk_8814b.h"
52-
#include "halrf/rtl8814b/halrf_txgapk_8814b.h"
50+
#include "rtl8814b/halrf_iqk_8814b.h"
51+
#include "rtl8814b/halrf_dpk_8814b.h"
52+
#include "rtl8814b/halrf_txgapk_8814b.h"
5353
#endif
5454

55-
#include "halrf/halrf_powertracking_ce.h"
55+
#include "halrf_powertracking_ce.h"
5656

5757
enum spur_cal_method {
5858
PLL_RESET,

hal/phydm/halrf/halphyrf_iot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*****************************************************************************/
2525

2626
#include "mp_precomp.h"
27-
#include "phydm_precomp.h"
27+
#include "../phydm_precomp.h"
2828

2929
#define CALCULATE_SWINGTALBE_OFFSET(_offset, _direction, _size, _delta_thermal) \
3030
do {\

hal/phydm/halrf/halphyrf_iot.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,27 @@
2626
#ifndef __HALPHYRF_H__
2727
#define __HALPHYRF_H__
2828

29-
#include "halrf/halrf_kfree.h"
29+
#include "halrf_kfree.h"
3030

3131
#if (RTL8821C_SUPPORT == 1)
32-
#include "halrf/rtl8821c/halrf_iqk_8821c.h"
32+
#include "rtl8821c/halrf_iqk_8821c.h"
3333
#endif
3434

3535
#if (RTL8195B_SUPPORT == 1)
36-
// #include "halrf/rtl8195b/halrf.h"
37-
#include "halrf/rtl8195b/halrf_iqk_8195b.h"
38-
#include "halrf/rtl8195b/halrf_txgapk_8195b.h"
39-
#include "halrf/rtl8195b/halrf_dpk_8195b.h"
36+
// #include "rtl8195b/halrf.h"
37+
#include "rtl8195b/halrf_iqk_8195b.h"
38+
#include "rtl8195b/halrf_txgapk_8195b.h"
39+
#include "rtl8195b/halrf_dpk_8195b.h"
4040
#endif
4141

4242
#if (RTL8710C_SUPPORT == 1)
43-
// #include "halrf/rtl8710c/halrf.h"
44-
#include "halrf/rtl8710c/halrf_iqk_8710c.h"
45-
// #include "halrf/rtl8710c/halrf_txgapk_8710c.h"
46-
// #include "halrf/rtl8710c/halrf_dpk_8710c.h"
43+
// #include "rtl8710c/halrf.h"
44+
#include "rtl8710c/halrf_iqk_8710c.h"
45+
// #include "rtl8710c/halrf_txgapk_8710c.h"
46+
// #include "rtl8710c/halrf_dpk_8710c.h"
4747
#endif
4848

49-
#include "halrf/halrf_powertracking_iot.h"
49+
#include "halrf_powertracking_iot.h"
5050

5151

5252
enum spur_cal_method {

0 commit comments

Comments
 (0)