radio.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. Broadcom B43legacy wireless driver
  3. Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
  4. Stefano Brivio <stefano.brivio@polimi.it>
  5. Michael Buesch <m@bues.ch>
  6. Danny van Dyk <kugelfang@gentoo.org>
  7. Andreas Jaggi <andreas.jaggi@waterwave.ch>
  8. Some parts of the code in this file are derived from the ipw2200
  9. driver Copyright(c) 2003 - 2004 Intel Corporation.
  10. This program is free software; you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation; either version 2 of the License, or
  13. (at your option) any later version.
  14. This program is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. GNU General Public License for more details.
  18. You should have received a copy of the GNU General Public License
  19. along with this program; see the file COPYING. If not, write to
  20. the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
  21. Boston, MA 02110-1301, USA.
  22. */
  23. #ifndef B43legacy_RADIO_H_
  24. #define B43legacy_RADIO_H_
  25. #include "b43legacy.h"
  26. #define B43legacy_RADIO_DEFAULT_CHANNEL_BG 6
  27. /* Force antenna 0. */
  28. #define B43legacy_RADIO_TXANTENNA_0 0
  29. /* Force antenna 1. */
  30. #define B43legacy_RADIO_TXANTENNA_1 1
  31. /* Use the RX antenna, that was selected for the most recently
  32. * received good PLCP header.
  33. */
  34. #define B43legacy_RADIO_TXANTENNA_LASTPLCP 3
  35. #define B43legacy_RADIO_TXANTENNA_DEFAULT B43legacy_RADIO_TXANTENNA_LASTPLCP
  36. #define B43legacy_RADIO_INTERFMODE_NONE 0
  37. #define B43legacy_RADIO_INTERFMODE_NONWLAN 1
  38. #define B43legacy_RADIO_INTERFMODE_MANUALWLAN 2
  39. #define B43legacy_RADIO_INTERFMODE_AUTOWLAN 3
  40. void b43legacy_radio_lock(struct b43legacy_wldev *dev);
  41. void b43legacy_radio_unlock(struct b43legacy_wldev *dev);
  42. u16 b43legacy_radio_read16(struct b43legacy_wldev *dev, u16 offset);
  43. void b43legacy_radio_write16(struct b43legacy_wldev *dev, u16 offset, u16 val);
  44. u16 b43legacy_radio_init2050(struct b43legacy_wldev *dev);
  45. void b43legacy_radio_turn_on(struct b43legacy_wldev *dev);
  46. void b43legacy_radio_turn_off(struct b43legacy_wldev *dev, bool force);
  47. int b43legacy_radio_selectchannel(struct b43legacy_wldev *dev, u8 channel,
  48. int synthetic_pu_workaround);
  49. void b43legacy_radio_set_txpower_a(struct b43legacy_wldev *dev, u16 txpower);
  50. void b43legacy_radio_set_txpower_bg(struct b43legacy_wldev *dev,
  51. u16 baseband_attenuation, u16 attenuation,
  52. u16 txpower);
  53. u16 b43legacy_default_baseband_attenuation(struct b43legacy_wldev *dev);
  54. u16 b43legacy_default_radio_attenuation(struct b43legacy_wldev *dev);
  55. u16 b43legacy_default_txctl1(struct b43legacy_wldev *dev);
  56. void b43legacy_radio_set_txantenna(struct b43legacy_wldev *dev, u32 val);
  57. void b43legacy_radio_clear_tssi(struct b43legacy_wldev *dev);
  58. u8 b43legacy_radio_aci_detect(struct b43legacy_wldev *dev, u8 channel);
  59. u8 b43legacy_radio_aci_scan(struct b43legacy_wldev *dev);
  60. int b43legacy_radio_set_interference_mitigation(struct b43legacy_wldev *dev,
  61. int mode);
  62. void b43legacy_calc_nrssi_slope(struct b43legacy_wldev *dev);
  63. void b43legacy_calc_nrssi_threshold(struct b43legacy_wldev *dev);
  64. s16 b43legacy_nrssi_hw_read(struct b43legacy_wldev *dev, u16 offset);
  65. void b43legacy_nrssi_hw_write(struct b43legacy_wldev *dev, u16 offset, s16 val);
  66. void b43legacy_nrssi_hw_update(struct b43legacy_wldev *dev, u16 val);
  67. void b43legacy_nrssi_mem_update(struct b43legacy_wldev *dev);
  68. u16 b43legacy_radio_calibrationvalue(struct b43legacy_wldev *dev);
  69. #endif /* B43legacy_RADIO_H_ */