From: Mike McCormack Date: Mon, 24 Jan 2011 14:22:21 +0000 (+0900) Subject: staging: rtl8192e: Remove unused members from struct Stats X-Git-Tag: MMI-PSA29.97-13-9~20521^2~810 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8cbe7ae6c1fd33419cba0c210a5f2c6b586b8d35;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: rtl8192e: Remove unused members from struct Stats Signed-off-by: Mike McCormack Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h index 09850a68a8b6..5f85872e39a2 100644 --- a/drivers/staging/rtl8192e/r8192E.h +++ b/drivers/staging/rtl8192e/r8192E.h @@ -481,79 +481,35 @@ typedef struct Stats unsigned long rxcmdpkt[4]; //08/05/08 amy rx cmd element txfeedback/bcn report/cfg set/query unsigned long rxurberr; /* remove */ unsigned long received_rate_histogram[4][32]; //0: Total, 1:OK, 2:CRC, 3:ICV, 2007 07 03 cosa - unsigned long received_preamble_GI[2][32]; //0: Long preamble/GI, 1:Short preamble/GI - unsigned long rx_AMPDUsize_histogram[5]; // level: (<4K), (4K~8K), (8K~16K), (16K~32K), (32K~64K) - unsigned long rx_AMPDUnum_histogram[5]; // level: (<5), (5~10), (10~20), (20~40), (>40) - unsigned long received_bwtype[5]; //0: 20M, 1: funn40M, 2: upper20M, 3: lower20M, 4: duplicate - unsigned long txnperr; - unsigned long txnpdrop; - unsigned long txresumed; unsigned long rxoverflow; unsigned long rxint; - unsigned long txnpokint; - unsigned long ints; - unsigned long shints; unsigned long txoverflow; - unsigned long txlpokint; - unsigned long txlpdrop; - unsigned long txlperr; unsigned long txbeokint; - unsigned long txbedrop; - unsigned long txbeerr; unsigned long txbkokint; - unsigned long txbkdrop; - unsigned long txbkerr; unsigned long txviokint; - unsigned long txvidrop; - unsigned long txvierr; unsigned long txvookint; - unsigned long txvodrop; - unsigned long txvoerr; unsigned long txbeaconokint; - unsigned long txbeacondrop; unsigned long txbeaconerr; unsigned long txmanageokint; - unsigned long txmanagedrop; - unsigned long txmanageerr; unsigned long txcmdpktokint; - unsigned long txdatapkt; unsigned long txfeedback; unsigned long txfeedbackok; unsigned long txoktotal; - unsigned long txokbytestotal; - unsigned long txokinperiod; - unsigned long txmulticast; - unsigned long txbytesmulticast; - unsigned long txbroadcast; - unsigned long txbytesbroadcast; unsigned long txunicast; unsigned long txbytesunicast; unsigned long rxbytesunicast; - unsigned long txfeedbackfail; - unsigned long txerrtotal; unsigned long txerrbytestotal; - unsigned long txerrmulticast; - unsigned long txerrbroadcast; - unsigned long txerrunicast; - unsigned long txretrycount; - unsigned long txfeedbackretry; - u8 last_packet_rate; + unsigned long slide_signal_strength[100]; unsigned long slide_evm[100]; unsigned long slide_rssi_total; // For recording sliding window's RSSI value unsigned long slide_evm_total; // For recording sliding window's EVM value long signal_strength; // Transformed, in dbm. Beautified signal strength for UI, not correct. - long signal_quality; - long last_signal_strength_inpercent; - long recv_signal_power; // Correct smoothed ss in Dbm, only used in driver to report real power now. u8 rx_rssi_percentage[4]; u8 rx_evm_percentage[2]; - long rxSNRdB[4]; - rt_tx_rahis_t txrate; u32 Slide_Beacon_pwdb[100]; //cosa add for beacon rssi u32 Slide_Beacon_Total; //cosa add for beacon rssi RT_SMOOTH_DATA_4RF cck_adc_pwdb; - u32 CurrentShowTxate; } Stats; diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index dcd2fc60b86b..a465f3770baa 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -1348,10 +1348,6 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb) if (uni_addr) priv->stats.txbytesunicast += (u8)(skb->len) - sizeof(TX_FWINFO_8190PCI); - else if (multi_addr) - priv->stats.txbytesmulticast += (u8)(skb->len) - sizeof(TX_FWINFO_8190PCI); - else - priv->stats.txbytesbroadcast += (u8)(skb->len) - sizeof(TX_FWINFO_8190PCI); /* fill tx firmware */ pTxFwInfo = (PTX_FWINFO_8190PCI)skb->data; @@ -4648,41 +4644,6 @@ static long rtl819x_translate_todbm(u8 signal_strength_index)// 0-100 index. return signal_power; } -/* - * Update Rx signal related information in the packet reeived - * to RxStats. User application can query RxStats to realize - * current Rx signal status. - * - * In normal operation, user only care about the information of the BSS - * and we shall invoke this function if the packet received is from the BSS. - */ -static void -rtl819x_update_rxsignalstatistics8190pci( - struct r8192_priv * priv, - struct ieee80211_rx_stats * pprevious_stats - ) -{ - int weighting = 0; - - //2 Update Rx Statistics (such as signal strength and signal quality). - - // Initila state - if(priv->stats.recv_signal_power == 0) - priv->stats.recv_signal_power = pprevious_stats->RecvSignalPower; - - // To avoid the past result restricting the statistics sensitivity, weight the current power (5/6) to speed up the - // reaction of smoothed Signal Power. - if(pprevious_stats->RecvSignalPower > priv->stats.recv_signal_power) - weighting = 5; - else if(pprevious_stats->RecvSignalPower < priv->stats.recv_signal_power) - weighting = (-5); - // - // We need more correct power of received packets and the "SignalStrength" of RxStats have been beautified or translated, - // so we record the correct power in Dbm here. By Bruce, 2008-03-07. - // - priv->stats.recv_signal_power = (priv->stats.recv_signal_power * 5 + pprevious_stats->RecvSignalPower + weighting) / 6; -} - static void rtl8190_process_cck_rxpathsel( struct r8192_priv * priv, @@ -4910,7 +4871,6 @@ static void rtl8192_process_phyinfo(struct r8192_priv * priv, u8* buffer,struct ( ((pHalData->UndecoratedSmoothedPWDB)* 5) + (pPreviousRfd->Status.RxPWDBAll)) / 6; } #endif - rtl819x_update_rxsignalstatistics8190pci(priv,pprevious_stats); } // @@ -4937,9 +4897,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv * priv, u8* buffer,struct // <1> Showed on UI for user, in percentage. tmp_val = priv->stats.slide_evm_total/slide_evm_statistics; - priv->stats.signal_quality = tmp_val; //cosa add 10/11/2007, Showed on UI for user in Windows Vista, for Link quality. - priv->stats.last_signal_strength_inpercent = tmp_val; } // <2> Showed on UI for engineering @@ -5242,7 +5200,6 @@ static void rtl8192_query_rxphystatus( tmp_rxsnr = pofdm_buf->rxsnr_X[i]; rx_snrX = (char)(tmp_rxsnr); rx_snrX /= 2; - priv->stats.rxSNRdB[i] = (long)rx_snrX; /* Translate DBM to percentage. */ RSSI = rtl819x_query_rxpwrpercentage(rx_pwr[i]); @@ -5301,10 +5258,6 @@ static void rtl8192_query_rxphystatus( /* record rx statistics for debug */ rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg; prxsc = (phy_ofdm_rx_status_rxsc_sgien_exintfflag *)&rxsc_sgien_exflg; - if(pdrvinfo->BW) //40M channel - priv->stats.received_bwtype[1+prxsc->rxsc]++; - else //20M channel - priv->stats.received_bwtype[0]++; } //UI BSS List signal strength(in percentage), make it good looking, from 0~100. @@ -5481,7 +5434,6 @@ static void UpdateReceivedRateHistogramStatistics8190( case MGN_MCS15: rateIndex = 27; break; default: rateIndex = 28; break; } - priv->stats.received_preamble_GI[preamble_guardinterval][rateIndex]++; priv->stats.received_rate_histogram[0][rateIndex]++; //total priv->stats.received_rate_histogram[rcvType][rateIndex]++; } @@ -5957,7 +5909,6 @@ static irqreturn_t rtl8192_interrupt(int irq, void *netdev) inta = read_nic_dword(dev, ISR); /* & priv->IntrMask; */ write_nic_dword(dev, ISR, inta); /* reset int situation */ - priv->stats.shints++; if (!inta) { /* * most probably we can safely return IRQ_NONE, @@ -5971,8 +5922,6 @@ static irqreturn_t rtl8192_interrupt(int irq, void *netdev) goto out_unlock; } - priv->stats.ints++; - if (!netif_running(dev)) goto out_unlock; diff --git a/drivers/staging/rtl8192e/r8192E_dm.c b/drivers/staging/rtl8192e/r8192E_dm.c index 319cf59c8503..08275b3cde39 100644 --- a/drivers/staging/rtl8192e/r8192E_dm.c +++ b/drivers/staging/rtl8192e/r8192E_dm.c @@ -3196,15 +3196,9 @@ static void dm_check_txrateandretrycount(struct net_device * dev) { struct r8192_priv *priv = ieee80211_priv(dev); struct ieee80211_device* ieee = priv->ieee80211; - //for 11n tx rate -// priv->stats.CurrentShowTxate = read_nic_byte(dev, Current_Tx_Rate_Reg); - ieee->softmac_stats.CurrentShowTxate = read_nic_byte(dev, Current_Tx_Rate_Reg); - //printk("=============>tx_rate_reg:%x\n", ieee->softmac_stats.CurrentShowTxate); //for initial tx rate -// priv->stats.last_packet_rate = read_nic_byte(dev, Initial_Tx_Rate_Reg); ieee->softmac_stats.last_packet_rate = read_nic_byte(dev ,Initial_Tx_Rate_Reg); //for tx tx retry count -// priv->stats.txretrycount = read_nic_dword(dev, Tx_Retry_Count_Reg); ieee->softmac_stats.txretrycount = read_nic_dword(dev, Tx_Retry_Count_Reg); } diff --git a/drivers/staging/rtl8192e/r819xE_cmdpkt.c b/drivers/staging/rtl8192e/r819xE_cmdpkt.c index 135439d12428..e841e1665fe8 100644 --- a/drivers/staging/rtl8192e/r819xE_cmdpkt.c +++ b/drivers/staging/rtl8192e/r819xE_cmdpkt.c @@ -160,52 +160,15 @@ cmpk_count_txstatistic( feedback info. */ if (pstx_fb->tok) { - priv->stats.txfeedbackok++; priv->stats.txoktotal++; - priv->stats.txokbytestotal += pstx_fb->pkt_length; - priv->stats.txokinperiod++; /* We can not make sure broadcast/multicast or unicast mode. */ - if (pstx_fb->pkt_type == PACKET_MULTICAST) - { - priv->stats.txmulticast++; - priv->stats.txbytesmulticast += pstx_fb->pkt_length; - } - else if (pstx_fb->pkt_type == PACKET_BROADCAST) - { - priv->stats.txbroadcast++; - priv->stats.txbytesbroadcast += pstx_fb->pkt_length; - } - else - { + if (pstx_fb->pkt_type != PACKET_MULTICAST && + pstx_fb->pkt_type != PACKET_BROADCAST) { priv->stats.txunicast++; priv->stats.txbytesunicast += pstx_fb->pkt_length; } } - else - { - priv->stats.txfeedbackfail++; - priv->stats.txerrtotal++; - priv->stats.txerrbytestotal += pstx_fb->pkt_length; - - /* We can not make sure broadcast/multicast or unicast mode. */ - if (pstx_fb->pkt_type == PACKET_MULTICAST) - { - priv->stats.txerrmulticast++; - } - else if (pstx_fb->pkt_type == PACKET_BROADCAST) - { - priv->stats.txerrbroadcast++; - } - else - { - priv->stats.txerrunicast++; - } - } - - priv->stats.txretrycount += pstx_fb->retry_cnt; - priv->stats.txfeedbackretry += pstx_fb->retry_cnt; - } @@ -403,29 +366,9 @@ static void cmpk_count_tx_status( struct net_device *dev, priv->stats.txfeedbackok += pstx_status->txok; priv->stats.txoktotal += pstx_status->txok; - priv->stats.txfeedbackfail += pstx_status->txfail; - priv->stats.txerrtotal += pstx_status->txfail; - - priv->stats.txretrycount += pstx_status->txretry; - priv->stats.txfeedbackretry += pstx_status->txretry; - - //pAdapter->TxStats.NumTxOkBytesTotal += psTx_FB->pkt_length; - //pAdapter->TxStats.NumTxErrBytesTotal += psTx_FB->pkt_length; - //pAdapter->MgntInfo.LinkDetectInfo.NumTxOkInPeriod++; - - priv->stats.txmulticast += pstx_status->txmcok; - priv->stats.txbroadcast += pstx_status->txbcok; priv->stats.txunicast += pstx_status->txucok; - priv->stats.txerrmulticast += pstx_status->txmcfail; - priv->stats.txerrbroadcast += pstx_status->txbcfail; - priv->stats.txerrunicast += pstx_status->txucfail; - - priv->stats.txbytesmulticast += pstx_status->txmclength; - priv->stats.txbytesbroadcast += pstx_status->txbclength; priv->stats.txbytesunicast += pstx_status->txuclength; - - priv->stats.last_packet_rate = pstx_status->rate; } @@ -454,13 +397,9 @@ cmpk_handle_tx_rate_history( struct net_device *dev, u8* pmsg) { - cmpk_tx_rahis_t *ptxrate; -// RT_RF_POWER_STATE rtState; - u8 i, j; + u8 i; u16 length = sizeof(cmpk_tx_rahis_t); u32 *ptemp; - struct r8192_priv *priv = ieee80211_priv(dev); - #ifdef ENABLE_PS pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); @@ -488,28 +427,6 @@ cmpk_handle_tx_rate_history( temp2 = ptemp[i]>>16; ptemp[i] = (temp1<<16)|temp2; } - - ptxrate = (cmpk_tx_rahis_t *)pmsg; - - if (ptxrate == NULL ) - { - return; - } - - for (i = 0; i < 16; i++) - { - // Collect CCK rate packet num - if (i < 4) - priv->stats.txrate.cck[i] += ptxrate->cck[i]; - - // Collect OFDM rate packet num - if (i< 8) - priv->stats.txrate.ofdm[i] += ptxrate->ofdm[i]; - - for (j = 0; j < 4; j++) - priv->stats.txrate.ht_mcs[j][i] += ptxrate->ht_mcs[j][i]; - } - }