Commit Graph

233 Commits

Author SHA1 Message Date
Carlos Garces
51d0819382 Use cpu_to_le16() insted of RTW_PUT_LE16()
Port 83a9b6694d1e300ca8240fdf654650dcc096c86f
2021-10-20 16:42:09 +02:00
Carlos Garces
c832879ea1 Remove unused headers
Port 109709e142eb69c76c78176fe8cd70a4278410a0
Port 0aba3f417fff530fbf031b8f31c37e2d018e44c2
2021-10-20 13:23:32 +02:00
Carlos Garces
813f544e1e Remove unused SetRetry macro
port e80c2859b16fbfe209e7ee7cf2b2b65deb890971
2021-10-18 20:03:20 +02:00
Carlos Garces
158017aa86 replace get_(d|s)a with ieee80211_get_(D|S)A
get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions.
Remove get_(d|s)a, use ieee80211_get_(D|S)A instead.

Link: https://lore.kernel.org/r/20210314090247.21181-2-insafonov@gmail.com
2021-10-18 19:40:27 +02:00
Carlos Garces
5ae45c1296 use IEEE80211_FCTL_* kernel definitions
_TO_DS_, _FROM_DS_, _MORE_FRAG_, _RETRY_, _PWRMGT_, _MORE_DATA_,
_PRIVACY_, _ORDER_ definitions are duplicate IEEE80211_FCTL_*
kernel definitions.

Link: https://lore.kernel.org/r/20210213131148.458582-1-insafonov@gmail.com
2021-10-18 19:32:53 +02:00
Carlos Garces
0242513fe3 Replace custom defimitions OP_MODE_ and HT_INFO_HT_PARAM_
Use the values provided by linux/ieee80211.h
IEEE80211_HT_OP_*
IEEE80211_HT_PARAM_*
2021-10-18 18:46:22 +02:00
Carlos Garces
db6ccf24e0 Removed unsused stbc_paramm definitions
If need IEEE80211_HT_STBC_PARAM_* from linux/ieee80211.h can be used
2021-10-18 18:04:37 +02:00
Carlos Garces
2cd85b6799 remove unused rtw_ieee80211_bar structure definition
port of bdf299c1407b249eb5d623b1ebdd7269a2a88729
2021-10-18 17:45:44 +02:00
Carlos Garces
04a730b326 replace rtw_ieee80211_ht_cap with ieee80211_ht_cap
port 042ca34b9ab19d0a52c3b01862a6c07fcb032e86
2021-10-18 17:09:47 +02:00
Carlos Garces
b4be42500f Use Spatial Multiplexing Power Save Modes from <linux/ieee80211.h> 2021-10-18 16:36:45 +02:00
Carlos Garces
3acac3288c Replace AMPDU emun structures with kernel provided
Port 98b32c71a455ff289442779fee02ad60a6217006
2021-10-18 16:28:25 +02:00
Carlos Garces
c5f30cb5cc remove enum WIFI_FRAME_SUBTYPE
The values defined in enum WIFI_FRAME_SUBTYPE are the same the #define
IEEE80211_STYPE_xxx from <linux/ieee80211.h>.

Port 33ed2b7079f6c38abce6abbaf1e6be4edad919d8
2021-10-18 16:05:53 +02:00
Carlos Garces
3555bdb258 Replace custom definitions with existing
ones at linux/ieee80211.h.

port 69fea2b4e59c52844cf5196c9c81157792d194fb
port 6ee9e6ee5c486f68e424185e133984d0a6ae662c
port f179515da9780c4cd37bee76c3cbb6f7364451d6
port aaa0bc19facf31426ca57267edc681a42dbd1ee1
port 99bb776980eeb231558a6ede0a1dd8d1a6e8ec0c
port 00f0b682841337c4d2e7dd2e75d86acb6b7ce2d8
port fc41e9618fc65bea5d615d487ca7de3b0e1110bc
port 3359e2927b321c635d9529bab1f087ac39c82227
port 38caee0abe9db1db387e7bea60a980eda22e9fa6
port b05cc3a9156b6b674904016d9c213e71c149f4c2
2021-10-15 17:42:20 +02:00
Carlos Garces
e73d0db27b Remove empty rtw_mfree_xmit_priv_lock()
Remove rtw_mfree_xmit_priv_lock() because it is empty. Remove its only
call from within _rtw_free_xmit_priv().

port of 093991aaadf0fbb34184fa37a46e7a157da3f386
2021-10-14 22:40:21 +02:00
Carlos Garces
355a2df5ab Remove function rtw_end_of_queue_search()
Port of 84660700807cbcd649c58ff8ce7f65021765b15c
2021-10-14 22:37:57 +02:00
Carlos Garces
bb871e7167 Remove wrappers
Port of 788253860c21f4e40add556d7ed715fefb2bafb3
Port of ace050139cee44d06b06b4c78074b4eb80fb7c0a
2021-10-14 22:19:09 +02:00
Larry Finger
5ac00c9dc2 Remove more empty routines
After removing some empty routines in os_dep/osdep_service.c, new routines
become empty. These include rtw_mfree_stainfo(),
_rtw_free_sta_xmit_priv_lock(), and rtw_mfree_recv_priv_lock.

Link: https://lore.kernel.org/r/20210805183717.23007-5-Larry.Finger@lwfinger.net
2021-10-14 22:03:44 +02:00
Carlos Garces
264085886d Remove wrappers _rtw_free_sema
Port of 2ca4ab5324062e70393e9a37a8db1ea94d6e2f99
2021-10-14 22:03:44 +02:00
Carlos Garces
7a5f134424 Replace rtw_get_current_time() with jiffies
Port of c01fb49636b65ceea513c00966c58b8bdb095c8f
2021-10-14 22:03:09 +02:00
Carlos Garces
4032543691 Remove OUI_MICROSOFT and use the value from kernel 2021-10-14 21:26:34 +02:00
Carlos Garces
3264bb634a Remove garbage after platform cleanup 2021-10-14 20:45:33 +02:00
Carlos Garces
b7fc146dee Remove code related to PLATFORM_OS_CE 2021-10-14 20:40:03 +02:00
Carlos Garces
b8fb1c691d Remove code related to PLATFORM_OS_XP 2021-10-14 20:23:16 +02:00
Carlos Garces
9e36a8086e Remove code related to PLATFORM_FREEBSD 2021-10-14 20:09:07 +02:00
Carlos Garces
9d13b33a29 Remove code related to PLATFORM_WINDOWS 2021-10-14 19:32:27 +02:00
Martin Kaiser
507d1c07e0 ctrl vendor req index is not used
The index for r8188eu's vendor-specific control requests is not used.
Remove the index parameter from usbctrl_vendorreq and pass index 0 to
usb_control_msg.

This patch is an adaptation of commit 3d0be94f62fd ("staging: rtl8188eu:
ctrl vendor req index is not used") for the new r8188eu driver.

Link: https://lore.kernel.org/r/20210818200041.10870-2-martin@kaiser.cx
2021-10-14 16:30:39 +02:00
Carlos Garces
4ddd7165fb use actual request type as parameter
At the moment, usbctrl_vendorreq's requesttype parameter must be set to
1 for reading and 0 for writing. It's then converted to the actual
bmRequestType for the USB control request. We can simplify the code and
avoid this conversion if the caller passes the actual bmRequestType.

This patch is an adaptation of commit 788fde031027 ("staging: rtl8188eu:
use actual request type as parameter") for the new r8188eu driver.

Link: https://lore.kernel.org/r/20210821164859.4351-3-martin@kaiser.cx
2021-10-14 16:30:39 +02:00
Pavel Skripkin
a0549c5041 remove {read,write}_macreg
These 2 functions are unused, so they can be simply removed

Link: https://lore.kernel.org/r/d591e29d77da73790c71f7a8e508a8b16fd48f65.1629789580.git.paskripkin@gmail.com
2021-10-14 16:30:39 +02:00
Michael Straube
2f0a5e695b remove ethernet.h header file
There are only two definitions from ethernet.h used in the driver.
Namely:

Both are only used in the file core/rtw_recv.c. Replace the usage of
ETHERNET_HEADER_SIZE with ETH_HLEN, move the definition of LLC_HEADER_SIZE
into rtw_recv.h and remove the now unused ethernet.h header file.

Link: https://lore.kernel.org/r/20210824123621.10801-4-straube.linux@gmail.com
2021-10-14 16:30:39 +02:00
Michael Straube
a99eff7ea3 remove if_ether.h header file
All constants, declarations and macros in if_ether.h are either
duplicated from <uapi/linux/if_ether.h> or unused. Remove the file
if_ether.h and its includes.

Link: https://lore.kernel.org/r/20210824123621.10801-2-straube.linux@gmail.com
2021-10-14 16:30:39 +02:00
Michael Straube
fe7007c52d remove ip.h header file
The struct ip_options declared in ip.h is only unsed in the optlength
macro which is also defined in ip.h and not used in the driver code.
All other definitions/declarations in ip.h are duplicated from
<include/uapi/linux/ip.h>. Remove the ip.h header file and its includes.

Link: https://lore.kernel.org/r/20210824123621.10801-3-straube.linux@gmail.com
2021-10-14 16:30:39 +02:00
Michael Straube
60aa279428 Use is_multicast_ether_addr instead of custom macro IS_MCAST, the
buffer is properly aligned.

Link: https://lore.kernel.org/r/20210823120106.9633-3-straube.linux@gmail.com
Link: https://lore.kernel.org/r/20210823120106.9633-4-straube.linux@gmail.com
Link: https://lore.kernel.org/r/20210823120106.9633-5-straube.linux@gmail.com
Link: https://lore.kernel.org/r/20210823120106.9633-6-straube.linux@gmail.com
Link: https://lore.kernel.org/r/20210823120106.9633-7-straube.linux@gmail.com
Link: https://lore.kernel.org/r/20210823120106.9633-8-straube.linux@gmail.com
Link: https://lore.kernel.org/r/20210823120106.9633-9-straube.linux@gmail.com
2021-10-14 16:30:30 +02:00
Carlos Garces
3cfc5c26b4 Remove unsused ieee80211_ext.h 2021-10-12 18:21:29 +02:00
Michael Straube
8f94c636ca remove cmd_osdep.h header file
All functions declared in the cmd_osdep.h header file are only used in
a single c source file. Make the functions static and remove the header
file and its includes.

Link: https://lore.kernel.org/r/20210821155151.25822-1-straube.linux@gmail.com
2021-10-12 18:21:11 +02:00
Carlos Garces
91b4661c5f use common ieee80211 constants
Many defined constants in wifi.h are unused and/or available from
<linux/ieee80211.h>, some with slightly different names. Remove
the constants from ieee80211.h and wifi.h and use the common ones. Rename where
necessary.
2021-10-12 17:52:52 +02:00
Carlos Garces
cc69f83f3d Remove empty update_bcn_p2p_ie 2021-10-12 17:17:32 +02:00
Carlos Garces
bb3dc5ca12 Replace _rtw_memmove with memmove 2021-10-12 17:09:01 +02:00
Carlos Garces
71d5c54af2 Replace _rtw_memcpy with memcpy 2021-10-12 17:03:53 +02:00
Martin Kaiser
cd6cb41e0f set pipe only once
Set the pipe for reading or writing in usbctrl_vendorreq only once.
There's no need to set it again for every retry.

This patch is an adaptation of commit 889ed8b5e374 ("staging: rtl8188eu:
set pipe only once") for the new r8188eu driver.

Link: https://lore.kernel.org/r/20210821164859.4351-10-martin@kaiser.cx
2021-10-12 16:50:33 +02:00
Martin Kaiser
972b1c23e2 remove unused members of struct _io_ops
Remove function pointers which are not used by the r8188eu driver.

Link: https://lore.kernel.org/r/20210821164859.4351-9-martin@kaiser.cx
2021-10-12 16:37:54 +02:00
Carlos Garces
cfca9a40c9 Allow reproducible builds 2021-10-12 16:02:19 +02:00
Carlos Garces
1c50f4c603 Removed unused and empty functions 2021-10-12 16:02:19 +02:00
Carlos Garcés
098afbae96 Avoid hide compilation warnings
Must be fixed instead of ignored
2021-10-12 16:02:10 +02:00
Martin Kaiser
d4dcb38048 clean up the usb_writeN
Remove unnecessary variables, check the length.

Link: https://lore.kernel.org/r/20210821164859.4351-8-martin@kaiser.cx
2021-10-11 16:56:09 +02:00
Martin Kaiser
fe504c75a2 clean up the usb_writeXY functions
Remove unnecessary variables, summarize declarations and assignments.

Link: https://lore.kernel.org/r/20210821164859.4351-7-martin@kaiser.cx
2021-10-11 16:51:54 +02:00
Martin Kaiser
ba036a3e14 clean up the usb_readXY functions
Remove unnecessary variables, summarize declarations and assignments.

Link: https://lore.kernel.org/r/20210821164859.4351-6-martin@kaiser.cx
2021-10-11 16:44:22 +02:00
Martin Kaiser
28e0bba794 ctrl vendor req value is always 0x05
The bRequest value for the vendor specific control requests sent by this
driver is always 0x05. Replace the function parameter with the define from
usb_ops.h.

This patch is an adaptation of commit eeb4661560ff ("staging: rtl8188eu:
ctrl vendor req value is always 0x05") for the new r8188eu driver.

Link: https://lore.kernel.org/r/20210818200041.10870-1-martin@kaiser.cx
2021-10-11 16:36:03 +02:00
Martin Kaiser
64831e6777 staging: r8188eu: remove unused define
_HCI_OPS_OS_C_ is not used in the r8188eu driver. Remove it.

Link: https://lore.kernel.org/r/20210821164859.4351-2-martin@kaiser.cx
2021-10-11 16:19:10 +02:00
Carlos Garcés
f218547ef9 Remove unused debug function 2021-10-11 16:14:07 +02:00
Phillip Potter
3255bcf093 remove function _rtw_zvmalloc
Remove the function _rtw_zvmalloc from os_dep/osdep_service.c, as this
function is now unused and is just an inline wrapper around vmalloc
which zeroes out the memory. All previous callers have been converted to
use vzalloc. Also remove the declaration from include/osdep_service.h.

It is considered generally bad practice to declare functions as inline in
the majority of cases, as not only can this qualifier be ignored by the
compiler but the compiler generally makes good decisions about inlining
anyway.

Link: https://lore.kernel.org/r/20210818234853.208448-7-phil@philpotter.co.uk
2021-10-11 16:12:10 +02:00