rtl8225se.h 1.8 KB

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