1 
2 /* Definitions for RTL8187SE hardware
3  *
4  * Copyright 2009 Larry Finger <Larry.Finger@lwfinger.net>
5  * Copyright 2014 Andrea Merello <andrea.merello@gmail.com>
6  *
7  * Based on the r8180 and Realtek r8187se drivers, which are:
8  * Copyright 2004-2005 Andrea Merello <andrea.merello@gmail.com>, et al.
9  *
10  * Also based on the rtl8187 driver, which is:
11  * Copyright 2007 Michael Wu <flamingice@sourmilk.net>
12  * Copyright 2007 Andrea Merello <andrea.merello@gmail.com>
13  *
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License version 2 as
16  * published by the Free Software Foundation.
17  */
18 
19 #ifndef RTL8187SE_RTL8225_H
20 #define RTL8187SE_RTL8225_H
21 
22 #define RTL8225SE_ANAPARAM_ON	0xb0054d00
23 #define RTL8225SE_ANAPARAM2_ON	0x000004c6
24 
25 /* all off except PLL */
26 #define RTL8225SE_ANAPARAM_OFF	0xb0054dec
27 /* all on including PLL */
28 #define RTL8225SE_ANAPARAM_OFF2	0xb0054dfc
29 
30 #define RTL8225SE_ANAPARAM2_OFF	0x00ff04c6
31 
32 #define RTL8225SE_ANAPARAM3	0x10
33 
34 enum rtl8187se_power_state {
35 	RTL8187SE_POWER_ON,
36 	RTL8187SE_POWER_OFF,
37 	RTL8187SE_POWER_SLEEP
38 };
39 
40 static inline void rtl8225se_write_phy_ofdm(struct ieee80211_hw *dev,
41 					  u8 addr, u8 data)
42 {
43 	rtl8180_write_phy(dev, addr, data);
44 }
45 
46 static inline void rtl8225se_write_phy_cck(struct ieee80211_hw *dev,
47 					 u8 addr, u8 data)
48 {
49 	rtl8180_write_phy(dev, addr, data | 0x10000);
50 }
51 
52 
53 const struct rtl818x_rf_ops *rtl8187se_detect_rf(struct ieee80211_hw *);
54 void rtl8225se_rf_stop(struct ieee80211_hw *dev);
55 void rtl8225se_rf_set_channel(struct ieee80211_hw *dev,
56 				     struct ieee80211_conf *conf);
57 void rtl8225se_rf_conf_erp(struct ieee80211_hw *dev,
58 				  struct ieee80211_bss_conf *info);
59 void rtl8225se_rf_init(struct ieee80211_hw *dev);
60 
61 #endif /* RTL8187SE_RTL8225_H */
62