iPXE
ath_regd.c File Reference
#include "regd.h"
#include "regd_common.h"

Go to the source code of this file.

Macros

#define ATH9K_2GHZ_CH01_11   REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
#define ATH9K_2GHZ_CH12_13
#define ATH9K_2GHZ_CH14
#define ATH9K_5GHZ_5150_5350
#define ATH9K_5GHZ_5470_5850
#define ATH9K_5GHZ_5725_5850
#define ATH9K_2GHZ_ALL
#define ATH9K_5GHZ_ALL
#define ATH9K_5GHZ_NO_MIDBAND

Functions

 FILE_SECBOOT (FORBIDDEN)
u32 ath_regd_get_band_ctl (struct ath_regulatory *reg, int band)
 

Macro Definition Documentation

◆ ATH9K_2GHZ_CH01_11

#define ATH9K_2GHZ_CH01_11   REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)

Definition at line 33 of file ath_regd.c.

◆ ATH9K_2GHZ_CH12_13

#define ATH9K_2GHZ_CH12_13
Value:
REG_RULE(2467-10, 2472+10, 40, 0, 20,\
NL80211_RRF_PASSIVE_SCAN)

Definition at line 36 of file ath_regd.c.

36#define ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\
37 NL80211_RRF_PASSIVE_SCAN)

◆ ATH9K_2GHZ_CH14

#define ATH9K_2GHZ_CH14
Value:
REG_RULE(2484-10, 2484+10, 40, 0, 20,\
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_OFDM)

Definition at line 38 of file ath_regd.c.

38#define ATH9K_2GHZ_CH14 REG_RULE(2484-10, 2484+10, 40, 0, 20,\
39 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_OFDM)

◆ ATH9K_5GHZ_5150_5350

#define ATH9K_5GHZ_5150_5350
Value:
REG_RULE(5150-10, 5350+10, 40, 0, 30,\
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)

Definition at line 42 of file ath_regd.c.

42#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 40, 0, 30,\
43 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)

◆ ATH9K_5GHZ_5470_5850

#define ATH9K_5GHZ_5470_5850
Value:
REG_RULE(5470-10, 5850+10, 40, 0, 30,\
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)

Definition at line 44 of file ath_regd.c.

44#define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 40, 0, 30,\
45 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)

◆ ATH9K_5GHZ_5725_5850

#define ATH9K_5GHZ_5725_5850
Value:
REG_RULE(5725-10, 5850+10, 40, 0, 30,\
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)

Definition at line 46 of file ath_regd.c.

46#define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 40, 0, 30,\
47 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)

◆ ATH9K_2GHZ_ALL

#define ATH9K_2GHZ_ALL
Value:
#define ATH9K_2GHZ_CH12_13
Definition ath_regd.c:36
#define ATH9K_2GHZ_CH14
Definition ath_regd.c:38
#define ATH9K_2GHZ_CH01_11
Definition ath_regd.c:33

Definition at line 49 of file ath_regd.c.

49#define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \
50 ATH9K_2GHZ_CH12_13, \
51 ATH9K_2GHZ_CH14

◆ ATH9K_5GHZ_ALL

#define ATH9K_5GHZ_ALL
Value:
#define ATH9K_5GHZ_5470_5850
Definition ath_regd.c:44
#define ATH9K_5GHZ_5150_5350
Definition ath_regd.c:42

Definition at line 53 of file ath_regd.c.

53#define ATH9K_5GHZ_ALL ATH9K_5GHZ_5150_5350, \
54 ATH9K_5GHZ_5470_5850

◆ ATH9K_5GHZ_NO_MIDBAND

#define ATH9K_5GHZ_NO_MIDBAND
Value:

Definition at line 57 of file ath_regd.c.

57#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
58 ATH9K_5GHZ_5725_5850

Function Documentation

◆ FILE_SECBOOT()

FILE_SECBOOT ( FORBIDDEN )

◆ ath_regd_get_band_ctl()

u32 ath_regd_get_band_ctl ( struct ath_regulatory * reg,
int band )

  • Can be used for:* Can be used by 0x63 and 0x65 *‍/* Can be used by 0x64 only *‍/* Can be used by 0x66 and 0x69 *‍/* Can be used by 0x67, 0x68, 0x6A and 0x6C *‍/* Frequency is one where radar detection is required *‍/
  • Allows active scan scan on Ch 12 and 13 *‍/
  • Always apply Radar/DFS rules on freq range 5260 MHz - 5700 MHz *‍/
  • EEPROM country code to regpair mapping *‍/
  • EEPROM rd code to regpair mapping *‍/
  • Returns the map of the EEPROM set RD to a country code *‍/

Definition at line 586 of file ath_regd.c.

588{
589 /* TODO Cottsay: reg */
590// if (!reg->regpair ||
591// (reg->country_code == CTRY_DEFAULT &&
592// is_wwr_sku(ath_regd_get_eepromRD(reg)))) {
593// return SD_NO_CTL;
594// }
595
596 switch (band) {
598 return reg->regpair->reg_2ghz_ctl;
600 return reg->regpair->reg_5ghz_ctl;
601 default:
602 return NO_CTL;
603 }
604}
#define NO_CTL
Definition eeprom.h:69
#define NET80211_BAND_2GHZ
The 2.4 GHz ISM band, unlicensed in most countries.
Definition net80211.h:45
#define NET80211_BAND_5GHZ
The band from 4.9 GHz to 5.7 GHz, which tends to be more restricted.
Definition net80211.h:47
static unsigned int unsigned int reg
Definition myson.h:162

References NET80211_BAND_2GHZ, NET80211_BAND_5GHZ, NO_CTL, reg, and u32.

Referenced by ath9k_regd_get_ctl().