]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225se.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
[mirror_ubuntu-jammy-kernel.git] / drivers / net / wireless / realtek / rtl818x / rtl8180 / rtl8225se.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 /* Definitions for RTL8187SE hardware
4 *
5 * Copyright 2009 Larry Finger <Larry.Finger@lwfinger.net>
6 * Copyright 2014 Andrea Merello <andrea.merello@gmail.com>
7 *
8 * Based on the r8180 and Realtek r8187se drivers, which are:
9 * Copyright 2004-2005 Andrea Merello <andrea.merello@gmail.com>, et al.
10 *
11 * Also based on the rtl8187 driver, which is:
12 * Copyright 2007 Michael Wu <flamingice@sourmilk.net>
13 * Copyright 2007 Andrea Merello <andrea.merello@gmail.com>
14 */
15
16 #ifndef RTL8187SE_RTL8225_H
17 #define RTL8187SE_RTL8225_H
18
19 #define RTL8225SE_ANAPARAM_ON 0xb0054d00
20 #define RTL8225SE_ANAPARAM2_ON 0x000004c6
21
22 /* all off except PLL */
23 #define RTL8225SE_ANAPARAM_OFF 0xb0054dec
24 /* all on including PLL */
25 #define RTL8225SE_ANAPARAM_OFF2 0xb0054dfc
26
27 #define RTL8225SE_ANAPARAM2_OFF 0x00ff04c6
28
29 #define RTL8225SE_ANAPARAM3 0x10
30
31 enum rtl8187se_power_state {
32 RTL8187SE_POWER_ON,
33 RTL8187SE_POWER_OFF,
34 RTL8187SE_POWER_SLEEP
35 };
36
37 static inline void rtl8225se_write_phy_ofdm(struct ieee80211_hw *dev,
38 u8 addr, u8 data)
39 {
40 rtl8180_write_phy(dev, addr, data);
41 }
42
43 static inline void rtl8225se_write_phy_cck(struct ieee80211_hw *dev,
44 u8 addr, u8 data)
45 {
46 rtl8180_write_phy(dev, addr, data | 0x10000);
47 }
48
49
50 const struct rtl818x_rf_ops *rtl8187se_detect_rf(struct ieee80211_hw *);
51 void rtl8225se_rf_stop(struct ieee80211_hw *dev);
52 void rtl8225se_rf_set_channel(struct ieee80211_hw *dev,
53 struct ieee80211_conf *conf);
54 void rtl8225se_rf_conf_erp(struct ieee80211_hw *dev,
55 struct ieee80211_bss_conf *info);
56 void rtl8225se_rf_init(struct ieee80211_hw *dev);
57
58 #endif /* RTL8187SE_RTL8225_H */