]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
rtlwifi: Fix missing country code for Great Britain
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 22 Aug 2016 19:27:59 +0000 (14:27 -0500)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 8 Nov 2016 16:44:57 +0000 (16:44 +0000)
BugLink: http://bugs.launchpad.net/bugs/1637510
commit 0c9d3491530773858ff9d705ec2a9c382f449230 upstream.

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. In addition,
the channels allowed for COUNTRY_CODE_ETSI were more properly suited
for China and Israel, not the EU. This problem has also been fixed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/wireless/realtek/rtlwifi/regd.c

index 5be34118e0af22b69392f5caf07f9eef5672c7fe..f67e7e5b13e192189c3f649a3aceb9ac50d6d57f 100644 (file)
@@ -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: