summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/r8192U_core.c
diff options
context:
space:
mode:
authorRaphaël Beamonte <raphael.beamonte@gmail.com>2015-08-18 12:58:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-12 18:24:33 -0700
commit14285c1f97c3bb137a12fb9e3a4e65e1a3a51a0d (patch)
tree22eccbd36e22a32149122924b9ab2ada5169e64a /drivers/staging/rtl8192u/r8192U_core.c
parent74a0266c072c185880290eb04d2fea4e68d62f1d (diff)
staging: rtl8192u: r8192U_core: clean C99 // comments
Replace C99 // comments by /* comments */ to follow the kernel code style. Remove some unuseful comments. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_core.c')
-rw-r--r--drivers/staging/rtl8192u/r8192U_core.c636
1 files changed, 316 insertions, 320 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index e0832d1a5493..9a658b4e0ce0 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -64,7 +64,7 @@ double __extendsfdf2(float a)
#include "r8190_rtl8256.h" /* RTL8225 Radio frontend */
#include "r8180_93cx6.h" /* Card EEPROM */
#include "r8192U_wx.h"
-#include "r819xU_phy.h" //added by WB 4.30.2008
+#include "r819xU_phy.h"
#include "r819xU_phyreg.h"
#include "r819xU_cmdpkt.h"
#include "r8192U_dm.h"
@@ -72,13 +72,13 @@ double __extendsfdf2(float a)
#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
-// FIXME: check if 2.6.7 is ok
+/* FIXME: check if 2.6.7 is ok */
#include "dot11d.h"
-//set here to open your trace code. //WB
+/* set here to open your trace code. */
u32 rt_global_debug_component = COMP_DOWN |
COMP_SEC |
- COMP_ERR; //always open err flags on
+ COMP_ERR; /* always open err flags on */
#define TOTAL_CAM_ENTRY 32
#define CAM_CONTENT_COUNT 8
@@ -109,7 +109,7 @@ MODULE_DEVICE_TABLE(usb, rtl8192_usb_id_tbl);
MODULE_DESCRIPTION("Linux driver for Realtek RTL8192 USB WiFi cards");
static char *ifname = "wlan%d";
-static int hwwep = 1; //default use hw. set 0 to use software security
+static int hwwep = 1; /* default use hw. set 0 to use software security */
static int channels = 0x3fff;
@@ -143,17 +143,17 @@ struct CHANNEL_LIST {
};
static struct CHANNEL_LIST ChannelPlan[] = {
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 24}, //FCC
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11}, //IC
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, //ETSI
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, //Spain. Change to ETSI.
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, //France. Change to ETSI.
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, //MKK //MKK
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22},//MKK1
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, //Israel.
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, // For 11a , TELEC
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, //MIC
- {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14} //For Global Domain. 1-11:active scan, 12-14 passive scan. //+YJ, 080626
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 24}, /* FCC */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11}, /* IC */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /* ETSI */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, /* Spain. Change to ETSI. */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, /* France. Change to ETSI. */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, /* MKK */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, /* MKK1 */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, /* Israel. */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, /* For 11a , TELEC */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, /* MIC */
+ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14} /* For Global Domain. 1-11:active scan, 12-14 passive scan. */
};
static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
@@ -173,7 +173,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
case COUNTRY_CODE_MIC:
Dot11d_Init(ieee);
ieee->bGlobalDomain = false;
- //actually 8225 & 8256 rf chips only support B,G,24N mode
+ /* actually 8225 & 8256 rf chips only support B,G,24N mode */
if ((priv->rf_chip == RF_8225) || (priv->rf_chip == RF_8256)) {
min_chan = 1;
max_chan = 14;
@@ -181,9 +181,9 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
RT_TRACE(COMP_ERR, "unknown rf chip, can't set channel map in function:%s()\n", __func__);
}
if (ChannelPlan[channel_plan].Len != 0) {
- // Clear old channel map
+ /* Clear old channel map */
memset(GET_DOT11D_INFO(ieee)->channel_map, 0, sizeof(GET_DOT11D_INFO(ieee)->channel_map));
- // Set new channel map
+ /* Set new channel map */
for (i = 0; i < ChannelPlan[channel_plan].Len; i++) {
if (ChannelPlan[channel_plan].Channel[i] < min_chan || ChannelPlan[channel_plan].Channel[i] > max_chan)
break;
@@ -193,7 +193,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
break;
case COUNTRY_CODE_GLOBAL_DOMAIN:
- GET_DOT11D_INFO(ieee)->bEnabled = 0;//this flag enabled to follow 11d country IE setting, otherwise, it shall follow global domain settings.
+ GET_DOT11D_INFO(ieee)->bEnabled = 0; /* this flag enabled to follow 11d country IE setting, otherwise, it shall follow global domain settings. */
Dot11d_Reset(ieee);
ieee->bGlobalDomain = true;
break;
@@ -209,9 +209,10 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
static void CamResetAllEntry(struct net_device *dev)
{
u32 ulcommand = 0;
- //2004/02/11 In static WEP, OID_ADD_KEY or OID_ADD_WEP are set before STA associate to AP.
- // However, ResetKey is called on OID_802_11_INFRASTRUCTURE_MODE and MlmeAssociateRequest
- // In this condition, Cam can not be reset because upper layer will not set this static key again.
+ /* 2004/02/11 In static WEP, OID_ADD_KEY or OID_ADD_WEP are set before STA associate to AP.
+ * However, ResetKey is called on OID_802_11_INFRASTRUCTURE_MODE and MlmeAssociateRequest
+ * In this condition, Cam can not be reset because upper layer will not set this static key again.
+ */
ulcommand |= BIT31 | BIT30;
write_nic_dword(dev, RWCAM, ulcommand);
@@ -264,7 +265,7 @@ int read_nic_byte_E(struct net_device *dev, int indx, u8 *data)
return 0;
}
-//as 92U has extend page from 4 to 16, so modify functions below.
+/* as 92U has extend page from 4 to 16, so modify functions below. */
void write_nic_byte(struct net_device *dev, int indx, u8 data)
{
int status;
@@ -678,7 +679,7 @@ void rtl8192_set_chan(struct net_device *dev, short ch)
/* this hack should avoid frame TX during channel setting*/
- //need to implement rf set channel here WB
+ /* need to implement rf set channel here */
if (priv->rf_set_chan)
priv->rf_set_chan(dev, priv->chan);
@@ -717,7 +718,7 @@ static int rtl8192_rx_initiate(struct net_device *dev)
info = (struct rtl8192_rx_info *)skb->cb;
info->urb = entry;
info->dev = dev;
- info->out_pipe = 3; //denote rx normal packet queue
+ info->out_pipe = 3; /* denote rx normal packet queue */
skb_queue_tail(&priv->rx_queue, skb);
usb_submit_urb(entry, GFP_KERNEL);
}
@@ -738,7 +739,7 @@ static int rtl8192_rx_initiate(struct net_device *dev)
info = (struct rtl8192_rx_info *)skb->cb;
info->urb = entry;
info->dev = dev;
- info->out_pipe = 9; //denote rx cmd packet queue
+ info->out_pipe = 9; /* denote rx cmd packet queue */
skb_queue_tail(&priv->rx_queue, skb);
usb_submit_urb(entry, GFP_KERNEL);
}
@@ -788,7 +789,7 @@ void rtl8192_set_rxconf(struct net_device *dev)
write_nic_dword(dev, RCR, rxconf);
}
-//wait to be removed
+/* wait to be removed */
void rtl8192_rx_enable(struct net_device *dev)
{
rtl8192_rx_initiate(dev);
@@ -933,13 +934,13 @@ static u32 rtl819xusb_rx_command_packet(struct net_device *dev,
static void rtl8192_data_hard_stop(struct net_device *dev)
{
- //FIXME !!
+ /* FIXME !! */
}
static void rtl8192_data_hard_resume(struct net_device *dev)
{
- // FIXME !!
+ /* FIXME !! */
}
/* this function TX data frames when the ieee80211 stack requires this.
@@ -1031,16 +1032,16 @@ static void rtl8192_tx_isr(struct urb *tx_urb)
atomic_dec(&priv->tx_pending[queue_index]);
}
- //
- // Handle HW Beacon:
- // We had transfer our beacon frame to host controller at this moment.
- //
- //
- // Caution:
- // Handling the wait queue of command packets.
- // For Tx command packets, we must not do TCB fragment because it is not handled right now.
- // We must cut the packets to match the size of TX_CMD_PKT before we send it.
- //
+ /*
+ * Handle HW Beacon:
+ * We had transfer our beacon frame to host controller at this moment.
+ *
+ *
+ * Caution:
+ * Handling the wait queue of command packets.
+ * For Tx command packets, we must not do TCB fragment because it is not handled right now.
+ * We must cut the packets to match the size of TX_CMD_PKT before we send it.
+ */
/* Handle MPDU in wait queue. */
if (queue_index != BEACON_QUEUE) {
@@ -1051,7 +1052,7 @@ static void rtl8192_tx_isr(struct urb *tx_urb)
if (skb)
priv->ieee80211->softmac_hard_start_xmit(skb, dev);
- return; //modified by david to avoid further processing AMSDU
+ return; /* avoid further processing AMSDU */
}
}
@@ -1167,7 +1168,7 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap)
u8 slot_time = 0;
if ((cap & WLAN_CAPABILITY_SHORT_SLOT) && (!priv->ieee80211->pHTInfo->bCurrentRT2RTLongSlotTime)) /* short slot time */
slot_time = SHORT_SLOT_TIME;
- else //long slot time
+ else /* long slot time */
slot_time = NON_SHORT_SLOT_TIME;
priv->slot_time = slot_time;
write_nic_byte(dev, SLOT_TIME, slot_time);
@@ -1197,7 +1198,7 @@ static void rtl8192_net_update(struct net_device *dev)
write_nic_word(dev, BCN_DRV_EARLY_INT, 1);
write_nic_byte(dev, BCN_ERR_THRESH, 100);
BcnTimeCfg |= (BcnCW << BCN_TCFG_CW_SHIFT);
- // TODO: BcnIFS may required to be changed on ASIC
+ /* TODO: BcnIFS may required to be changed on ASIC */
BcnTimeCfg |= BcnIFS << BCN_TCFG_IFS;
write_nic_word(dev, BCN_TCFG, BcnTimeCfg);
@@ -1207,8 +1208,9 @@ static void rtl8192_net_update(struct net_device *dev)
}
-//temporary hw beacon is not used any more.
-//open it when necessary
+/* temporary hw beacon is not used any more.
+ * open it when necessary
+ */
void rtl819xusb_beacon_tx(struct net_device *dev, u16 tx_rate)
{
@@ -1287,16 +1289,17 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
memset(pdesc, 0, USB_HWDESC_HEADER_LEN);
/* Tx descriptor ought to be set according to the skb->cb */
- pdesc->FirstSeg = 1;//bFirstSeg;
- pdesc->LastSeg = 1;//bLastSeg;
+ pdesc->FirstSeg = 1;
+ pdesc->LastSeg = 1;
pdesc->CmdInit = tcb_desc->bCmdOrInit;
pdesc->TxBufferSize = tcb_desc->txbuf_size;
pdesc->OWN = 1;
pdesc->LINIP = tcb_desc->bLastIniPkt;
- //----------------------------------------------------------------------------
- // Fill up USB_OUT_CONTEXT.
- //----------------------------------------------------------------------------
+ /*----------------------------------------------------------------------------
+ * Fill up USB_OUT_CONTEXT.
+ *----------------------------------------------------------------------------
+ */
idx_pipe = 0x04;
usb_fill_bulk_urb(tx_urb, priv->udev, usb_sndbulkpipe(priv->udev, idx_pipe),
skb->data, skb->len, rtl8192_tx_isr, skb);
@@ -1320,7 +1323,7 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
*/
static u8 MapHwQueueToFirmwareQueue(u8 QueueID)
{
- u8 QueueSelect = 0x0; //defualt set to
+ u8 QueueSelect = 0x0; /* defualt set to */
switch (QueueID) {
case BE_QUEUE:
@@ -1346,8 +1349,8 @@ static u8 MapHwQueueToFirmwareQueue(u8 QueueID)
QueueSelect = QSLT_BEACON;
break;
- // TODO: 2006.10.30 mark other queue selection until we verify it is OK
- // TODO: Remove Assertions
+ /* TODO: 2006.10.30 mark other queue selection until we verify it is OK */
+ /* TODO: Remove Assertions */
case TXCMD_QUEUE:
QueueSelect = QSLT_CMD;
break;
@@ -1548,7 +1551,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20_40) {
if (tcb_desc->bPacketBW) {
tx_fwinfo->TxBandwidth = 1;
- tx_fwinfo->TxSubCarrier = 0; //By SD3's Jerry suggestion, use duplicated mode
+ tx_fwinfo->TxSubCarrier = 0; /* use duplicated mode */
} else {
tx_fwinfo->TxBandwidth = 0;
tx_fwinfo->TxSubCarrier = priv->nCur40MhzPrimeSC;
@@ -1600,7 +1603,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
tx_desc->USERATE = tcb_desc->bTxUseDriverAssingedRate;
/* Fill fields that are required to be initialized in all of the descriptors */
- //DWORD 0
+ /* DWORD 0 */
tx_desc->FirstSeg = 1;
tx_desc->LastSeg = 1;
tx_desc->OWN = 1;
@@ -1616,7 +1619,11 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
status = usb_submit_urb(tx_urb, GFP_ATOMIC);
if (!status) {
- //we need to send 0 byte packet whenever 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has been transmitted. Otherwise, it will be halt to wait for another packet. WB. 2008.08.27
+ /* We need to send 0 byte packet whenever
+ * 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has
+ * been transmitted. Otherwise, it will be halt to wait for
+ * another packet.
+ */
bool bSend0Byte = false;
u8 zero = 0;
if (udev->speed == USB_SPEED_HIGH) {
@@ -1770,7 +1777,10 @@ static void rtl8192_link_change(struct net_device *dev)
if (ieee->state == IEEE80211_LINKED) {
rtl8192_net_update(dev);
rtl8192_update_ratr_table(dev);
- //add this as in pure N mode, wep encryption will use software way, but there is no chance to set this as wep will not set group key in wext. WB.2008.07.08
+ /* Add this as in pure N mode, wep encryption will use software
+ * way, but there is no chance to set this as wep will not set
+ * group key in wext.
+ */
if ((KEY_TYPE_WEP40 == ieee->pairwise_key_type) || (KEY_TYPE_WEP104 == ieee->pairwise_key_type))
EnableHWSecurityConfig8192(dev);
}
@@ -1832,7 +1842,7 @@ static void rtl8192_qos_activate(struct work_struct *work)
/* For we just support b/g mode at present, let the slot time at 9/20 selection */
/* update the ac parameter to related registers */
for (i = 0; i < QOS_QUEUE_NUM; i++) {
- //Mode G/A: slotTimeTimer = 9; Mode B: 20
+ /* Mode G/A: slotTimeTimer = 9; Mode B: 20 */
u1bAIFS = qos_parameters->aifs[i] * ((mode & (IEEE_G | IEEE_N_24G)) ? 9 : 20) + aSifsTime;
u1bAIFS <<= AC_PARAM_AIFS_OFFSET;
op_limit = (u32)le16_to_cpu(qos_parameters->tx_op_limit[i]);
@@ -2021,7 +2031,9 @@ static bool GetNmodeSupportBySecCfg8192(struct net_device *dev)
int encrypt;
crypt = ieee->crypt[ieee->tx_keyidx];
- //we use connecting AP's capability instead of only security config on our driver to distinguish whether it should use N mode or G mode
+ /* we use connecting AP's capability instead of only security config
+ * on our driver to distinguish whether it should use N mode or G mode
+ */
encrypt = (network->capability & WLAN_CAPABILITY_PRIVACY) || (ieee->host_encrypt && crypt && crypt->ops && (0 == strcmp(crypt->ops->name, "WEP")));
/* simply judge */
@@ -2051,7 +2063,9 @@ static bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev)
static void rtl8192_refresh_supportrate(struct r8192_priv *priv)
{
struct ieee80211_device *ieee = priv->ieee80211;
- //we do not consider set support rate for ABG mode, only HT MCS rate is set here.
+ /* We do not consider set support rate for ABG mode, only
+ * HT MCS rate is set here.
+ */
if (ieee->mode == WIRELESS_MODE_N_24G || ieee->mode == WIRELESS_MODE_N_5G)
memcpy(ieee->Regdot11HTOperationalRateSet, ieee->RegHTSuppRateSet, 16);
else
@@ -2098,7 +2112,7 @@ static void rtl8192_SetWirelessMode(struct net_device *dev, u8 wireless_mode)
wireless_mode = WIRELESS_MODE_B;
}
}
-#ifdef TO_DO_LIST //// TODO: this function doesn't work well at this time, we should wait for FPGA
+#ifdef TO_DO_LIST /* TODO: this function doesn't work well at this time, we should wait for FPGA */
ActUpdateChannelAccessSetting(pAdapter, pHalData->CurrentWirelessMode, &pAdapter->MgntInfo.Info8185.ChannelAccessSetting);
#endif
priv->ieee80211->mode = wireless_mode;
@@ -2111,43 +2125,43 @@ static void rtl8192_SetWirelessMode(struct net_device *dev, u8 wireless_mode)
rtl8192_refresh_supportrate(priv);
}
-//init priv variables here. only non_zero value should be initialized here.
+/* init priv variables here. only non_zero value should be initialized here. */
static void rtl8192_init_priv_variable(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
u8 i;
priv->card_8192 = NIC_8192U;
- priv->chan = 1; //set to channel 1
- priv->ieee80211->mode = WIRELESS_MODE_AUTO; //SET AUTO
+ priv->chan = 1; /* set to channel 1 */
+ priv->ieee80211->mode = WIRELESS_MODE_AUTO; /* SET AUTO */
priv->ieee80211->iw_mode = IW_MODE_INFRA;
priv->ieee80211->ieee_up = 0;
priv->retry_rts = DEFAULT_RETRY_RTS;
priv->retry_data = DEFAULT_RETRY_DATA;
priv->ieee80211->rts = DEFAULT_RTS_THRESHOLD;
- priv->ieee80211->rate = 110; //11 mbps
+ priv->ieee80211->rate = 110; /* 11 mbps */
priv->ieee80211->short_slot = 1;
priv->promisc = (dev->flags & IFF_PROMISC) ? 1 : 0;
priv->CckPwEnl = 6;
- //for silent reset
+ /* for silent reset */
priv->IrpPendingCount = 1;
priv->ResetProgress = RESET_TYPE_NORESET;
priv->bForcedSilentReset = false;
priv->bDisableNormalResetCheck = false;
priv->force_reset = false;
- priv->ieee80211->FwRWRF = 0; //we don't use FW read/write RF until stable firmware is available.
+ priv->ieee80211->FwRWRF = 0; /* we don't use FW read/write RF until stable firmware is available. */
priv->ieee80211->current_network.beacon_interval = DEFAULT_BEACONINTERVAL;
priv->ieee80211->softmac_features = IEEE_SOFTMAC_SCAN |
IEEE_SOFTMAC_ASSOCIATE | IEEE_SOFTMAC_PROBERQ |
IEEE_SOFTMAC_PROBERS | IEEE_SOFTMAC_TX_QUEUE |
- IEEE_SOFTMAC_BEACONS;//added by amy 080604
+ IEEE_SOFTMAC_BEACONS;
priv->ieee80211->active_scan = 1;
priv->ieee80211->modulation = IEEE80211_CCK_MODULATION | IEEE80211_OFDM_MODULATION;
priv->ieee80211->host_encrypt = 1;
priv->ieee80211->host_decrypt = 1;
- priv->ieee80211->start_send_beacons = NULL; //-by amy 080604
- priv->ieee80211->stop_send_beacons = NULL; //-by amy 080604
+ priv->ieee80211->start_send_beacons = NULL;
+ priv->ieee80211->stop_send_beacons = NULL;
priv->ieee80211->softmac_hard_start_xmit = rtl8192_hard_start_xmit;
priv->ieee80211->set_chan = rtl8192_set_chan;
priv->ieee80211->link_change = rtl8192_link_change;
@@ -2160,15 +2174,14 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
priv->ieee80211->tx_headroom = TX_PACKET_SHIFT_BYTES;
priv->ieee80211->qos_support = 1;
- //added by WB
priv->ieee80211->SetBWModeHandler = rtl8192_SetBWMode;
priv->ieee80211->handle_assoc_response = rtl8192_handle_assoc_response;
priv->ieee80211->handle_beacon = rtl8192_handle_beacon;
- //added by david
+
priv->ieee80211->GetNmodeSupportBySecCfg = GetNmodeSupportBySecCfg8192;
priv->ieee80211->GetHalfNmodeSupportByAPsHandler = GetHalfNmodeSupportByAPs819xUsb;
priv->ieee80211->SetWirelessMode = rtl8192_SetWirelessMode;
- //added by amy
+
priv->ieee80211->InitialGainHandler = InitialGain819xUsb;
priv->card_type = USB;
#ifdef TO_DO_LIST
@@ -2182,30 +2195,29 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
priv->EarlyRxThreshold = 7;
priv->enable_gpio0 = 0;
priv->TransmitConfig =
- (TCR_MXDMA_2048 << TCR_MXDMA_OFFSET) | // Max DMA Burst Size per Tx DMA Burst, 7: reserved.
- (priv->ShortRetryLimit << TCR_SRL_OFFSET) | // Short retry limit
- (priv->LongRetryLimit << TCR_LRL_OFFSET) | // Long retry limit
- (false ? TCR_SAT : 0); // FALSE: HW provides PLCP length and LENGEXT, TRUE: SW provides them
+ (TCR_MXDMA_2048 << TCR_MXDMA_OFFSET) | /* Max DMA Burst Size per Tx DMA Burst, 7: reserved. */
+ (priv->ShortRetryLimit << TCR_SRL_OFFSET) | /* Short retry limit */
+ (priv->LongRetryLimit << TCR_LRL_OFFSET) | /* Long retry limit */
+ (false ? TCR_SAT : 0); /* FALSE: HW provides PLCP length and LENGEXT, TRUE: SW provides them */
#ifdef TO_DO_LIST
if (Adapter->bInHctTest)
pHalData->ReceiveConfig = pHalData->CSMethod |
- RCR_AMF | RCR_ADF | //accept management/data
- //guangan200710
- RCR_ACF | //accept control frame for SW AP needs PS-poll, 2005.07.07, by rcnjko.
- RCR_AB | RCR_AM | RCR_APM | //accept BC/MC/UC
- RCR_AICV | RCR_ACRC32 | //accept ICV/CRC error packet
- ((u32)7 << RCR_MXDMA_OFFSET) | // Max DMA Burst Size per Tx DMA Burst, 7: unlimited.
- (pHalData->EarlyRxThreshold << RCR_FIFO_OFFSET) | // Rx FIFO Threshold, 7: No Rx threshold.
+ RCR_AMF | RCR_ADF | /* accept management/data */
+ RCR_ACF | /* accept control frame for SW AP needs PS-poll, 2005.07.07, by rcnjko. */
+ RCR_AB | RCR_AM | RCR_APM | /* accept BC/MC/UC */
+ RCR_AICV | RCR_ACRC32 | /* accept ICV/CRC error packet */
+ ((u32)7 << RCR_MXDMA_OFFSET) | /* Max DMA Burst Size per Tx DMA Burst, 7: unlimited. */
+ (pHalData->EarlyRxThreshold << RCR_FIFO_OFFSET) | /* Rx FIFO Threshold, 7: No Rx threshold. */
(pHalData->EarlyRxThreshold == 7 ? RCR_OnlyErlPkt : 0);
else
#endif
priv->ReceiveConfig =
- RCR_AMF | RCR_ADF | //accept management/data
- RCR_ACF | //accept control frame for SW AP needs PS-poll, 2005.07.07, by rcnjko.
- RCR_AB | RCR_AM | RCR_APM | //accept BC/MC/UC
- ((u32)7 << RCR_MXDMA_OFFSET) | // Max DMA Burst Size per Rx DMA Burst, 7: unlimited.
- (priv->EarlyRxThreshold << RX_FIFO_THRESHOLD_SHIFT) | // Rx FIFO Threshold, 7: No Rx threshold.
+ RCR_AMF | RCR_ADF | /* accept management/data */
+ RCR_ACF | /* accept control frame for SW AP needs PS-poll, 2005.07.07, by rcnjko. */
+ RCR_AB | RCR_AM | RCR_APM | /* accept BC/MC/UC */
+ ((u32)7 << RCR_MXDMA_OFFSET) | /* Max DMA Burst Size per Rx DMA Burst, 7: unlimited. */
+ (priv->EarlyRxThreshold << RX_FIFO_THRESHOLD_SHIFT) | /* Rx FIFO Threshold, 7: No Rx threshold. */
(priv->EarlyRxThreshold == 7 ? RCR_ONLYERLPKT : 0);
priv->AcmControl = 0;
@@ -2225,11 +2237,11 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
priv->rf_set_chan = rtl8192_phy_SwChnl;
}
-//init lock here
+/* init lock here */
static void rtl8192_init_priv_lock(struct r8192_priv *priv)
{
spin_lock_init(&priv->tx_lock);
- spin_lock_init(&priv->irq_lock);//added by thomas
+ spin_lock_init(&priv->irq_lock);
sema_init(&priv->wx_sem, 1);
sema_init(&priv->rf_sem, 1);
mutex_init(&priv->mutex);
@@ -2238,7 +2250,7 @@ static void rtl8192_init_priv_lock(struct r8192_priv *priv)
static void rtl819x_watchdog_wqcallback(struct work_struct *work);
static void rtl8192_irq_rx_tasklet(struct r8192_priv *priv);
-//init tasklet and wait_queue here. only 2.6 above kernel is considered
+/* init tasklet and wait_queue here. only 2.6 above kernel is considered */
#define DRV_NAME "wlan0"
static void rtl8192_init_priv_task(struct net_device *dev)
{
@@ -2267,12 +2279,14 @@ static void rtl8192_get_eeprom_size(struct net_device *dev)
RT_TRACE(COMP_EPROM, "===========>%s()\n", __func__);
read_nic_word_E(dev, EPROM_CMD, &curCR);
RT_TRACE(COMP_EPROM, "read from Reg EPROM_CMD(%x):%x\n", EPROM_CMD, curCR);
- //whether need I consider BIT5?
+ /* whether need I consider BIT5? */
priv->epromtype = (curCR & Cmd9346CR_9356SEL) ? EPROM_93c56 : EPROM_93c46;
RT_TRACE(COMP_EPROM, "<===========%s(), epromtype:%d\n", __func__, priv->epromtype);
}
-//used to swap endian. as ntohl & htonl are not necessary to swap endian, so use this instead.
+/* used to swap endian. as ntohl & htonl are not necessary
+ * to swap endian, so use this instead.
+ */
static inline u16 endian_swap(u16 *data)
{
u16 tmp = *data;
@@ -2288,7 +2302,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
u16 tmpValue = 0;
int i;
RT_TRACE(COMP_EPROM, "===========>%s()\n", __func__);
- wEPROM_ID = eprom_read(dev, 0); //first read EEPROM ID out;
+ wEPROM_ID = eprom_read(dev, 0); /* first read EEPROM ID out; */
RT_TRACE(COMP_EPROM, "EEPROM ID is 0x%x\n", wEPROM_ID);
if (wEPROM_ID != RTL8190_EEPROM_ID) {
@@ -2313,7 +2327,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
priv->eeprom_CustomerID = 0;
}
RT_TRACE(COMP_EPROM, "vid:0x%4x, pid:0x%4x, CustomID:0x%2x, ChanPlan:0x%x\n", priv->eeprom_vid, priv->eeprom_pid, priv->eeprom_CustomerID, priv->eeprom_ChannelPlan);
- //set channelplan from eeprom
+ /* set channelplan from eeprom */
priv->ChannelPlan = priv->eeprom_ChannelPlan;
if (bLoad_From_EEPOM) {
int i;
@@ -2324,40 +2338,40 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
}
} else {
memcpy(dev->dev_addr, bMac_Tmp_Addr, 6);
- //should I set IDR0 here?
+ /* should I set IDR0 here? */
}
RT_TRACE(COMP_EPROM, "MAC addr:%pM\n", dev->dev_addr);
- priv->rf_type = RTL819X_DEFAULT_RF_TYPE; //default 1T2R
+ priv->rf_type = RTL819X_DEFAULT_RF_TYPE; /* default 1T2R */
priv->rf_chip = RF_8256;
if (priv->card_8192_version == (u8)VERSION_819xU_A) {
- //read Tx power gain offset of legacy OFDM to HT rate
+ /* read Tx power gain offset of legacy OFDM to HT rate */
if (bLoad_From_EEPOM)
priv->EEPROMTxPowerDiff = (eprom_read(dev, (EEPROM_TxPowerDiff >> 1)) & 0xff00) >> 8;
else
priv->EEPROMTxPowerDiff = EEPROM_Default_TxPower;
RT_TRACE(COMP_EPROM, "TxPowerDiff:%d\n", priv->EEPROMTxPowerDiff);
- //read ThermalMeter from EEPROM
+ /* read ThermalMeter from EEPROM */
if (bLoad_From_EEPOM)
priv->EEPROMThermalMeter = (u8)(eprom_read(dev, (EEPROM_ThermalMeter >> 1)) & 0x00ff);
else
priv->EEPROMThermalMeter = EEPROM_Default_ThermalMeter;
RT_TRACE(COMP_EPROM, "ThermalMeter:%d\n", priv->EEPROMThermalMeter);
- //vivi, for tx power track
+ /* for tx power track */
priv->TSSI_13dBm = priv->EEPROMThermalMeter * 100;
- //read antenna tx power offset of B/C/D to A from EEPROM
+ /* read antenna tx power offset of B/C/D to A from EEPROM */
if (bLoad_From_EEPOM)
priv->EEPROMPwDiff = (eprom_read(dev, (EEPROM_PwDiff >> 1)) & 0x0f00) >> 8;
else
priv->EEPROMPwDiff = EEPROM_Default_PwDiff;
RT_TRACE(COMP_EPROM, "TxPwDiff:%d\n", priv->EEPROMPwDiff);
- // Read CrystalCap from EEPROM
+ /* Read CrystalCap from EEPROM */
if (bLoad_From_EEPOM)
priv->EEPROMCrystalCap = (eprom_read(dev, (EEPROM_CrystalCap >> 1)) & 0x0f);
else
priv->EEPROMCrystalCap = EEPROM_Default_CrystalCap;
RT_TRACE(COMP_EPROM, "CrystalCap = %d\n", priv->EEPROMCrystalCap);
- //get per-channel Tx power level
+ /* get per-channel Tx power level */
if (bLoad_From_EEPOM)
priv->EEPROM_Def_Ver = (eprom_read(dev, (EEPROM_TxPwIndex_Ver >> 1)) & 0xff00) >> 8;
else
@@ -2409,10 +2423,9 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
else
tmpValue = 0x10;
priv->EEPROMTxPowerLevelOFDM24G[2] = (u8)tmpValue;
- }//endif EEPROM_Def_Ver == 1
+ } /* endif EEPROM_Def_Ver == 1 */
- //update HAL variables
- //
+ /* update HAL variables */
for (i = 0; i < 14; i++) {
if (i <= 3)
priv->TxPowerLevelOFDM24G[i] = priv->EEPROMTxPowerLevelOFDM24G[0];
@@ -2440,18 +2453,19 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
}
}
priv->TxPowerDiff = priv->EEPROMPwDiff;
- // Antenna B gain offset to antenna A, bit0~3
+ /* Antenna B gain offset to antenna A, bit0~3 */
priv->AntennaTxPwDiff[0] = (priv->EEPROMTxPowerDiff & 0xf);
- // Antenna C gain offset to antenna A, bit4~7
+ /* Antenna C gain offset to antenna A, bit4~7 */
priv->AntennaTxPwDiff[1] = (priv->EEPROMTxPowerDiff & 0xf0) >> 4;
- // CrystalCap, bit12~15
+ /* CrystalCap, bit12~15 */
priv->CrystalCap = priv->EEPROMCrystalCap;
- // ThermalMeter, bit0~3 for RFIC1, bit4~7 for RFIC2
- // 92U does not enable TX power tracking.
+ /* ThermalMeter, bit0~3 for RFIC1, bit4~7 for RFIC2
+ * 92U does not enable TX power tracking.
+ */
priv->ThermalMeter[0] = priv->EEPROMThermalMeter;
- }//end if VersionID == VERSION_819xU_A
+ } /* end if VersionID == VERSION_819xU_A */
- //added by vivi, for dlink led, 20080416
+ /* for dlink led */
switch (priv->eeprom_CustomerID) {
case EEPROM_CID_RUNTOP:
priv->CustomerID = RT_CID_819x_RUNTOP;
@@ -2489,10 +2503,10 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
RT_TRACE(COMP_EPROM, "\n2T4R config\n");
}
- // 2008/01/16 MH We can only know RF type in the function. So we have to init
- // DIG RATR table again.
+ /* We can only know RF type in the function. So we have to init
+ * DIG RATR table again.
+ */
init_rate_adaptive(dev);
- //we need init DIG RATR table here again.
RT_TRACE(COMP_EPROM, "<===========%s()\n", __func__);
}
@@ -2561,8 +2575,7 @@ static void rtl8192_hwconfig(struct net_device *dev)
struct r8192_priv *priv = ieee80211_priv(dev);
u32 ratr_value = 0;
- // Set RRSR, RATR, and BW_OPMODE registers
- //
+ /* Set RRSR, RATR, and BW_OPMODE registers */
switch (priv->ieee80211->mode) {
case WIRELESS_MODE_B:
regBwOpMode = BW_OPMODE_20MHZ;
@@ -2594,8 +2607,9 @@ static void rtl8192_hwconfig(struct net_device *dev)
}
break;
case WIRELESS_MODE_N_24G:
- // It support CCK rate by default.
- // CCK rate will be filtered out only when associated AP does not support it.
+ /* It support CCK rate by default. CCK rate will be filtered
+ * out only when associated AP does not support it.
+ */
regBwOpMode = BW_OPMODE_20MHZ;
regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG | RATE_ALL_OFDM_1SS | RATE_ALL_OFDM_2SS;
regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
@@ -2617,25 +2631,23 @@ static void rtl8192_hwconfig(struct net_device *dev)
regRRSR = ((regTmp) << 24) | (regRRSR & 0x00ffffff);
write_nic_dword(dev, RRSR, regRRSR);
- //
- // Set Retry Limit here
- //
+ /* Set Retry Limit here */
write_nic_word(dev, RETRY_LIMIT,
priv->ShortRetryLimit << RETRY_LIMIT_SHORT_SHIFT |
priv->LongRetryLimit << RETRY_LIMIT_LONG_SHIFT);
- // Set Contention Window here
+ /* Set Contention Window here */
- // Set Tx AGC
+ /* Set Tx AGC */
- // Set Tx Antenna including Feedback control
+ /* Set Tx Antenna including Feedback control */
- // Set Auto Rate fallback control
+ /* Set Auto Rate fallback control */
}
-//InitializeAdapter and PhyCfg
+/* InitializeAdapter and PhyCfg */
static bool rtl8192_adapter_start(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
@@ -2645,7 +2657,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
u8 tmp;
RT_TRACE(COMP_INIT, "====>%s()\n", __func__);
priv->Rf_Mode = RF_OP_By_SW_3wire;
- //for ASIC power on sequence
+ /* for ASIC power on sequence */
write_nic_byte_E(dev, 0x5f, 0x80);
mdelay(50);
write_nic_byte_E(dev, 0x5f, 0xf0);
@@ -2654,21 +2666,21 @@ static bool rtl8192_adapter_start(struct net_device *dev)
write_nic_byte(dev, 0x17, 0x37);
mdelay(10);
priv->pFirmware->firmware_status = FW_STATUS_0_INIT;
- //config CPUReset Register
- //Firmware Reset or not?
+ /* config CPUReset Register */
+ /* Firmware Reset or not? */
read_nic_dword(dev, CPU_GEN, &dwRegRead);
if (priv->pFirmware->firmware_status == FW_STATUS_0_INIT)
- dwRegRead |= CPU_GEN_SYSTEM_RESET; //do nothing here?
+ dwRegRead |= CPU_GEN_SYSTEM_RESET; /* do nothing here? */
else if (priv->pFirmware->firmware_status == FW_STATUS_5_READY)
dwRegRead |= CPU_GEN_FIRMWARE_RESET;
else
RT_TRACE(COMP_ERR, "ERROR in %s(): undefined firmware state(%d)\n", __func__, priv->pFirmware->firmware_status);
write_nic_dword(dev, CPU_GEN, dwRegRead);
- //config BB.
+ /* config BB. */
rtl8192_BBConfig(dev);
- //Loopback mode or not
+ /* Loopback mode or not */
priv->LoopbackMode = RTL819xU_NO_LOOPBACK;
read_nic_dword(dev, CPU_GEN, &dwRegRead);
@@ -2681,27 +2693,27 @@ static bool rtl8192_adapter_start(struct net_device *dev)
write_nic_dword(dev, CPU_GEN, dwRegRead);
- //after reset cpu, we need wait for a seconds to write in register.
+ /* after reset cpu, we need wait for a seconds to write in register. */
udelay(500);
- //xiong add for new bitfile:usb suspend reset pin set to 1. //do we need?
+ /* add for new bitfile:usb suspend reset pin set to 1. Do we need? */
read_nic_byte_E(dev, 0x5f, &tmp);
write_nic_byte_E(dev, 0x5f, tmp | 0x20);
- //Set Hardware
+ /* Set Hardware */
rtl8192_hwconfig(dev);
- //turn on Tx/Rx
+ /* turn on Tx/Rx */
write_nic_byte(dev, CMDR, CR_RE | CR_TE);
- //set IDR0 here
+ /* set IDR0 here */
write_nic_dword(dev, MAC0, ((u32 *)dev->dev_addr)[0]);
write_nic_word(dev, MAC4, ((u16 *)(dev->dev_addr + 4))[0]);
- //set RCR
+ /* set RCR */
write_nic_dword(dev, RCR, priv->ReceiveConfig);
- //Initialize Number of Reserved Pages in Firmware Queue
+ /* Initialize Number of Reserved Pages in Firmware Queue */
write_nic_dword(dev, RQPN1, NUM_OF_PAGE_IN_FW_QUEUE_BK << RSVD_FW_QUEUE_PAGE_BK_SHIFT |
NUM_OF_PAGE_IN_FW_QUEUE_BE << RSVD_FW_QUEUE_PAGE_BE_SHIFT |
NUM_OF_PAGE_IN_FW_QUEUE_VI << RSVD_FW_QUEUE_PAGE_VI_SHIFT |
@@ -2712,8 +2724,8 @@ static bool rtl8192_adapter_start(struct net_device *dev)
NUM_OF_PAGE_IN_FW_QUEUE_BCN << RSVD_FW_QUEUE_PAGE_BCN_SHIFT);
write_nic_dword(dev, RATR0 + 4 * 7, (RATE_ALL_OFDM_AG | RATE_ALL_CCK));
- //Set AckTimeout
- // TODO: (it value is only for FPGA version). need to be changed!!2006.12.18, by Emily
+ /* Set AckTimeout */
+ /* TODO: (it value is only for FPGA version). need to be changed!! */
write_nic_byte(dev, ACK_TIMEOUT, 0x30);
if (priv->ResetProgress == RESET_TYPE_NORESET)
@@ -2726,7 +2738,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
write_nic_byte(dev, SECR, SECR_value);
}
- //Beacon related
+ /* Beacon related */
write_nic_word(dev, ATIMWND, 2);
write_nic_word(dev, BCN_INTERVAL, 100);
@@ -2744,20 +2756,22 @@ static bool rtl8192_adapter_start(struct net_device *dev)
rtl8192_phy_setTxPower(dev, priv->chan);
}
- //Firmware download
+ /* Firmware download */
init_status = init_firmware(dev);
if (!init_status) {
RT_TRACE(COMP_ERR, "ERR!!! %s(): Firmware download is failed\n", __func__);
return init_status;
}
RT_TRACE(COMP_INIT, "%s():after firmware download\n", __func__);
- //
+
#ifdef TO_DO_LIST
if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
if (pMgntInfo->RegRfOff) { /* User disable RF via registry. */
RT_TRACE((COMP_INIT | COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
- // Those actions will be discard in MgntActSet_RF_State because of the same state
+ /* Those actions will be discard in MgntActSet_RF_State
+ * because of the same state
+ */
for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0);
} else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) { /* H/W or S/W RF OFF before sleep. */
@@ -2771,13 +2785,15 @@ static bool rtl8192_adapter_start(struct net_device *dev)
} else {
if (pHalData->eRFPowerState == eRfOff) {
MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason);
- // Those actions will be discard in MgntActSet_RF_State because of the same state
+ /* Those actions will be discard in MgntActSet_RF_State
+ * because of the same state
+ */
for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0);
}
}
#endif
- //config RF.
+ /* config RF. */
if (priv->ResetProgress == RESET_TYPE_NORESET) {
rtl8192_phy_RFConfig(dev);
RT_TRACE(COMP_INIT, "%s():after phy RF config\n", __func__);
@@ -2785,7 +2801,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
if (priv->ieee80211->FwRWRF)
- // We can force firmware to do RF-R/W
+ /* We can force firmware to do RF-R/W */
priv->Rf_Mode = RF_OP_By_FW;
else
priv->Rf_Mode = RF_OP_By_SW_3wire;
@@ -2797,7 +2813,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
rtl8192_setBBreg(dev, rFPGA0_RFMOD, bOFDMEn, 0x1);
if (priv->ResetProgress == RESET_TYPE_NORESET) {
- //if D or C cut
+ /* if D or C cut */
u8 tmpvalue;
read_nic_byte(dev, 0x301, &tmpvalue);
if (tmpvalue == 0x03) {
@@ -2882,9 +2898,7 @@ static RESET_TYPE TxCheckStuck(struct net_device *dev)
u8 QueueID;
bool bCheckFwTxCnt = false;
- //
- // Decide such threshold according to current power save mode
- //
+ /* Decide such threshold according to current power save mode */
for (QueueID = 0; QueueID <= BEACON_QUEUE; QueueID++) {
if (QueueID == TXCMD_QUEUE)
@@ -2911,11 +2925,12 @@ static bool HalRxCheckStuck819xUsb(struct net_device *dev)
static u8 rx_chk_cnt;
read_nic_word(dev, 0x130, &RegRxCounter);
RT_TRACE(COMP_RESET, "%s(): RegRxCounter is %d,RxCounter is %d\n", __func__, RegRxCounter, priv->RxCounter);
- // If rssi is small, we should check rx for long time because of bad rx.
- // or maybe it will continuous silent reset every 2 seconds.
+ /*