rtl8xxxu: Set the correct thermal meter register for 8723bu
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 29 Feb 2016 22:05:25 +0000 (17:05 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 10 Mar 2016 13:29:14 +0000 (15:29 +0200)
Older chips use RF register 0x24 to set the thermal meter. Newer chips
use register 0x42.

This change makes sure to set the correct thermal meter register
depending on the chip.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c

index 5681339..241d68d 100644 (file)
@@ -6502,7 +6502,11 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
        /*
         * This should enable thermal meter
         */
-       rtl8xxxu_write_rfreg(priv, RF_A, RF6052_REG_T_METER, 0x60);
+       if (priv->fops->has_s0s1)
+               rtl8xxxu_write_rfreg(priv,
+                                    RF_A, RF6052_REG_T_METER_8723B, 0x37cf8);
+       else
+               rtl8xxxu_write_rfreg(priv, RF_A, RF6052_REG_T_METER, 0x60);
 
        /* Init BT hw config. */
        if (priv->fops->init_bt)