950-3-4-ath10k-Define-rx_ppdu_end-for-QCA9984.patch 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. From acc6b5593eee9386b209dd29da1e4bdbba99cf9a Mon Sep 17 00:00:00 2001
  2. From: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
  3. Date: Mon, 23 May 2016 23:12:44 +0300
  4. Subject: ath10k: define rx_ppdu_end for QCA9984
  5. QCA9984 Rx descriptor has two 32-bit words of location information
  6. when compared to one 32-bit word in QCA99X0. To handle this difference in
  7. rx descriptor ppdu_end, define a new ppdu_end for QCA9984 descriptor
  8. which has the new structure to represent rx_location_info.
  9. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
  10. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  11. ---
  12. drivers/net/wireless/ath/ath10k/rx_desc.h | 46 +++++++++++++++++++++++++++++++
  13. 1 file changed, 46 insertions(+)
  14. diff --git a/drivers/net/wireless/ath/ath10k/rx_desc.h b/drivers/net/wireless/ath/ath10k/rx_desc.h
  15. index 3e7dfaa..9ceebea 100644
  16. --- a/drivers/net/wireless/ath/ath10k/rx_desc.h
  17. +++ b/drivers/net/wireless/ath/ath10k/rx_desc.h
  18. @@ -996,6 +996,41 @@ struct rx_pkt_end {
  19. __le32 phy_timestamp_2;
  20. } __packed;
  21. +#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_MASK 0x00003fff
  22. +#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_LSB 0
  23. +#define RX_LOCATION_INFO0_RTT_FAC_VHT_MASK 0x1fff8000
  24. +#define RX_LOCATION_INFO0_RTT_FAC_VHT_LSB 15
  25. +#define RX_LOCATION_INFO0_RTT_STRONGEST_CHAIN_MASK 0xc0000000
  26. +#define RX_LOCATION_INFO0_RTT_STRONGEST_CHAIN_LSB 30
  27. +#define RX_LOCATION_INFO0_RTT_FAC_LEGACY_STATUS BIT(14)
  28. +#define RX_LOCATION_INFO0_RTT_FAC_VHT_STATUS BIT(29)
  29. +
  30. +#define RX_LOCATION_INFO1_RTT_PREAMBLE_TYPE_MASK 0x0000000c
  31. +#define RX_LOCATION_INFO1_RTT_PREAMBLE_TYPE_LSB 2
  32. +#define RX_LOCATION_INFO1_PKT_BW_MASK 0x00000030
  33. +#define RX_LOCATION_INFO1_PKT_BW_LSB 4
  34. +#define RX_LOCATION_INFO1_SKIP_P_SKIP_BTCF_MASK 0x0000ff00
  35. +#define RX_LOCATION_INFO1_SKIP_P_SKIP_BTCF_LSB 8
  36. +#define RX_LOCATION_INFO1_RTT_MSC_RATE_MASK 0x000f0000
  37. +#define RX_LOCATION_INFO1_RTT_MSC_RATE_LSB 16
  38. +#define RX_LOCATION_INFO1_RTT_PBD_LEG_BW_MASK 0x00300000
  39. +#define RX_LOCATION_INFO1_RTT_PBD_LEG_BW_LSB 20
  40. +#define RX_LOCATION_INFO1_TIMING_BACKOFF_MASK 0x07c00000
  41. +#define RX_LOCATION_INFO1_TIMING_BACKOFF_LSB 22
  42. +#define RX_LOCATION_INFO1_RTT_TX_FRAME_PHASE_MASK 0x18000000
  43. +#define RX_LOCATION_INFO1_RTT_TX_FRAME_PHASE_LSB 27
  44. +#define RX_LOCATION_INFO1_RTT_CFR_STATUS BIT(0)
  45. +#define RX_LOCATION_INFO1_RTT_CIR_STATUS BIT(1)
  46. +#define RX_LOCATION_INFO1_RTT_GI_TYPE BIT(7)
  47. +#define RX_LOCATION_INFO1_RTT_MAC_PHY_PHASE BIT(29)
  48. +#define RX_LOCATION_INFO1_RTT_TX_DATA_START_X_PHASE BIT(30)
  49. +#define RX_LOCATION_INFO1_RX_LOCATION_VALID BIT(31)
  50. +
  51. +struct rx_location_info {
  52. + __le32 rx_location_info0; /* %RX_LOCATION_INFO0_ */
  53. + __le32 rx_location_info1; /* %RX_LOCATION_INFO1_ */
  54. +} __packed;
  55. +
  56. enum rx_phy_ppdu_end_info0 {
  57. RX_PHY_PPDU_END_INFO0_ERR_RADAR = BIT(2),
  58. RX_PHY_PPDU_END_INFO0_ERR_RX_ABORT = BIT(3),
  59. @@ -1074,12 +1109,23 @@ struct rx_ppdu_end_qca99x0 {
  60. __le16 info1; /* %RX_PPDU_END_INFO1_ */
  61. } __packed;
  62. +struct rx_ppdu_end_qca9984 {
  63. + struct rx_pkt_end rx_pkt_end;
  64. + struct rx_location_info rx_location_info;
  65. + struct rx_phy_ppdu_end rx_phy_ppdu_end;
  66. + __le32 rx_timing_offset; /* %RX_PPDU_END_RX_TIMING_OFFSET_ */
  67. + __le32 rx_info; /* %RX_PPDU_END_RX_INFO_ */
  68. + __le16 bb_length;
  69. + __le16 info1; /* %RX_PPDU_END_INFO1_ */
  70. +} __packed;
  71. +
  72. struct rx_ppdu_end {
  73. struct rx_ppdu_end_common common;
  74. union {
  75. struct rx_ppdu_end_qca988x qca988x;
  76. struct rx_ppdu_end_qca6174 qca6174;
  77. struct rx_ppdu_end_qca99x0 qca99x0;
  78. + struct rx_ppdu_end_qca9984 qca9984;
  79. } __packed;
  80. } __packed;
  81. --
  82. cgit v0.12