rtl8188e_xmit.c 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  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. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #define _RTL8188E_XMIT_C_
  21. #include <osdep_service.h>
  22. #include <drv_types.h>
  23. #include <rtl8188e_hal.h>
  24. void dump_txrpt_ccx_88e(void *buf)
  25. {
  26. struct txrpt_ccx_88e *txrpt_ccx = buf;
  27. DBG_88E("%s:\n"
  28. "tag1:%u, pkt_num:%u, txdma_underflow:%u, int_bt:%u, int_tri:%u, int_ccx:%u\n"
  29. "mac_id:%u, pkt_ok:%u, bmc:%u\n"
  30. "retry_cnt:%u, lifetime_over:%u, retry_over:%u\n"
  31. "ccx_qtime:%u\n"
  32. "final_data_rate:0x%02x\n"
  33. "qsel:%u, sw:0x%03x\n",
  34. __func__, txrpt_ccx->tag1, txrpt_ccx->pkt_num,
  35. txrpt_ccx->txdma_underflow, txrpt_ccx->int_bt,
  36. txrpt_ccx->int_tri, txrpt_ccx->int_ccx,
  37. txrpt_ccx->mac_id, txrpt_ccx->pkt_ok, txrpt_ccx->bmc,
  38. txrpt_ccx->retry_cnt, txrpt_ccx->lifetime_over,
  39. txrpt_ccx->retry_over, txrpt_ccx_qtime_88e(txrpt_ccx),
  40. txrpt_ccx->final_data_rate, txrpt_ccx->qsel,
  41. txrpt_ccx_sw_88e(txrpt_ccx)
  42. );
  43. }
  44. void handle_txrpt_ccx_88e(struct adapter *adapter, u8 *buf)
  45. {
  46. struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
  47. if (txrpt_ccx->int_ccx) {
  48. if (txrpt_ccx->pkt_ok)
  49. rtw_ack_tx_done(&adapter->xmitpriv,
  50. RTW_SCTX_DONE_SUCCESS);
  51. else
  52. rtw_ack_tx_done(&adapter->xmitpriv,
  53. RTW_SCTX_DONE_CCX_PKT_FAIL);
  54. }
  55. }
  56. void _dbg_dump_tx_info(struct adapter *padapter, int frame_tag,
  57. struct tx_desc *ptxdesc)
  58. {
  59. u8 dmp_txpkt;
  60. bool dump_txdesc = false;
  61. rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(dmp_txpkt));
  62. if (dmp_txpkt == 1) {/* dump txdesc for data frame */
  63. DBG_88E("dump tx_desc for data frame\n");
  64. if ((frame_tag & 0x0f) == DATA_FRAMETAG)
  65. dump_txdesc = true;
  66. } else if (dmp_txpkt == 2) {/* dump txdesc for mgnt frame */
  67. DBG_88E("dump tx_desc for mgnt frame\n");
  68. if ((frame_tag & 0x0f) == MGNT_FRAMETAG)
  69. dump_txdesc = true;
  70. }
  71. if (dump_txdesc) {
  72. DBG_88E("=====================================\n");
  73. DBG_88E("txdw0(0x%08x)\n", ptxdesc->txdw0);
  74. DBG_88E("txdw1(0x%08x)\n", ptxdesc->txdw1);
  75. DBG_88E("txdw2(0x%08x)\n", ptxdesc->txdw2);
  76. DBG_88E("txdw3(0x%08x)\n", ptxdesc->txdw3);
  77. DBG_88E("txdw4(0x%08x)\n", ptxdesc->txdw4);
  78. DBG_88E("txdw5(0x%08x)\n", ptxdesc->txdw5);
  79. DBG_88E("txdw6(0x%08x)\n", ptxdesc->txdw6);
  80. DBG_88E("txdw7(0x%08x)\n", ptxdesc->txdw7);
  81. DBG_88E("=====================================\n");
  82. }
  83. }