]> git.baikalelectronics.ru Git - kernel.git/commit
wilc1000: Fix use of void pointer as a wrong struct type
authorVsevolod Kozlov <zaba@mm.st>
Wed, 10 Feb 2021 18:40:24 +0000 (20:40 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 11 Feb 2021 06:45:48 +0000 (08:45 +0200)
commite54e7f5ff27ab0ddb5dfd83354ebf618ba83057c
treecb84eea27f30111841aaeab5297130d821c9a0cb
parentba95885a3c7dfca7a0559dfa5001ea97caa151b5
wilc1000: Fix use of void pointer as a wrong struct type

ac_classify() expects a struct sk_buff* as its second argument, which is
a member of struct tx_complete_data. priv happens to be a pointer to
struct tx_complete_data, so passing it directly to ac_classify() leads
to wrong behaviour and occasional panics.

Since there is only one caller of wilc_wlan_txq_add_net_pkt and it
already knows the type behind this pointer, and the structure is already
in the header file, change the function signature to use the real type
instead of void* in order to prevent confusion.

Signed-off-by: Vsevolod Kozlov <zaba@mm.st>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/YCQomJ1mO5BLxYOT@Vsevolods-Mini.lan
drivers/net/wireless/microchip/wilc1000/netdev.c
drivers/net/wireless/microchip/wilc1000/wlan.c
drivers/net/wireless/microchip/wilc1000/wlan.h