Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 
0003 /* Definitions for RTL8187SE hardware
0004  *
0005  * Copyright 2009 Larry Finger <Larry.Finger@lwfinger.net>
0006  * Copyright 2014 Andrea Merello <andrea.merello@gmail.com>
0007  *
0008  * Based on the r8180 and Realtek r8187se drivers, which are:
0009  * Copyright 2004-2005 Andrea Merello <andrea.merello@gmail.com>, et al.
0010  *
0011  * Also based on the rtl8187 driver, which is:
0012  * Copyright 2007 Michael Wu <flamingice@sourmilk.net>
0013  * Copyright 2007 Andrea Merello <andrea.merello@gmail.com>
0014  */
0015 
0016 #ifndef RTL8187SE_RTL8225_H
0017 #define RTL8187SE_RTL8225_H
0018 
0019 #define RTL8225SE_ANAPARAM_ON   0xb0054d00
0020 #define RTL8225SE_ANAPARAM2_ON  0x000004c6
0021 
0022 /* all off except PLL */
0023 #define RTL8225SE_ANAPARAM_OFF  0xb0054dec
0024 /* all on including PLL */
0025 #define RTL8225SE_ANAPARAM_OFF2 0xb0054dfc
0026 
0027 #define RTL8225SE_ANAPARAM2_OFF 0x00ff04c6
0028 
0029 #define RTL8225SE_ANAPARAM3 0x10
0030 
0031 enum rtl8187se_power_state {
0032     RTL8187SE_POWER_ON,
0033     RTL8187SE_POWER_OFF,
0034     RTL8187SE_POWER_SLEEP
0035 };
0036 
0037 static inline void rtl8225se_write_phy_ofdm(struct ieee80211_hw *dev,
0038                       u8 addr, u8 data)
0039 {
0040     rtl8180_write_phy(dev, addr, data);
0041 }
0042 
0043 static inline void rtl8225se_write_phy_cck(struct ieee80211_hw *dev,
0044                      u8 addr, u8 data)
0045 {
0046     rtl8180_write_phy(dev, addr, data | 0x10000);
0047 }
0048 
0049 
0050 const struct rtl818x_rf_ops *rtl8187se_detect_rf(struct ieee80211_hw *);
0051 void rtl8225se_rf_stop(struct ieee80211_hw *dev);
0052 void rtl8225se_rf_set_channel(struct ieee80211_hw *dev,
0053                      struct ieee80211_conf *conf);
0054 void rtl8225se_rf_conf_erp(struct ieee80211_hw *dev,
0055                   struct ieee80211_bss_conf *info);
0056 void rtl8225se_rf_init(struct ieee80211_hw *dev);
0057 
0058 #endif /* RTL8187SE_RTL8225_H */