Lines Matching refs:ah

54 ath9k_regd_get_eepromRD(struct ath_hal *ah)
56 return (ah->ah_currentRD & ~WORLDWIDE_ROAMING_FLAG);
72 ath9k_regd_is_eeprom_valid(struct ath_hal *ah)
74 uint16_t rd = ath9k_regd_get_eepromRD(ah);
96 ath9k_regd_is_fcc_midband_supported(struct ath_hal *ah)
100 regcap = ah->ah_caps.reg_cap;
109 ath9k_regd_is_ccode_valid(struct ath_hal *ah, uint16_t cc)
119 rd = ath9k_regd_get_eepromRD(ah);
146 ath9k_regd_get_wmodes_nreg(struct ath_hal *ah,
152 bcopy(ah->ah_caps.wireless_modes, modes_allowed,
153 sizeof (ah->ah_caps.wireless_modes));
155 if (is_set(ATH9K_MODE_11G, ah->ah_caps.wireless_modes) &&
159 if (is_set(ATH9K_MODE_11A, ah->ah_caps.wireless_modes) &&
163 if (is_set(ATH9K_MODE_11NG_HT20, ah->ah_caps.wireless_modes) &&
167 if (is_set(ATH9K_MODE_11NA_HT20, ah->ah_caps.wireless_modes) &&
171 if (is_set(ATH9K_MODE_11NG_HT40PLUS, ah->ah_caps.wireless_modes) &&
175 if (is_set(ATH9K_MODE_11NG_HT40MINUS, ah->ah_caps.wireless_modes) &&
179 if (is_set(ATH9K_MODE_11NA_HT40PLUS, ah->ah_caps.wireless_modes) &&
183 if (is_set(ATH9K_MODE_11NA_HT40MINUS, ah->ah_caps.wireless_modes) &&
189 ath9k_regd_is_public_safety_sku(struct ath_hal *ah)
193 rd = ath9k_regd_get_eepromRD(ah);
201 if (ah->ah_countryCode == CTRY_UNITED_STATES_FCC49)
221 ath9k_regd_get_default_country(struct ath_hal *ah)
226 rd = ath9k_regd_get_eepromRD(ah);
278 ath9k_regd_get_wmode_regdomain(struct ath_hal *ah, int regDmn,
289 rdnum = ath9k_regd_get_eepromRD(ah);
382 ath9k_regd_get_eeprom_reg_ext_bits(struct ath_hal *ah,
385 return ((ah->ah_currentRDExt & (1 << bit)) ? B_TRUE : B_FALSE);
412 ath9k_regd_is_chan_present(struct ath_hal *ah, uint16_t c)
417 if (!ah->ah_channels[i].channel)
419 else if (ah->ah_channels[i].channel == c)
429 struct ath_hal *ah,
455 !(ah->ah_caps.hw_caps & ATH9K_HW_CAP_CHAN_HALFRATE)) {
463 !(ah->ah_caps.hw_caps & ATH9K_HW_CAP_CHAN_QUARTERRATE)) {
483 if ((rd->flags & NO_HOSTAP) && (ah->ah_opmode == ATH9K_M_HOSTAP)) {
490 !(ath9k_regd_get_eeprom_reg_ext_bits(ah, REG_EXT_FCC_DFS_HT40)) &&
499 !(ath9k_regd_get_eeprom_reg_ext_bits(ah,
508 !(ath9k_regd_get_eeprom_reg_ext_bits(ah, REG_EXT_JAPAN_DFS_HT40)) &&
548 uint32_t regcap = ah->ah_caps.reg_cap;
574 ret = ath9k_regd_is_chan_present(ah, c);
576 chan = &ah->ah_channels[pos];
586 chan = &ah->ah_channels[ret];
604 ath9k_regd_japan_check(struct ath_hal *ah, int b, struct regDomain *rd5GHz)
612 regcap = ah->ah_caps.reg_cap;
633 struct ath_hal *ah,
647 struct ath9k_channel *ichans = &ah->ah_channels[0];
662 if (!ath9k_regd_is_ccode_valid(ah, cc)) {
668 if (!ath9k_regd_is_eeprom_valid(ah)) {
674 ah->ah_countryCode = ath9k_regd_get_default_country(ah);
676 if (ah->ah_countryCode == CTRY_DEFAULT) {
677 ah->ah_countryCode = cc & COUNTRY_CODE_MASK;
678 if ((ah->ah_countryCode == CTRY_DEFAULT) &&
679 (ath9k_regd_get_eepromRD(ah) == CTRY_DEFAULT)) {
680 ah->ah_countryCode = CTRY_UNITED_STATES;
685 if (ah->ah_countryCode == CTRY_DEFAULT) {
686 regdmn = ath9k_regd_get_eepromRD(ah);
690 country = ath9k_regd_find_country(ah->ah_countryCode);
695 ah->ah_countryCode));
701 if (((ath9k_regd_get_eepromRD(ah) &
704 if (!isWwrSKU_NoMidband(ah) &&
705 ath9k_regd_is_fcc_midband_supported(ah))
715 if (!ath9k_regd_get_wmode_regdomain(ah, regdmn,
720 ah->ah_countryCode));
723 if (!ath9k_regd_get_wmode_regdomain(ah, regdmn,
728 ah->ah_countryCode));
732 if (!isWwrSKU(ah) && ((rd5GHz.regDmnEnum == FCC1) ||
734 if (ath9k_regd_is_fcc_midband_supported(ah)) {
735 if (!ath9k_regd_get_wmode_regdomain(ah,
741 ah->ah_countryCode));
748 modes_avail = ah->ah_caps.wireless_modes;
750 ath9k_regd_get_wmodes_nreg(ah, country, &rd5GHz, modes_allowed);
759 if (maxchans > ARRAY_SIZE(ah->ah_channels))
760 maxchans = ARRAY_SIZE(ah->ah_channels);
775 if (!ath9k_get_channel_edges(ah, cm->flags, &c_lo, &c_hi)) {
834 if (ath9k_regd_japan_check(ah,
864 if (ath9k_regd_add_channel(ah,
885 if (next > ARRAY_SIZE(ah->ah_channels)) {
889 next, (int)ARRAY_SIZE(ah->ah_channels)));
890 next = ARRAY_SIZE(ah->ah_channels);
898 ah->ah_nchan = next;
905 ah->ah_channels[i].channel,
906 ah->ah_channels[i].channelFlags));
911 ah->ah_countryCode = ah->ah_countryCode;
913 ah->ah_currentRDInUse = (uint16_t)regdmn; /* LINT */
914 ah->ah_currentRD5G = rd5GHz.regDmnEnum;
915 ah->ah_currentRD2G = rd2GHz.regDmnEnum;
917 ah->ah_iso[0] = 0;
918 ah->ah_iso[1] = 0;
920 ah->ah_iso[0] = country->isoName[0];
921 ah->ah_iso[1] = country->isoName[1];
928 ath9k_regd_check_channel(struct ath_hal *ah, const struct ath9k_channel *c)
939 cc = ah->ah_curchan;
949 base = ah->ah_channels;
950 n = ah->ah_nchan;
985 ath9k_regd_get_antenna_allowed(struct ath_hal *ah, struct ath9k_channel *chan)
989 ichan = ath9k_regd_check_channel(ah, chan);
997 ath9k_regd_get_ctl(struct ath_hal *ah, struct ath9k_channel *chan)
1002 if (ah->ah_countryCode == CTRY_DEFAULT && isWwrSKU(ah)) {
1010 ichan = ath9k_regd_check_channel(ah, chan);
1028 ath9k_regd_get_current_country(struct ath_hal *ah,
1031 uint16_t rd = ath9k_regd_get_eepromRD(ah);
1037 ctry->isMultidomain = isWwrSKU(ah);
1039 ctry->countryCode = ah->ah_countryCode;
1040 ctry->regDmnEnum = ah->ah_currentRD;
1041 ctry->regDmn5G = ah->ah_currentRD5G;
1042 ctry->regDmn2G = ah->ah_currentRD2G;
1043 ctry->iso[0] = ah->ah_iso[0];
1044 ctry->iso[1] = ah->ah_iso[1];
1045 ctry->iso[2] = ah->ah_iso[2];