This commit fixes checkpatch.pl warnings:
also port the folowing commits
5ef6c5db04ffff21006099961c3c8acc5727b2c8
74941703accd4a94e7a74c31050d7985216b7034
7d0b4f3c9300f43b65125115f5728e1a5d39e270
This patch switches to <linux/ieee80211.h> and <net/cfg80211.h> and
deletes a lot of duplicate definitions plus many unused ones.
rtw_ieee80211_hdr_3addr_qos is duplicate of ieee80211_qos_hdr.
rtw_ieee80211_spectrum_mgmt_actioncode is a duplication of ieee80211_spectrum_mgmt_actioncode
rtw_ieee80211_hdr_3addr is duplicate of ieee80211_hdr_3addr.
rtw_ieee80211_hdr is duplicate of ieee80211_hdr
rtw_ieee80211s_hdr is duplicate of ieee80211s_hdr
rtw_ieee80211_rann_ie is duplicate of ieee80211_rann_ie
from include/linux/ieee80211.h.
Link: https://lore.kernel.org/r/20200906133236.556427-1-insafonov@gmail.com
Link: https://lore.kernel.org/r/20200609194848.166130-1-pterjan@google.com
Also port
5cd8396540b5f7ef7c3ac499e967dd4deb8e9930
bbfe286b07d8282f4957dee692e85b3bd60de770
d87f574d6923c546e7d0f75ce0581436376b98a6
36eb7d108e8de3097f373eb8629d8739d4fa3e74
1b9e6df5169b36b3242e2e28c39f9bbfc01863e8
d94971aa97670d400371baef5d9d5cf6dc8ea2b5
Remove empty functions from ieee80211.h
Use values from linux/ieee80211.h
port 12a17d72f7948148b80c0dfa72ea983da33464ba
port a9d8763889737b7e0f83956e093bd48190876044
port 872cfb096d3a009709b56f23f5280a359bbe58e2
port a4bc0fa9ec51008bb494943ec98b4ad836e3a216
port 13e00f8ebded278a7887d98ad65ceabc24f3776a
Using eth_broadcast_addr() to assign broadcast address instead
of copying from an array that contains the all-ones broadcast
address
Port 78adf574c969c14a470b686af8d6bd7e1dcf142b
Port 3b0a4a1bdb0f6348dba797a0fa1cf161f5639ded
Port 44c26bec861476f89ac5aee0bb19df128a42543b
Link: https://lore.kernel.org/r/20210616081243.2511663-4-yangyingliang@huawei.com
Replace rtw_ieee80211_channel_flags with ieee80211_channel_flags from net/cfg80211.h
Replace rtw_ieee80211_root_mode_identifier with ieee80211_root_mode_identifier from linux/ieee80211.h
port b658acbf64ae38b8fca982c2929ccc0bf4eb1ea2
port 5befa937e8daaebcde81b9423eb93f3ff2e918f7
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
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.
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
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