Philipp Hortmann
8af028c2b2
staging: vt6655: Convert macro vt6655_mac_word_reg_bits_off to function
...
Convert macro vt6655_mac_word_reg_bits_off to function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/04fb37871c4d383c27287934a0dddb3aa7974b08.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:38 +02:00
Philipp Hortmann
64a5c7bf56
staging: vt6655: Convert macro vt6655_mac_reg_bits_off to function
...
Convert macro vt6655_mac_reg_bits_off to function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/422950c8e1349fba2f97b0b95ba13f361cde05d9.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:38 +02:00
Philipp Hortmann
77072b0f4b
staging: vt6655: Convert macro vt6655_mac_word_reg_bits_on to function
...
Convert macro vt6655_mac_word_reg_bits_on to function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/255c7f5a5e98a399aa4e299e7cf567016bd86d60.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:38 +02:00
Philipp Hortmann
1b22544915
staging: vt6655: Convert macro vt6655_mac_reg_bits_on to function
...
Convert macro vt6655_mac_reg_bits_on to function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/6b23869ec13b35359b135f005a81f3ed50e5801e.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:38 +02:00
Philipp Hortmann
28d4e69287
staging: vt6655: Rename MACvWordRegBitsOff
...
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/b8d4b72ddfdefb6b8a73fb95f6851e0f365118ba.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:38 +02:00
Philipp Hortmann
5327d71d19
staging: vt6655: Rename MACvRegBitsOff
...
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/e6bea6707f20a53d0631dd1f477ce72d36cd6f3e.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:38 +02:00
Philipp Hortmann
ee67fe63b4
staging: vt6655: Rename MACvWordRegBitsOn
...
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/b3873e1103d642a804d42c945dc0c73d94b0c1cf.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:38 +02:00
Philipp Hortmann
67ec557644
staging: vt6655: Rename MACvRegBitsOn
...
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/7fb9627441ff97897d132c62d59676355b6d14ea.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:38 +02:00
Philipp Hortmann
ee9aded6d3
staging: vt6655: Rename wData to reg_value in two macros
...
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/8f2e9451a24e380c997fcf7c87249f7ed9b66787.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:37 +02:00
Philipp Hortmann
d57561d960
staging: vt6655: Rename byData to reg_value in two macros
...
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/159014866cce40913d360a0692fb3c426d4cb840.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:37 +02:00
Philipp Hortmann
5bd643b197
staging: vt6655: Rename wBits to bit_mask in two macros
...
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/8929407dc7355df515b7f9fdd195b45ff44f6b98.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:37 +02:00
Philipp Hortmann
10ff399bf6
staging: vt6655: Rename byBits to bit_mask in two macros
...
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/5ac7e8860ecb23232cf5befea024872e7db76d59.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:37 +02:00
Philipp Hortmann
186c46008c
staging: vt6655: Rename byRegOfs to reg_offset in four macros
...
Fix name of a variable in four macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/82f65d22ac8cd75b2c7790c13be3d0068968925b.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:48:37 +02:00
Martin Kaiser
724933e37a
staging: r8188eu: fall back to random mac address
...
Call eth_random_addr to generate a random mac address if we cannot load
the mac address from the efuses.
Do not use a constant mac address as fallback. This may create conflicts
if we have several r8188eu devices on the network.
Suggested-by: Joe Perches <joe@perches.com >
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com > # Edimax N150
Reviewed-by: Pavel Skripkin <paskripkin@gmail.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220713075552.140927-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:47:36 +02:00
Martin Kaiser
c1da5a7bef
staging: r888eu: use dynamic allocation for efuse buffer
...
Use kmalloc to allocate the efuse buffer in ReadAdapterInfo8188EU and
free it on exit. This is better than using a 512 byte array on the stack.
It's ok to drop the __aligned(4) qualifier. kmalloc aligns to
ARCH_KMALLOC_MINALIGN, this is at least 8 bytes.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com >
Suggested-by: Larry Finger <Larry.Finger@lwfinger.net >
Acked-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220713075804.140986-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:47:21 +02:00
Binyi Han
4cdb845db3
staging: qlge: Avoid multiplication while keep the same logic
...
Avoid the more expensive multiplication while keep the same logic.
Signed-off-by: Binyi Han <dantengknight@gmail.com >
Link: https://lore.kernel.org/r/31fe21bf4a9e8f13cf27bd50073e9d5d197654ea.1657697683.git.dantengknight@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:46:58 +02:00
Binyi Han
f39b6c58d8
staging: qlge: Fix indentation issue under long for loop
...
Fix indentation issue to adhere to Linux kernel coding style, issue
found by checkpatch. And change the long for loop into 3 lines.
Signed-off-by: Binyi Han <dantengknight@gmail.com >
Link: https://lore.kernel.org/r/4e18dabcce7f589386a33ceed59096aa049779f0.1657697683.git.dantengknight@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-14 15:46:58 +02:00
Michael Straube
042f1a6f43
staging: r8188eu: remove HW_VAR_MLME_SITESURVEY from SetHwReg8188EU()
...
Remove the HW_VAR_MLME_SITESURVEY case from SetHwReg8188EU() and move
the functionality to two new functions in rtw_mlme_ext.c. This is part
of the ongoing effort to get rid of SetHwReg8188EU().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com > # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20220711174417.10721-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-12 12:32:01 +02:00
Martin Kaiser
d4090520cd
staging: r8188eu: the bcnhead parameter is always 0
...
The only caller of efuse_read_phymap_from_txpktbuf sets bcnhead to 0.
Remove this function parameter and simplify the function body.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-15-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
c337bf6256
staging: r8188eu: efuse_utilized is never read
...
The efuse_utilized variable in function efuse_phymap_to_logical is
written to but never read. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-14-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
e2bd5dc33f
staging: r8188eu: _offset is always 0 in efuse_phymap_to_logical
...
The _offset parameter of iol_read_efuse is always 0. Remove the
parameter and use 0 in the function body.
We can now replace the bytewise copy from efuseTbl to pbuf with memcpy.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
cda94a6b44
staging: r8188eu: offset is always 0 in iol_read_efuse
...
The offset parameter of iol_read_efuse is always 0. Remove the
parameter and use 0 in the function body.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
db9895b86b
staging: r8188eu: offset is always 0 in rtl8188e_ReadEFuse
...
The offset parameter of rtl8188e_ReadEFuse is always 0. Remove the
parameter and use 0 in the function body.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
36442aa73b
staging: r8188eu: txpktbuf_bndy is always 0
...
The only caller of iol_read_efuse sets the txpktbuf_bndy parameter to 0.
Remove the parameter from iol_read_efuse and use 0 in the function body.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
e1ebb0d6a1
staging: r8188eu: merge ReadEFuseByIC into rtl8188e_ReadEFuse
...
The rtl8188e_ReadEFuse function is just a wrapper to call ReadEFuseByIC.
Copy ReadEFuseByIC into rtl8188e_ReadEFuse and remove ReadEFuseByIC.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
3c1178680b
staging: r8188eu: use memcpy for fallback mac address
...
Use memcpy to store the fallback mac address in eeprom->mac_addr. Do not
copy byte by byte.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
0fcae03da0
staging: r8188eu: always initialise efuse buffer with 0xff
...
If BOOT_FROM_EEPROM is set, efuse_buf is not initialised before it is
passed to functions that read from it.
The buffer will be filled with 0x00 in this case like all local variables.
However, the parsing functions expect the buffer to be filled with 0xFF if
reading eeprom/efuse data failed. Fill the buffer with 0xFF before we try
to read the data.
Please note that this problem existed before we started using a local
buffer. Adapter->eeprompriv->efuse_eeprom_data was allocated as a part of
struct adapter by a vzalloc call in rtw_usb_if1_init.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
698bd81fe8
staging: r8188eu: use a local buffer for efuse data
...
The efuse_eeprom_data array in struct eeprom_priv is used only by
ReadAdapterInfo8188EU. We can remove efuse_eeprom_data and use a local
buffer instead.
Use EFUSE_MAP_LEN_88E as buffer size. Its value is the same as
HWSET_MAX_SIZE_512. The functions that access the buffer use
EFUSE_MAP_LEN_88E for its size.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
14dbcfc4c9
staging: r8188eu: merge EFUSE_ShadowMapUpdate with its caller
...
Merge the EFUSE_ShadowMapUpdate function into ReadAdapterInfo8188EU, which
is the only caller.
Merging the two functions makes it clearer that eeprom->efuse_eeprom_data
is in fact a temporary buffer that stores info read from efuses.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:45 +02:00
Martin Kaiser
1c4d6546c3
staging: r8188eu: remove eeprom function prototypes
...
Remove prototypes for non-existing eeprom functions. It seems that r8188eu
has efuses but no eeprom.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:44 +02:00
Martin Kaiser
af4e6efda5
staging: r8188eu: remove EepromOrEfuse from struct eeprom_priv
...
The EepromOrEfuse flag in struct eeprom_priv is used only in the
ReadAdapterInfo8188EU function. We can remove EepromOrEfuse from struct
eeprom_priv.
As the meaning of EepromOrEfuse isn't obvious, there is a macro
is_boot_from_eeprom that's used for checking the value. We don't need the
macro, writing the check as !(eeValue & BOOT_FROM_EEPROM) makes it clear
what is checked.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:44 +02:00
Martin Kaiser
ba68103d0f
staging: r8188eu: remove unused eeprom defines
...
Remove some eeprom-related defines which are not used by the r8188eu
driver. This driver uses BOOT_FROM_EEPROM and EEPROM_EN instead of the
defines that this patch removes.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220709171000.180481-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:06:44 +02:00
Michael Straube
3782d95998
staging: r8188eu: remove HW_VAR_DM_FUNC_CLR from SetHwReg8188EU()
...
Remove the HW_VAR_DM_FUNC_CLR case from SetHwReg8188EU() and move its
functionality to a static function. This is part of the ongoing effort
to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20220709094458.9578-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:05:57 +02:00
Michael Straube
8ad697c3d7
staging: r8188eu: remove HW_VAR_DM_FUNC_RESET from SetHwReg8188EU()
...
Remove the HW_VAR_DM_FUNC_RESET case from SetHwReg8188EU() and move
its functionality to a static function. This is part of the ongoing
effort to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20220709094458.9578-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:05:57 +02:00
Michael Straube
f18ab26f77
staging: r8188eu: remove HW_VAR_DM_FLAG from SetHwReg8188EU()
...
Remove the HW_VAR_DM_FLAG case from SetHwReg8188EU() and move its
functionality to a static function. This is part of the ongoing
effort to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20220709094458.9578-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:05:57 +02:00
Michael Straube
7644e877ba
staging: r8188eu: remove HW_VAR_DM_FUNC_OP from SetHwReg8188EU()
...
Remove the HW_VAR_DM_FUNC_OP case from SetHwReg8188EU() and move the
functionality to the functions that call SetHwReg8188EU() with
HW_VAR_DM_FUNC_OP. This is part of the ongoing effort to get rid of
SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20220709094458.9578-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:05:57 +02:00
Michael Straube
ae9411408c
staging: r8188eu: remove HW_VAR_BASIC_RATE from SetHwReg8188EU()
...
Remove the HW_VAR_BASIC_RATE case from SetHwReg8188EU() and move the
functionality to a separate function. This is part of the ongoing
effort to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20220709094458.9578-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:05:57 +02:00
Duoming Zhou
6a0c054930
staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback
...
There are sleep in atomic context bugs when dm_fsync_timer_callback is
executing. The root cause is that the memory allocation functions with
GFP_KERNEL or GFP_NOIO parameters are called in dm_fsync_timer_callback
which is a timer handler. The call paths that could trigger bugs are
shown below:
(interrupt context)
dm_fsync_timer_callback
write_nic_byte
kzalloc(sizeof(data), GFP_KERNEL); //may sleep
usb_control_msg
kmalloc(.., GFP_NOIO); //may sleep
write_nic_dword
kzalloc(sizeof(data), GFP_KERNEL); //may sleep
usb_control_msg
kmalloc(.., GFP_NOIO); //may sleep
This patch uses delayed work to replace timer and moves the operations
that may sleep into the delayed work in order to mitigate bugs.
Fixes: 8fc8598e61 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn >
Link: https://lore.kernel.org/r/20220710103002.63283-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 10:05:35 +02:00
Greg Kroah-Hartman
39c1b1af3e
Merge 5.19-rc6 into staging-next
...
We need the staging driver fix in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-11 09:25:23 +02:00
Philipp Hortmann
2a1f94e455
staging: vt6655: Use loop in vt6655_mac_read_ether_addr
...
Use loop in vt6655_mac_read_ether_addr to avoid multiple
similar statements.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/f233c8a007d75a8adcc99a07c582b75bdc1985db.1657134099.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:29:22 +02:00
Philipp Hortmann
385b35ab80
staging: vt6655: Use loop in vt6655_mac_write_bssid_addr
...
Use loop in vt6655_mac_write_bssid_addr to avoid multiple
similar statements.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/b3b93ae7ce41562565e9007eb4580b9c47a2881f.1657134099.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:29:22 +02:00
Martin Kaiser
3deb12ea54
staging: r8188eu: pattrib addresses were already set by the caller
...
Do not set pattrib's src, dst, bssid, ra and ta again in
sta2sta_data_frame.
sta2sta_data_frame is called from validate_recv_data_frame when both to_ds
and from_ds are 0. All pattrib address fields have already been set to the
correct addresses when sta2sta_data_frame is called.
memcpy(pattrib->dst, ieee80211_get_DA(hdr), ETH_ALEN);
ieee80211_get_DA returns addr1 if to_ds and from_ds are 0
memcpy(pattrib->src, ieee80211_get_SA(hdr), ETH_ALEN);
ieee80211_get_SA returns addr2 if to_ds and from_ds are 0
memcpy(pattrib->ra, hdr->addr1, ETH_ALEN);
memcpy(pattrib->ta, hdr->addr2, ETH_ALEN);
For pattrib->dst == addr1, pattrib->src == addr2, these
assignments match those in sta2sta_data_frame that this
patch removes.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220707194914.63794-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:29:07 +02:00
Martin Kaiser
8eaa8197bc
staging: r8188eu: remove sta2sta_data_frame prototype
...
Remove the prototype for sta2sta_data_frame. Make the function static, it
is used only inside rtw_recv.c.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220707194914.63794-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:29:07 +02:00
Philipp Hortmann
7b5ec68ac1
staging: vt6655: Convert macro vt6655_mac_read_ether_addr to function
...
Convert macro vt6655_mac_read_ether_addr to static function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/2e2524187d9d3a6140fe4a5a35926db14dddfe98.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:28:47 +02:00
Philipp Hortmann
5df564ca11
staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function
...
Convert macro vt6655_mac_write_bssid_addr to static function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/caecf7287d92c5d25ba0dfc16a24a6ce4aa67d55.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:28:47 +02:00
Philipp Hortmann
52fbed10b8
staging: vt6655: Move two macros to file where those are used
...
Move two multiline macros to file of only useage to
convert them later to static functions.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/b4a04608b3900186d4941b3bfe9463bb79e261e8.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:28:47 +02:00
Philipp Hortmann
41c8e56bae
staging: vt6655: Rename MACvReadEtherAddress
...
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/3714f7cd3425e0ef0a3df0cc291131cdb85a3796.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:28:47 +02:00
Philipp Hortmann
06f737ef8f
staging: vt6655: Rename MACvWriteBSSIDAddress
...
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/1190d93181409679f9ae348a95ea269b48b1115c.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:28:46 +02:00
Philipp Hortmann
20cbfe17a4
staging: vt6655: Rename pbyEtherAddr to mac_addr
...
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/fcc66446a04c1ecb3c2b66cdd47e932c231b1b9d.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:28:46 +02:00
Jakub Kicinski
60c85e23be
staging: switch to netif_napi_add_weight()
...
netif_napi_add() will soon default to weight of 64 instead of
requiring the user to specify that parameter. Most users already
pass or should pass 64. Move the callers in staging to
netif_napi_add_weight() which will keep the argument.
This way we'll avoid a huge cross-tree conversion when
argument is removed.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
Link: https://lore.kernel.org/r/20220705225801.923601-1-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:28:21 +02:00