summaryrefslogtreecommitdiff
path: root/sys/dev/ic/pgtreg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/pgtreg.h')
-rw-r--r--sys/dev/ic/pgtreg.h318
1 files changed, 159 insertions, 159 deletions
diff --git a/sys/dev/ic/pgtreg.h b/sys/dev/ic/pgtreg.h
index f7acae28b93..69c0cc3c2ec 100644
--- a/sys/dev/ic/pgtreg.h
+++ b/sys/dev/ic/pgtreg.h
@@ -26,41 +26,41 @@
*/
/* Sizes, delays, etc. */
-#define PFF_TX_LIST_CNT 32
-#define PFF_RX_LIST_CNT 8
-#define PFF_FRAG_SIZE 1536 /* overkill for mgmt frames */
-#define PFF_DIRECT_MEMORY_OFFSET 0x1000
-#define PFF_DIRECT_MEMORY_SIZE 0x1000
-#define PFF_FIRMWARE_INTERNAL_OFFSET 0x20000
-#define PFF_WRITEIO_DELAY 10
-#define PFF_RESET_DELAY 50000
+#define PGT_TX_LIST_CNT 32
+#define PGT_RX_LIST_CNT 8
+#define PGT_FRAG_SIZE 1536 /* overkill for mgmt frames */
+#define PGT_DIRECT_MEMORY_OFFSET 0x1000
+#define PGT_DIRECT_MEMORY_SIZE 0x1000
+#define PGT_FIRMWARE_INTERNAL_OFFSET 0x20000
+#define PGT_WRITEIO_DELAY 10
+#define PGT_RESET_DELAY 50000
/* Registers */
-#define PFF_REG_DEV_INT 0x0000 /* device interrupt */
-#define PFF_DEV_INT_RESET 0x00000001
-#define PFF_DEV_INT_UPDATE 0x00000002
-#define PFF_DEV_INT_WAKEUP 0x00000008
-#define PFF_DEV_INT_SLEEP 0x00000010
-#define PFF_REG_INT_STAT 0x0010 /* interrupt status */
-#define PFF_INT_STAT_UPDATE 0x00000002
-#define PFF_INT_STAT_INIT 0x00000004
-#define PFF_INT_STAT_WAKEUP 0x00000008
-#define PFF_INT_STAT_SLEEP 0x00000010
-#define PFF_INT_STAT_UNKNOWN0 0x00004000
-#define PFF_INT_STAT_UNKNOWN1 0x80000000
-#define PFF_INT_STAT_SOURCES 0x8000401e
-#define PFF_REG_INT_ACK 0x0014 /* interrupt acknowledgement */
-#define PFF_REG_INT_EN 0x0018 /* interrupt enable */
-#define PFF_REG_CTRL_BLK_BASE 0x0020 /* control block address */
-#define PFF_REG_GEN_PURP_COM 0x0024
-#define PFF_REG_DIR_MEM_BASE 0x0030
-#define PFF_REG_CTRL_STAT 0x0078
-#define PFF_CTRL_STAT_SLEEPMODE 0x00000200
-#define PFF_CTRL_STAT_CLOCKRUN 0x00800000
-#define PFF_CTRL_STAT_RESET 0x10000000
-#define PFF_CTRL_STAT_RAMBOOT 0x20000000
-#define PFF_CTRL_STAT_STARTHALTED 0x40000000
-#define PFF_CTRL_STAT_HOST_OVERRIDE 0x80000000
+#define PGT_REG_DEV_INT 0x0000 /* device interrupt */
+#define PGT_DEV_INT_RESET 0x00000001
+#define PGT_DEV_INT_UPDATE 0x00000002
+#define PGT_DEV_INT_WAKEUP 0x00000008
+#define PGT_DEV_INT_SLEEP 0x00000010
+#define PGT_REG_INT_STAT 0x0010 /* interrupt status */
+#define PGT_INT_STAT_UPDATE 0x00000002
+#define PGT_INT_STAT_INIT 0x00000004
+#define PGT_INT_STAT_WAKEUP 0x00000008
+#define PGT_INT_STAT_SLEEP 0x00000010
+#define PGT_INT_STAT_UNKNOWN0 0x00004000
+#define PGT_INT_STAT_UNKNOWN1 0x80000000
+#define PGT_INT_STAT_SOURCES 0x8000401e
+#define PGT_REG_INT_ACK 0x0014 /* interrupt acknowledgement */
+#define PGT_REG_INT_EN 0x0018 /* interrupt enable */
+#define PGT_REG_CTRL_BLK_BASE 0x0020 /* control block address */
+#define PGT_REG_GEN_PURP_COM 0x0024
+#define PGT_REG_DIR_MEM_BASE 0x0030
+#define PGT_REG_CTRL_STAT 0x0078
+#define PGT_CTRL_STAT_SLEEPMODE 0x00000200
+#define PGT_CTRL_STAT_CLOCKRUN 0x00800000
+#define PGT_CTRL_STAT_RESET 0x10000000
+#define PGT_CTRL_STAT_RAMBOOT 0x20000000
+#define PGT_CTRL_STAT_STARTHALTED 0x40000000
+#define PGT_CTRL_STAT_HOST_OVERRIDE 0x80000000
/*
* The control block consists of a set of queues for low- and high-priority
@@ -70,19 +70,19 @@
* queue interface. Almost every structure is little-endian.
*/
enum pgt_queue {
- PFF_QUEUE_DATA_LOW_RX = 0,
- PFF_QUEUE_DATA_LOW_TX = 1,
- PFF_QUEUE_DATA_HIGH_RX = 2,
- PFF_QUEUE_DATA_HIGH_TX = 3,
- PFF_QUEUE_MGMT_RX = 4,
- PFF_QUEUE_MGMT_TX = 5
+ PGT_QUEUE_DATA_LOW_RX = 0,
+ PGT_QUEUE_DATA_LOW_TX = 1,
+ PGT_QUEUE_DATA_HIGH_RX = 2,
+ PGT_QUEUE_DATA_HIGH_TX = 3,
+ PGT_QUEUE_MGMT_RX = 4,
+ PGT_QUEUE_MGMT_TX = 5
};
-#define PFF_QUEUE_COUNT 6
-#define PFF_QUEUE_DATA_RX_SIZE 8
-#define PFF_QUEUE_DATA_TX_SIZE 32
-#define PFF_QUEUE_MGMT_SIZE 4
-#define PFF_QUEUE_FULL_THRESHOLD 8
+#define PGT_QUEUE_COUNT 6
+#define PGT_QUEUE_DATA_RX_SIZE 8
+#define PGT_QUEUE_DATA_TX_SIZE 32
+#define PGT_QUEUE_MGMT_SIZE 4
+#define PGT_QUEUE_FULL_THRESHOLD 8
struct pgt_frag {
uint32_t pf_addr; /* physical host address */
@@ -92,14 +92,14 @@ struct pgt_frag {
};
struct pgt_control_block {
- uint32_t pcb_driver_curfrag[PFF_QUEUE_COUNT];
- uint32_t pcb_device_curfrag[PFF_QUEUE_COUNT];
- struct pgt_frag pcb_data_low_rx[PFF_QUEUE_DATA_RX_SIZE];
- struct pgt_frag pcb_data_low_tx[PFF_QUEUE_DATA_TX_SIZE];
- struct pgt_frag pcb_data_high_rx[PFF_QUEUE_DATA_RX_SIZE];
- struct pgt_frag pcb_data_high_tx[PFF_QUEUE_DATA_TX_SIZE];
- struct pgt_frag pcb_mgmt_rx[PFF_QUEUE_MGMT_SIZE];
- struct pgt_frag pcb_mgmt_tx[PFF_QUEUE_MGMT_SIZE];
+ uint32_t pcb_driver_curfrag[PGT_QUEUE_COUNT];
+ uint32_t pcb_device_curfrag[PGT_QUEUE_COUNT];
+ struct pgt_frag pcb_data_low_rx[PGT_QUEUE_DATA_RX_SIZE];
+ struct pgt_frag pcb_data_low_tx[PGT_QUEUE_DATA_TX_SIZE];
+ struct pgt_frag pcb_data_high_rx[PGT_QUEUE_DATA_RX_SIZE];
+ struct pgt_frag pcb_data_high_tx[PGT_QUEUE_DATA_TX_SIZE];
+ struct pgt_frag pcb_mgmt_rx[PGT_QUEUE_MGMT_SIZE];
+ struct pgt_frag pcb_mgmt_tx[PGT_QUEUE_MGMT_SIZE];
uint32_t pcb_padding;
};
@@ -158,154 +158,154 @@ struct pgt_rx_annex {
* OIDs used to communicate management information.
*/
enum pgt_oid {
- PFF_OID_MAC_ADDRESS = 0x00000000,
+ PGT_OID_MAC_ADDRESS = 0x00000000,
/* uint8_t ether[6]; */
- PFF_OID_LINK_STATE = 0x00000001,
+ PGT_OID_LINK_STATE = 0x00000001,
/* uint32_t rate; (500kbps units) */
- PFF_OID_BSS_TYPE = 0x10000000,
+ PGT_OID_BSS_TYPE = 0x10000000,
/* uint32_t network; */
-#define PFF_BSS_TYPE_NONE 0
-#define PFF_BSS_TYPE_STA 1
-#define PFF_BSS_TYPE_IBSS 2
-#define PFF_BSS_TYPE_ANY 3
- PFF_OID_BSSID = 0x10000001,
+#define PGT_BSS_TYPE_NONE 0
+#define PGT_BSS_TYPE_STA 1
+#define PGT_BSS_TYPE_IBSS 2
+#define PGT_BSS_TYPE_ANY 3
+ PGT_OID_BSSID = 0x10000001,
/* uint8_t bssid[6]; */
- PFF_OID_SSID = 0x10000002,
+ PGT_OID_SSID = 0x10000002,
/* struct pgt_obj_ssid; */
- PFF_OID_COUNTRY = 0x10000005,
+ PGT_OID_COUNTRY = 0x10000005,
/* uint32_t country; guessing until I see some foreign hardware... */
-#define PFF_COUNTRY_USA 0
- PFF_OID_SSID_OVERRIDE = 0x10000006,
+#define PGT_COUNTRY_USA 0
+ PGT_OID_SSID_OVERRIDE = 0x10000006,
/* struct pgt_obj_ssid; */
- PFF_OID_AUTH_MODE = 0x12000000,
+ PGT_OID_AUTH_MODE = 0x12000000,
/* uint32_t auth; */
-#define PFF_AUTH_MODE_NONE 0
-#define PFF_AUTH_MODE_OPEN 1
-#define PFF_AUTH_MODE_SHARED 2
-#define PFF_AUTH_MODE_BOTH 3
- PFF_OID_PRIVACY_INVOKED = 0x12000001,
+#define PGT_AUTH_MODE_NONE 0
+#define PGT_AUTH_MODE_OPEN 1
+#define PGT_AUTH_MODE_SHARED 2
+#define PGT_AUTH_MODE_BOTH 3
+ PGT_OID_PRIVACY_INVOKED = 0x12000001,
/* uint32_t privacy; */
- PFF_OID_EXCLUDE_UNENCRYPTED = 0x12000002,
+ PGT_OID_EXCLUDE_UNENCRYPTED = 0x12000002,
/* uint32_t exunencrypted; */
- PFF_OID_DEFAULT_KEYNUM = 0x12000003,
+ PGT_OID_DEFAULT_KEYNUM = 0x12000003,
/* uint32_t defkey; */
- PFF_OID_DEFAULT_KEY0 = 0x12000004,
+ PGT_OID_DEFAULT_KEY0 = 0x12000004,
/* struct pgt_obj_key; */
- PFF_OID_DEFAULT_KEY1 = 0x12000005,
+ PGT_OID_DEFAULT_KEY1 = 0x12000005,
/* struct pgt_obj_key; */
- PFF_OID_DEFAULT_KEY2 = 0x12000006,
+ PGT_OID_DEFAULT_KEY2 = 0x12000006,
/* struct pgt_obj_key; */
- PFF_OID_DEFAULT_KEY3 = 0x12000007,
+ PGT_OID_DEFAULT_KEY3 = 0x12000007,
/* struct pgt_obj_key; */
- PFF_OID_STA_KEY = 0x12000008,
- PFF_OID_PSM = 0x14000000,
+ PGT_OID_STA_KEY = 0x12000008,
+ PGT_OID_PSM = 0x14000000,
/* uint32_t powersave; */
- PFF_OID_EAPAUTHSTA = 0x150007de,
+ PGT_OID_EAPAUTHSTA = 0x150007de,
/* uint8_t sta[6]; */
- PFF_OID_EAPUNAUTHSTA = 0x150007df,
+ PGT_OID_EAPUNAUTHSTA = 0x150007df,
/* uint8_t sta[6]; */
- PFF_OID_DOT1X = 0x150007e0,
+ PGT_OID_DOT1X = 0x150007e0,
/* uint32_t dot1x; */
-#define PFF_DOT1X_AUTH_NONE 0
-#define PFF_DOT1X_AUTH_ENABLED 1
-#define PFF_DOT1X_KEYTX_ENABLED 2
- PFF_OID_SLOT_TIME = 0x17000000,
+#define PGT_DOT1X_AUTH_NONE 0
+#define PGT_DOT1X_AUTH_ENABLED 1
+#define PGT_DOT1X_KEYTX_ENABLED 2
+ PGT_OID_SLOT_TIME = 0x17000000,
/* uint32_t slottime; */
- PFF_OID_CHANNEL = 0x17000007,
+ PGT_OID_CHANNEL = 0x17000007,
/* uint32_t channel; */
- PFF_OID_PREAMBLE_MODE = 0x17000009,
+ PGT_OID_PREAMBLE_MODE = 0x17000009,
/* uint32_t preamble; */
-#define PFF_OID_PREAMBLE_MODE_LONG 0
-#define PFF_OID_PREAMBLE_MODE_SHORT 1
-#define PFF_OID_PREAMBLE_MODE_DYNAMIC 2
- PFF_OID_RATES = 0x1700000a,
+#define PGT_OID_PREAMBLE_MODE_LONG 0
+#define PGT_OID_PREAMBLE_MODE_SHORT 1
+#define PGT_OID_PREAMBLE_MODE_DYNAMIC 2
+ PGT_OID_RATES = 0x1700000a,
/* uint8_t rates[]; nul terminated */
- PFF_OID_RSSI_VECTOR = 0x1700000d,
- PFF_OID_OUTPUT_POWER_TABLE = 0x1700000e,
- PFF_OID_OUTPUT_POWER = 0x1700000f,
- PFF_OID_SUPPORTED_RATES = 0x17000010,
+ PGT_OID_RSSI_VECTOR = 0x1700000d,
+ PGT_OID_OUTPUT_POWER_TABLE = 0x1700000e,
+ PGT_OID_OUTPUT_POWER = 0x1700000f,
+ PGT_OID_SUPPORTED_RATES = 0x17000010,
/* uint8_t rates[]; nul terminated */
- PFF_OID_NOISE_FLOOR = 0x17000013,
+ PGT_OID_NOISE_FLOOR = 0x17000013,
/* uint32_t noise; */
- PFF_OID_SLOT_MODE = 0x17000017,
+ PGT_OID_SLOT_MODE = 0x17000017,
/* uint32_t slot; */
-#define PFF_OID_SLOT_MODE_LONG 0
-#define PFF_OID_SLOT_MODE_SHORT 1
-#define PFF_OID_SLOT_MODE_DYNAMIC 2
- PFF_OID_EXTENDED_RATES = 0x17000020,
+#define PGT_OID_SLOT_MODE_LONG 0
+#define PGT_OID_SLOT_MODE_SHORT 1
+#define PGT_OID_SLOT_MODE_DYNAMIC 2
+ PGT_OID_EXTENDED_RATES = 0x17000020,
/* uint8_t rates[]; nul terminated */
- PFF_OID_FREQUENCY = 0x17000011,
+ PGT_OID_FREQUENCY = 0x17000011,
/* uint32_t frequency; */
- PFF_OID_SUPPORTED_FREQUENCIES = 0x17000012,
+ PGT_OID_SUPPORTED_FREQUENCIES = 0x17000012,
/* struct pgt_obj_freq; */
- PFF_OID_PROFILE = 0x17000019,
+ PGT_OID_PROFILE = 0x17000019,
/* uint32_t profile; */
-#define PFF_PROFILE_B_ONLY 0
-#define PFF_PROFILE_MIXED_G_WIFI 1
-#define PFF_PROFILE_MIXED_LONG 2
-#define PFF_PROFILE_G_ONLY 3
-#define PFF_PROFILE_TEST 4
-#define PFF_PROFILE_B_WIFI 5
-#define PFF_PROFILE_A_ONLY 6
-#define PFF_PROFILE_MIXED_SHORT 7
- PFF_OID_DEAUTHENTICATE = 0x18000000,
+#define PGT_PROFILE_B_ONLY 0
+#define PGT_PROFILE_MIXED_G_WIFI 1
+#define PGT_PROFILE_MIXED_LONG 2
+#define PGT_PROFILE_G_ONLY 3
+#define PGT_PROFILE_TEST 4
+#define PGT_PROFILE_B_WIFI 5
+#define PGT_PROFILE_A_ONLY 6
+#define PGT_PROFILE_MIXED_SHORT 7
+ PGT_OID_DEAUTHENTICATE = 0x18000000,
/* struct pgt_obj_mlme; */
- PFF_OID_AUTHENTICATE = 0x18000001,
+ PGT_OID_AUTHENTICATE = 0x18000001,
/* struct pgt_obj_mlme; */
- PFF_OID_DISASSOCIATE = 0x18000002,
+ PGT_OID_DISASSOCIATE = 0x18000002,
/* struct pgt_obj_mlme; */
- PFF_OID_ASSOCIATE = 0x18000003,
+ PGT_OID_ASSOCIATE = 0x18000003,
/* struct pgt_obj_mlme; */
- PFF_OID_SCAN = 0x18000004,
- PFF_OID_BEACON = 0x18000005,
+ PGT_OID_SCAN = 0x18000004,
+ PGT_OID_BEACON = 0x18000005,
/* struct pgt_obj_mlmeex; */
- PFF_OID_PROBE = 0x18000006,
+ PGT_OID_PROBE = 0x18000006,
/* struct pgt_obj_mlmeex; */
- PFF_OID_DEAUTHENTICATEEX = 0x18000007,
+ PGT_OID_DEAUTHENTICATEEX = 0x18000007,
/* struct pgt_obj_mlmeex; */
- PFF_OID_AUTHENTICATEEX = 0x18000008,
+ PGT_OID_AUTHENTICATEEX = 0x18000008,
/* struct pgt_obj_mlmeex; */
- PFF_OID_DISASSOCIATEEX = 0x18000009,
+ PGT_OID_DISASSOCIATEEX = 0x18000009,
/* struct pgt_obj_mlmeex; */
- PFF_OID_ASSOCIATEEX = 0x1800000a,
+ PGT_OID_ASSOCIATEEX = 0x1800000a,
/* struct pgt_obj_mlmeex; */
- PFF_OID_REASSOCIATE = 0x1800000b,
+ PGT_OID_REASSOCIATE = 0x1800000b,
/* struct pgt_obj_mlmeex; */
- PFF_OID_REASSOCIATEEX = 0x1800000c,
+ PGT_OID_REASSOCIATEEX = 0x1800000c,
/* struct pgt_obj_mlmeex; */
- PFF_OID_MLME_AUTO_LEVEL = 0x19000001,
+ PGT_OID_MLME_AUTO_LEVEL = 0x19000001,
/* uint32_t mlme; */
-#define PFF_MLME_AUTO_LEVEL_AUTO 0
-#define PFF_MLME_AUTO_LEVEL_INTERMEDIATE 1
-#define PFF_MLME_AUTO_LEVEL_EXTENDED 2
+#define PGT_MLME_AUTO_LEVEL_AUTO 0
+#define PGT_MLME_AUTO_LEVEL_INTERMEDIATE 1
+#define PGT_MLME_AUTO_LEVEL_EXTENDED 2
/* struct pgt_obj_buffer;*/
- PFF_OID_PSM_BUFFER = 0x19000004,
+ PGT_OID_PSM_BUFFER = 0x19000004,
/* struct pgt_obj_buffer;*/
-#define PFF_PSM_BUFFER_FRAME_COUNT 64
- PFF_OID_MAX_FRAME_BURST = 0x1b000008,
+#define PGT_PSM_BUFFER_FRAME_COUNT 64
+ PGT_OID_MAX_FRAME_BURST = 0x1b000008,
/* uint32_t max_usec_grouped; */
- PFF_OID_BSS_FIND = 0x1c000042,
+ PGT_OID_BSS_FIND = 0x1c000042,
/* struct pgt_obj_bss; */
- PFF_OID_BSS_LIST = 0x1c000043,
+ PGT_OID_BSS_LIST = 0x1c000043,
/* struct pgt_obj_bsslist; */
/* Initial settings. */
- PFF_OID_MODE = 0xff020003,
+ PGT_OID_MODE = 0xff020003,
/* uint32_t mode; */
-#define PFF_MODE_PROMISCUOUS 0
-#define PFF_MODE_CLIENT 1
-#define PFF_MODE_AP 2
-#define PFF_MODE_SNIFFER 3
- PFF_OID_CONFIG = 0xff020008,
+#define PGT_MODE_PROMISCUOUS 0
+#define PGT_MODE_CLIENT 1
+#define PGT_MODE_AP 2
+#define PGT_MODE_SNIFFER 3
+ PGT_OID_CONFIG = 0xff020008,
/* uint32_t flags; */
-#define PFF_CONFIG_MANUAL_RUN 0x00000001
-#define PFF_CONFIG_FRAME_TRAP 0x00000002
-#define PFF_CONFIG_RX_ANNEX 0x00000004
-#define PFF_CONFIG_TX_ANNEX 0x00000008
-#define PFF_CONFIG_WDS 0x00000010
- PFF_OID_PHY = 0xff02000d,
-#define PFF_OID_PHY_2400MHZ 0x00000001
-#define PFF_OID_PHY_5000MHZ 0x00000002
-#define PFF_OID_PHY_FAA 0x80000000
+#define PGT_CONFIG_MANUAL_RUN 0x00000001
+#define PGT_CONFIG_FRAME_TRAP 0x00000002
+#define PGT_CONFIG_RX_ANNEX 0x00000004
+#define PGT_CONFIG_TX_ANNEX 0x00000008
+#define PGT_CONFIG_WDS 0x00000010
+ PGT_OID_PHY = 0xff02000d,
+#define PGT_OID_PHY_2400MHZ 0x00000001
+#define PGT_OID_PHY_5000MHZ 0x00000002
+#define PGT_OID_PHY_FAA 0x80000000
};
/*
@@ -318,8 +318,8 @@ struct pgt_obj_ssid {
struct pgt_obj_key {
uint8_t pok_type;
-#define PFF_OBJ_KEY_TYPE_WEP 0
-#define PFF_OBJ_KEY_TYPE_TKIP 1
+#define PGT_OBJ_KEY_TYPE_WEP 0
+#define PGT_OBJ_KEY_TYPE_TKIP 1
uint8_t pok_length;
uint8_t pok_key[32];
} __attribute__((packed));
@@ -327,14 +327,14 @@ struct pgt_obj_key {
/*
* Each mlme received includes the current 802.11 state.
*/
-#define PFF_MLME_STATE_NONE 0
-#define PFF_MLME_STATE_AUTHING 1
-#define PFF_MLME_STATE_AUTH 2
-#define PFF_MLME_STATE_ASSOCING 3
+#define PGT_MLME_STATE_NONE 0
+#define PGT_MLME_STATE_AUTHING 1
+#define PGT_MLME_STATE_AUTH 2
+#define PGT_MLME_STATE_ASSOCING 3
-#define PFF_MLME_STATE_ASSOC 5
-#define PFF_MLME_STATE_IBSS 6
-#define PFF_MLME_STATE_WDS 7
+#define PGT_MLME_STATE_ASSOC 5
+#define PGT_MLME_STATE_IBSS 6
+#define PGT_MLME_STATE_WDS 7
struct pgt_obj_mlme {
uint8_t pom_address[6];
@@ -378,7 +378,7 @@ struct pgt_obj_bss {
struct pgt_obj_bsslist {
uint32_t pob_count;
struct pgt_obj_bss pob_bsslist[0];
-#define PFF_OBJ_BSSLIST_NBSS 24
+#define PGT_OBJ_BSSLIST_NBSS 24
} __attribute__((packed));
struct pgt_obj_frequencies {