wifi: rtl8xxxu: Split up rtl8xxxu_identify_chip
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Sat, 5 Nov 2022 22:54:22 +0000 (00:54 +0200)
committerKalle Valo <kvalo@kernel.org>
Wed, 16 Nov 2022 09:26:10 +0000 (11:26 +0200)
commit14566bbfdfaf3784f43ea9ca6769463dd6bed1e2
tree418de2e268514a0d5cf47d21c5e45a0326a1c33b
parentbcfcb712e41401887930361946666549e8ba7747
wifi: rtl8xxxu: Split up rtl8xxxu_identify_chip

Move the reusable parts into separate functions and create one
identify_chip function for each chip type.

This is preparation for supporting the RTL8710BU chip, which would
need too many ugly changes to this function. Another reason to do this
is to get rid of the long and scary if..else if..else block in the
middle of the function.

Everything should still work the same as before.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/b268b5cf-071c-6292-0d90-0573e4fb2228@gmail.com
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c