On Wed, Oct 21, 2015 at 02:57 AM CEST, Jes Sorensen <[email protected]> 
wrote:
> Jakub Sitnicki <[email protected]> writes:
>> rtl8192cu driver doesn't read/write the REG_EFUSE_TEST register.
>> Neither does the rtl8188eu driver.  Do it only for RTL8192CU-based
>> devices.
>>
>> Signed-off-by: Jakub Sitnicki <[email protected]>
>> ---
>>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 9 ++++++---
>>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 +
>>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> This looks a reasonable change - I verified the 8723BU does this as
> well, but 8192EU doesn't.
>
> I did modify you commit message slightly since it said "Do it only for
> RTL8192CU-based devices" and I am sure you meant 8723AU (and now
> 8723BU).
>
> If you dislike the change to the message, let me know and I'll pull the
> patch or change it.

You're right.  It should say "RTL8723AU-based devices".  Must have had a
brain-fart there.  Thanks for fixing the message.

-Jakub

>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c 
>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
>> index 5f90261..a8d7e0a 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
>> @@ -1704,6 +1704,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv 
>> *priv)
>>                      priv->has_bluetooth = 1;
>>              if (val32 & MULTI_GPS_FUNC_EN)
>>                      priv->has_gps = 1;
>> +            priv->is_multi_func = 1;
>>      } else if (val32 & SYS_CFG_TYPE_ID) {
>>              bonding = rtl8xxxu_read32(priv, REG_HPON_FSM);
>>              bonding &= HPON_FSM_BONDING_MASK;
>> @@ -1934,9 +1935,11 @@ static int rtl8xxxu_read_efuse(struct rtl8xxxu_priv 
>> *priv)
>>      if (val8 & EEPROM_BOOT)
>>              priv->boot_eeprom = 1;
>>  
>> -    val32 = rtl8xxxu_read32(priv, REG_EFUSE_TEST);
>> -    val32 = (val32 & ~EFUSE_SELECT_MASK) | EFUSE_WIFI_SELECT;
>> -    rtl8xxxu_write32(priv, REG_EFUSE_TEST, val32);
>> +    if (priv->is_multi_func) {
>> +            val32 = rtl8xxxu_read32(priv, REG_EFUSE_TEST);
>> +            val32 = (val32 & ~EFUSE_SELECT_MASK) | EFUSE_WIFI_SELECT;
>> +            rtl8xxxu_write32(priv, REG_EFUSE_TEST, val32);
>> +    }
>>  
>>      dev_dbg(dev, "Booting from %s\n",
>>              priv->boot_eeprom ? "EEPROM" : "EFUSE");
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h 
>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> index f2a1bac..622e6f5 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
>> @@ -597,6 +597,7 @@ struct rtl8xxxu_priv {
>>      struct rtl8723au_idx ht20_max_power_offset[3];
>>      u32 chip_cut:4;
>>      u32 rom_rev:4;
>> +    u32 is_multi_func:1;
>>      u32 has_wifi:1;
>>      u32 has_bluetooth:1;
>>      u32 enable_bluetooth:1;
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to