aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2012-01-03 14:12:54 -0800
committerDmitry Shmidt <dimitrysh@google.com>2012-01-03 14:16:58 -0800
commit1071cf4b06c8ed46e57a32b037524ac7202e14bb (patch)
tree28d1b3b853f29f4639ae534820e7a7edfc347a50 /arch/arm/mach-s5pv210
parent0a6f1c045620244664c96754809ac0ecd496bf56 (diff)
downloadkernel_samsung_aries-1071cf4b06c8ed46e57a32b037524ac7202e14bb.zip
kernel_samsung_aries-1071cf4b06c8ed46e57a32b037524ac7202e14bb.tar.gz
kernel_samsung_aries-1071cf4b06c8ed46e57a32b037524ac7202e14bb.tar.bz2
ARM: s5pv210: herring: Add wlan locale translation table
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rwxr-xr-xarch/arm/mach-s5pv210/mach-herring.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/mach-herring.c b/arch/arm/mach-s5pv210/mach-herring.c
index 9d3edf8..fe578c4 100755
--- a/arch/arm/mach-s5pv210/mach-herring.c
+++ b/arch/arm/mach-s5pv210/mach-herring.c
@@ -5343,11 +5343,82 @@ int __init herring_init_wifi_mem(void)
return -ENOMEM;
}
+
+/* Customized Locale table : OPTIONAL feature */
+#define WLC_CNTRY_BUF_SZ 4
+typedef struct cntry_locales_custom {
+ char iso_abbrev[WLC_CNTRY_BUF_SZ];
+ char custom_locale[WLC_CNTRY_BUF_SZ];
+ int custom_locale_rev;
+} cntry_locales_custom_t;
+
+static cntry_locales_custom_t herring_wlan_translate_custom_table[] = {
+/* Table should be filled out based on custom platform regulatory requirement */
+ {"", "XY", 4}, /* universal */
+ {"US", "US", 69}, /* input ISO "US" to : US regrev 69 */
+ {"CA", "US", 69}, /* input ISO "CA" to : US regrev 69 */
+ {"EU", "EU", 5}, /* European union countries */
+ {"AT", "EU", 5},
+ {"BE", "EU", 5},
+ {"BG", "EU", 5},
+ {"CY", "EU", 5},
+ {"CZ", "EU", 5},
+ {"DK", "EU", 5},
+ {"EE", "EU", 5},
+ {"FI", "EU", 5},
+ {"FR", "EU", 5},
+ {"DE", "EU", 5},
+ {"GR", "EU", 5},
+ {"HU", "EU", 5},
+ {"IE", "EU", 5},
+ {"IT", "EU", 5},
+ {"LV", "EU", 5},
+ {"LI", "EU", 5},
+ {"LT", "EU", 5},
+ {"LU", "EU", 5},
+ {"MT", "EU", 5},
+ {"NL", "EU", 5},
+ {"PL", "EU", 5},
+ {"PT", "EU", 5},
+ {"RO", "EU", 5},
+ {"SK", "EU", 5},
+ {"SI", "EU", 5},
+ {"ES", "EU", 5},
+ {"SE", "EU", 5},
+ {"GB", "EU", 5}, /* input ISO "GB" to : EU regrev 05 */
+ {"IL", "IL", 0},
+ {"CH", "CH", 0},
+ {"TR", "TR", 0},
+ {"NO", "NO", 0},
+ {"KR", "XY", 3},
+ {"AU", "XY", 3},
+ {"CN", "XY", 3}, /* input ISO "CN" to : XY regrev 03 */
+ {"TW", "XY", 3},
+ {"AR", "XY", 3},
+ {"MX", "XY", 3}
+};
+
+static void *herring_wlan_get_country_code(char *ccode)
+{
+ int size = ARRAY_SIZE(herring_wlan_translate_custom_table);
+ int i;
+
+ if (!ccode)
+ return NULL;
+
+ for (i = 0; i < size; i++)
+ if (strcmp(ccode, herring_wlan_translate_custom_table[i].iso_abbrev) == 0)
+ return &herring_wlan_translate_custom_table[i];
+ return &herring_wlan_translate_custom_table[0];
+}
+
+
static struct wifi_platform_data wifi_pdata = {
.set_power = wlan_power_en,
.set_reset = wlan_reset_en,
.set_carddetect = wlan_carddetect_en,
.mem_prealloc = herring_mem_prealloc,
+ .get_country_code = herring_wlan_get_country_code,
};
static struct platform_device sec_device_wifi = {