The values defined in enum WIFI_FRAME_SUBTYPE are the same the #define
IEEE80211_STYPE_xxx from <linux/ieee80211.h>.
Port 33ed2b7079f6c38abce6abbaf1e6be4edad919d8
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
Remove rtw_mfree_xmit_priv_lock() because it is empty. Remove its only
call from within _rtw_free_xmit_priv().
port of 093991aaadf0fbb34184fa37a46e7a157da3f386
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
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
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
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
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.
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
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
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
Convert all rtw_zvmalloc calls within the driver to use the existing
kernel vzalloc function, which has the same semantics. Also rewrite the
two places where it is mentioned in comments to say vzalloc, and remove
the redundant cast to struct adapter * in ./os_dep/usb_intf.c as vzalloc
returns void *.
The reason for the conversion is that rtw_zvmalloc is just a
preprocessor definition for _rtw_zvmalloc which itself is just an inline
wrapper around vmalloc which then zeroes the memory out. As vzalloc does
the same thing via usage of __GFP_ZERO, this code is redundant and can
subsequently be removed.
Link: https://lore.kernel.org/r/20210818234853.208448-5-phil@philpotter.co.uk
Remove the function _rtw_vmalloc from os_dep/osdep_service.c, converting
its only user (also in os_dep/osdep_service.c) to use plain vmalloc.
This function is just an inline wrapper around vmalloc which returns a u8
pointer, which isn't needed. 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-4-phil@philpotter.co.uk
Convert the only call to rtw_vmalloc in os_dep/ioctl_linux.c to the
kernel's existing vmalloc function, as rtw_malloc is just a preprocessor
definition for _rtw_vmalloc. The _rtw_vmalloc function is defined inline
and returns a u8, wrapping standard vmalloc. This behaviour is not necessary.
Link: https://lore.kernel.org/r/20210818234853.208448-2-phil@philpotter.co.uk
The compiler is free to ignore, or follow, "inline" markings so they
really have no use in .c files, so just remove them.
This allows functions to properly show up as being unused when all
callers to them are removed, otherwise gcc does not warn you about this.
Link: https://lore.kernel.org/r/20210816073450.668993-1-gregkh@linuxfoundation.org
Looking at the error function as a whole, the error handling is odd
compared to the rest of the kernel, which prefers to set error codes on
goto paths, rather than a global "status" variable which determines the
error code at the end of the function and function calls in the case of
error.
Rearrange the error handling of this function to bring it more inline
with how the kernel does it in most cases, which helps readability.
Link: https://lore.kernel.org/r/20210812204027.338872-4-nathan@kernel.org
Link: https://lore.kernel.org/r/20210813201418.4018631-1-nathan@kernel.org