--- 1683501ee7fbd08f17603fda6b2cd4b7ba92d3e9 +++ 010cfc61b3a99ceb63689b09ec8f57ac6bf0bf87 @@ -70,7 +70,11 @@ const struct cntry_locales_custom transl {"ES", "ES", 1}, {"FI", "FI", 1}, {"FR", "FR", 1}, +#ifdef BCM4335_CHIP + {"GB", "GB", 6}, +#else {"GB", "GB", 1}, +#endif {"GR", "GR", 1}, {"HR", "HR", 1}, {"HU", "HU", 1}, @@ -84,7 +88,9 @@ const struct cntry_locales_custom transl {"LT", "LT", 1}, {"LU", "LU", 1}, {"LV", "LV", 1}, +#ifndef BCM4330_CHIP {"MA", "MA", 1}, +#endif {"MT", "MT", 1}, {"MX", "MX", 1}, {"NL", "NL", 1}, @@ -96,8 +102,9 @@ const struct cntry_locales_custom transl {"SE", "SE", 1}, {"SI", "SI", 1}, {"SK", "SK", 1}, +#ifndef BCM4330_CHIP {"TR", "TR", 7}, - {"UA", "UA", 2}, +#endif {"TW", "TW", 2}, {"IR", "XZ", 11}, /* Universal if Country code is IRAN, (ISLAMIC REPUBLIC OF) */ {"SD", "XZ", 11}, /* Universal if Country code is SUDAN */ @@ -108,14 +115,50 @@ const struct cntry_locales_custom transl {"MH", "XZ", 11}, /* Universal if Country code is MARSHALL ISLANDS */ {"PK", "XZ", 11}, /* Universal if Country code is PAKISTAN */ #ifdef BCM4334_CHIP - {"RU", "RU", 5}, + {"RU", "RU", 13}, {"SG", "SG", 4}, - {"US", "US", 46} + {"US", "US", 46}, + {"UA", "UA", 8}, + {"CO", "CO", 4}, + {"ID", "ID", 1}, + {"LA", "LA", 1}, + {"LB", "LB", 2}, + {"VN", "VN", 4}, #endif #ifdef BCM4330_CHIP - {"RU", "RU", 1}, - {"US", "US", 5} + {"RU", "RU", 13}, + {"US", "US", 5}, + {"UA", "UY", 0}, + {"AD", "AL", 0}, + {"CX", "AU", 2}, + {"GE", "GB", 1}, + {"ID", "MW", 0}, + {"KI", "AU", 2}, + {"NP", "SA", 0}, + {"WS", "SA", 0}, + {"LR", "BR", 0}, + {"ZM", "IN", 0}, + {"AN", "AG", 0}, + {"AI", "AS", 0}, + {"BM", "AS", 0}, + {"DZ", "IL", 0}, + {"LC", "AG", 0}, + {"MF", "BY", 0}, + {"GY", "CU", 0}, + {"LA", "GB", 1}, + {"LB", "BR", 0}, + {"MA", "IL", 0}, + {"MO", "BD", 0}, + {"MW", "BD", 0}, + {"QA", "BD", 0}, + {"TR", "GB", 1}, + {"TZ", "BF", 0}, + {"VN", "BR", 0}, + {"JO", "XZ", 1}, + {"PG", "XZ", 1}, + {"SA", "XZ", 1}, #endif + {"UA", "UA", 2} }; /* Customized Locale convertor @@ -273,12 +316,12 @@ int dhd_write_rdwr_macaddr(struct ether_ mac->octet[0], mac->octet[1], mac->octet[2], mac->octet[3], mac->octet[4], mac->octet[5]); - /* /data/.mac.info will be created */ - fp_mac = filp_open(filepath_data, O_RDWR | O_CREAT, 0666); + /* /efs/wifi/.mac.info will be created */ + fp_mac = filp_open(filepath_efs, O_RDWR | O_CREAT, 0666); if (IS_ERR(fp_mac)) { DHD_ERROR(("[WIFI] %s: File open error\n", filepath_data)); return -1; - } else { + } else { oldfs = get_fs(); set_fs(get_ds()); @@ -295,12 +338,12 @@ int dhd_write_rdwr_macaddr(struct ether_ set_fs(oldfs); filp_close(fp_mac, NULL); } - /* /efs/wifi/.mac.info will be created */ - fp_mac = filp_open(filepath_efs, O_RDWR | O_CREAT, 0666); + /* /data/.mac.info will be created */ + fp_mac = filp_open(filepath_data, O_RDWR | O_CREAT, 0666); if (IS_ERR(fp_mac)) { DHD_ERROR(("[WIFI] %s: File open error\n", filepath_efs)); return -1; - } else { + } else { oldfs = get_fs(); set_fs(get_ds()); @@ -335,7 +378,7 @@ int dhd_check_rdwr_macaddr(struct dhd_in #ifdef CONFIG_TARGET_LOCALE_NA char *nvfilepath = "/data/misc/wifi/.nvmac.info"; #else - char *nvfilepath = NVMACINFO; + char *nvfilepath = "/efs/wifi/.nvmac.info"; #endif char cur_mac[128] = {0}; char dummy_mac[ETHER_ADDR_LEN] = {0x00, 0x90, 0x4C, 0xC5, 0x12, 0x38}; @@ -347,11 +390,6 @@ int dhd_check_rdwr_macaddr(struct dhd_in fp_nvm = filp_open(nvfilepath, O_RDONLY, 0); if (IS_ERR(fp_nvm)) { /* file does not exist */ - /* Create the .nvmac.info */ - fp_nvm = filp_open(nvfilepath, O_RDWR | O_CREAT, 0666); - if (!IS_ERR(fp_nvm)) - filp_close(fp_nvm, NULL); - /* read MAC Address */ strcpy(cur_mac, "cur_etheraddr"); ret = dhd_wl_ioctl_cmd(dhdp, WLC_GET_VAR, cur_mac,