Commit Graph

61 Commits

Author SHA1 Message Date
lwfinger
38231d5832 Merge pull request #30 from johnkeeping/sta-info-alignment
rtl8723ds: fix sta_info alignment
2022-11-29 19:35:49 -06:00
John Keeping
255c827ec1 rtl8723ds: fix sta_info alignment
Allocation function return memory that is properly aligned for most data
types, there is no need to manually align the buffer later.

On 64-bit systems this is particularly wrong as struct sta_info should
be 8-byte aligned so this calculation is guaranteed to misalign the
structure.  If the architecture requires aligned access, this leads to
an alignment fault and panic.

Signed-off-by: John Keeping <john@metanate.com>
2022-11-29 18:39:10 +00:00
lwfinger
fa06cb893c Merge pull request #29 from giuliobenetti/fix/user-extra-flags-override
Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the end of E…
2022-11-16 09:49:28 -06:00
Giulio Benetti
769a1943cb Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the end of EXTRA_FLAGS assignment
At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
since it's assigned at the beginning of the Makefile. For example it's not
possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
allow to build these modules for big endian architectures. So let's move
the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
EXTRA_CFLAGS assignment.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2022-11-16 16:08:21 +01:00
Larry Finger
5ab2d3f385 rtl8723ds: Fix builds for kernels through 6.1
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2022-11-04 10:41:53 -05:00
lwfinger
912fdb3053 Merge pull request #27 from xypron/rtw_mfree_stainfo
rtl8723ds: fix rtw_mfree_stainfo()
2022-10-20 10:01:13 -05:00
Heinrich Schuchardt
5ce43b6183 rtl8723ds: fix rtw_mfree_stainfo()
Building with GCC 12.2 results in:

/var/lib/dkms/licheerv-rtl8723ds/1.0/build/core/rtw_sta_mgt.c:
In function ‘rtw_mfree_stainfo’:
/var/lib/dkms/licheerv-rtl8723ds/1.0/build/core/rtw_sta_mgt.c:338:25:
warning: the comparison will always evaluate as ‘true’ for
the address of ‘lock’ will never be NULL [-Waddress]
  338 |         if (&psta->lock != NULL)
      |

Remove the superfluous check.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-10-20 14:28:31 +02:00
lwfinger
3febf28dc7 Merge pull request #26 from AlexGhiti/int/alex/fix_5.19
rtl8723ds: Fix compilation errors on a 5.19 kernel
2022-10-18 09:37:28 -05:00
Alexandre Ghiti
ce40065dc4 rtl8723ds: Fix compilation errors on a 5.19 kernel
Fix the following errors that happen on a 5.19 kernel:

error: initialization of ‘int (*)(struct wiphy *, struct net_device *, unsigned int)’
       from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *)’
       [-Werror=incompatible-pointer-types]
 6821 | .stop_ap = cfg80211_rtw_stop_ap,

error: ‘struct wireless_dev’ has no member named ‘current_bss’
 7052 | if (wdev->current_bss) {

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-10-18 15:26:13 +02:00
lwfinger
83032266f6 Merge pull request #22 from johnkeeping/preempt-rt
rtl8723ds: remove raw_spinlock on RT
2022-07-26 16:36:43 -05:00
John Keeping
161bb7bab4 rtl8723ds: remove raw_spinlock on RT
There's no need for a raw spinlock in this driver as it doesn't do
anything in hardirq context on -rt.  Some of the critical sections
guarded by these locks are long and contain unbounded loops so there is
a risk of raw spinlocks causing latency spikes on -rt.

The existing code is broken with CONFIG_PREEMPT_RT anyway as only a
subset of the functions that depend on lock type are covered by the
preprocessor #if/#else blocks.

Remove the special-case for CONFIG_PREEMPT_RT.

Signed-off-by: John Keeping <john@metanate.com>
2022-07-26 15:06:25 +01:00
Larry Finger
6f3869f15a rtl8723ds: Change Makefile to handle riscv32 and riscv64
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2022-06-01 10:15:24 -05:00
Larry Finger
76146e8584 rtl8723ds: Fix build errors with kernel 5.18
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2022-04-07 10:53:17 -05:00
Larry Finger
76fb80685b rtl8723ds: Fix build on kernel 5.17
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2022-02-05 11:47:13 -06:00
lwfinger
2c218a36ed Merge pull request #14 from jekamps/kernel_5.15-fix
rtl8723ds: Fix build with kernel 5.15
2022-01-18 10:13:30 -06:00
John-Eric Kamps
b80b52a36e rtl8723ds: Fix build with kernel 5.15
Signed-off-by: John-Eric Kamps <johnny86@gmx.de>
2022-01-17 23:28:21 +01:00
lwfinger
1b6ddd544b Merge pull request #11 from Icenowy/newest-kernel
Adapt for newest kernel (5.14)
2021-07-24 12:40:07 -05:00
Icenowy Zheng
9afd800400 fix hang on 5.14
Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
2021-07-24 18:40:13 +08:00
Icenowy Zheng
4bc94be2c6 fix build for 5.12
Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
2021-07-24 18:40:05 +08:00
Icenowy Zheng
6fde63d7c1 fix build for removed get_fs/set_fs (5.10)
Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
2021-07-24 18:38:55 +08:00
Larry Finger
f3167881f4 rtl8723ds: Use CONFIG_PREEMPT_RT to select raw spin lock form for real-time kernels
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2021-03-24 21:00:11 -05:00
Larry Finger
9837ccab16 rtl8723ds: Fix some smatch warnings
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2021-03-18 16:42:51 -05:00
Larry Finger
80af87ac76 rtl8723ds: Update cfg80211_rtw_mgmt_frame_register for kernel 5.8
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2020-09-18 18:49:41 -05:00
Larry Finger
c54996f3a7 rtl8723ds: Fix builds for kernel 5.8+
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2020-09-17 11:19:09 -05:00
Larry Finger
149dcf1140 rtl8723ds: Add *.d to .gitignore
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2020-04-11 11:37:54 -05:00