baseband.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
  4. * All rights reserved.
  5. *
  6. * File: baseband.h
  7. *
  8. * Purpose: Implement functions to access baseband
  9. *
  10. * Author: Jerry Chen
  11. *
  12. * Date: Jun. 5, 2002
  13. *
  14. */
  15. #ifndef __BASEBAND_H__
  16. #define __BASEBAND_H__
  17. #include "device.h"
  18. /*
  19. * Registers in the BASEBAND
  20. */
  21. #define BB_MAX_CONTEXT_SIZE 256
  22. /*
  23. * Baseband RF pair definition in eeprom (Bits 6..0)
  24. */
  25. #define PREAMBLE_LONG 0
  26. #define PREAMBLE_SHORT 1
  27. #define F5G 0
  28. #define F2_4G 1
  29. #define TOP_RATE_54M 0x80000000
  30. #define TOP_RATE_48M 0x40000000
  31. #define TOP_RATE_36M 0x20000000
  32. #define TOP_RATE_24M 0x10000000
  33. #define TOP_RATE_18M 0x08000000
  34. #define TOP_RATE_12M 0x04000000
  35. #define TOP_RATE_11M 0x02000000
  36. #define TOP_RATE_9M 0x01000000
  37. #define TOP_RATE_6M 0x00800000
  38. #define TOP_RATE_55M 0x00400000
  39. #define TOP_RATE_2M 0x00200000
  40. #define TOP_RATE_1M 0x00100000
  41. unsigned int BBuGetFrameTime(unsigned char byPreambleType,
  42. unsigned char byPktType,
  43. unsigned int cbFrameLength,
  44. unsigned short wRate);
  45. void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,
  46. u16 tx_rate, u8 pkt_type, struct vnt_phy_field *phy);
  47. bool BBbReadEmbedded(struct vnt_private *priv, unsigned char byBBAddr,
  48. unsigned char *pbyData);
  49. bool BBbWriteEmbedded(struct vnt_private *priv, unsigned char byBBAddr,
  50. unsigned char byData);
  51. void BBvSetShortSlotTime(struct vnt_private *priv);
  52. void BBvSetVGAGainOffset(struct vnt_private *priv, unsigned char byData);
  53. /* VT3253 Baseband */
  54. bool BBbVT3253Init(struct vnt_private *priv);
  55. void BBvSoftwareReset(struct vnt_private *priv);
  56. void BBvPowerSaveModeON(struct vnt_private *priv);
  57. void BBvPowerSaveModeOFF(struct vnt_private *priv);
  58. void BBvSetTxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode);
  59. void BBvSetRxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode);
  60. void BBvSetDeepSleep(struct vnt_private *priv, unsigned char byLocalID);
  61. void BBvExitDeepSleep(struct vnt_private *priv, unsigned char byLocalID);
  62. #endif /* __BASEBAND_H__ */