#include "rtl_core.h"
#include "r8192E_hw.h"
#include "r8192E_cmdpkt.h"
-/*---------------------------Define Local Constant---------------------------*/
-/* Debug constant*/
-#define CMPK_DEBOUNCE_CNT 1
-#define CMPK_PRINT(Address)\
-{\
- unsigned char i;\
- u32 temp[10];\
- \
- memcpy(temp, Address, 40);\
- for (i = 0; i < 40; i += 4)\
- printk(KERN_INFO "\r\n %08x", temp[i]);\
-}
-/*---------------------------Define functions---------------------------------*/
bool cmpk_message_handle_tx(
struct net_device *dev,
u8 *code_virtual_address,
write_nic_byte(dev, TPPoll, TPPoll_CQ);
Failed:
return rt_status;
-} /* CMPK_Message_Handle_Tx */
+}
static void
cmpk_count_txstatistic(
priv->stats.txretrycount += pstx_fb->retry_cnt;
priv->stats.txfeedbackretry += pstx_fb->retry_cnt;
-
-} /* cmpk_CountTxStatistic */
-
-
+}
static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
{
struct r8192_priv *priv = rtllib_priv(dev);
- struct cmpk_txfb rx_tx_fb; /* */
+ struct cmpk_txfb rx_tx_fb;
priv->stats.txfeedback++;
memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(struct cmpk_txfb));
cmpk_count_txstatistic(dev, &rx_tx_fb);
-
-} /* cmpk_Handle_Tx_Feedback */
+}
static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
{
tx_rate = 10;
DMESG("send beacon frame tx rate is 1Mbpm\n");
}
-
}
static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
DMESG("---> cmpk_Handle_Interrupt_Status()\n");
-
rx_intr_status.length = pmsg[1];
if (rx_intr_status.length != (sizeof(struct cmpk_intr_sta) - 2)) {
DMESG("cmpk_Handle_Interrupt_Status: wrong length!\n");
return;
}
-
if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
rx_intr_status.interrupt_status = *((u32 *)(pmsg + 4));
DMESG("<---- cmpk_handle_interrupt_status()\n");
-} /* cmpk_handle_interrupt_status */
-
+}
static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
{
- cmpk_query_cfg_t rx_query_cfg; /* */
+ cmpk_query_cfg_t rx_query_cfg;
rx_query_cfg.cfg_action = (pmsg[4] & 0x80000000)>>31;
rx_query_cfg.mask = (pmsg[12] << 24) | (pmsg[13] << 16) |
(pmsg[14] << 8) | (pmsg[15] << 0);
-} /* cmpk_Handle_Query_Config_Rx */
-
+}
static void cmpk_count_tx_status(struct net_device *dev,
struct cmpk_tx_status *pstx_status)
priv->stats.txbytesunicast += pstx_status->txuclength;
priv->stats.last_packet_rate = pstx_status->rate;
-} /* cmpk_CountTxStatus */
-
-
+}
static void cmpk_handle_tx_status(struct net_device *dev, u8 *pmsg)
{
- struct cmpk_tx_status rx_tx_sts; /* */
+ struct cmpk_tx_status rx_tx_sts;
memcpy((void *)&rx_tx_sts, (void *)pmsg, sizeof(struct cmpk_tx_status));
cmpk_count_tx_status(dev, &rx_tx_sts);
u32 *ptemp;
struct r8192_priv *priv = rtllib_priv(dev);
-
#ifdef ENABLE_PS
pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE,
(pu1Byte)(&rtState));
priv->stats.txrate.ht_mcs[j][i] +=
ptxrate->ht_mcs[j][i];
}
-
}
-
u32 cmpk_message_handle_rx(struct net_device *dev,
struct rtllib_rx_stats *pstats)
{
RT_TRACE(COMP_CMDPKT, "---->cmpk_message_handle_rx()\n");
- if (pstats == NULL) {
- /* Print error message. */
- /*RT_TRACE(COMP_SEND, DebugLevel,
- ("\n\r[CMPK]-->Err queue id or pointer"));*/
+ if (pstats == NULL)
return 0;
- }
total_length = pstats->Length;