mac80211: use upstream patches for rtl8xxxu
[openwrt/staging/dedeckeh.git] / package / kernel / mac80211 / patches / 653-0014-rtl8xxxu-Introduce-fops-bitflag-indicating-type-of-t.patch
1 From eed145ab25a3eeba4caf2d4be0b5c7a3097f39bd Mon Sep 17 00:00:00 2001
2 From: Jes Sorensen <Jes.Sorensen@redhat.com>
3 Date: Fri, 19 Aug 2016 17:46:36 -0400
4 Subject: [PATCH] rtl8xxxu: Introduce fops bitflag indicating type of thermal
5 meter
6
7 Do not rely on TX descriptor size to determine the thermal meter
8 type.
9
10 Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
11 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
12 ---
13 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 +
14 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 1 +
15 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 1 +
16 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
17 4 files changed, 4 insertions(+), 1 deletion(-)
18
19 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
20 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
21 @@ -1342,6 +1342,7 @@ struct rtl8xxxu_fileops {
22 char rx_desc_size;
23 u8 has_s0s1:1;
24 u8 has_tx_report:1;
25 + u8 gen2_thermal_meter:1;
26 u32 adda_1t_init;
27 u32 adda_1t_path_on;
28 u32 adda_2t_path_on_a;
29 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
30 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
31 @@ -1505,6 +1505,7 @@ struct rtl8xxxu_fileops rtl8192eu_fops =
32 .tx_desc_size = sizeof(struct rtl8xxxu_txdesc40),
33 .rx_desc_size = sizeof(struct rtl8xxxu_rxdesc24),
34 .has_s0s1 = 0,
35 + .gen2_thermal_meter = 1,
36 .adda_1t_init = 0x0fc01616,
37 .adda_1t_path_on = 0x0fc01616,
38 .adda_2t_path_on_a = 0x0fc01616,
39 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
40 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
41 @@ -1667,6 +1667,7 @@ struct rtl8xxxu_fileops rtl8723bu_fops =
42 .rx_desc_size = sizeof(struct rtl8xxxu_rxdesc24),
43 .has_s0s1 = 1,
44 .has_tx_report = 1,
45 + .gen2_thermal_meter = 1,
46 .adda_1t_init = 0x01c00014,
47 .adda_1t_path_on = 0x01c00014,
48 .adda_2t_path_on_a = 0x01c00014,
49 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
50 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
51 @@ -4195,7 +4195,7 @@ static int rtl8xxxu_init_device(struct i
52 /*
53 * This should enable thermal meter
54 */
55 - if (priv->fops->tx_desc_size == sizeof(struct rtl8xxxu_txdesc40))
56 + if (priv->fops->gen2_thermal_meter)
57 rtl8xxxu_write_rfreg(priv,
58 RF_A, RF6052_REG_T_METER_8723B, 0x37cf8);
59 else