102ac6454SAndrew Thompson /* $OpenBSD: if_zydreg.h,v 1.19 2006/11/30 19:28:07 damien Exp $ */ 202ac6454SAndrew Thompson /* $NetBSD: if_zydreg.h,v 1.2 2007/06/16 11:18:45 kiyohara Exp $ */ 302ac6454SAndrew Thompson 402ac6454SAndrew Thompson /*- 502ac6454SAndrew Thompson * Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr> 602ac6454SAndrew Thompson * Copyright (c) 2006 by Florian Stoehr <ich@florian-stoehr.de> 702ac6454SAndrew Thompson * 802ac6454SAndrew Thompson * Permission to use, copy, modify, and distribute this software for any 902ac6454SAndrew Thompson * purpose with or without fee is hereby granted, provided that the above 1002ac6454SAndrew Thompson * copyright notice and this permission notice appear in all copies. 1102ac6454SAndrew Thompson * 1202ac6454SAndrew Thompson * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1302ac6454SAndrew Thompson * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1402ac6454SAndrew Thompson * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1502ac6454SAndrew Thompson * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1602ac6454SAndrew Thompson * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1702ac6454SAndrew Thompson * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1802ac6454SAndrew Thompson * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1902ac6454SAndrew Thompson */ 2002ac6454SAndrew Thompson 2102ac6454SAndrew Thompson /* 2202ac6454SAndrew Thompson * ZyDAS ZD1211/ZD1211B USB WLAN driver. 2302ac6454SAndrew Thompson */ 2402ac6454SAndrew Thompson 2502ac6454SAndrew Thompson #define ZYD_CR_GPI_EN 0x9418 2602ac6454SAndrew Thompson #define ZYD_CR_RADIO_PD 0x942c 2702ac6454SAndrew Thompson #define ZYD_CR_RF2948_PD 0x942c 2802ac6454SAndrew Thompson #define ZYD_CR_EN_PS_MANUAL_AGC 0x943c 2902ac6454SAndrew Thompson #define ZYD_CR_CONFIG_PHILIPS 0x9440 3002ac6454SAndrew Thompson #define ZYD_CR_I2C_WRITE 0x9444 3102ac6454SAndrew Thompson #define ZYD_CR_SA2400_SER_RP 0x9448 3202ac6454SAndrew Thompson #define ZYD_CR_RADIO_PE 0x9458 3302ac6454SAndrew Thompson #define ZYD_CR_RST_BUS_MASTER 0x945c 3402ac6454SAndrew Thompson #define ZYD_CR_RFCFG 0x9464 3502ac6454SAndrew Thompson #define ZYD_CR_HSTSCHG 0x946c 3602ac6454SAndrew Thompson #define ZYD_CR_PHY_ON 0x9474 3702ac6454SAndrew Thompson #define ZYD_CR_RX_DELAY 0x9478 3802ac6454SAndrew Thompson #define ZYD_CR_RX_PE_DELAY 0x947c 3902ac6454SAndrew Thompson #define ZYD_CR_GPIO_1 0x9490 4002ac6454SAndrew Thompson #define ZYD_CR_GPIO_2 0x9494 4102ac6454SAndrew Thompson #define ZYD_CR_EnZYD_CRyBufMux 0x94a8 4202ac6454SAndrew Thompson #define ZYD_CR_PS_CTRL 0x9500 4302ac6454SAndrew Thompson #define ZYD_CR_ADDA_PWR_DWN 0x9504 4402ac6454SAndrew Thompson #define ZYD_CR_ADDA_MBIAS_WT 0x9508 4502ac6454SAndrew Thompson #define ZYD_CR_INTERRUPT 0x9510 4602ac6454SAndrew Thompson #define ZYD_CR_MAC_PS_STATE 0x950c 4702ac6454SAndrew Thompson #define ZYD_CR_ATIM_WND_PERIOD 0x951c 4802ac6454SAndrew Thompson #define ZYD_CR_BCN_INTERVAL 0x9520 4902ac6454SAndrew Thompson #define ZYD_CR_PRE_TBTT 0x9524 5002ac6454SAndrew Thompson 5102ac6454SAndrew Thompson /* 5202ac6454SAndrew Thompson * MAC registers. 5302ac6454SAndrew Thompson */ 5402ac6454SAndrew Thompson #define ZYD_MAC_MACADRL 0x9610 /* MAC address (low) */ 5502ac6454SAndrew Thompson #define ZYD_MAC_MACADRH 0x9614 /* MAC address (high) */ 5602ac6454SAndrew Thompson #define ZYD_MAC_BSSADRL 0x9618 /* BSS address (low) */ 5702ac6454SAndrew Thompson #define ZYD_MAC_BSSADRH 0x961c /* BSS address (high) */ 5802ac6454SAndrew Thompson #define ZYD_MAC_BCNCFG 0x9620 /* BCN configuration */ 5902ac6454SAndrew Thompson #define ZYD_MAC_GHTBL 0x9624 /* Group hash table (low) */ 6002ac6454SAndrew Thompson #define ZYD_MAC_GHTBH 0x9628 /* Group hash table (high) */ 6102ac6454SAndrew Thompson #define ZYD_MAC_RX_TIMEOUT 0x962c /* Rx timeout value */ 6202ac6454SAndrew Thompson #define ZYD_MAC_BAS_RATE 0x9630 /* Basic rate setting */ 6302ac6454SAndrew Thompson #define ZYD_MAC_MAN_RATE 0x9634 /* Mandatory rate setting */ 6402ac6454SAndrew Thompson #define ZYD_MAC_RTSCTSRATE 0x9638 /* RTS CTS rate */ 6502ac6454SAndrew Thompson #define ZYD_MAC_BACKOFF_PROTECT 0x963c /* Backoff protection */ 6602ac6454SAndrew Thompson #define ZYD_MAC_RX_THRESHOLD 0x9640 /* Rx threshold */ 6702ac6454SAndrew Thompson #define ZYD_MAC_TX_PE_CONTROL 0x9644 /* Tx_PE control */ 6802ac6454SAndrew Thompson #define ZYD_MAC_AFTER_PNP 0x9648 /* After PnP */ 6902ac6454SAndrew Thompson #define ZYD_MAC_RX_PE_DELAY 0x964c /* Rx_pe delay */ 7002ac6454SAndrew Thompson #define ZYD_MAC_RX_ADDR2_L 0x9650 /* RX address2 (low) */ 7102ac6454SAndrew Thompson #define ZYD_MAC_RX_ADDR2_H 0x9654 /* RX address2 (high) */ 7202ac6454SAndrew Thompson #define ZYD_MAC_SIFS_ACK_TIME 0x9658 /* Dynamic SIFS ack time */ 7302ac6454SAndrew Thompson #define ZYD_MAC_PHY_DELAY 0x9660 /* PHY delay */ 7402ac6454SAndrew Thompson #define ZYD_MAC_PHY_DELAY2 0x966c /* PHY delay */ 7502ac6454SAndrew Thompson #define ZYD_MAC_BCNFIFO 0x9670 /* Beacon FIFO I/O port */ 7602ac6454SAndrew Thompson #define ZYD_MAC_SNIFFER 0x9674 /* Sniffer on/off */ 7702ac6454SAndrew Thompson #define ZYD_MAC_ENCRYPTION_TYPE 0x9678 /* Encryption type */ 7802ac6454SAndrew Thompson #define ZYD_MAC_RETRY 0x967c /* Retry time */ 7902ac6454SAndrew Thompson #define ZYD_MAC_MISC 0x9680 /* Misc */ 8002ac6454SAndrew Thompson #define ZYD_MAC_STMACHINESTAT 0x9684 /* State machine status */ 8102ac6454SAndrew Thompson #define ZYD_MAC_TX_UNDERRUN_CNT 0x9688 /* TX underrun counter */ 8202ac6454SAndrew Thompson #define ZYD_MAC_RXFILTER 0x968c /* Send to host settings */ 8302ac6454SAndrew Thompson #define ZYD_MAC_ACK_EXT 0x9690 /* Acknowledge extension */ 8402ac6454SAndrew Thompson #define ZYD_MAC_BCNFIFOST 0x9694 /* BCN FIFO set and status */ 8502ac6454SAndrew Thompson #define ZYD_MAC_DIFS_EIFS_SIFS 0x9698 /* DIFS, EIFS & SIFS settings */ 8602ac6454SAndrew Thompson #define ZYD_MAC_RX_TIMEOUT_CNT 0x969c /* RX timeout count */ 8702ac6454SAndrew Thompson #define ZYD_MAC_RX_TOTAL_FRAME 0x96a0 /* RX total frame count */ 8802ac6454SAndrew Thompson #define ZYD_MAC_RX_CRC32_CNT 0x96a4 /* RX CRC32 frame count */ 8902ac6454SAndrew Thompson #define ZYD_MAC_RX_CRC16_CNT 0x96a8 /* RX CRC16 frame count */ 9002ac6454SAndrew Thompson #define ZYD_MAC_RX_UDEC 0x96ac /* RX unicast decr. error count */ 9102ac6454SAndrew Thompson #define ZYD_MAC_RX_OVERRUN_CNT 0x96b0 /* RX FIFO overrun count */ 9202ac6454SAndrew Thompson #define ZYD_MAC_RX_MDEC 0x96bc /* RX multicast decr. err. cnt. */ 9302ac6454SAndrew Thompson #define ZYD_MAC_NAV_TCR 0x96c4 /* NAV timer count read */ 9402ac6454SAndrew Thompson #define ZYD_MAC_BACKOFF_ST_RD 0x96c8 /* Backoff status read */ 9502ac6454SAndrew Thompson #define ZYD_MAC_DM_RETRY_CNT_RD 0x96cc /* DM retry count read */ 9602ac6454SAndrew Thompson #define ZYD_MAC_RX_ACR 0x96d0 /* RX arbitration count read */ 9702ac6454SAndrew Thompson #define ZYD_MAC_TX_CCR 0x96d4 /* Tx complete count read */ 9802ac6454SAndrew Thompson #define ZYD_MAC_TCB_ADDR 0x96e8 /* Current PCI process TCP addr */ 9902ac6454SAndrew Thompson #define ZYD_MAC_RCB_ADDR 0x96ec /* Next RCB address */ 10002ac6454SAndrew Thompson #define ZYD_MAC_CONT_WIN_LIMIT 0x96f0 /* Contention window limit */ 10102ac6454SAndrew Thompson #define ZYD_MAC_TX_PKT 0x96f4 /* Tx total packet count read */ 10202ac6454SAndrew Thompson #define ZYD_MAC_DL_CTRL 0x96f8 /* Download control */ 10302ac6454SAndrew Thompson #define ZYD_MAC_CAM_MODE 0x9700 /* CAM: Continuous Access Mode */ 10402ac6454SAndrew Thompson #define ZYD_MACB_TXPWR_CTL1 0x9b00 10502ac6454SAndrew Thompson #define ZYD_MACB_TXPWR_CTL2 0x9b04 10602ac6454SAndrew Thompson #define ZYD_MACB_TXPWR_CTL3 0x9b08 10702ac6454SAndrew Thompson #define ZYD_MACB_TXPWR_CTL4 0x9b0c 10802ac6454SAndrew Thompson #define ZYD_MACB_AIFS_CTL1 0x9b10 10902ac6454SAndrew Thompson #define ZYD_MACB_AIFS_CTL2 0x9b14 11002ac6454SAndrew Thompson #define ZYD_MACB_TXOP 0x9b20 11102ac6454SAndrew Thompson #define ZYD_MACB_MAX_RETRY 0x9b28 11202ac6454SAndrew Thompson 11302ac6454SAndrew Thompson /* 114f0d0985eSGabor Kovesdan * Miscellaneous registers. 11502ac6454SAndrew Thompson */ 11602ac6454SAndrew Thompson #define ZYD_FIRMWARE_START_ADDR 0xee00 11702ac6454SAndrew Thompson #define ZYD_FIRMWARE_BASE_ADDR 0xee1d /* Firmware base address */ 11802ac6454SAndrew Thompson 11902ac6454SAndrew Thompson /* 12002ac6454SAndrew Thompson * EEPROM registers. 12102ac6454SAndrew Thompson */ 12202ac6454SAndrew Thompson #define ZYD_EEPROM_START_HEAD 0xf800 /* EEPROM start */ 12302ac6454SAndrew Thompson #define ZYD_EEPROM_SUBID 0xf817 12402ac6454SAndrew Thompson #define ZYD_EEPROM_POD 0xf819 12502ac6454SAndrew Thompson #define ZYD_EEPROM_MAC_ADDR_P1 0xf81b /* Part 1 of the MAC address */ 12602ac6454SAndrew Thompson #define ZYD_EEPROM_MAC_ADDR_P2 0xf81d /* Part 2 of the MAC address */ 12702ac6454SAndrew Thompson #define ZYD_EEPROM_PWR_CAL 0xf81f /* Calibration */ 12802ac6454SAndrew Thompson #define ZYD_EEPROM_PWR_INT 0xf827 /* Calibration */ 12902ac6454SAndrew Thompson #define ZYD_EEPROM_ALLOWEDCHAN 0xf82f /* Allowed CH mask, 1 bit each */ 13002ac6454SAndrew Thompson #define ZYD_EEPROM_DEVICE_VER 0xf837 /* Device version */ 13102ac6454SAndrew Thompson #define ZYD_EEPROM_PHY_REG 0xf83c /* PHY registers */ 13202ac6454SAndrew Thompson #define ZYD_EEPROM_36M_CAL 0xf83f /* Calibration */ 13302ac6454SAndrew Thompson #define ZYD_EEPROM_11A_INT 0xf847 /* Interpolation */ 13402ac6454SAndrew Thompson #define ZYD_EEPROM_48M_CAL 0xf84f /* Calibration */ 13502ac6454SAndrew Thompson #define ZYD_EEPROM_48M_INT 0xf857 /* Interpolation */ 13602ac6454SAndrew Thompson #define ZYD_EEPROM_54M_CAL 0xf85f /* Calibration */ 13702ac6454SAndrew Thompson #define ZYD_EEPROM_54M_INT 0xf867 /* Interpolation */ 13802ac6454SAndrew Thompson 13902ac6454SAndrew Thompson /* 14002ac6454SAndrew Thompson * Firmware registers offsets (relative to fwbase). 14102ac6454SAndrew Thompson */ 14202ac6454SAndrew Thompson #define ZYD_FW_FIRMWARE_REV 0x0000 /* Firmware version */ 14302ac6454SAndrew Thompson #define ZYD_FW_USB_SPEED 0x0001 /* USB speed (!=0 if highspeed) */ 14402ac6454SAndrew Thompson #define ZYD_FW_FIX_TX_RATE 0x0002 /* Fixed TX rate */ 14502ac6454SAndrew Thompson #define ZYD_FW_LINK_STATUS 0x0003 14602ac6454SAndrew Thompson #define ZYD_FW_SOFT_RESET 0x0004 14702ac6454SAndrew Thompson #define ZYD_FW_FLASH_CHK 0x0005 14802ac6454SAndrew Thompson 14902ac6454SAndrew Thompson /* possible flags for register ZYD_FW_LINK_STATUS */ 15002ac6454SAndrew Thompson #define ZYD_LED1 (1 << 8) 15102ac6454SAndrew Thompson #define ZYD_LED2 (1 << 9) 15202ac6454SAndrew Thompson 15302ac6454SAndrew Thompson /* 15402ac6454SAndrew Thompson * RF IDs. 15502ac6454SAndrew Thompson */ 15602ac6454SAndrew Thompson #define ZYD_RF_UW2451 0x2 /* not supported yet */ 15702ac6454SAndrew Thompson #define ZYD_RF_UCHIP 0x3 /* not supported yet */ 15802ac6454SAndrew Thompson #define ZYD_RF_AL2230 0x4 15902ac6454SAndrew Thompson #define ZYD_RF_AL7230B 0x5 16002ac6454SAndrew Thompson #define ZYD_RF_THETA 0x6 /* not supported yet */ 16102ac6454SAndrew Thompson #define ZYD_RF_AL2210 0x7 16202ac6454SAndrew Thompson #define ZYD_RF_MAXIM_NEW 0x8 16302ac6454SAndrew Thompson #define ZYD_RF_GCT 0x9 16402ac6454SAndrew Thompson #define ZYD_RF_AL2230S 0xa /* not supported yet */ 16502ac6454SAndrew Thompson #define ZYD_RF_RALINK 0xb /* not supported yet */ 16602ac6454SAndrew Thompson #define ZYD_RF_INTERSIL 0xc /* not supported yet */ 16702ac6454SAndrew Thompson #define ZYD_RF_RFMD 0xd 16802ac6454SAndrew Thompson #define ZYD_RF_MAXIM_NEW2 0xe 16902ac6454SAndrew Thompson #define ZYD_RF_PHILIPS 0xf /* not supported yet */ 17002ac6454SAndrew Thompson 17102ac6454SAndrew Thompson /* 17202ac6454SAndrew Thompson * PHY registers (8 bits, not documented). 17302ac6454SAndrew Thompson */ 17402ac6454SAndrew Thompson #define ZYD_CR0 0x9000 17502ac6454SAndrew Thompson #define ZYD_CR1 0x9004 17602ac6454SAndrew Thompson #define ZYD_CR2 0x9008 17702ac6454SAndrew Thompson #define ZYD_CR3 0x900c 17802ac6454SAndrew Thompson #define ZYD_CR5 0x9010 17902ac6454SAndrew Thompson #define ZYD_CR6 0x9014 18002ac6454SAndrew Thompson #define ZYD_CR7 0x9018 18102ac6454SAndrew Thompson #define ZYD_CR8 0x901c 18202ac6454SAndrew Thompson #define ZYD_CR4 0x9020 18302ac6454SAndrew Thompson #define ZYD_CR9 0x9024 18402ac6454SAndrew Thompson #define ZYD_CR10 0x9028 18502ac6454SAndrew Thompson #define ZYD_CR11 0x902c 18602ac6454SAndrew Thompson #define ZYD_CR12 0x9030 18702ac6454SAndrew Thompson #define ZYD_CR13 0x9034 18802ac6454SAndrew Thompson #define ZYD_CR14 0x9038 18902ac6454SAndrew Thompson #define ZYD_CR15 0x903c 19002ac6454SAndrew Thompson #define ZYD_CR16 0x9040 19102ac6454SAndrew Thompson #define ZYD_CR17 0x9044 19202ac6454SAndrew Thompson #define ZYD_CR18 0x9048 19302ac6454SAndrew Thompson #define ZYD_CR19 0x904c 19402ac6454SAndrew Thompson #define ZYD_CR20 0x9050 19502ac6454SAndrew Thompson #define ZYD_CR21 0x9054 19602ac6454SAndrew Thompson #define ZYD_CR22 0x9058 19702ac6454SAndrew Thompson #define ZYD_CR23 0x905c 19802ac6454SAndrew Thompson #define ZYD_CR24 0x9060 19902ac6454SAndrew Thompson #define ZYD_CR25 0x9064 20002ac6454SAndrew Thompson #define ZYD_CR26 0x9068 20102ac6454SAndrew Thompson #define ZYD_CR27 0x906c 20202ac6454SAndrew Thompson #define ZYD_CR28 0x9070 20302ac6454SAndrew Thompson #define ZYD_CR29 0x9074 20402ac6454SAndrew Thompson #define ZYD_CR30 0x9078 20502ac6454SAndrew Thompson #define ZYD_CR31 0x907c 20602ac6454SAndrew Thompson #define ZYD_CR32 0x9080 20702ac6454SAndrew Thompson #define ZYD_CR33 0x9084 20802ac6454SAndrew Thompson #define ZYD_CR34 0x9088 20902ac6454SAndrew Thompson #define ZYD_CR35 0x908c 21002ac6454SAndrew Thompson #define ZYD_CR36 0x9090 21102ac6454SAndrew Thompson #define ZYD_CR37 0x9094 21202ac6454SAndrew Thompson #define ZYD_CR38 0x9098 21302ac6454SAndrew Thompson #define ZYD_CR39 0x909c 21402ac6454SAndrew Thompson #define ZYD_CR40 0x90a0 21502ac6454SAndrew Thompson #define ZYD_CR41 0x90a4 21602ac6454SAndrew Thompson #define ZYD_CR42 0x90a8 21702ac6454SAndrew Thompson #define ZYD_CR43 0x90ac 21802ac6454SAndrew Thompson #define ZYD_CR44 0x90b0 21902ac6454SAndrew Thompson #define ZYD_CR45 0x90b4 22002ac6454SAndrew Thompson #define ZYD_CR46 0x90b8 22102ac6454SAndrew Thompson #define ZYD_CR47 0x90bc 22202ac6454SAndrew Thompson #define ZYD_CR48 0x90c0 22302ac6454SAndrew Thompson #define ZYD_CR49 0x90c4 22402ac6454SAndrew Thompson #define ZYD_CR50 0x90c8 22502ac6454SAndrew Thompson #define ZYD_CR51 0x90cc 22602ac6454SAndrew Thompson #define ZYD_CR52 0x90d0 22702ac6454SAndrew Thompson #define ZYD_CR53 0x90d4 22802ac6454SAndrew Thompson #define ZYD_CR54 0x90d8 22902ac6454SAndrew Thompson #define ZYD_CR55 0x90dc 23002ac6454SAndrew Thompson #define ZYD_CR56 0x90e0 23102ac6454SAndrew Thompson #define ZYD_CR57 0x90e4 23202ac6454SAndrew Thompson #define ZYD_CR58 0x90e8 23302ac6454SAndrew Thompson #define ZYD_CR59 0x90ec 23402ac6454SAndrew Thompson #define ZYD_CR60 0x90f0 23502ac6454SAndrew Thompson #define ZYD_CR61 0x90f4 23602ac6454SAndrew Thompson #define ZYD_CR62 0x90f8 23702ac6454SAndrew Thompson #define ZYD_CR63 0x90fc 23802ac6454SAndrew Thompson #define ZYD_CR64 0x9100 23902ac6454SAndrew Thompson #define ZYD_CR65 0x9104 24002ac6454SAndrew Thompson #define ZYD_CR66 0x9108 24102ac6454SAndrew Thompson #define ZYD_CR67 0x910c 24202ac6454SAndrew Thompson #define ZYD_CR68 0x9110 24302ac6454SAndrew Thompson #define ZYD_CR69 0x9114 24402ac6454SAndrew Thompson #define ZYD_CR70 0x9118 24502ac6454SAndrew Thompson #define ZYD_CR71 0x911c 24602ac6454SAndrew Thompson #define ZYD_CR72 0x9120 24702ac6454SAndrew Thompson #define ZYD_CR73 0x9124 24802ac6454SAndrew Thompson #define ZYD_CR74 0x9128 24902ac6454SAndrew Thompson #define ZYD_CR75 0x912c 25002ac6454SAndrew Thompson #define ZYD_CR76 0x9130 25102ac6454SAndrew Thompson #define ZYD_CR77 0x9134 25202ac6454SAndrew Thompson #define ZYD_CR78 0x9138 25302ac6454SAndrew Thompson #define ZYD_CR79 0x913c 25402ac6454SAndrew Thompson #define ZYD_CR80 0x9140 25502ac6454SAndrew Thompson #define ZYD_CR81 0x9144 25602ac6454SAndrew Thompson #define ZYD_CR82 0x9148 25702ac6454SAndrew Thompson #define ZYD_CR83 0x914c 25802ac6454SAndrew Thompson #define ZYD_CR84 0x9150 25902ac6454SAndrew Thompson #define ZYD_CR85 0x9154 26002ac6454SAndrew Thompson #define ZYD_CR86 0x9158 26102ac6454SAndrew Thompson #define ZYD_CR87 0x915c 26202ac6454SAndrew Thompson #define ZYD_CR88 0x9160 26302ac6454SAndrew Thompson #define ZYD_CR89 0x9164 26402ac6454SAndrew Thompson #define ZYD_CR90 0x9168 26502ac6454SAndrew Thompson #define ZYD_CR91 0x916c 26602ac6454SAndrew Thompson #define ZYD_CR92 0x9170 26702ac6454SAndrew Thompson #define ZYD_CR93 0x9174 26802ac6454SAndrew Thompson #define ZYD_CR94 0x9178 26902ac6454SAndrew Thompson #define ZYD_CR95 0x917c 27002ac6454SAndrew Thompson #define ZYD_CR96 0x9180 27102ac6454SAndrew Thompson #define ZYD_CR97 0x9184 27202ac6454SAndrew Thompson #define ZYD_CR98 0x9188 27302ac6454SAndrew Thompson #define ZYD_CR99 0x918c 27402ac6454SAndrew Thompson #define ZYD_CR100 0x9190 27502ac6454SAndrew Thompson #define ZYD_CR101 0x9194 27602ac6454SAndrew Thompson #define ZYD_CR102 0x9198 27702ac6454SAndrew Thompson #define ZYD_CR103 0x919c 27802ac6454SAndrew Thompson #define ZYD_CR104 0x91a0 27902ac6454SAndrew Thompson #define ZYD_CR105 0x91a4 28002ac6454SAndrew Thompson #define ZYD_CR106 0x91a8 28102ac6454SAndrew Thompson #define ZYD_CR107 0x91ac 28202ac6454SAndrew Thompson #define ZYD_CR108 0x91b0 28302ac6454SAndrew Thompson #define ZYD_CR109 0x91b4 28402ac6454SAndrew Thompson #define ZYD_CR110 0x91b8 28502ac6454SAndrew Thompson #define ZYD_CR111 0x91bc 28602ac6454SAndrew Thompson #define ZYD_CR112 0x91c0 28702ac6454SAndrew Thompson #define ZYD_CR113 0x91c4 28802ac6454SAndrew Thompson #define ZYD_CR114 0x91c8 28902ac6454SAndrew Thompson #define ZYD_CR115 0x91cc 29002ac6454SAndrew Thompson #define ZYD_CR116 0x91d0 29102ac6454SAndrew Thompson #define ZYD_CR117 0x91d4 29202ac6454SAndrew Thompson #define ZYD_CR118 0x91d8 29302ac6454SAndrew Thompson #define ZYD_CR119 0x91dc 29402ac6454SAndrew Thompson #define ZYD_CR120 0x91e0 29502ac6454SAndrew Thompson #define ZYD_CR121 0x91e4 29602ac6454SAndrew Thompson #define ZYD_CR122 0x91e8 29702ac6454SAndrew Thompson #define ZYD_CR123 0x91ec 29802ac6454SAndrew Thompson #define ZYD_CR124 0x91f0 29902ac6454SAndrew Thompson #define ZYD_CR125 0x91f4 30002ac6454SAndrew Thompson #define ZYD_CR126 0x91f8 30102ac6454SAndrew Thompson #define ZYD_CR127 0x91fc 30202ac6454SAndrew Thompson #define ZYD_CR128 0x9200 30302ac6454SAndrew Thompson #define ZYD_CR129 0x9204 30402ac6454SAndrew Thompson #define ZYD_CR130 0x9208 30502ac6454SAndrew Thompson #define ZYD_CR131 0x920c 30602ac6454SAndrew Thompson #define ZYD_CR132 0x9210 30702ac6454SAndrew Thompson #define ZYD_CR133 0x9214 30802ac6454SAndrew Thompson #define ZYD_CR134 0x9218 30902ac6454SAndrew Thompson #define ZYD_CR135 0x921c 31002ac6454SAndrew Thompson #define ZYD_CR136 0x9220 31102ac6454SAndrew Thompson #define ZYD_CR137 0x9224 31202ac6454SAndrew Thompson #define ZYD_CR138 0x9228 31302ac6454SAndrew Thompson #define ZYD_CR139 0x922c 31402ac6454SAndrew Thompson #define ZYD_CR140 0x9230 31502ac6454SAndrew Thompson #define ZYD_CR141 0x9234 31602ac6454SAndrew Thompson #define ZYD_CR142 0x9238 31702ac6454SAndrew Thompson #define ZYD_CR143 0x923c 31802ac6454SAndrew Thompson #define ZYD_CR144 0x9240 31902ac6454SAndrew Thompson #define ZYD_CR145 0x9244 32002ac6454SAndrew Thompson #define ZYD_CR146 0x9248 32102ac6454SAndrew Thompson #define ZYD_CR147 0x924c 32202ac6454SAndrew Thompson #define ZYD_CR148 0x9250 32302ac6454SAndrew Thompson #define ZYD_CR149 0x9254 32402ac6454SAndrew Thompson #define ZYD_CR150 0x9258 32502ac6454SAndrew Thompson #define ZYD_CR151 0x925c 32602ac6454SAndrew Thompson #define ZYD_CR152 0x9260 32702ac6454SAndrew Thompson #define ZYD_CR153 0x9264 32802ac6454SAndrew Thompson #define ZYD_CR154 0x9268 32902ac6454SAndrew Thompson #define ZYD_CR155 0x926c 33002ac6454SAndrew Thompson #define ZYD_CR156 0x9270 33102ac6454SAndrew Thompson #define ZYD_CR157 0x9274 33202ac6454SAndrew Thompson #define ZYD_CR158 0x9278 33302ac6454SAndrew Thompson #define ZYD_CR159 0x927c 33402ac6454SAndrew Thompson #define ZYD_CR160 0x9280 33502ac6454SAndrew Thompson #define ZYD_CR161 0x9284 33602ac6454SAndrew Thompson #define ZYD_CR162 0x9288 33702ac6454SAndrew Thompson #define ZYD_CR163 0x928c 33802ac6454SAndrew Thompson #define ZYD_CR164 0x9290 33902ac6454SAndrew Thompson #define ZYD_CR165 0x9294 34002ac6454SAndrew Thompson #define ZYD_CR166 0x9298 34102ac6454SAndrew Thompson #define ZYD_CR167 0x929c 34202ac6454SAndrew Thompson #define ZYD_CR168 0x92a0 34302ac6454SAndrew Thompson #define ZYD_CR169 0x92a4 34402ac6454SAndrew Thompson #define ZYD_CR170 0x92a8 34502ac6454SAndrew Thompson #define ZYD_CR171 0x92ac 34602ac6454SAndrew Thompson #define ZYD_CR172 0x92b0 34702ac6454SAndrew Thompson #define ZYD_CR173 0x92b4 34802ac6454SAndrew Thompson #define ZYD_CR174 0x92b8 34902ac6454SAndrew Thompson #define ZYD_CR175 0x92bc 35002ac6454SAndrew Thompson #define ZYD_CR176 0x92c0 35102ac6454SAndrew Thompson #define ZYD_CR177 0x92c4 35202ac6454SAndrew Thompson #define ZYD_CR178 0x92c8 35302ac6454SAndrew Thompson #define ZYD_CR179 0x92cc 35402ac6454SAndrew Thompson #define ZYD_CR180 0x92d0 35502ac6454SAndrew Thompson #define ZYD_CR181 0x92d4 35602ac6454SAndrew Thompson #define ZYD_CR182 0x92d8 35702ac6454SAndrew Thompson #define ZYD_CR183 0x92dc 35802ac6454SAndrew Thompson #define ZYD_CR184 0x92e0 35902ac6454SAndrew Thompson #define ZYD_CR185 0x92e4 36002ac6454SAndrew Thompson #define ZYD_CR186 0x92e8 36102ac6454SAndrew Thompson #define ZYD_CR187 0x92ec 36202ac6454SAndrew Thompson #define ZYD_CR188 0x92f0 36302ac6454SAndrew Thompson #define ZYD_CR189 0x92f4 36402ac6454SAndrew Thompson #define ZYD_CR190 0x92f8 36502ac6454SAndrew Thompson #define ZYD_CR191 0x92fc 36602ac6454SAndrew Thompson #define ZYD_CR192 0x9300 36702ac6454SAndrew Thompson #define ZYD_CR193 0x9304 36802ac6454SAndrew Thompson #define ZYD_CR194 0x9308 36902ac6454SAndrew Thompson #define ZYD_CR195 0x930c 37002ac6454SAndrew Thompson #define ZYD_CR196 0x9310 37102ac6454SAndrew Thompson #define ZYD_CR197 0x9314 37202ac6454SAndrew Thompson #define ZYD_CR198 0x9318 37302ac6454SAndrew Thompson #define ZYD_CR199 0x931c 37402ac6454SAndrew Thompson #define ZYD_CR200 0x9320 37502ac6454SAndrew Thompson #define ZYD_CR201 0x9324 37602ac6454SAndrew Thompson #define ZYD_CR202 0x9328 37702ac6454SAndrew Thompson #define ZYD_CR203 0x932c 37802ac6454SAndrew Thompson #define ZYD_CR204 0x9330 37902ac6454SAndrew Thompson #define ZYD_CR205 0x9334 38002ac6454SAndrew Thompson #define ZYD_CR206 0x9338 38102ac6454SAndrew Thompson #define ZYD_CR207 0x933c 38202ac6454SAndrew Thompson #define ZYD_CR208 0x9340 38302ac6454SAndrew Thompson #define ZYD_CR209 0x9344 38402ac6454SAndrew Thompson #define ZYD_CR210 0x9348 38502ac6454SAndrew Thompson #define ZYD_CR211 0x934c 38602ac6454SAndrew Thompson #define ZYD_CR212 0x9350 38702ac6454SAndrew Thompson #define ZYD_CR213 0x9354 38802ac6454SAndrew Thompson #define ZYD_CR214 0x9358 38902ac6454SAndrew Thompson #define ZYD_CR215 0x935c 39002ac6454SAndrew Thompson #define ZYD_CR216 0x9360 39102ac6454SAndrew Thompson #define ZYD_CR217 0x9364 39202ac6454SAndrew Thompson #define ZYD_CR218 0x9368 39302ac6454SAndrew Thompson #define ZYD_CR219 0x936c 39402ac6454SAndrew Thompson #define ZYD_CR220 0x9370 39502ac6454SAndrew Thompson #define ZYD_CR221 0x9374 39602ac6454SAndrew Thompson #define ZYD_CR222 0x9378 39702ac6454SAndrew Thompson #define ZYD_CR223 0x937c 39802ac6454SAndrew Thompson #define ZYD_CR224 0x9380 39902ac6454SAndrew Thompson #define ZYD_CR225 0x9384 40002ac6454SAndrew Thompson #define ZYD_CR226 0x9388 40102ac6454SAndrew Thompson #define ZYD_CR227 0x938c 40202ac6454SAndrew Thompson #define ZYD_CR228 0x9390 40302ac6454SAndrew Thompson #define ZYD_CR229 0x9394 40402ac6454SAndrew Thompson #define ZYD_CR230 0x9398 40502ac6454SAndrew Thompson #define ZYD_CR231 0x939c 40602ac6454SAndrew Thompson #define ZYD_CR232 0x93a0 40702ac6454SAndrew Thompson #define ZYD_CR233 0x93a4 40802ac6454SAndrew Thompson #define ZYD_CR234 0x93a8 40902ac6454SAndrew Thompson #define ZYD_CR235 0x93ac 41002ac6454SAndrew Thompson #define ZYD_CR236 0x93b0 41102ac6454SAndrew Thompson #define ZYD_CR240 0x93c0 41202ac6454SAndrew Thompson #define ZYD_CR241 0x93c4 41302ac6454SAndrew Thompson #define ZYD_CR242 0x93c8 41402ac6454SAndrew Thompson #define ZYD_CR243 0x93cc 41502ac6454SAndrew Thompson #define ZYD_CR244 0x93d0 41602ac6454SAndrew Thompson #define ZYD_CR245 0x93d4 41702ac6454SAndrew Thompson #define ZYD_CR251 0x93ec 41802ac6454SAndrew Thompson #define ZYD_CR252 0x93f0 41902ac6454SAndrew Thompson #define ZYD_CR253 0x93f4 42002ac6454SAndrew Thompson #define ZYD_CR254 0x93f8 42102ac6454SAndrew Thompson #define ZYD_CR255 0x93fc 42202ac6454SAndrew Thompson 42302ac6454SAndrew Thompson /* copied nearly verbatim from the Linux driver rewrite */ 42402ac6454SAndrew Thompson #define ZYD_DEF_PHY \ 42502ac6454SAndrew Thompson { \ 42602ac6454SAndrew Thompson { ZYD_CR0, 0x0a }, { ZYD_CR1, 0x06 }, { ZYD_CR2, 0x26 }, \ 42702ac6454SAndrew Thompson { ZYD_CR3, 0x38 }, { ZYD_CR4, 0x80 }, { ZYD_CR9, 0xa0 }, \ 42802ac6454SAndrew Thompson { ZYD_CR10, 0x81 }, { ZYD_CR11, 0x00 }, { ZYD_CR12, 0x7f }, \ 42902ac6454SAndrew Thompson { ZYD_CR13, 0x8c }, { ZYD_CR14, 0x80 }, { ZYD_CR15, 0x3d }, \ 43002ac6454SAndrew Thompson { ZYD_CR16, 0x20 }, { ZYD_CR17, 0x1e }, { ZYD_CR18, 0x0a }, \ 43102ac6454SAndrew Thompson { ZYD_CR19, 0x48 }, { ZYD_CR20, 0x0c }, { ZYD_CR21, 0x0c }, \ 43202ac6454SAndrew Thompson { ZYD_CR22, 0x23 }, { ZYD_CR23, 0x90 }, { ZYD_CR24, 0x14 }, \ 43302ac6454SAndrew Thompson { ZYD_CR25, 0x40 }, { ZYD_CR26, 0x10 }, { ZYD_CR27, 0x19 }, \ 43402ac6454SAndrew Thompson { ZYD_CR28, 0x7f }, { ZYD_CR29, 0x80 }, { ZYD_CR30, 0x4b }, \ 43502ac6454SAndrew Thompson { ZYD_CR31, 0x60 }, { ZYD_CR32, 0x43 }, { ZYD_CR33, 0x08 }, \ 43602ac6454SAndrew Thompson { ZYD_CR34, 0x06 }, { ZYD_CR35, 0x0a }, { ZYD_CR36, 0x00 }, \ 43702ac6454SAndrew Thompson { ZYD_CR37, 0x00 }, { ZYD_CR38, 0x38 }, { ZYD_CR39, 0x0c }, \ 43802ac6454SAndrew Thompson { ZYD_CR40, 0x84 }, { ZYD_CR41, 0x2a }, { ZYD_CR42, 0x80 }, \ 43902ac6454SAndrew Thompson { ZYD_CR43, 0x10 }, { ZYD_CR44, 0x12 }, { ZYD_CR46, 0xff }, \ 44002ac6454SAndrew Thompson { ZYD_CR47, 0x1e }, { ZYD_CR48, 0x26 }, { ZYD_CR49, 0x5b }, \ 44102ac6454SAndrew Thompson { ZYD_CR64, 0xd0 }, { ZYD_CR65, 0x04 }, { ZYD_CR66, 0x58 }, \ 44202ac6454SAndrew Thompson { ZYD_CR67, 0xc9 }, { ZYD_CR68, 0x88 }, { ZYD_CR69, 0x41 }, \ 44302ac6454SAndrew Thompson { ZYD_CR70, 0x23 }, { ZYD_CR71, 0x10 }, { ZYD_CR72, 0xff }, \ 44402ac6454SAndrew Thompson { ZYD_CR73, 0x32 }, { ZYD_CR74, 0x30 }, { ZYD_CR75, 0x65 }, \ 44502ac6454SAndrew Thompson { ZYD_CR76, 0x41 }, { ZYD_CR77, 0x1b }, { ZYD_CR78, 0x30 }, \ 44602ac6454SAndrew Thompson { ZYD_CR79, 0x68 }, { ZYD_CR80, 0x64 }, { ZYD_CR81, 0x64 }, \ 44702ac6454SAndrew Thompson { ZYD_CR82, 0x00 }, { ZYD_CR83, 0x00 }, { ZYD_CR84, 0x00 }, \ 44802ac6454SAndrew Thompson { ZYD_CR85, 0x02 }, { ZYD_CR86, 0x00 }, { ZYD_CR87, 0x00 }, \ 44902ac6454SAndrew Thompson { ZYD_CR88, 0xff }, { ZYD_CR89, 0xfc }, { ZYD_CR90, 0x00 }, \ 45002ac6454SAndrew Thompson { ZYD_CR91, 0x00 }, { ZYD_CR92, 0x00 }, { ZYD_CR93, 0x08 }, \ 45102ac6454SAndrew Thompson { ZYD_CR94, 0x00 }, { ZYD_CR95, 0x00 }, { ZYD_CR96, 0xff }, \ 45202ac6454SAndrew Thompson { ZYD_CR97, 0xe7 }, { ZYD_CR98, 0x00 }, { ZYD_CR99, 0x00 }, \ 45302ac6454SAndrew Thompson { ZYD_CR100, 0x00 }, { ZYD_CR101, 0xae }, { ZYD_CR102, 0x02 }, \ 45402ac6454SAndrew Thompson { ZYD_CR103, 0x00 }, { ZYD_CR104, 0x03 }, { ZYD_CR105, 0x65 }, \ 45502ac6454SAndrew Thompson { ZYD_CR106, 0x04 }, { ZYD_CR107, 0x00 }, { ZYD_CR108, 0x0a }, \ 45602ac6454SAndrew Thompson { ZYD_CR109, 0xaa }, { ZYD_CR110, 0xaa }, { ZYD_CR111, 0x25 }, \ 45702ac6454SAndrew Thompson { ZYD_CR112, 0x25 }, { ZYD_CR113, 0x00 }, { ZYD_CR119, 0x1e }, \ 45802ac6454SAndrew Thompson { ZYD_CR125, 0x90 }, { ZYD_CR126, 0x00 }, { ZYD_CR127, 0x00 }, \ 45902ac6454SAndrew Thompson { ZYD_CR5, 0x00 }, { ZYD_CR6, 0x00 }, { ZYD_CR7, 0x00 }, \ 46002ac6454SAndrew Thompson { ZYD_CR8, 0x00 }, { ZYD_CR9, 0x20 }, { ZYD_CR12, 0xf0 }, \ 46102ac6454SAndrew Thompson { ZYD_CR20, 0x0e }, { ZYD_CR21, 0x0e }, { ZYD_CR27, 0x10 }, \ 46202ac6454SAndrew Thompson { ZYD_CR44, 0x33 }, { ZYD_CR47, 0x1E }, { ZYD_CR83, 0x24 }, \ 46302ac6454SAndrew Thompson { ZYD_CR84, 0x04 }, { ZYD_CR85, 0x00 }, { ZYD_CR86, 0x0C }, \ 46402ac6454SAndrew Thompson { ZYD_CR87, 0x12 }, { ZYD_CR88, 0x0C }, { ZYD_CR89, 0x00 }, \ 46502ac6454SAndrew Thompson { ZYD_CR90, 0x10 }, { ZYD_CR91, 0x08 }, { ZYD_CR93, 0x00 }, \ 46602ac6454SAndrew Thompson { ZYD_CR94, 0x01 }, { ZYD_CR95, 0x00 }, { ZYD_CR96, 0x50 }, \ 46702ac6454SAndrew Thompson { ZYD_CR97, 0x37 }, { ZYD_CR98, 0x35 }, { ZYD_CR101, 0x13 }, \ 46802ac6454SAndrew Thompson { ZYD_CR102, 0x27 }, { ZYD_CR103, 0x27 }, { ZYD_CR104, 0x18 }, \ 46902ac6454SAndrew Thompson { ZYD_CR105, 0x12 }, { ZYD_CR109, 0x27 }, { ZYD_CR110, 0x27 }, \ 47002ac6454SAndrew Thompson { ZYD_CR111, 0x27 }, { ZYD_CR112, 0x27 }, { ZYD_CR113, 0x27 }, \ 47102ac6454SAndrew Thompson { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x26 }, { ZYD_CR116, 0x24 }, \ 47202ac6454SAndrew Thompson { ZYD_CR117, 0xfc }, { ZYD_CR118, 0xfa }, { ZYD_CR120, 0x4f }, \ 47302ac6454SAndrew Thompson { ZYD_CR125, 0xaa }, { ZYD_CR127, 0x03 }, { ZYD_CR128, 0x14 }, \ 47402ac6454SAndrew Thompson { ZYD_CR129, 0x12 }, { ZYD_CR130, 0x10 }, { ZYD_CR131, 0x0C }, \ 47502ac6454SAndrew Thompson { ZYD_CR136, 0xdf }, { ZYD_CR137, 0x40 }, { ZYD_CR138, 0xa0 }, \ 47602ac6454SAndrew Thompson { ZYD_CR139, 0xb0 }, { ZYD_CR140, 0x99 }, { ZYD_CR141, 0x82 }, \ 47702ac6454SAndrew Thompson { ZYD_CR142, 0x54 }, { ZYD_CR143, 0x1c }, { ZYD_CR144, 0x6c }, \ 47802ac6454SAndrew Thompson { ZYD_CR147, 0x07 }, { ZYD_CR148, 0x4c }, { ZYD_CR149, 0x50 }, \ 47902ac6454SAndrew Thompson { ZYD_CR150, 0x0e }, { ZYD_CR151, 0x18 }, { ZYD_CR160, 0xfe }, \ 48002ac6454SAndrew Thompson { ZYD_CR161, 0xee }, { ZYD_CR162, 0xaa }, { ZYD_CR163, 0xfa }, \ 48102ac6454SAndrew Thompson { ZYD_CR164, 0xfa }, { ZYD_CR165, 0xea }, { ZYD_CR166, 0xbe }, \ 48202ac6454SAndrew Thompson { ZYD_CR167, 0xbe }, { ZYD_CR168, 0x6a }, { ZYD_CR169, 0xba }, \ 48302ac6454SAndrew Thompson { ZYD_CR170, 0xba }, { ZYD_CR171, 0xba }, { ZYD_CR204, 0x7d }, \ 48402ac6454SAndrew Thompson { ZYD_CR203, 0x30 }, { 0, 0} \ 48502ac6454SAndrew Thompson } 48602ac6454SAndrew Thompson 48702ac6454SAndrew Thompson #define ZYD_DEF_PHYB \ 48802ac6454SAndrew Thompson { \ 48902ac6454SAndrew Thompson { ZYD_CR0, 0x14 }, { ZYD_CR1, 0x06 }, { ZYD_CR2, 0x26 }, \ 49002ac6454SAndrew Thompson { ZYD_CR3, 0x38 }, { ZYD_CR4, 0x80 }, { ZYD_CR9, 0xe0 }, \ 49102ac6454SAndrew Thompson { ZYD_CR10, 0x81 }, { ZYD_CR11, 0x00 }, { ZYD_CR12, 0xf0 }, \ 49202ac6454SAndrew Thompson { ZYD_CR13, 0x8c }, { ZYD_CR14, 0x80 }, { ZYD_CR15, 0x3d }, \ 49302ac6454SAndrew Thompson { ZYD_CR16, 0x20 }, { ZYD_CR17, 0x1e }, { ZYD_CR18, 0x0a }, \ 49402ac6454SAndrew Thompson { ZYD_CR19, 0x48 }, { ZYD_CR20, 0x10 }, { ZYD_CR21, 0x0e }, \ 49502ac6454SAndrew Thompson { ZYD_CR22, 0x23 }, { ZYD_CR23, 0x90 }, { ZYD_CR24, 0x14 }, \ 49602ac6454SAndrew Thompson { ZYD_CR25, 0x40 }, { ZYD_CR26, 0x10 }, { ZYD_CR27, 0x10 }, \ 49702ac6454SAndrew Thompson { ZYD_CR28, 0x7f }, { ZYD_CR29, 0x80 }, { ZYD_CR30, 0x4b }, \ 49802ac6454SAndrew Thompson { ZYD_CR31, 0x60 }, { ZYD_CR32, 0x43 }, { ZYD_CR33, 0x08 }, \ 49902ac6454SAndrew Thompson { ZYD_CR34, 0x06 }, { ZYD_CR35, 0x0a }, { ZYD_CR36, 0x00 }, \ 50002ac6454SAndrew Thompson { ZYD_CR37, 0x00 }, { ZYD_CR38, 0x38 }, { ZYD_CR39, 0x0c }, \ 50102ac6454SAndrew Thompson { ZYD_CR40, 0x84 }, { ZYD_CR41, 0x2a }, { ZYD_CR42, 0x80 }, \ 50202ac6454SAndrew Thompson { ZYD_CR43, 0x10 }, { ZYD_CR44, 0x33 }, { ZYD_CR46, 0xff }, \ 50302ac6454SAndrew Thompson { ZYD_CR47, 0x1E }, { ZYD_CR48, 0x26 }, { ZYD_CR49, 0x5b }, \ 50402ac6454SAndrew Thompson { ZYD_CR64, 0xd0 }, { ZYD_CR65, 0x04 }, { ZYD_CR66, 0x58 }, \ 50502ac6454SAndrew Thompson { ZYD_CR67, 0xc9 }, { ZYD_CR68, 0x88 }, { ZYD_CR69, 0x41 }, \ 50602ac6454SAndrew Thompson { ZYD_CR70, 0x23 }, { ZYD_CR71, 0x10 }, { ZYD_CR72, 0xff }, \ 50702ac6454SAndrew Thompson { ZYD_CR73, 0x32 }, { ZYD_CR74, 0x30 }, { ZYD_CR75, 0x65 }, \ 50802ac6454SAndrew Thompson { ZYD_CR76, 0x41 }, { ZYD_CR77, 0x1b }, { ZYD_CR78, 0x30 }, \ 50902ac6454SAndrew Thompson { ZYD_CR79, 0xf0 }, { ZYD_CR80, 0x64 }, { ZYD_CR81, 0x64 }, \ 51002ac6454SAndrew Thompson { ZYD_CR82, 0x00 }, { ZYD_CR83, 0x24 }, { ZYD_CR84, 0x04 }, \ 51102ac6454SAndrew Thompson { ZYD_CR85, 0x00 }, { ZYD_CR86, 0x0c }, { ZYD_CR87, 0x12 }, \ 51202ac6454SAndrew Thompson { ZYD_CR88, 0x0c }, { ZYD_CR89, 0x00 }, { ZYD_CR90, 0x58 }, \ 51302ac6454SAndrew Thompson { ZYD_CR91, 0x04 }, { ZYD_CR92, 0x00 }, { ZYD_CR93, 0x00 }, \ 51402ac6454SAndrew Thompson { ZYD_CR94, 0x01 }, { ZYD_CR95, 0x20 }, { ZYD_CR96, 0x50 }, \ 51502ac6454SAndrew Thompson { ZYD_CR97, 0x37 }, { ZYD_CR98, 0x35 }, { ZYD_CR99, 0x00 }, \ 51602ac6454SAndrew Thompson { ZYD_CR100, 0x01 }, { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 }, \ 51702ac6454SAndrew Thompson { ZYD_CR103, 0x27 }, { ZYD_CR104, 0x18 }, { ZYD_CR105, 0x12 }, \ 51802ac6454SAndrew Thompson { ZYD_CR106, 0x04 }, { ZYD_CR107, 0x00 }, { ZYD_CR108, 0x0a }, \ 51902ac6454SAndrew Thompson { ZYD_CR109, 0x27 }, { ZYD_CR110, 0x27 }, { ZYD_CR111, 0x27 }, \ 52002ac6454SAndrew Thompson { ZYD_CR112, 0x27 }, { ZYD_CR113, 0x27 }, { ZYD_CR114, 0x27 }, \ 52102ac6454SAndrew Thompson { ZYD_CR115, 0x26 }, { ZYD_CR116, 0x24 }, { ZYD_CR117, 0xfc }, \ 52202ac6454SAndrew Thompson { ZYD_CR118, 0xfa }, { ZYD_CR119, 0x1e }, { ZYD_CR125, 0x90 }, \ 52302ac6454SAndrew Thompson { ZYD_CR126, 0x00 }, { ZYD_CR127, 0x00 }, { ZYD_CR128, 0x14 }, \ 52402ac6454SAndrew Thompson { ZYD_CR129, 0x12 }, { ZYD_CR130, 0x10 }, { ZYD_CR131, 0x0c }, \ 52502ac6454SAndrew Thompson { ZYD_CR136, 0xdf }, { ZYD_CR137, 0xa0 }, { ZYD_CR138, 0xa8 }, \ 52602ac6454SAndrew Thompson { ZYD_CR139, 0xb4 }, { ZYD_CR140, 0x98 }, { ZYD_CR141, 0x82 }, \ 52702ac6454SAndrew Thompson { ZYD_CR142, 0x53 }, { ZYD_CR143, 0x1c }, { ZYD_CR144, 0x6c }, \ 52802ac6454SAndrew Thompson { ZYD_CR147, 0x07 }, { ZYD_CR148, 0x40 }, { ZYD_CR149, 0x40 }, \ 52902ac6454SAndrew Thompson { ZYD_CR150, 0x14 }, { ZYD_CR151, 0x18 }, { ZYD_CR159, 0x70 }, \ 53002ac6454SAndrew Thompson { ZYD_CR160, 0xfe }, { ZYD_CR161, 0xee }, { ZYD_CR162, 0xaa }, \ 53102ac6454SAndrew Thompson { ZYD_CR163, 0xfa }, { ZYD_CR164, 0xfa }, { ZYD_CR165, 0xea }, \ 53202ac6454SAndrew Thompson { ZYD_CR166, 0xbe }, { ZYD_CR167, 0xbe }, { ZYD_CR168, 0x6a }, \ 53302ac6454SAndrew Thompson { ZYD_CR169, 0xba }, { ZYD_CR170, 0xba }, { ZYD_CR171, 0xba }, \ 53402ac6454SAndrew Thompson { ZYD_CR204, 0x7d }, { ZYD_CR203, 0x30 }, \ 53502ac6454SAndrew Thompson { 0, 0 } \ 53602ac6454SAndrew Thompson } 53702ac6454SAndrew Thompson 53802ac6454SAndrew Thompson #define ZYD_RFMD_PHY \ 53902ac6454SAndrew Thompson { \ 54002ac6454SAndrew Thompson { ZYD_CR2, 0x1e }, { ZYD_CR9, 0x20 }, { ZYD_CR10, 0x89 }, \ 54102ac6454SAndrew Thompson { ZYD_CR11, 0x00 }, { ZYD_CR15, 0xd0 }, { ZYD_CR17, 0x68 }, \ 54202ac6454SAndrew Thompson { ZYD_CR19, 0x4a }, { ZYD_CR20, 0x0c }, { ZYD_CR21, 0x0e }, \ 54302ac6454SAndrew Thompson { ZYD_CR23, 0x48 }, { ZYD_CR24, 0x14 }, { ZYD_CR26, 0x90 }, \ 54402ac6454SAndrew Thompson { ZYD_CR27, 0x30 }, { ZYD_CR29, 0x20 }, { ZYD_CR31, 0xb2 }, \ 54502ac6454SAndrew Thompson { ZYD_CR32, 0x43 }, { ZYD_CR33, 0x28 }, { ZYD_CR38, 0x30 }, \ 54602ac6454SAndrew Thompson { ZYD_CR34, 0x0f }, { ZYD_CR35, 0xf0 }, { ZYD_CR41, 0x2a }, \ 54702ac6454SAndrew Thompson { ZYD_CR46, 0x7f }, { ZYD_CR47, 0x1e }, { ZYD_CR51, 0xc5 }, \ 54802ac6454SAndrew Thompson { ZYD_CR52, 0xc5 }, { ZYD_CR53, 0xc5 }, { ZYD_CR79, 0x58 }, \ 54902ac6454SAndrew Thompson { ZYD_CR80, 0x30 }, { ZYD_CR81, 0x30 }, { ZYD_CR82, 0x00 }, \ 55002ac6454SAndrew Thompson { ZYD_CR83, 0x24 }, { ZYD_CR84, 0x04 }, { ZYD_CR85, 0x00 }, \ 55102ac6454SAndrew Thompson { ZYD_CR86, 0x10 }, { ZYD_CR87, 0x2a }, { ZYD_CR88, 0x10 }, \ 55202ac6454SAndrew Thompson { ZYD_CR89, 0x24 }, { ZYD_CR90, 0x18 }, { ZYD_CR91, 0x00 }, \ 55302ac6454SAndrew Thompson { ZYD_CR92, 0x0a }, { ZYD_CR93, 0x00 }, { ZYD_CR94, 0x01 }, \ 55402ac6454SAndrew Thompson { ZYD_CR95, 0x00 }, { ZYD_CR96, 0x40 }, { ZYD_CR97, 0x37 }, \ 55502ac6454SAndrew Thompson { ZYD_CR98, 0x05 }, { ZYD_CR99, 0x28 }, { ZYD_CR100, 0x00 }, \ 55602ac6454SAndrew Thompson { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 }, { ZYD_CR103, 0x27 }, \ 55702ac6454SAndrew Thompson { ZYD_CR104, 0x18 }, { ZYD_CR105, 0x12 }, { ZYD_CR106, 0x1a }, \ 55802ac6454SAndrew Thompson { ZYD_CR107, 0x24 }, { ZYD_CR108, 0x0a }, { ZYD_CR109, 0x13 }, \ 55902ac6454SAndrew Thompson { ZYD_CR110, 0x2f }, { ZYD_CR111, 0x27 }, { ZYD_CR112, 0x27 }, \ 56002ac6454SAndrew Thompson { ZYD_CR113, 0x27 }, { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x40 }, \ 56102ac6454SAndrew Thompson { ZYD_CR116, 0x40 }, { ZYD_CR117, 0xf0 }, { ZYD_CR118, 0xf0 }, \ 56202ac6454SAndrew Thompson { ZYD_CR119, 0x16 }, { ZYD_CR122, 0x00 }, { ZYD_CR127, 0x03 }, \ 56302ac6454SAndrew Thompson { ZYD_CR131, 0x08 }, { ZYD_CR138, 0x28 }, { ZYD_CR148, 0x44 }, \ 56402ac6454SAndrew Thompson { ZYD_CR150, 0x10 }, { ZYD_CR169, 0xbb }, { ZYD_CR170, 0xbb } \ 56502ac6454SAndrew Thompson } 56602ac6454SAndrew Thompson 56702ac6454SAndrew Thompson #define ZYD_RFMD_RF \ 56802ac6454SAndrew Thompson { \ 56902ac6454SAndrew Thompson 0x000007, 0x07dd43, 0x080959, 0x0e6666, 0x116a57, 0x17dd43, \ 57002ac6454SAndrew Thompson 0x1819f9, 0x1e6666, 0x214554, 0x25e7fa, 0x27fffa, 0x294128, \ 57102ac6454SAndrew Thompson 0x2c0000, 0x300000, 0x340000, 0x381e0f, 0x6c180f \ 57202ac6454SAndrew Thompson } 57302ac6454SAndrew Thompson 57402ac6454SAndrew Thompson #define ZYD_RFMD_CHANTABLE \ 57502ac6454SAndrew Thompson { \ 57602ac6454SAndrew Thompson { 0x181979, 0x1e6666 }, \ 57702ac6454SAndrew Thompson { 0x181989, 0x1e6666 }, \ 57802ac6454SAndrew Thompson { 0x181999, 0x1e6666 }, \ 57902ac6454SAndrew Thompson { 0x1819a9, 0x1e6666 }, \ 58002ac6454SAndrew Thompson { 0x1819b9, 0x1e6666 }, \ 58102ac6454SAndrew Thompson { 0x1819c9, 0x1e6666 }, \ 58202ac6454SAndrew Thompson { 0x1819d9, 0x1e6666 }, \ 58302ac6454SAndrew Thompson { 0x1819e9, 0x1e6666 }, \ 58402ac6454SAndrew Thompson { 0x1819f9, 0x1e6666 }, \ 58502ac6454SAndrew Thompson { 0x181a09, 0x1e6666 }, \ 58602ac6454SAndrew Thompson { 0x181a19, 0x1e6666 }, \ 58702ac6454SAndrew Thompson { 0x181a29, 0x1e6666 }, \ 58802ac6454SAndrew Thompson { 0x181a39, 0x1e6666 }, \ 58902ac6454SAndrew Thompson { 0x181a60, 0x1c0000 } \ 59002ac6454SAndrew Thompson } 59102ac6454SAndrew Thompson 59202ac6454SAndrew Thompson #define ZYD_AL2230_PHY \ 59302ac6454SAndrew Thompson { \ 59402ac6454SAndrew Thompson { ZYD_CR15, 0x20 }, { ZYD_CR23, 0x40 }, { ZYD_CR24, 0x20 }, \ 59502ac6454SAndrew Thompson { ZYD_CR26, 0x11 }, { ZYD_CR28, 0x3e }, { ZYD_CR29, 0x00 }, \ 59602ac6454SAndrew Thompson { ZYD_CR44, 0x33 }, { ZYD_CR106, 0x2a }, { ZYD_CR107, 0x1a }, \ 59702ac6454SAndrew Thompson { ZYD_CR109, 0x09 }, { ZYD_CR110, 0x27 }, { ZYD_CR111, 0x2b }, \ 59802ac6454SAndrew Thompson { ZYD_CR112, 0x2b }, { ZYD_CR119, 0x0a }, { ZYD_CR10, 0x89 }, \ 59902ac6454SAndrew Thompson { ZYD_CR17, 0x28 }, { ZYD_CR26, 0x93 }, { ZYD_CR34, 0x30 }, \ 60002ac6454SAndrew Thompson { ZYD_CR35, 0x3e }, { ZYD_CR41, 0x24 }, { ZYD_CR44, 0x32 }, \ 60102ac6454SAndrew Thompson { ZYD_CR46, 0x96 }, { ZYD_CR47, 0x1e }, { ZYD_CR79, 0x58 }, \ 60202ac6454SAndrew Thompson { ZYD_CR80, 0x30 }, { ZYD_CR81, 0x30 }, { ZYD_CR87, 0x0a }, \ 60302ac6454SAndrew Thompson { ZYD_CR89, 0x04 }, { ZYD_CR92, 0x0a }, { ZYD_CR99, 0x28 }, \ 60402ac6454SAndrew Thompson { ZYD_CR100, 0x00 }, { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 }, \ 60502ac6454SAndrew Thompson { ZYD_CR106, 0x24 }, { ZYD_CR107, 0x2a }, { ZYD_CR109, 0x09 }, \ 60602ac6454SAndrew Thompson { ZYD_CR110, 0x13 }, { ZYD_CR111, 0x1f }, { ZYD_CR112, 0x1f }, \ 60702ac6454SAndrew Thompson { ZYD_CR113, 0x27 }, { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x24 }, \ 60802ac6454SAndrew Thompson { ZYD_CR116, 0x24 }, { ZYD_CR117, 0xf4 }, { ZYD_CR118, 0xfc }, \ 60902ac6454SAndrew Thompson { ZYD_CR119, 0x10 }, { ZYD_CR120, 0x4f }, { ZYD_CR121, 0x77 }, \ 61002ac6454SAndrew Thompson { ZYD_CR122, 0xe0 }, { ZYD_CR137, 0x88 }, { ZYD_CR252, 0xff }, \ 61102ac6454SAndrew Thompson { ZYD_CR253, 0xff }, { ZYD_CR251, 0x2f }, { ZYD_CR251, 0x3f }, \ 61202ac6454SAndrew Thompson { ZYD_CR138, 0x28 }, { ZYD_CR203, 0x06 } \ 61302ac6454SAndrew Thompson } 61402ac6454SAndrew Thompson 61502ac6454SAndrew Thompson #define ZYD_AL2230_PHY_B \ 61602ac6454SAndrew Thompson { \ 61702ac6454SAndrew Thompson { ZYD_CR10, 0x89 }, { ZYD_CR15, 0x20 }, { ZYD_CR17, 0x2B }, \ 61802ac6454SAndrew Thompson { ZYD_CR23, 0x40 }, { ZYD_CR24, 0x20 }, { ZYD_CR26, 0x93 }, \ 61902ac6454SAndrew Thompson { ZYD_CR28, 0x3e }, { ZYD_CR29, 0x00 }, { ZYD_CR33, 0x28 }, \ 62002ac6454SAndrew Thompson { ZYD_CR34, 0x30 }, { ZYD_CR35, 0x3e }, { ZYD_CR41, 0x24 }, \ 62102ac6454SAndrew Thompson { ZYD_CR44, 0x32 }, { ZYD_CR46, 0x99 }, { ZYD_CR47, 0x1e }, \ 62202ac6454SAndrew Thompson { ZYD_CR48, 0x06 }, { ZYD_CR49, 0xf9 }, { ZYD_CR51, 0x01 }, \ 62302ac6454SAndrew Thompson { ZYD_CR52, 0x80 }, { ZYD_CR53, 0x7e }, { ZYD_CR65, 0x00 }, \ 62402ac6454SAndrew Thompson { ZYD_CR66, 0x00 }, { ZYD_CR67, 0x00 }, { ZYD_CR68, 0x00 }, \ 62502ac6454SAndrew Thompson { ZYD_CR69, 0x28 }, { ZYD_CR79, 0x58 }, { ZYD_CR80, 0x30 }, \ 62602ac6454SAndrew Thompson { ZYD_CR81, 0x30 }, { ZYD_CR87, 0x0a }, { ZYD_CR89, 0x04 }, \ 62702ac6454SAndrew Thompson { ZYD_CR91, 0x00 }, { ZYD_CR92, 0x0a }, { ZYD_CR98, 0x8d }, \ 62802ac6454SAndrew Thompson { ZYD_CR99, 0x00 }, { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 }, \ 62902ac6454SAndrew Thompson { ZYD_CR106, 0x24 }, { ZYD_CR107, 0x2a }, { ZYD_CR109, 0x13 }, \ 63002ac6454SAndrew Thompson { ZYD_CR110, 0x1f }, { ZYD_CR111, 0x1f }, { ZYD_CR112, 0x1f }, \ 63102ac6454SAndrew Thompson { ZYD_CR113, 0x27 }, { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x26 }, \ 63202ac6454SAndrew Thompson { ZYD_CR116, 0x24 }, { ZYD_CR117, 0xfa }, { ZYD_CR118, 0xfa }, \ 63302ac6454SAndrew Thompson { ZYD_CR119, 0x10 }, { ZYD_CR120, 0x4f }, { ZYD_CR121, 0x6c }, \ 63402ac6454SAndrew Thompson { ZYD_CR122, 0xfc }, { ZYD_CR123, 0x57 }, { ZYD_CR125, 0xad }, \ 63502ac6454SAndrew Thompson { ZYD_CR126, 0x6c }, { ZYD_CR127, 0x03 }, { ZYD_CR137, 0x50 }, \ 63602ac6454SAndrew Thompson { ZYD_CR138, 0xa8 }, { ZYD_CR144, 0xac }, { ZYD_CR150, 0x0d }, \ 63702ac6454SAndrew Thompson { ZYD_CR252, 0x34 }, { ZYD_CR253, 0x34 } \ 63802ac6454SAndrew Thompson } 63902ac6454SAndrew Thompson 64002ac6454SAndrew Thompson #define ZYD_AL2230_PHY_PART1 \ 64102ac6454SAndrew Thompson { \ 64202ac6454SAndrew Thompson { ZYD_CR240, 0x57 }, { ZYD_CR9, 0xe0 } \ 64302ac6454SAndrew Thompson } 64402ac6454SAndrew Thompson 64502ac6454SAndrew Thompson #define ZYD_AL2230_PHY_PART2 \ 64602ac6454SAndrew Thompson { \ 64702ac6454SAndrew Thompson { ZYD_CR251, 0x2f }, { ZYD_CR251, 0x7f }, \ 64802ac6454SAndrew Thompson } 64902ac6454SAndrew Thompson 65002ac6454SAndrew Thompson #define ZYD_AL2230_PHY_PART3 \ 65102ac6454SAndrew Thompson { \ 65202ac6454SAndrew Thompson { ZYD_CR128, 0x14 }, { ZYD_CR129, 0x12 }, { ZYD_CR130, 0x10 }, \ 65302ac6454SAndrew Thompson } 65402ac6454SAndrew Thompson 65502ac6454SAndrew Thompson #define ZYD_AL2230S_PHY_INIT \ 65602ac6454SAndrew Thompson { \ 65702ac6454SAndrew Thompson { ZYD_CR47, 0x1e }, { ZYD_CR106, 0x22 }, { ZYD_CR107, 0x2a }, \ 65802ac6454SAndrew Thompson { ZYD_CR109, 0x13 }, { ZYD_CR118, 0xf8 }, { ZYD_CR119, 0x12 }, \ 65902ac6454SAndrew Thompson { ZYD_CR122, 0xe0 }, { ZYD_CR128, 0x10 }, { ZYD_CR129, 0x0e }, \ 66002ac6454SAndrew Thompson { ZYD_CR130, 0x10 } \ 66102ac6454SAndrew Thompson } 66202ac6454SAndrew Thompson 66302ac6454SAndrew Thompson #define ZYD_AL2230_PHY_FINI_PART1 \ 66402ac6454SAndrew Thompson { \ 66502ac6454SAndrew Thompson { ZYD_CR80, 0x30 }, { ZYD_CR81, 0x30 }, { ZYD_CR79, 0x58 }, \ 66602ac6454SAndrew Thompson { ZYD_CR12, 0xf0 }, { ZYD_CR77, 0x1b }, { ZYD_CR78, 0x58 }, \ 66702ac6454SAndrew Thompson { ZYD_CR203, 0x06 }, { ZYD_CR240, 0x80 }, \ 66802ac6454SAndrew Thompson } 66902ac6454SAndrew Thompson 67002ac6454SAndrew Thompson #define ZYD_AL2230_RF_PART1 \ 67102ac6454SAndrew Thompson { \ 67202ac6454SAndrew Thompson 0x03f790, 0x033331, 0x00000d, 0x0b3331, 0x03b812, 0x00fff3 \ 67302ac6454SAndrew Thompson } 67402ac6454SAndrew Thompson 67502ac6454SAndrew Thompson #define ZYD_AL2230_RF_PART2 \ 67602ac6454SAndrew Thompson { \ 67702ac6454SAndrew Thompson 0x000da4, 0x0f4dc5, 0x0805b6, 0x011687, 0x000688, 0x0403b9, \ 67802ac6454SAndrew Thompson 0x00dbba, 0x00099b, 0x0bdffc, 0x00000d, 0x00500f \ 67902ac6454SAndrew Thompson } 68002ac6454SAndrew Thompson 68102ac6454SAndrew Thompson #define ZYD_AL2230_RF_PART3 \ 68202ac6454SAndrew Thompson { \ 68302ac6454SAndrew Thompson 0x00d00f, 0x004c0f, 0x00540f, 0x00700f, 0x00500f \ 68402ac6454SAndrew Thompson } 68502ac6454SAndrew Thompson 68602ac6454SAndrew Thompson #define ZYD_AL2230_RF_B \ 68702ac6454SAndrew Thompson { \ 68802ac6454SAndrew Thompson 0x03f790, 0x033331, 0x00000d, 0x0b3331, 0x03b812, 0x00fff3, \ 68902ac6454SAndrew Thompson 0x0005a4, 0x0f4dc5, 0x0805b6, 0x0146c7, 0x000688, 0x0403b9, \ 69002ac6454SAndrew Thompson 0x00dbba, 0x00099b, 0x0bdffc, 0x00000d, 0x00580f \ 69102ac6454SAndrew Thompson } 69202ac6454SAndrew Thompson 69302ac6454SAndrew Thompson #define ZYD_AL2230_RF_B_PART1 \ 69402ac6454SAndrew Thompson { \ 69502ac6454SAndrew Thompson 0x8cccd0, 0x481dc0, 0xcfff00, 0x25a000 \ 69602ac6454SAndrew Thompson } 69702ac6454SAndrew Thompson 69802ac6454SAndrew Thompson #define ZYD_AL2230_RF_B_PART2 \ 69902ac6454SAndrew Thompson { \ 70002ac6454SAndrew Thompson 0x25a000, 0xa3b2f0, 0x6da010, 0xe36280, 0x116000, 0x9dc020, \ 70102ac6454SAndrew Thompson 0x5ddb00, 0xd99000, 0x3ffbd0, 0xb00000, 0xf01a00 \ 70202ac6454SAndrew Thompson } 70302ac6454SAndrew Thompson 70402ac6454SAndrew Thompson #define ZYD_AL2230_RF_B_PART3 \ 70502ac6454SAndrew Thompson { \ 70602ac6454SAndrew Thompson 0xf01b00, 0xf01e00, 0xf01a00 \ 70702ac6454SAndrew Thompson } 70802ac6454SAndrew Thompson 70902ac6454SAndrew Thompson #define ZYD_AL2230_CHANTABLE \ 71002ac6454SAndrew Thompson { \ 71102ac6454SAndrew Thompson { 0x03f790, 0x033331, 0x00000d }, \ 71202ac6454SAndrew Thompson { 0x03f790, 0x0b3331, 0x00000d }, \ 71302ac6454SAndrew Thompson { 0x03e790, 0x033331, 0x00000d }, \ 71402ac6454SAndrew Thompson { 0x03e790, 0x0b3331, 0x00000d }, \ 71502ac6454SAndrew Thompson { 0x03f7a0, 0x033331, 0x00000d }, \ 71602ac6454SAndrew Thompson { 0x03f7a0, 0x0b3331, 0x00000d }, \ 71702ac6454SAndrew Thompson { 0x03e7a0, 0x033331, 0x00000d }, \ 71802ac6454SAndrew Thompson { 0x03e7a0, 0x0b3331, 0x00000d }, \ 71902ac6454SAndrew Thompson { 0x03f7b0, 0x033331, 0x00000d }, \ 72002ac6454SAndrew Thompson { 0x03f7b0, 0x0b3331, 0x00000d }, \ 72102ac6454SAndrew Thompson { 0x03e7b0, 0x033331, 0x00000d }, \ 72202ac6454SAndrew Thompson { 0x03e7b0, 0x0b3331, 0x00000d }, \ 72302ac6454SAndrew Thompson { 0x03f7c0, 0x033331, 0x00000d }, \ 72402ac6454SAndrew Thompson { 0x03e7c0, 0x066661, 0x00000d } \ 72502ac6454SAndrew Thompson } 72602ac6454SAndrew Thompson 72702ac6454SAndrew Thompson #define ZYD_AL2230_CHANTABLE_B \ 72802ac6454SAndrew Thompson { \ 72902ac6454SAndrew Thompson { 0x09efc0, 0x8cccc0, 0xb00000 }, \ 73002ac6454SAndrew Thompson { 0x09efc0, 0x8cccd0, 0xb00000 }, \ 73102ac6454SAndrew Thompson { 0x09e7c0, 0x8cccc0, 0xb00000 }, \ 73202ac6454SAndrew Thompson { 0x09e7c0, 0x8cccd0, 0xb00000 }, \ 73302ac6454SAndrew Thompson { 0x05efc0, 0x8cccc0, 0xb00000 }, \ 73402ac6454SAndrew Thompson { 0x05efc0, 0x8cccd0, 0xb00000 }, \ 73502ac6454SAndrew Thompson { 0x05e7c0, 0x8cccc0, 0xb00000 }, \ 73602ac6454SAndrew Thompson { 0x05e7c0, 0x8cccd0, 0xb00000 }, \ 73702ac6454SAndrew Thompson { 0x0defc0, 0x8cccc0, 0xb00000 }, \ 73802ac6454SAndrew Thompson { 0x0defc0, 0x8cccd0, 0xb00000 }, \ 73902ac6454SAndrew Thompson { 0x0de7c0, 0x8cccc0, 0xb00000 }, \ 74002ac6454SAndrew Thompson { 0x0de7c0, 0x8cccd0, 0xb00000 }, \ 74102ac6454SAndrew Thompson { 0x03efc0, 0x8cccc0, 0xb00000 }, \ 74202ac6454SAndrew Thompson { 0x03e7c0, 0x866660, 0xb00000 } \ 74302ac6454SAndrew Thompson } 74402ac6454SAndrew Thompson 74502ac6454SAndrew Thompson #define ZYD_AL7230B_PHY_1 \ 74602ac6454SAndrew Thompson { \ 74702ac6454SAndrew Thompson { ZYD_CR240, 0x57 }, { ZYD_CR15, 0x20 }, { ZYD_CR23, 0x40 }, \ 74802ac6454SAndrew Thompson { ZYD_CR24, 0x20 }, { ZYD_CR26, 0x11 }, { ZYD_CR28, 0x3e }, \ 74902ac6454SAndrew Thompson { ZYD_CR29, 0x00 }, { ZYD_CR44, 0x33 }, { ZYD_CR106, 0x22 }, \ 75002ac6454SAndrew Thompson { ZYD_CR107, 0x1a }, { ZYD_CR109, 0x09 }, { ZYD_CR110, 0x27 }, \ 75102ac6454SAndrew Thompson { ZYD_CR111, 0x2b }, { ZYD_CR112, 0x2b }, { ZYD_CR119, 0x0a }, \ 75202ac6454SAndrew Thompson { ZYD_CR122, 0xfc }, { ZYD_CR10, 0x89 }, { ZYD_CR17, 0x28 }, \ 75302ac6454SAndrew Thompson { ZYD_CR26, 0x93 }, { ZYD_CR34, 0x30 }, { ZYD_CR35, 0x3e }, \ 75402ac6454SAndrew Thompson { ZYD_CR41, 0x24 }, { ZYD_CR44, 0x32 }, { ZYD_CR46, 0x96 }, \ 75502ac6454SAndrew Thompson { ZYD_CR47, 0x1e }, { ZYD_CR79, 0x58 }, { ZYD_CR80, 0x30 }, \ 75602ac6454SAndrew Thompson { ZYD_CR81, 0x30 }, { ZYD_CR87, 0x0a }, { ZYD_CR89, 0x04 }, \ 75702ac6454SAndrew Thompson { ZYD_CR92, 0x0a }, { ZYD_CR99, 0x28 }, { ZYD_CR100, 0x02 }, \ 75802ac6454SAndrew Thompson { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 }, { ZYD_CR106, 0x22 }, \ 75902ac6454SAndrew Thompson { ZYD_CR107, 0x3f }, { ZYD_CR109, 0x09 }, { ZYD_CR110, 0x1f }, \ 76002ac6454SAndrew Thompson { ZYD_CR111, 0x1f }, { ZYD_CR112, 0x1f }, { ZYD_CR113, 0x27 }, \ 76102ac6454SAndrew Thompson { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x24 }, { ZYD_CR116, 0x3f }, \ 76202ac6454SAndrew Thompson { ZYD_CR117, 0xfa }, { ZYD_CR118, 0xfc }, { ZYD_CR119, 0x10 }, \ 76302ac6454SAndrew Thompson { ZYD_CR120, 0x4f }, { ZYD_CR121, 0x77 }, { ZYD_CR137, 0x88 }, \ 76402ac6454SAndrew Thompson { ZYD_CR138, 0xa8 }, { ZYD_CR252, 0x34 }, { ZYD_CR253, 0x34 }, \ 76502ac6454SAndrew Thompson { ZYD_CR251, 0x2f } \ 76602ac6454SAndrew Thompson } 76702ac6454SAndrew Thompson 76802ac6454SAndrew Thompson #define ZYD_AL7230B_PHY_2 \ 76902ac6454SAndrew Thompson { \ 77002ac6454SAndrew Thompson { ZYD_CR251, 0x3f }, { ZYD_CR128, 0x14 }, { ZYD_CR129, 0x12 }, \ 77102ac6454SAndrew Thompson { ZYD_CR130, 0x10 }, { ZYD_CR38, 0x38 }, { ZYD_CR136, 0xdf } \ 77202ac6454SAndrew Thompson } 77302ac6454SAndrew Thompson 77402ac6454SAndrew Thompson #define ZYD_AL7230B_PHY_3 \ 77502ac6454SAndrew Thompson { \ 77602ac6454SAndrew Thompson { ZYD_CR203, 0x06 }, { ZYD_CR240, 0x80 } \ 77702ac6454SAndrew Thompson } 77802ac6454SAndrew Thompson 77902ac6454SAndrew Thompson #define ZYD_AL7230B_RF_1 \ 78002ac6454SAndrew Thompson { \ 78102ac6454SAndrew Thompson 0x09ec04, 0x8cccc8, 0x4ff821, 0xc5fbfc, 0x21ebfe, 0xafd401, \ 78202ac6454SAndrew Thompson 0x6cf56a, 0xe04073, 0x193d76, 0x9dd844, 0x500007, 0xd8c010, \ 78302ac6454SAndrew Thompson 0x3c9000, 0xbfffff, 0x700000, 0xf15d58 \ 78402ac6454SAndrew Thompson } 78502ac6454SAndrew Thompson 78602ac6454SAndrew Thompson #define ZYD_AL7230B_RF_2 \ 78702ac6454SAndrew Thompson { \ 78802ac6454SAndrew Thompson 0xf15d59, 0xf15d5c, 0xf15d58 \ 78902ac6454SAndrew Thompson } 79002ac6454SAndrew Thompson 79102ac6454SAndrew Thompson #define ZYD_AL7230B_RF_SETCHANNEL \ 79202ac6454SAndrew Thompson { \ 79302ac6454SAndrew Thompson 0x4ff821, 0xc5fbfc, 0x21ebfe, 0xafd401, 0x6cf56a, 0xe04073, \ 79402ac6454SAndrew Thompson 0x193d76, 0x9dd844, 0x500007, 0xd8c010, 0x3c9000, 0xf15d58 \ 79502ac6454SAndrew Thompson } 79602ac6454SAndrew Thompson 79702ac6454SAndrew Thompson #define ZYD_AL7230B_CHANTABLE \ 79802ac6454SAndrew Thompson { \ 79902ac6454SAndrew Thompson { 0x09ec00, 0x8cccc8 }, \ 80002ac6454SAndrew Thompson { 0x09ec00, 0x8cccd8 }, \ 80102ac6454SAndrew Thompson { 0x09ec00, 0x8cccc0 }, \ 80202ac6454SAndrew Thompson { 0x09ec00, 0x8cccd0 }, \ 80302ac6454SAndrew Thompson { 0x05ec00, 0x8cccc8 }, \ 80402ac6454SAndrew Thompson { 0x05ec00, 0x8cccd8 }, \ 80502ac6454SAndrew Thompson { 0x05ec00, 0x8cccc0 }, \ 80602ac6454SAndrew Thompson { 0x05ec00, 0x8cccd0 }, \ 80702ac6454SAndrew Thompson { 0x0dec00, 0x8cccc8 }, \ 80802ac6454SAndrew Thompson { 0x0dec00, 0x8cccd8 }, \ 80902ac6454SAndrew Thompson { 0x0dec00, 0x8cccc0 }, \ 81002ac6454SAndrew Thompson { 0x0dec00, 0x8cccd0 }, \ 81102ac6454SAndrew Thompson { 0x03ec00, 0x8cccc8 }, \ 81202ac6454SAndrew Thompson { 0x03ec00, 0x866660 } \ 81302ac6454SAndrew Thompson } 81402ac6454SAndrew Thompson 81502ac6454SAndrew Thompson #define ZYD_AL2210_PHY \ 81602ac6454SAndrew Thompson { \ 81702ac6454SAndrew Thompson { ZYD_CR9, 0xe0 }, { ZYD_CR10, 0x91 }, { ZYD_CR12, 0x90 }, \ 81802ac6454SAndrew Thompson { ZYD_CR15, 0xd0 }, { ZYD_CR16, 0x40 }, { ZYD_CR17, 0x58 }, \ 81902ac6454SAndrew Thompson { ZYD_CR18, 0x04 }, { ZYD_CR23, 0x66 }, { ZYD_CR24, 0x14 }, \ 82002ac6454SAndrew Thompson { ZYD_CR26, 0x90 }, { ZYD_CR31, 0x80 }, { ZYD_CR34, 0x06 }, \ 82102ac6454SAndrew Thompson { ZYD_CR35, 0x3e }, { ZYD_CR38, 0x38 }, { ZYD_CR46, 0x90 }, \ 82202ac6454SAndrew Thompson { ZYD_CR47, 0x1e }, { ZYD_CR64, 0x64 }, { ZYD_CR79, 0xb5 }, \ 82302ac6454SAndrew Thompson { ZYD_CR80, 0x38 }, { ZYD_CR81, 0x30 }, { ZYD_CR113, 0xc0 }, \ 82402ac6454SAndrew Thompson { ZYD_CR127, 0x03 } \ 82502ac6454SAndrew Thompson } 82602ac6454SAndrew Thompson 82702ac6454SAndrew Thompson #define ZYD_AL2210_RF \ 82802ac6454SAndrew Thompson { \ 82902ac6454SAndrew Thompson 0x2396c0, 0x00fcb1, 0x358132, 0x0108b3, 0xc77804, 0x456415, \ 83002ac6454SAndrew Thompson 0xff2226, 0x806667, 0x7860f8, 0xbb01c9, 0x00000a, 0x00000b \ 83102ac6454SAndrew Thompson } 83202ac6454SAndrew Thompson 83302ac6454SAndrew Thompson #define ZYD_AL2210_CHANTABLE \ 83402ac6454SAndrew Thompson { \ 83502ac6454SAndrew Thompson 0x0196c0, 0x019710, 0x019760, 0x0197b0, 0x019800, 0x019850, \ 83602ac6454SAndrew Thompson 0x0198a0, 0x0198f0, 0x019940, 0x019990, 0x0199e0, 0x019a30, \ 83702ac6454SAndrew Thompson 0x019a80, 0x019b40 \ 83802ac6454SAndrew Thompson } 83902ac6454SAndrew Thompson 84002ac6454SAndrew Thompson #define ZYD_GCT_PHY \ 84102ac6454SAndrew Thompson { \ 84278cc4bbbSWeongyo Jeong { ZYD_CR10, 0x89 }, { ZYD_CR15, 0x20 }, { ZYD_CR17, 0x28 }, \ 84378cc4bbbSWeongyo Jeong { ZYD_CR23, 0x38 }, { ZYD_CR24, 0x20 }, { ZYD_CR26, 0x93 }, \ 84478cc4bbbSWeongyo Jeong { ZYD_CR27, 0x15 }, { ZYD_CR28, 0x3e }, { ZYD_CR29, 0x00 }, \ 84578cc4bbbSWeongyo Jeong { ZYD_CR33, 0x28 }, { ZYD_CR34, 0x30 }, { ZYD_CR35, 0x43 }, \ 84678cc4bbbSWeongyo Jeong { ZYD_CR41, 0x24 }, { ZYD_CR44, 0x32 }, { ZYD_CR46, 0x92 }, \ 84778cc4bbbSWeongyo Jeong { ZYD_CR47, 0x1e }, { ZYD_CR48, 0x04 }, { ZYD_CR49, 0xfa }, \ 84878cc4bbbSWeongyo Jeong { ZYD_CR79, 0x58 }, { ZYD_CR80, 0x30 }, { ZYD_CR81, 0x30 }, \ 84978cc4bbbSWeongyo Jeong { ZYD_CR87, 0x0a }, { ZYD_CR89, 0x04 }, { ZYD_CR91, 0x00 }, \ 85078cc4bbbSWeongyo Jeong { ZYD_CR92, 0x0a }, { ZYD_CR98, 0x8d }, { ZYD_CR99, 0x28 }, \ 85178cc4bbbSWeongyo Jeong { ZYD_CR100, 0x02 }, { ZYD_CR101, 0x09 }, { ZYD_CR102, 0x27 }, \ 85278cc4bbbSWeongyo Jeong { ZYD_CR106, 0x1c }, { ZYD_CR107, 0x1c }, { ZYD_CR109, 0x13 }, \ 85378cc4bbbSWeongyo Jeong { ZYD_CR110, 0x1f }, { ZYD_CR111, 0x13 }, { ZYD_CR112, 0x1f }, \ 85478cc4bbbSWeongyo Jeong { ZYD_CR113, 0x27 }, { ZYD_CR114, 0x23 }, { ZYD_CR115, 0x24 }, \ 85578cc4bbbSWeongyo Jeong { ZYD_CR116, 0x24 }, { ZYD_CR117, 0xfa }, { ZYD_CR118, 0xf0 }, \ 85678cc4bbbSWeongyo Jeong { ZYD_CR119, 0x1a }, { ZYD_CR120, 0x4f }, { ZYD_CR121, 0x1f }, \ 85778cc4bbbSWeongyo Jeong { ZYD_CR122, 0xf0 }, { ZYD_CR123, 0x57 }, { ZYD_CR125, 0xad }, \ 85878cc4bbbSWeongyo Jeong { ZYD_CR126, 0x6c }, { ZYD_CR127, 0x03 }, { ZYD_CR128, 0x14 }, \ 85978cc4bbbSWeongyo Jeong { ZYD_CR129, 0x12 }, { ZYD_CR130, 0x10 }, { ZYD_CR137, 0x50 }, \ 86078cc4bbbSWeongyo Jeong { ZYD_CR138, 0xa8 }, { ZYD_CR144, 0xac }, { ZYD_CR146, 0x20 }, \ 86178cc4bbbSWeongyo Jeong { ZYD_CR252, 0xff }, { ZYD_CR253, 0xff } \ 86202ac6454SAndrew Thompson } 86302ac6454SAndrew Thompson 86402ac6454SAndrew Thompson #define ZYD_GCT_RF \ 86502ac6454SAndrew Thompson { \ 86678cc4bbbSWeongyo Jeong 0x40002b, 0x519e4f, 0x6f81ad, 0x73fffe, 0x25f9c, 0x100047, \ 86778cc4bbbSWeongyo Jeong 0x200999, 0x307602, 0x346063, \ 86802ac6454SAndrew Thompson } 86902ac6454SAndrew Thompson 87078cc4bbbSWeongyo Jeong #define ZYD_GCT_VCO \ 87102ac6454SAndrew Thompson { \ 87278cc4bbbSWeongyo Jeong { 0x664d, 0x604d, 0x6675, 0x6475, 0x6655, 0x6455, 0x6665 }, \ 87378cc4bbbSWeongyo Jeong { 0x666d, 0x606d, 0x664d, 0x644d, 0x6675, 0x6475, 0x6655 }, \ 87478cc4bbbSWeongyo Jeong { 0x665d, 0x605d, 0x666d, 0x646d, 0x664d, 0x644d, 0x6675 }, \ 87578cc4bbbSWeongyo Jeong { 0x667d, 0x607d, 0x665d, 0x645d, 0x666d, 0x646d, 0x664d }, \ 87678cc4bbbSWeongyo Jeong { 0x6643, 0x6043, 0x667d, 0x647d, 0x665d, 0x645d, 0x666d }, \ 87778cc4bbbSWeongyo Jeong { 0x6663, 0x6063, 0x6643, 0x6443, 0x667d, 0x647d, 0x665d }, \ 87878cc4bbbSWeongyo Jeong { 0x6653, 0x6053, 0x6663, 0x6463, 0x6643, 0x6443, 0x667d }, \ 87978cc4bbbSWeongyo Jeong { 0x6673, 0x6073, 0x6653, 0x6453, 0x6663, 0x6463, 0x6643 }, \ 88078cc4bbbSWeongyo Jeong { 0x664b, 0x604b, 0x6673, 0x6473, 0x6653, 0x6453, 0x6663 }, \ 88178cc4bbbSWeongyo Jeong { 0x666b, 0x606b, 0x664b, 0x644b, 0x6673, 0x6473, 0x6653 }, \ 88278cc4bbbSWeongyo Jeong { 0x665b, 0x605b, 0x666b, 0x646b, 0x664b, 0x644b, 0x6673 } \ 88302ac6454SAndrew Thompson } 88402ac6454SAndrew Thompson 88578cc4bbbSWeongyo Jeong #define ZYD_GCT_TXGAIN \ 88602ac6454SAndrew Thompson { \ 88778cc4bbbSWeongyo Jeong 0x0e313, 0x0fb13, 0x0e093, 0x0f893, 0x0ea93, 0x1f093, 0x1f493, \ 88878cc4bbbSWeongyo Jeong 0x1f693, 0x1f393, 0x1f35b, 0x1e6db, 0x1ff3f, 0x1ffff, 0x361d7, \ 88978cc4bbbSWeongyo Jeong 0x37fbf, 0x3ff8b, 0x3ff33, 0x3fb3f, 0x3ffff \ 89002ac6454SAndrew Thompson } 89102ac6454SAndrew Thompson 89278cc4bbbSWeongyo Jeong #define ZYD_GCT_CHANNEL_ACAL \ 89302ac6454SAndrew Thompson { \ 89478cc4bbbSWeongyo Jeong 0x106847, 0x106847, 0x106867, 0x106867, 0x106867, 0x106867, \ 89578cc4bbbSWeongyo Jeong 0x106857, 0x106857, 0x106857, 0x106857, 0x106877, 0x106877, \ 89678cc4bbbSWeongyo Jeong 0x106877, 0x10684f \ 89702ac6454SAndrew Thompson } 89802ac6454SAndrew Thompson 89978cc4bbbSWeongyo Jeong #define ZYD_GCT_CHANNEL_STD \ 90002ac6454SAndrew Thompson { \ 90178cc4bbbSWeongyo Jeong 0x100047, 0x100047, 0x100067, 0x100067, 0x100067, 0x100067, \ 90278cc4bbbSWeongyo Jeong 0x100057, 0x100057, 0x100057, 0x100057, 0x100077, 0x100077, \ 90378cc4bbbSWeongyo Jeong 0x100077, 0x10004f \ 90478cc4bbbSWeongyo Jeong } 90578cc4bbbSWeongyo Jeong 90678cc4bbbSWeongyo Jeong #define ZYD_GCT_CHANNEL_DIV \ 90778cc4bbbSWeongyo Jeong { \ 90878cc4bbbSWeongyo Jeong 0x200999, 0x20099b, 0x200998, 0x20099a, 0x200999, 0x20099b, \ 90978cc4bbbSWeongyo Jeong 0x200998, 0x20099a, 0x200999, 0x20099b, 0x200998, 0x20099a, \ 91078cc4bbbSWeongyo Jeong 0x200999, 0x200ccc \ 91102ac6454SAndrew Thompson } 91202ac6454SAndrew Thompson 91302ac6454SAndrew Thompson #define ZYD_MAXIM2_PHY \ 91402ac6454SAndrew Thompson { \ 91502ac6454SAndrew Thompson { ZYD_CR23, 0x40 }, { ZYD_CR15, 0x20 }, { ZYD_CR28, 0x3e }, \ 91602ac6454SAndrew Thompson { ZYD_CR29, 0x00 }, { ZYD_CR26, 0x11 }, { ZYD_CR44, 0x33 }, \ 91702ac6454SAndrew Thompson { ZYD_CR106, 0x2a }, { ZYD_CR107, 0x1a }, { ZYD_CR109, 0x2b }, \ 91802ac6454SAndrew Thompson { ZYD_CR110, 0x2b }, { ZYD_CR111, 0x2b }, { ZYD_CR112, 0x2b }, \ 91902ac6454SAndrew Thompson { ZYD_CR10, 0x89 }, { ZYD_CR17, 0x20 }, { ZYD_CR26, 0x93 }, \ 92002ac6454SAndrew Thompson { ZYD_CR34, 0x30 }, { ZYD_CR35, 0x40 }, { ZYD_CR41, 0x24 }, \ 92102ac6454SAndrew Thompson { ZYD_CR44, 0x32 }, { ZYD_CR46, 0x90 }, { ZYD_CR89, 0x18 }, \ 92202ac6454SAndrew Thompson { ZYD_CR92, 0x0a }, { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 }, \ 92302ac6454SAndrew Thompson { ZYD_CR106, 0x20 }, { ZYD_CR107, 0x24 }, { ZYD_CR109, 0x09 }, \ 92402ac6454SAndrew Thompson { ZYD_CR110, 0x13 }, { ZYD_CR111, 0x13 }, { ZYD_CR112, 0x13 }, \ 92502ac6454SAndrew Thompson { ZYD_CR113, 0x27 }, { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x24 }, \ 92602ac6454SAndrew Thompson { ZYD_CR116, 0x24 }, { ZYD_CR117, 0xf4 }, { ZYD_CR118, 0xfa }, \ 92702ac6454SAndrew Thompson { ZYD_CR120, 0x4f }, { ZYD_CR121, 0x77 }, { ZYD_CR122, 0xfe }, \ 92802ac6454SAndrew Thompson { ZYD_CR10, 0x89 }, { ZYD_CR17, 0x20 }, { ZYD_CR26, 0x93 }, \ 92902ac6454SAndrew Thompson { ZYD_CR34, 0x30 }, { ZYD_CR35, 0x40 }, { ZYD_CR41, 0x24 }, \ 93002ac6454SAndrew Thompson { ZYD_CR44, 0x32 }, { ZYD_CR46, 0x90 }, { ZYD_CR79, 0x58 }, \ 93102ac6454SAndrew Thompson { ZYD_CR80, 0x30 }, { ZYD_CR81, 0x30 }, { ZYD_CR89, 0x18 }, \ 93202ac6454SAndrew Thompson { ZYD_CR92, 0x0a }, { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 }, \ 93302ac6454SAndrew Thompson { ZYD_CR106, 0x20 }, { ZYD_CR107, 0x24 }, { ZYD_CR109, 0x09 }, \ 93402ac6454SAndrew Thompson { ZYD_CR110, 0x13 }, { ZYD_CR111, 0x13 }, { ZYD_CR112, 0x13 }, \ 93502ac6454SAndrew Thompson { ZYD_CR113, 0x27 }, { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x24 }, \ 93602ac6454SAndrew Thompson { ZYD_CR116, 0x24 }, { ZYD_CR117, 0xf4 }, { ZYD_CR118, 0x00 }, \ 93702ac6454SAndrew Thompson { ZYD_CR120, 0x4f }, { ZYD_CR121, 0x06 }, { ZYD_CR122, 0xfe } \ 93802ac6454SAndrew Thompson } 93902ac6454SAndrew Thompson 94002ac6454SAndrew Thompson #define ZYD_MAXIM2_RF \ 94102ac6454SAndrew Thompson { \ 94202ac6454SAndrew Thompson 0x33334, 0x10a03, 0x00400, 0x00ca1, 0x10072, 0x18645, 0x04006, \ 94302ac6454SAndrew Thompson 0x000a7, 0x08258, 0x03fc9, 0x0040a, 0x0000b, 0x0026c \ 94402ac6454SAndrew Thompson } 94502ac6454SAndrew Thompson 94602ac6454SAndrew Thompson #define ZYD_MAXIM2_CHANTABLE_F \ 94702ac6454SAndrew Thompson { \ 94802ac6454SAndrew Thompson 0x33334, 0x08884, 0x1ddd4, 0x33334, 0x08884, 0x1ddd4, 0x33334, \ 94902ac6454SAndrew Thompson 0x08884, 0x1ddd4, 0x33334, 0x08884, 0x1ddd4, 0x33334, 0x26664 \ 95002ac6454SAndrew Thompson } 95102ac6454SAndrew Thompson 95202ac6454SAndrew Thompson #define ZYD_MAXIM2_CHANTABLE \ 95302ac6454SAndrew Thompson { \ 95402ac6454SAndrew Thompson { 0x33334, 0x10a03 }, \ 95502ac6454SAndrew Thompson { 0x08884, 0x20a13 }, \ 95602ac6454SAndrew Thompson { 0x1ddd4, 0x30a13 }, \ 95702ac6454SAndrew Thompson { 0x33334, 0x10a13 }, \ 95802ac6454SAndrew Thompson { 0x08884, 0x20a23 }, \ 95902ac6454SAndrew Thompson { 0x1ddd4, 0x30a23 }, \ 96002ac6454SAndrew Thompson { 0x33334, 0x10a23 }, \ 96102ac6454SAndrew Thompson { 0x08884, 0x20a33 }, \ 96202ac6454SAndrew Thompson { 0x1ddd4, 0x30a33 }, \ 96302ac6454SAndrew Thompson { 0x33334, 0x10a33 }, \ 96402ac6454SAndrew Thompson { 0x08884, 0x20a43 }, \ 96502ac6454SAndrew Thompson { 0x1ddd4, 0x30a43 }, \ 96602ac6454SAndrew Thompson { 0x33334, 0x10a43 }, \ 96702ac6454SAndrew Thompson { 0x26664, 0x20a53 } \ 96802ac6454SAndrew Thompson } 96902ac6454SAndrew Thompson 970e87b19e3SWeongyo Jeong #define ZYD_TX_RATEDIV \ 971e87b19e3SWeongyo Jeong { \ 972b8e3094cSHans Petter Selasky 0x1, 0x2, 0xb, 0xb, 0x1, 0x1, 0x1, 0x1, 0x30, 0x18, 0xc, 0x6, \ 973e87b19e3SWeongyo Jeong 0x36, 0x24, 0x12, 0x9 \ 974e87b19e3SWeongyo Jeong } 975e87b19e3SWeongyo Jeong 97602ac6454SAndrew Thompson /* 97702ac6454SAndrew Thompson * Control pipe requests. 97802ac6454SAndrew Thompson */ 97902ac6454SAndrew Thompson #define ZYD_DOWNLOADREQ 0x30 98002ac6454SAndrew Thompson #define ZYD_DOWNLOADSTS 0x31 98102ac6454SAndrew Thompson #define ZYD_READFWDATAREQ 0x32 98202ac6454SAndrew Thompson 98302ac6454SAndrew Thompson /* possible values for register ZYD_CR_INTERRUPT */ 98402ac6454SAndrew Thompson #define ZYD_HWINT_MASK 0x004f0000 98502ac6454SAndrew Thompson 98602ac6454SAndrew Thompson /* possible values for register ZYD_MAC_MISC */ 98702ac6454SAndrew Thompson #define ZYD_UNLOCK_PHY_REGS 0x80 98802ac6454SAndrew Thompson 98902ac6454SAndrew Thompson /* possible values for register ZYD_MAC_ENCRYPTION_TYPE */ 99002ac6454SAndrew Thompson #define ZYD_ENC_SNIFFER 8 99102ac6454SAndrew Thompson 99202ac6454SAndrew Thompson /* flags for register ZYD_MAC_RXFILTER */ 99302ac6454SAndrew Thompson #define ZYD_FILTER_ASS_REQ (1 << 0) 99402ac6454SAndrew Thompson #define ZYD_FILTER_ASS_RSP (1 << 1) 99502ac6454SAndrew Thompson #define ZYD_FILTER_REASS_REQ (1 << 2) 99602ac6454SAndrew Thompson #define ZYD_FILTER_REASS_RSP (1 << 3) 99702ac6454SAndrew Thompson #define ZYD_FILTER_PRB_REQ (1 << 4) 99802ac6454SAndrew Thompson #define ZYD_FILTER_PRB_RSP (1 << 5) 99902ac6454SAndrew Thompson #define ZYD_FILTER_BCN (1 << 8) 100002ac6454SAndrew Thompson #define ZYD_FILTER_ATIM (1 << 9) 100102ac6454SAndrew Thompson #define ZYD_FILTER_DEASS (1 << 10) 100202ac6454SAndrew Thompson #define ZYD_FILTER_AUTH (1 << 11) 100302ac6454SAndrew Thompson #define ZYD_FILTER_DEAUTH (1 << 12) 100402ac6454SAndrew Thompson #define ZYD_FILTER_PS_POLL (1 << 26) 100502ac6454SAndrew Thompson #define ZYD_FILTER_RTS (1 << 27) 100602ac6454SAndrew Thompson #define ZYD_FILTER_CTS (1 << 28) 100702ac6454SAndrew Thompson #define ZYD_FILTER_ACK (1 << 29) 100802ac6454SAndrew Thompson #define ZYD_FILTER_CFE (1 << 30) 10097a22215cSEitan Adler #define ZYD_FILTER_CFE_A (1U << 31) 101002ac6454SAndrew Thompson 101102ac6454SAndrew Thompson /* helpers for register ZYD_MAC_RXFILTER */ 101202ac6454SAndrew Thompson #define ZYD_FILTER_MONITOR 0xffffffff 101302ac6454SAndrew Thompson #define ZYD_FILTER_BSS \ 101402ac6454SAndrew Thompson (ZYD_FILTER_ASS_REQ | ZYD_FILTER_ASS_RSP | \ 101502ac6454SAndrew Thompson ZYD_FILTER_REASS_REQ | ZYD_FILTER_REASS_RSP | \ 101602ac6454SAndrew Thompson ZYD_FILTER_PRB_REQ | ZYD_FILTER_PRB_RSP | \ 101702ac6454SAndrew Thompson (0x3 << 6) | \ 101802ac6454SAndrew Thompson ZYD_FILTER_BCN | ZYD_FILTER_ATIM | ZYD_FILTER_DEASS | \ 101902ac6454SAndrew Thompson ZYD_FILTER_AUTH | ZYD_FILTER_DEAUTH | \ 102002ac6454SAndrew Thompson (0x7 << 13) | \ 102102ac6454SAndrew Thompson ZYD_FILTER_PS_POLL | ZYD_FILTER_ACK) 102202ac6454SAndrew Thompson #define ZYD_FILTER_HOSTAP \ 102302ac6454SAndrew Thompson (ZYD_FILTER_ASS_REQ | ZYD_FILTER_REASS_REQ | \ 102402ac6454SAndrew Thompson ZYD_FILTER_PRB_REQ | ZYD_FILTER_DEASS | ZYD_FILTER_AUTH | \ 102502ac6454SAndrew Thompson ZYD_FILTER_DEAUTH | ZYD_FILTER_PS_POLL) 102602ac6454SAndrew Thompson 102702ac6454SAndrew Thompson struct zyd_tx_desc { 102802ac6454SAndrew Thompson uint8_t phy; 102902ac6454SAndrew Thompson #define ZYD_TX_PHY_SIGNAL(x) ((x) & 0xf) 103002ac6454SAndrew Thompson #define ZYD_TX_PHY_OFDM (1 << 4) 103102ac6454SAndrew Thompson #define ZYD_TX_PHY_SHPREAMBLE (1 << 5) /* CCK */ 103202ac6454SAndrew Thompson #define ZYD_TX_PHY_5GHZ (1 << 5) /* OFDM */ 103302ac6454SAndrew Thompson uint16_t len; 103402ac6454SAndrew Thompson uint8_t flags; 103502ac6454SAndrew Thompson #define ZYD_TX_FLAG_BACKOFF (1 << 0) 103602ac6454SAndrew Thompson #define ZYD_TX_FLAG_MULTICAST (1 << 1) 103702ac6454SAndrew Thompson #define ZYD_TX_FLAG_TYPE(x) (((x) & 0x3) << 2) 103802ac6454SAndrew Thompson #define ZYD_TX_TYPE_DATA 0 103902ac6454SAndrew Thompson #define ZYD_TX_TYPE_PS_POLL 1 104002ac6454SAndrew Thompson #define ZYD_TX_TYPE_MGMT 2 104102ac6454SAndrew Thompson #define ZYD_TX_TYPE_CTL 3 104202ac6454SAndrew Thompson #define ZYD_TX_FLAG_WAKEUP (1 << 4) 104302ac6454SAndrew Thompson #define ZYD_TX_FLAG_RTS (1 << 5) 104402ac6454SAndrew Thompson #define ZYD_TX_FLAG_ENCRYPT (1 << 6) 104502ac6454SAndrew Thompson #define ZYD_TX_FLAG_CTS_TO_SELF (1 << 7) 104602ac6454SAndrew Thompson uint16_t pktlen; 104702ac6454SAndrew Thompson uint16_t plcp_length; 104802ac6454SAndrew Thompson uint8_t plcp_service; 104902ac6454SAndrew Thompson #define ZYD_PLCP_LENGEXT 0x80 105002ac6454SAndrew Thompson uint16_t nextlen; 105102ac6454SAndrew Thompson } __packed; 105202ac6454SAndrew Thompson 105302ac6454SAndrew Thompson struct zyd_plcphdr { 105402ac6454SAndrew Thompson uint8_t signal; 105502ac6454SAndrew Thompson uint8_t reserved[2]; 105602ac6454SAndrew Thompson uint16_t service; /* unaligned! */ 105702ac6454SAndrew Thompson } __packed; 105802ac6454SAndrew Thompson 105902ac6454SAndrew Thompson struct zyd_rx_stat { 106002ac6454SAndrew Thompson uint8_t signal_cck; 106102ac6454SAndrew Thompson uint8_t rssi; 106202ac6454SAndrew Thompson uint8_t signal_ofdm; 106302ac6454SAndrew Thompson uint8_t cipher; 106402ac6454SAndrew Thompson #define ZYD_RX_CIPHER_WEP64 1 106502ac6454SAndrew Thompson #define ZYD_RX_CIPHER_TKIP 2 106602ac6454SAndrew Thompson #define ZYD_RX_CIPHER_AES 4 106702ac6454SAndrew Thompson #define ZYD_RX_CIPHER_WEP128 5 106802ac6454SAndrew Thompson #define ZYD_RX_CIPHER_WEP256 6 106902ac6454SAndrew Thompson #define ZYD_RX_CIPHER_WEP \ 107002ac6454SAndrew Thompson (ZYD_RX_CIPHER_WEP64 | ZYD_RX_CIPHER_WEP128 | ZYD_RX_CIPHER_WEP256) 107102ac6454SAndrew Thompson uint8_t flags; 107202ac6454SAndrew Thompson #define ZYD_RX_OFDM (1 << 0) 107302ac6454SAndrew Thompson #define ZYD_RX_TIMEOUT (1 << 1) 107402ac6454SAndrew Thompson #define ZYD_RX_OVERRUN (1 << 2) 107502ac6454SAndrew Thompson #define ZYD_RX_DECRYPTERR (1 << 3) 107602ac6454SAndrew Thompson #define ZYD_RX_BADCRC32 (1 << 4) 107702ac6454SAndrew Thompson #define ZYD_RX_NOT2ME (1 << 5) 107802ac6454SAndrew Thompson #define ZYD_RX_BADCRC16 (1 << 6) 107902ac6454SAndrew Thompson #define ZYD_RX_ERROR (1 << 7) 108002ac6454SAndrew Thompson } __packed; 108102ac6454SAndrew Thompson 108202ac6454SAndrew Thompson /* this structure may be unaligned */ 108302ac6454SAndrew Thompson struct zyd_rx_desc { 108402ac6454SAndrew Thompson #define ZYD_MAX_RXFRAMECNT 3 108502ac6454SAndrew Thompson uWord len[ZYD_MAX_RXFRAMECNT]; 108602ac6454SAndrew Thompson uWord tag; 108702ac6454SAndrew Thompson #define ZYD_TAG_MULTIFRAME 0x697e 108802ac6454SAndrew Thompson } __packed; 108902ac6454SAndrew Thompson 109002ac6454SAndrew Thompson /* I2C bus alike */ 109102ac6454SAndrew Thompson struct zyd_rfwrite_cmd { 109202ac6454SAndrew Thompson uint16_t code; 109302ac6454SAndrew Thompson uint16_t width; 109402ac6454SAndrew Thompson uint16_t bit[32]; 109502ac6454SAndrew Thompson #define ZYD_RF_IF_LE (1 << 1) 109602ac6454SAndrew Thompson #define ZYD_RF_CLK (1 << 2) 109702ac6454SAndrew Thompson #define ZYD_RF_DATA (1 << 3) 109802ac6454SAndrew Thompson } __packed; 109902ac6454SAndrew Thompson 110002ac6454SAndrew Thompson struct zyd_cmd { 110102ac6454SAndrew Thompson uint16_t code; 110202ac6454SAndrew Thompson #define ZYD_CMD_IOWR 0x0021 /* write HMAC or PHY register */ 110302ac6454SAndrew Thompson #define ZYD_CMD_IORD 0x0022 /* read HMAC or PHY register */ 110402ac6454SAndrew Thompson #define ZYD_CMD_RFCFG 0x0023 /* write RF register */ 110502ac6454SAndrew Thompson #define ZYD_NOTIF_IORD 0x9001 /* response for ZYD_CMD_IORD */ 110602ac6454SAndrew Thompson #define ZYD_NOTIF_MACINTR 0x9001 /* interrupt notification */ 110702ac6454SAndrew Thompson #define ZYD_NOTIF_RETRYSTATUS 0xa001 /* Tx retry notification */ 110802ac6454SAndrew Thompson uint8_t data[64]; 110902ac6454SAndrew Thompson } __packed; 111002ac6454SAndrew Thompson 111102ac6454SAndrew Thompson /* structure for command ZYD_CMD_IOWR */ 111202ac6454SAndrew Thompson struct zyd_pair { 111302ac6454SAndrew Thompson uint16_t reg; 111402ac6454SAndrew Thompson /* helpers macros to read/write 32-bit registers */ 111502ac6454SAndrew Thompson #define ZYD_REG32_LO(reg) (reg) 111602ac6454SAndrew Thompson #define ZYD_REG32_HI(reg) \ 111702ac6454SAndrew Thompson ((reg) + ((((reg) & 0xf000) == 0x9000) ? 2 : 1)) 111802ac6454SAndrew Thompson uint16_t val; 111902ac6454SAndrew Thompson } __packed; 112002ac6454SAndrew Thompson 112102ac6454SAndrew Thompson /* structure for notification ZYD_NOTIF_RETRYSTATUS */ 112202ac6454SAndrew Thompson struct zyd_notif_retry { 112302ac6454SAndrew Thompson uint16_t rate; 112402ac6454SAndrew Thompson uint8_t macaddr[IEEE80211_ADDR_LEN]; 112502ac6454SAndrew Thompson uint16_t count; 112602ac6454SAndrew Thompson } __packed; 112702ac6454SAndrew Thompson 112802ac6454SAndrew Thompson #define ZYD_CONFIG_INDEX 0 112902ac6454SAndrew Thompson #define ZYD_IFACE_INDEX 0 113002ac6454SAndrew Thompson 113102ac6454SAndrew Thompson #define ZYD_INTR_TIMEOUT 1000 113202ac6454SAndrew Thompson #define ZYD_TX_TIMEOUT 10000 113302ac6454SAndrew Thompson 113402ac6454SAndrew Thompson #define ZYD_MAX_TXBUFSZ \ 113502ac6454SAndrew Thompson (sizeof(struct zyd_tx_desc) + MCLBYTES) 113602ac6454SAndrew Thompson #define ZYD_MIN_FRAGSZ \ 113702ac6454SAndrew Thompson (sizeof(struct zyd_plcphdr) + IEEE80211_MIN_LEN + \ 113802ac6454SAndrew Thompson sizeof(struct zyd_rx_stat)) 113902ac6454SAndrew Thompson #define ZYD_MIN_RXBUFSZ ZYD_MIN_FRAGSZ 114002ac6454SAndrew Thompson #define ZYX_MAX_RXBUFSZ \ 114102ac6454SAndrew Thompson ((sizeof (struct zyd_plcphdr) + IEEE80211_MAX_LEN + \ 114202ac6454SAndrew Thompson sizeof (struct zyd_rx_stat)) * ZYD_MAX_RXFRAMECNT + \ 114302ac6454SAndrew Thompson sizeof (struct zyd_rx_desc)) 114402ac6454SAndrew Thompson #define ZYD_TX_DESC_SIZE (sizeof (struct zyd_tx_desc)) 114502ac6454SAndrew Thompson 114602ac6454SAndrew Thompson #define ZYD_RX_LIST_CNT 1 114702ac6454SAndrew Thompson #define ZYD_TX_LIST_CNT 5 114802ac6454SAndrew Thompson #define ZYD_CMD_FLAG_READ (1 << 0) 114902ac6454SAndrew Thompson #define ZYD_CMD_FLAG_SENT (1 << 1) 115002ac6454SAndrew Thompson 115102ac6454SAndrew Thompson /* quickly determine if a given rate is CCK or OFDM */ 115202ac6454SAndrew Thompson #define ZYD_RATE_IS_OFDM(rate) ((rate) >= 12 && (rate) != 22) 115302ac6454SAndrew Thompson 115402ac6454SAndrew Thompson struct zyd_phy_pair { 115502ac6454SAndrew Thompson uint16_t reg; 115602ac6454SAndrew Thompson uint8_t val; 115702ac6454SAndrew Thompson }; 115802ac6454SAndrew Thompson 115902ac6454SAndrew Thompson struct zyd_mac_pair { 116002ac6454SAndrew Thompson uint16_t reg; 116102ac6454SAndrew Thompson uint32_t val; 116202ac6454SAndrew Thompson }; 116302ac6454SAndrew Thompson 116402ac6454SAndrew Thompson struct zyd_tx_data { 116502ac6454SAndrew Thompson STAILQ_ENTRY(zyd_tx_data) next; 116602ac6454SAndrew Thompson struct zyd_softc *sc; 116702ac6454SAndrew Thompson struct zyd_tx_desc desc; 116802ac6454SAndrew Thompson struct mbuf *m; 116902ac6454SAndrew Thompson struct ieee80211_node *ni; 117002ac6454SAndrew Thompson int rate; 117102ac6454SAndrew Thompson }; 117202ac6454SAndrew Thompson typedef STAILQ_HEAD(, zyd_tx_data) zyd_txdhead; 117302ac6454SAndrew Thompson 117402ac6454SAndrew Thompson struct zyd_rx_data { 117502ac6454SAndrew Thompson struct mbuf *m; 117602ac6454SAndrew Thompson int rssi; 117702ac6454SAndrew Thompson }; 117802ac6454SAndrew Thompson 117902ac6454SAndrew Thompson struct zyd_rx_radiotap_header { 118002ac6454SAndrew Thompson struct ieee80211_radiotap_header wr_ihdr; 118102ac6454SAndrew Thompson uint8_t wr_flags; 118202ac6454SAndrew Thompson uint8_t wr_rate; 118302ac6454SAndrew Thompson uint16_t wr_chan_freq; 118402ac6454SAndrew Thompson uint16_t wr_chan_flags; 118502ac6454SAndrew Thompson int8_t wr_antsignal; 118602ac6454SAndrew Thompson int8_t wr_antnoise; 1187e8353a7aSHans Petter Selasky } __packed __aligned(8); 118802ac6454SAndrew Thompson 118902ac6454SAndrew Thompson #define ZYD_RX_RADIOTAP_PRESENT \ 119002ac6454SAndrew Thompson ((1 << IEEE80211_RADIOTAP_FLAGS) | \ 119102ac6454SAndrew Thompson (1 << IEEE80211_RADIOTAP_RATE) | \ 119202ac6454SAndrew Thompson (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \ 119302ac6454SAndrew Thompson (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | \ 119402ac6454SAndrew Thompson (1 << IEEE80211_RADIOTAP_CHANNEL)) 119502ac6454SAndrew Thompson 119602ac6454SAndrew Thompson struct zyd_tx_radiotap_header { 119702ac6454SAndrew Thompson struct ieee80211_radiotap_header wt_ihdr; 119802ac6454SAndrew Thompson uint8_t wt_flags; 119902ac6454SAndrew Thompson uint8_t wt_rate; 120002ac6454SAndrew Thompson uint16_t wt_chan_freq; 120102ac6454SAndrew Thompson uint16_t wt_chan_flags; 1202*786ac703SAndriy Voskoboinyk } __packed; 120302ac6454SAndrew Thompson 120402ac6454SAndrew Thompson #define ZYD_TX_RADIOTAP_PRESENT \ 120502ac6454SAndrew Thompson ((1 << IEEE80211_RADIOTAP_FLAGS) | \ 120602ac6454SAndrew Thompson (1 << IEEE80211_RADIOTAP_RATE) | \ 120702ac6454SAndrew Thompson (1 << IEEE80211_RADIOTAP_CHANNEL)) 120802ac6454SAndrew Thompson 120902ac6454SAndrew Thompson struct zyd_softc; /* forward declaration */ 121002ac6454SAndrew Thompson 121102ac6454SAndrew Thompson struct zyd_rf { 121202ac6454SAndrew Thompson /* RF methods */ 121302ac6454SAndrew Thompson int (*init)(struct zyd_rf *); 121402ac6454SAndrew Thompson int (*switch_radio)(struct zyd_rf *, int); 121502ac6454SAndrew Thompson int (*set_channel)(struct zyd_rf *, uint8_t); 121602ac6454SAndrew Thompson int (*bandedge6)(struct zyd_rf *, 121702ac6454SAndrew Thompson struct ieee80211_channel *); 121802ac6454SAndrew Thompson /* RF attributes */ 121902ac6454SAndrew Thompson struct zyd_softc *rf_sc; /* back-pointer */ 122002ac6454SAndrew Thompson int width; 122178cc4bbbSWeongyo Jeong int idx; /* for GIT RF */ 122278cc4bbbSWeongyo Jeong int update_pwr; 122302ac6454SAndrew Thompson }; 122402ac6454SAndrew Thompson 122502ac6454SAndrew Thompson struct zyd_rq { 122602ac6454SAndrew Thompson struct zyd_cmd *cmd; 122702ac6454SAndrew Thompson const uint16_t *idata; 122802ac6454SAndrew Thompson struct zyd_pair *odata; 122902ac6454SAndrew Thompson int ilen; 123002ac6454SAndrew Thompson int olen; 123102ac6454SAndrew Thompson int flags; 123202ac6454SAndrew Thompson STAILQ_ENTRY(zyd_rq) rq; 123302ac6454SAndrew Thompson }; 123402ac6454SAndrew Thompson 123502ac6454SAndrew Thompson struct zyd_vap { 123602ac6454SAndrew Thompson struct ieee80211vap vap; 123702ac6454SAndrew Thompson int (*newstate)(struct ieee80211vap *, 123802ac6454SAndrew Thompson enum ieee80211_state, int); 123902ac6454SAndrew Thompson }; 124002ac6454SAndrew Thompson #define ZYD_VAP(vap) ((struct zyd_vap *)(vap)) 124102ac6454SAndrew Thompson 124202ac6454SAndrew Thompson enum { 124302ac6454SAndrew Thompson ZYD_BULK_WR, 124402ac6454SAndrew Thompson ZYD_BULK_RD, 124502ac6454SAndrew Thompson ZYD_INTR_WR, 124602ac6454SAndrew Thompson ZYD_INTR_RD, 124702ac6454SAndrew Thompson ZYD_N_TRANSFER = 4, 124802ac6454SAndrew Thompson }; 124902ac6454SAndrew Thompson 125002ac6454SAndrew Thompson struct zyd_softc { 12517a79cebfSGleb Smirnoff struct ieee80211com sc_ic; 1252f6930becSAndriy Voskoboinyk struct ieee80211_ratectl_tx_status sc_txs; 12537a79cebfSGleb Smirnoff struct mbufq sc_snd; 125402ac6454SAndrew Thompson device_t sc_dev; 1255760bc48eSAndrew Thompson struct usb_device *sc_udev; 125602ac6454SAndrew Thompson 1257760bc48eSAndrew Thompson struct usb_xfer *sc_xfer[ZYD_N_TRANSFER]; 125802ac6454SAndrew Thompson 125902ac6454SAndrew Thompson int sc_flags; 126002ac6454SAndrew Thompson #define ZYD_FLAG_FWLOADED (1 << 0) 126102ac6454SAndrew Thompson #define ZYD_FLAG_INITONCE (1 << 1) 126202ac6454SAndrew Thompson #define ZYD_FLAG_INITDONE (1 << 2) 1263645e4d17SHans Petter Selasky #define ZYD_FLAG_DETACHED (1 << 3) 12647a79cebfSGleb Smirnoff #define ZYD_FLAG_RUNNING (1 << 4) 126502ac6454SAndrew Thompson 126602ac6454SAndrew Thompson struct zyd_rf sc_rf; 126702ac6454SAndrew Thompson 126802ac6454SAndrew Thompson STAILQ_HEAD(, zyd_rq) sc_rtx; 126902ac6454SAndrew Thompson STAILQ_HEAD(, zyd_rq) sc_rqh; 127002ac6454SAndrew Thompson 127102ac6454SAndrew Thompson uint16_t sc_fwbase; 127202ac6454SAndrew Thompson uint8_t sc_regdomain; 127302ac6454SAndrew Thompson uint8_t sc_macrev; 127402ac6454SAndrew Thompson uint16_t sc_fwrev; 127502ac6454SAndrew Thompson uint8_t sc_rfrev; 127602ac6454SAndrew Thompson uint8_t sc_parev; 127702ac6454SAndrew Thompson uint8_t sc_al2230s; 127802ac6454SAndrew Thompson uint8_t sc_bandedge6; 127902ac6454SAndrew Thompson uint8_t sc_newphy; 128002ac6454SAndrew Thompson uint8_t sc_cckgain; 128102ac6454SAndrew Thompson uint8_t sc_fix_cr157; 128202ac6454SAndrew Thompson uint8_t sc_ledtype; 128302ac6454SAndrew Thompson uint8_t sc_txled; 128402ac6454SAndrew Thompson 128502ac6454SAndrew Thompson uint32_t sc_atim_wnd; 128602ac6454SAndrew Thompson uint32_t sc_pre_tbtt; 128702ac6454SAndrew Thompson uint32_t sc_bcn_int; 128802ac6454SAndrew Thompson 128902ac6454SAndrew Thompson uint8_t sc_pwrcal[14]; 129002ac6454SAndrew Thompson uint8_t sc_pwrint[14]; 129102ac6454SAndrew Thompson uint8_t sc_ofdm36_cal[14]; 129202ac6454SAndrew Thompson uint8_t sc_ofdm48_cal[14]; 129302ac6454SAndrew Thompson uint8_t sc_ofdm54_cal[14]; 1294ae132f11SAndriy Voskoboinyk uint8_t sc_bssid[IEEE80211_ADDR_LEN]; 129502ac6454SAndrew Thompson 129602ac6454SAndrew Thompson struct mtx sc_mtx; 129702ac6454SAndrew Thompson struct zyd_tx_data tx_data[ZYD_TX_LIST_CNT]; 129802ac6454SAndrew Thompson zyd_txdhead tx_q; 129902ac6454SAndrew Thompson zyd_txdhead tx_free; 130002ac6454SAndrew Thompson int tx_nfree; 130102ac6454SAndrew Thompson struct zyd_rx_desc sc_rx_desc; 130202ac6454SAndrew Thompson struct zyd_rx_data sc_rx_data[ZYD_MAX_RXFRAMECNT]; 130302ac6454SAndrew Thompson int sc_rx_count; 130402ac6454SAndrew Thompson 130502ac6454SAndrew Thompson struct zyd_cmd sc_ibuf; 130602ac6454SAndrew Thompson 130702ac6454SAndrew Thompson struct zyd_rx_radiotap_header sc_rxtap; 130802ac6454SAndrew Thompson struct zyd_tx_radiotap_header sc_txtap; 130902ac6454SAndrew Thompson }; 131002ac6454SAndrew Thompson 131102ac6454SAndrew Thompson #define ZYD_LOCK(sc) mtx_lock(&(sc)->sc_mtx) 131202ac6454SAndrew Thompson #define ZYD_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) 131302ac6454SAndrew Thompson #define ZYD_LOCK_ASSERT(sc, t) mtx_assert(&(sc)->sc_mtx, t) 1314