diff options
author | John Crispin <john@phrozen.org> | 2018-08-02 08:44:29 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-09-26 16:35:33 +0200 |
commit | d9eefa7a7031543571d434693c7f984dfbdc990d (patch) | |
tree | 73ac027ccf6cdb6fd209a83e7e25c3d0472d46b4 /package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch | |
parent | e9d92bf1e1af71ff19e4cdc753de3f65963c58a5 (diff) | |
download | upstream-d9eefa7a7031543571d434693c7f984dfbdc990d.tar.gz upstream-d9eefa7a7031543571d434693c7f984dfbdc990d.tar.bz2 upstream-d9eefa7a7031543571d434693c7f984dfbdc990d.zip |
mac80211: rebase ontop of v4.18.5
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch')
-rw-r--r-- | package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch b/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch deleted file mode 100644 index e7551c3a70..0000000000 --- a/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> -Subject: [PATCH] brcmfmac: add in-driver tables with country codes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This adds early support for changing region. Ideally this data should -be stored in DT as all these mappings are devices specific. - -Signed-off-by: Rafał Miłecki <rafal@milecki.pl> ---- - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c -@@ -23,6 +23,36 @@ - #include "common.h" - #include "of.h" - -+/* TODO: FIXME: Use DT */ -+static void brcmf_of_probe_cc(struct device *dev, -+ struct brcmf_mp_device *settings) -+{ -+ static struct brcmfmac_pd_cc_entry netgear_r8000_cc_ent[] = { -+ { "JP", "JP", 78 }, -+ { "US", "Q2", 86 }, -+ }; -+ struct brcmfmac_pd_cc_entry *cc_ent = NULL; -+ int table_size = 0; -+ -+ if (of_machine_is_compatible("netgear,r8000")) { -+ cc_ent = netgear_r8000_cc_ent; -+ table_size = ARRAY_SIZE(netgear_r8000_cc_ent); -+ } -+ -+ if (cc_ent && table_size) { -+ struct brcmfmac_pd_cc *cc; -+ size_t memsize; -+ -+ memsize = table_size * sizeof(struct brcmfmac_pd_cc_entry); -+ cc = devm_kzalloc(dev, sizeof(*cc) + memsize, GFP_KERNEL); -+ if (!cc) -+ return; -+ cc->table_size = table_size; -+ memcpy(cc->table, cc_ent, memsize); -+ settings->country_codes = cc; -+ } -+} -+ - void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, - struct brcmf_mp_device *settings) - { -@@ -32,6 +62,8 @@ void brcmf_of_probe(struct device *dev, - u32 irqf; - u32 val; - -+ brcmf_of_probe_cc(dev, settings); -+ - if (!np || bus_type != BRCMF_BUSTYPE_SDIO || - !of_device_is_compatible(np, "brcm,bcm4329-fmac")) - return; |