Commit a5be45ea authored by Bitterblue Smith's avatar Bitterblue Smith Committed by Kalle Valo
Browse files

wifi: rtl8xxxu: Clean up some messy ifs



Add some new members to rtl8xxxu_fileops and use them instead of
checking priv->rtl_chip.

Signed-off-by: default avatarBitterblue Smith <rtl8821cerfe2@gmail.com>
Reviewed-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/e24a5534-6e33-cfb9-0634-0caf4646513f@gmail.com
parent cc4cffc3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1923,6 +1923,11 @@ struct rtl8xxxu_fileops {
	u8 has_tx_report:1;
	u8 gen2_thermal_meter:1;
	u8 needs_full_init:1;
	u8 init_reg_rxfltmap:1;
	u8 init_reg_pkt_life_time:1;
	u8 init_reg_hmtfr:1;
	u8 ampdu_max_time;
	u8 ustime_tsf_edca;
	u32 adda_1t_init;
	u32 adda_1t_path_on;
	u32 adda_2t_path_on_a;
+1 −0
Original line number Diff line number Diff line
@@ -1883,6 +1883,7 @@ struct rtl8xxxu_fileops rtl8188eu_fops = {
	.rx_desc_size = sizeof(struct rtl8xxxu_rxdesc16),
	.tx_desc_size = sizeof(struct rtl8xxxu_txdesc32),
	.has_tx_report = 1,
	.init_reg_pkt_life_time = 1,
	.gen2_thermal_meter = 1,
	.adda_1t_init = 0x0b1b25a0,
	.adda_1t_path_on = 0x0bdb25a0,
+5 −0
Original line number Diff line number Diff line
@@ -1746,6 +1746,11 @@ struct rtl8xxxu_fileops rtl8188fu_fops = {
	.has_tx_report = 1,
	.gen2_thermal_meter = 1,
	.needs_full_init = 1,
	.init_reg_rxfltmap = 1,
	.init_reg_pkt_life_time = 1,
	.init_reg_hmtfr = 1,
	.ampdu_max_time = 0x70,
	.ustime_tsf_edca = 0x28,
	.adda_1t_init = 0x03c00014,
	.adda_1t_path_on = 0x03c00014,
	.trxff_boundary = 0x3f7f,
+9 −0
Original line number Diff line number Diff line
@@ -1865,6 +1865,15 @@ struct rtl8xxxu_fileops rtl8710bu_fops = {
	.has_tx_report = 1,
	.gen2_thermal_meter = 1,
	.needs_full_init = 1,
	.init_reg_rxfltmap = 1,
	.init_reg_pkt_life_time = 1,
	.init_reg_hmtfr = 1,
	.ampdu_max_time = 0x5e,
	/*
	 * The RTL8710BU vendor driver uses 0x50 here and it works fine,
	 * but in rtl8xxxu 0x50 causes slow upload and random packet loss. Why?
	 */
	.ustime_tsf_edca = 0x28,
	.adda_1t_init = 0x03c00016,
	.adda_1t_path_on = 0x03c00016,
	.trxff_boundary = 0x3f7f,
+3 −0
Original line number Diff line number Diff line
@@ -1741,6 +1741,9 @@ struct rtl8xxxu_fileops rtl8723bu_fops = {
	.has_tx_report = 1,
	.gen2_thermal_meter = 1,
	.needs_full_init = 1,
	.init_reg_hmtfr = 1,
	.ampdu_max_time = 0x5e,
	.ustime_tsf_edca = 0x50,
	.adda_1t_init = 0x01c00014,
	.adda_1t_path_on = 0x01c00014,
	.adda_2t_path_on_a = 0x01c00014,
Loading