dm_common.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2009-2014 Realtek Corporation.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * The full GNU General Public License is included in this distribution in the
  15. * file called LICENSE.
  16. *
  17. * Contact Information:
  18. * wlanfae <wlanfae@realtek.com>
  19. * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
  20. * Hsinchu 300, Taiwan.
  21. *
  22. * Larry Finger <Larry.Finger@lwfinger.net>
  23. *
  24. *****************************************************************************/
  25. #include "../wifi.h"
  26. #include "dm_common.h"
  27. #include "../rtl8723ae/dm.h"
  28. #include <linux/module.h>
  29. /* These routines are common to RTL8723AE and RTL8723bE */
  30. void rtl8723_dm_init_dynamic_txpower(struct ieee80211_hw *hw)
  31. {
  32. struct rtl_priv *rtlpriv = rtl_priv(hw);
  33. rtlpriv->dm.dynamic_txpower_enable = false;
  34. rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL;
  35. rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
  36. }
  37. EXPORT_SYMBOL_GPL(rtl8723_dm_init_dynamic_txpower);
  38. void rtl8723_dm_init_edca_turbo(struct ieee80211_hw *hw)
  39. {
  40. struct rtl_priv *rtlpriv = rtl_priv(hw);
  41. rtlpriv->dm.current_turbo_edca = false;
  42. rtlpriv->dm.is_any_nonbepkts = false;
  43. rtlpriv->dm.is_cur_rdlstate = false;
  44. }
  45. EXPORT_SYMBOL_GPL(rtl8723_dm_init_edca_turbo);
  46. void rtl8723_dm_init_dynamic_bb_powersaving(struct ieee80211_hw *hw)
  47. {
  48. struct rtl_priv *rtlpriv = rtl_priv(hw);
  49. struct ps_t *dm_pstable = &rtlpriv->dm_pstable;
  50. dm_pstable->pre_ccastate = CCA_MAX;
  51. dm_pstable->cur_ccasate = CCA_MAX;
  52. dm_pstable->pre_rfstate = RF_MAX;
  53. dm_pstable->cur_rfstate = RF_MAX;
  54. dm_pstable->rssi_val_min = 0;
  55. dm_pstable->initialize = 0;
  56. }
  57. EXPORT_SYMBOL_GPL(rtl8723_dm_init_dynamic_bb_powersaving);