wmi.c (3c3d7cb1db4af176dab843f22ea092a4ef1eb989) | wmi.c (ef8c00174a8738ea334197c0164143354644cb16) |
---|---|
1/* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 900 unchanged lines hidden (view full) --- 909ath6kl_get_regpair(u16 regdmn) 910{ 911 int i; 912 913 if (regdmn == NO_ENUMRD) 914 return NULL; 915 916 for (i = 0; i < ARRAY_SIZE(regDomainPairs); i++) { | 1/* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 900 unchanged lines hidden (view full) --- 909ath6kl_get_regpair(u16 regdmn) 910{ 911 int i; 912 913 if (regdmn == NO_ENUMRD) 914 return NULL; 915 916 for (i = 0; i < ARRAY_SIZE(regDomainPairs); i++) { |
917 if (regDomainPairs[i].regDmnEnum == regdmn) | 917 if (regDomainPairs[i].reg_domain == regdmn) |
918 return ®DomainPairs[i]; 919 } 920 921 return NULL; 922} 923 924static struct country_code_to_enum_rd * 925ath6kl_regd_find_country_by_rd(u16 regdmn) --- 23 unchanged lines hidden (view full) --- 949 if ((reg_code >> ATH6KL_COUNTRY_RD_SHIFT) & COUNTRY_ERD_FLAG) 950 country = ath6kl_regd_find_country((u16) reg_code); 951 else if (!(((u16) reg_code & WORLD_SKU_MASK) == WORLD_SKU_PREFIX)) { 952 953 regpair = ath6kl_get_regpair((u16) reg_code); 954 country = ath6kl_regd_find_country_by_rd((u16) reg_code); 955 if (regpair) 956 ath6kl_dbg(ATH6KL_DBG_WMI, "Regpair used: 0x%0x\n", | 918 return ®DomainPairs[i]; 919 } 920 921 return NULL; 922} 923 924static struct country_code_to_enum_rd * 925ath6kl_regd_find_country_by_rd(u16 regdmn) --- 23 unchanged lines hidden (view full) --- 949 if ((reg_code >> ATH6KL_COUNTRY_RD_SHIFT) & COUNTRY_ERD_FLAG) 950 country = ath6kl_regd_find_country((u16) reg_code); 951 else if (!(((u16) reg_code & WORLD_SKU_MASK) == WORLD_SKU_PREFIX)) { 952 953 regpair = ath6kl_get_regpair((u16) reg_code); 954 country = ath6kl_regd_find_country_by_rd((u16) reg_code); 955 if (regpair) 956 ath6kl_dbg(ATH6KL_DBG_WMI, "Regpair used: 0x%0x\n", |
957 regpair->regDmnEnum); | 957 regpair->reg_domain); |
958 else 959 ath6kl_warn("Regpair not found reg_code 0x%0x\n", 960 reg_code); 961 } 962 963 if (country && wmi->parent_dev->wiphy_registered) { 964 alpha2[0] = country->isoName[0]; 965 alpha2[1] = country->isoName[1]; --- 3168 unchanged lines hidden --- | 958 else 959 ath6kl_warn("Regpair not found reg_code 0x%0x\n", 960 reg_code); 961 } 962 963 if (country && wmi->parent_dev->wiphy_registered) { 964 alpha2[0] = country->isoName[0]; 965 alpha2[1] = country->isoName[1]; --- 3168 unchanged lines hidden --- |