All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: Fix missing country code for Great Britain
@ 2016-08-19 15:14 Larry Finger
  2016-08-22 15:36 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2016-08-19 15:14 UTC (permalink / raw)
  To: kvalo; +Cc: devel, linux-wireless, Larry Finger, Stable

Some RTL8821AE devices sold in Great Britain have the country code of
0x25 encoded in their EEPROM. This value is not tested in the routine
that establishes the regulatory info for the chip. The fix is to set
this code to have the same capabilities as the EU countries.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
---
 drivers/net/wireless/realtek/rtlwifi/regd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/regd.c b/drivers/net/wireless/realtek/rtlwifi/regd.c
index 3524441..6ee6bf8 100644
--- a/drivers/net/wireless/realtek/rtlwifi/regd.c
+++ b/drivers/net/wireless/realtek/rtlwifi/regd.c
@@ -345,9 +345,9 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select(
 		return &rtl_regdom_no_midband;
 	case COUNTRY_CODE_IC:
 		return &rtl_regdom_11;
-	case COUNTRY_CODE_ETSI:
 	case COUNTRY_CODE_TELEC_NETGEAR:
 		return &rtl_regdom_60_64;
+	case COUNTRY_CODE_ETSI:
 	case COUNTRY_CODE_SPAIN:
 	case COUNTRY_CODE_FRANCE:
 	case COUNTRY_CODE_ISRAEL:
@@ -406,6 +406,8 @@ static u8 channel_plan_to_country_code(u8 channelplan)
 		return COUNTRY_CODE_WORLD_WIDE_13;
 	case 0x22:
 		return COUNTRY_CODE_IC;
+	case 0x25:
+		return COUNTRY_CODE_ETSI;
 	case 0x32:
 		return COUNTRY_CODE_TELEC_NETGEAR;
 	case 0x41:
-- 
2.6.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtlwifi: Fix missing country code for Great Britain
  2016-08-19 15:14 [PATCH] rtlwifi: Fix missing country code for Great Britain Larry Finger
@ 2016-08-22 15:36 ` Kalle Valo
  2016-08-22 19:23   ` Larry Finger
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2016-08-22 15:36 UTC (permalink / raw)
  To: Larry Finger; +Cc: devel, linux-wireless, Stable

Larry Finger <Larry.Finger@lwfinger.net> writes:

> Some RTL8821AE devices sold in Great Britain have the country code of
> 0x25 encoded in their EEPROM. This value is not tested in the routine
> that establishes the regulatory info for the chip. The fix is to set
> this code to have the same capabilities as the EU countries.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Stable <stable@vger.kernel.org>

[...]

> --- a/drivers/net/wireless/realtek/rtlwifi/regd.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/regd.c
> @@ -345,9 +345,9 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select(
>  		return &rtl_regdom_no_midband;
>  	case COUNTRY_CODE_IC:
>  		return &rtl_regdom_11;
> -	case COUNTRY_CODE_ETSI:
>  	case COUNTRY_CODE_TELEC_NETGEAR:
>  		return &rtl_regdom_60_64;
> +	case COUNTRY_CODE_ETSI:
>  	case COUNTRY_CODE_SPAIN:
>  	case COUNTRY_CODE_FRANCE:
>  	case COUNTRY_CODE_ISRAEL:

I didn't check the full source, but here you seem to be changing also
the content of ETSI regdomain. The commit log doesn't mention anything
about that so I want to double check that this is really intentionally.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtlwifi: Fix missing country code for Great Britain
  2016-08-22 15:36 ` Kalle Valo
@ 2016-08-22 19:23   ` Larry Finger
  0 siblings, 0 replies; 3+ messages in thread
From: Larry Finger @ 2016-08-22 19:23 UTC (permalink / raw)
  To: Kalle Valo; +Cc: devel, linux-wireless, Stable

On 08/22/2016 10:36 AM, Kalle Valo wrote:
> Larry Finger <Larry.Finger@lwfinger.net> writes:
>
>> Some RTL8821AE devices sold in Great Britain have the country code of
>> 0x25 encoded in their EEPROM. This value is not tested in the routine
>> that establishes the regulatory info for the chip. The fix is to set
>> this code to have the same capabilities as the EU countries.
>>
>> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
>> Cc: Stable <stable@vger.kernel.org>
>
> [...]
>
>> --- a/drivers/net/wireless/realtek/rtlwifi/regd.c
>> +++ b/drivers/net/wireless/realtek/rtlwifi/regd.c
>> @@ -345,9 +345,9 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select(
>>  		return &rtl_regdom_no_midband;
>>  	case COUNTRY_CODE_IC:
>>  		return &rtl_regdom_11;
>> -	case COUNTRY_CODE_ETSI:
>>  	case COUNTRY_CODE_TELEC_NETGEAR:
>>  		return &rtl_regdom_60_64;
>> +	case COUNTRY_CODE_ETSI:
>>  	case COUNTRY_CODE_SPAIN:
>>  	case COUNTRY_CODE_FRANCE:
>>  	case COUNTRY_CODE_ISRAEL:
>
> I didn't check the full source, but here you seem to be changing also
> the content of ETSI regdomain. The commit log doesn't mention anything
> about that so I want to double check that this is really intentionally.

Yes, I did intend to change all of ETSI. It was previously allowing channels 
appropriate for China and Israel.

I will resubmit with an improved commit message.

Thanks,

Larry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-22 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-19 15:14 [PATCH] rtlwifi: Fix missing country code for Great Britain Larry Finger
2016-08-22 15:36 ` Kalle Valo
2016-08-22 19:23   ` Larry Finger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.