Lines Matching refs:priv
27 struct rtl8187_priv *priv = dev->priv; in rtl8225_write_bitbang() local
34 reg80 = rtl818x_ioread16(priv, &priv->map->RFPinsOutput) & 0xfff3; in rtl8225_write_bitbang()
35 reg82 = rtl818x_ioread16(priv, &priv->map->RFPinsEnable); in rtl8225_write_bitbang()
37 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, reg82 | 0x7); in rtl8225_write_bitbang()
39 reg84 = rtl818x_ioread16(priv, &priv->map->RFPinsSelect); in rtl8225_write_bitbang()
40 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84 | 0x7); in rtl8225_write_bitbang()
43 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write_bitbang()
45 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80); in rtl8225_write_bitbang()
52 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg); in rtl8225_write_bitbang()
54 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg | (1 << 1)); in rtl8225_write_bitbang()
55 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg | (1 << 1)); in rtl8225_write_bitbang()
58 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg); in rtl8225_write_bitbang()
61 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write_bitbang()
64 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write_bitbang()
65 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84); in rtl8225_write_bitbang()
70 struct rtl8187_priv *priv = dev->priv; in rtl8225_write_8051() local
73 reg80 = rtl818x_ioread16(priv, &priv->map->RFPinsOutput); in rtl8225_write_8051()
74 reg82 = rtl818x_ioread16(priv, &priv->map->RFPinsEnable); in rtl8225_write_8051()
75 reg84 = rtl818x_ioread16(priv, &priv->map->RFPinsSelect); in rtl8225_write_8051()
80 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, reg82 | 0x0007); in rtl8225_write_8051()
81 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84 | 0x0007); in rtl8225_write_8051()
84 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write_8051()
87 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80); in rtl8225_write_8051()
90 mutex_lock(&priv->io_mutex); in rtl8225_write_8051()
92 priv->io_dmabuf->bits16 = data; in rtl8225_write_8051()
93 usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0), in rtl8225_write_8051()
95 addr, 0x8225, &priv->io_dmabuf->bits16, sizeof(data), in rtl8225_write_8051()
98 mutex_unlock(&priv->io_mutex); in rtl8225_write_8051()
100 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write_8051()
103 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write_8051()
104 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84); in rtl8225_write_8051()
109 struct rtl8187_priv *priv = dev->priv; in rtl8225_write() local
111 if (priv->asic_rev) in rtl8225_write()
119 struct rtl8187_priv *priv = dev->priv; in rtl8225_read() local
123 reg80 = rtl818x_ioread16(priv, &priv->map->RFPinsOutput); in rtl8225_read()
124 reg82 = rtl818x_ioread16(priv, &priv->map->RFPinsEnable); in rtl8225_read()
125 reg84 = rtl818x_ioread16(priv, &priv->map->RFPinsSelect); in rtl8225_read()
129 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, reg82 | 0x000F); in rtl8225_read()
130 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84 | 0x000F); in rtl8225_read()
132 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_read()
134 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80); in rtl8225_read()
141 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg); in rtl8225_read()
145 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
148 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
153 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg); in rtl8225_read()
158 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
161 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
164 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
170 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
173 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
176 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
179 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
183 if (rtl818x_ioread16(priv, &priv->map->RFPinsInput) & (1 << 1)) in rtl8225_read()
186 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
191 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
195 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, reg82); in rtl8225_read()
196 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84); in rtl8225_read()
197 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x03A0); in rtl8225_read()
283 struct rtl8187_priv *priv = dev->priv; in rtl8225_rf_set_tx_power() local
289 cck_power = priv->channels[channel - 1].hw_value & 0xF; in rtl8225_rf_set_tx_power()
290 ofdm_power = priv->channels[channel - 1].hw_value >> 4; in rtl8225_rf_set_tx_power()
298 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, in rtl8225_rf_set_tx_power()
312 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); in rtl8225_rf_set_tx_power()
313 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); in rtl8225_rf_set_tx_power()
314 rtl818x_iowrite8(priv, &priv->map->CONFIG3, in rtl8225_rf_set_tx_power()
316 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, in rtl8225_rf_set_tx_power()
318 rtl818x_iowrite8(priv, &priv->map->CONFIG3, in rtl8225_rf_set_tx_power()
320 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); in rtl8225_rf_set_tx_power()
326 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, in rtl8225_rf_set_tx_power()
339 struct rtl8187_priv *priv = dev->priv; in rtl8225_rf_init() local
460 rtl818x_iowrite8(priv, &priv->map->TESTR, 0x0D); in rtl8225_rf_init()
468 rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */ in rtl8225_rf_init()
470 rtl818x_iowrite32(priv, (__le32 *)0xFF94, 0x3dc00002); in rtl8225_rf_init()
534 struct rtl8187_priv *priv = dev->priv; in rtl8225z2_rf_set_tx_power() local
540 cck_power = priv->channels[channel - 1].hw_value & 0xF; in rtl8225z2_rf_set_tx_power()
541 ofdm_power = priv->channels[channel - 1].hw_value >> 4; in rtl8225z2_rf_set_tx_power()
544 cck_power += priv->txpwr_base & 0xF; in rtl8225z2_rf_set_tx_power()
551 ofdm_power += priv->txpwr_base >> 4; in rtl8225z2_rf_set_tx_power()
562 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, in rtl8225z2_rf_set_tx_power()
567 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); in rtl8225z2_rf_set_tx_power()
568 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); in rtl8225z2_rf_set_tx_power()
569 rtl818x_iowrite8(priv, &priv->map->CONFIG3, in rtl8225z2_rf_set_tx_power()
571 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, in rtl8225z2_rf_set_tx_power()
573 rtl818x_iowrite8(priv, &priv->map->CONFIG3, in rtl8225z2_rf_set_tx_power()
575 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); in rtl8225z2_rf_set_tx_power()
583 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, in rtl8225z2_rf_set_tx_power()
590 struct rtl8187_priv *priv = dev->priv; in rtl8225z2_b_rf_set_tx_power() local
595 cck_power = priv->channels[channel - 1].hw_value & 0xF; in rtl8225z2_b_rf_set_tx_power()
596 ofdm_power = priv->channels[channel - 1].hw_value >> 4; in rtl8225z2_b_rf_set_tx_power()
599 cck_power = (priv->hw_rev == RTL8187BvB) ? 15 : 22; in rtl8225z2_b_rf_set_tx_power()
601 cck_power += (priv->hw_rev == RTL8187BvB) ? 0 : 7; in rtl8225z2_b_rf_set_tx_power()
602 cck_power += priv->txpwr_base & 0xF; in rtl8225z2_b_rf_set_tx_power()
606 ofdm_power = (priv->hw_rev == RTL8187BvB) ? 17 : 25; in rtl8225z2_b_rf_set_tx_power()
608 ofdm_power += (priv->hw_rev == RTL8187BvB) ? 2 : 10; in rtl8225z2_b_rf_set_tx_power()
609 ofdm_power += (priv->txpwr_base >> 4) & 0xF; in rtl8225z2_b_rf_set_tx_power()
617 if (priv->hw_rev == RTL8187BvB) { in rtl8225z2_b_rf_set_tx_power()
638 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, in rtl8225z2_b_rf_set_tx_power()
642 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, in rtl8225z2_b_rf_set_tx_power()
644 if (priv->hw_rev == RTL8187BvB) { in rtl8225z2_b_rf_set_tx_power()
694 struct rtl8187_priv *priv = dev->priv; in rtl8225z2_rf_init() local
826 rtl818x_iowrite8(priv, (u8 *)0xFF5B, 0x0D); msleep(1); in rtl8225z2_rf_init()
834 rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */ in rtl8225z2_rf_init()
836 rtl818x_iowrite32(priv, (__le32 *)0xFF94, 0x3dc00002); in rtl8225z2_rf_init()
841 struct rtl8187_priv *priv = dev->priv; in rtl8225z2_b_rf_init() local
877 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, 0x03); in rtl8225z2_b_rf_init()
878 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, 0x07); in rtl8225z2_b_rf_init()
879 rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); in rtl8225z2_b_rf_init()
906 struct rtl8187_priv *priv = dev->priv; in rtl8225_rf_set_channel() local
910 if (priv->rf->init == rtl8225_rf_init) in rtl8225_rf_set_channel()
912 else if (priv->rf->init == rtl8225z2_rf_init) in rtl8225_rf_set_channel()
945 struct rtl8187_priv *priv = dev->priv; in rtl8187_detect_rf() local
947 if (!priv->is_rtl8187b) { in rtl8187_detect_rf()