From: Mike McCormack <mikem@xxxxxxxxxx> Signed-off-by: Mike McCormack <mikem@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/staging/rtl8192e/r8192E_dm.c | 29 --------------- drivers/staging/rtl8192e/r8192E_wx.c | 56 +----------------------------- drivers/staging/rtl8192e/r8192_pm.c | 38 -------------------- drivers/staging/rtl8192e/r819xE_cmdpkt.c | 51 +-------------------------- 4 files changed, 2 insertions(+), 172 deletions(-) diff --git a/drivers/staging/rtl8192e/r8192E_dm.c b/drivers/staging/rtl8192e/r8192E_dm.c index d328d67..20d9c0b 100644 --- a/drivers/staging/rtl8192e/r8192E_dm.c +++ b/drivers/staging/rtl8192e/r8192E_dm.c @@ -440,12 +440,9 @@ static void dm_check_rate_adaptive(struct net_device * dev) } } - // 2008.04.01 -#if 1 // For RTL819X, if pairwisekey = wep/tkip, we support only MCS0~7. if(priv->ieee80211->GetHalfNmodeSupportByAPsHandler(dev)) targetRATR &= 0xf00fffff; -#endif // // Check whether updating of RATR0 is required @@ -2088,7 +2085,6 @@ void dm_init_edca_turbo(struct net_device *dev) priv->bis_cur_rdlstate = false; } -#if 1 static void dm_check_edca_turbo( struct net_device * dev) { @@ -2106,10 +2102,8 @@ static void dm_check_edca_turbo( // Do not be Turbo if it's under WiFi config and Qos Enabled, because the EDCA parameters // should follow the settings from QAP. By Bruce, 2007-12-07. // - #if 1 if(priv->ieee80211->state != IEEE80211_LINKED) goto dm_CheckEdcaTurbo_EXIT; - #endif // We do not turn on EDCA turbo mode for some AP that has IOT issue if(priv->ieee80211->pHTInfo->IOTAction & HT_IOT_ACT_DISABLE_EDCA_TURBO) goto dm_CheckEdcaTurbo_EXIT; @@ -2197,7 +2191,6 @@ dm_CheckEdcaTurbo_EXIT: lastTxOkCnt = priv->stats.txbytesunicast; lastRxOkCnt = priv->stats.rxbytesunicast; } -#endif static void dm_init_ctstoself(struct net_device * dev) { @@ -2237,18 +2230,7 @@ static void dm_ctstoself(struct net_device *dev) } else //uplink { - #if 1 pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF; - #else - if(priv->undecorated_smoothed_pwdb < priv->ieee80211->CTSToSelfTH) // disable CTS to self - { - pHTInfo->IOTAction &= ~HT_IOT_ACT_FORCED_CTS2SELF; - } - else if(priv->undecorated_smoothed_pwdb >= (priv->ieee80211->CTSToSelfTH+5)) // enable CTS to self - { - pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF; - } - #endif } lastTxOkCnt = priv->stats.txbytesunicast; @@ -2259,7 +2241,6 @@ static void dm_ctstoself(struct net_device *dev) /* Copy 8187B template for 9xseries */ -#if 1 static void dm_check_rfctrl_gpio(struct net_device * dev) { #ifdef RTL8192E @@ -2283,7 +2264,6 @@ static void dm_check_rfctrl_gpio(struct net_device * dev) } -#endif /* Check if PBC button is pressed. */ static void dm_check_pbc_gpio(struct net_device *dev) { @@ -3152,7 +3132,6 @@ static void dm_check_txrateandretrycount(struct net_device * dev) static void dm_send_rssi_tofw(struct net_device *dev) { - DCMD_TXCMD_T tx_cmd; struct r8192_priv *priv = ieee80211_priv(dev); // If we test chariot, we should stop the TX command ? @@ -3160,13 +3139,5 @@ static void dm_send_rssi_tofw(struct net_device *dev) // 0x1e0(byte) to botify driver. write_nic_byte(priv, DRIVER_RSSI, (u8)priv->undecorated_smoothed_pwdb); return; -#if 1 - tx_cmd.Op = TXCMD_SET_RX_RSSI; - tx_cmd.Length = 4; - tx_cmd.Value = priv->undecorated_smoothed_pwdb; - - cmpk_message_handle_tx(dev, (u8*)&tx_cmd, - DESC_PACKET_TYPE_INIT, sizeof(DCMD_TXCMD_T)); -#endif } diff --git a/drivers/staging/rtl8192e/r8192E_wx.c b/drivers/staging/rtl8192e/r8192E_wx.c index c6239bb..a2e9432 100644 --- a/drivers/staging/rtl8192e/r8192E_wx.c +++ b/drivers/staging/rtl8192e/r8192E_wx.c @@ -693,20 +693,6 @@ static int r8192_wx_set_enc(struct net_device *dev, zero_addr[key_idx], 0, //DefaultKey hwkey); //KeyContent - -#if 0 - if(key_idx == 0){ - - //write_nic_byte(dev, SECR, 7); - setKey( dev, - 4, //EntryNo - key_idx, //KeyIndex - KEY_TYPE_WEP40, //KeyType - broadcast_addr, //addr - 0, //DefaultKey - hwkey); //KeyContent - } -#endif } else if(wrqu->encoding.length==0xd){ @@ -719,43 +705,9 @@ static int r8192_wx_set_enc(struct net_device *dev, zero_addr[key_idx], 0, //DefaultKey hwkey); //KeyContent -#if 0 - if(key_idx == 0){ - - //write_nic_byte(dev, SECR, 7); - setKey( dev, - 4, //EntryNo - key_idx, //KeyIndex - KEY_TYPE_WEP104, //KeyType - broadcast_addr, //addr - 0, //DefaultKey - hwkey); //KeyContent - } -#endif } else printk("wrong type in WEP, not WEP40 and WEP104\n"); - - - } - -#if 0 - //consider the setting different key index situation - //wrqu->encoding.flags = 801 means that we set key with index "1" - if(wrqu->encoding.length==0 && (wrqu->encoding.flags >>8) == 0x8 ){ - printk("===>1\n"); - //write_nic_byte(dev, SECR, 7); - EnableHWSecurityConfig8192(dev); - //copy wpa config from default key(key0~key3) to broadcast key(key5) - // - key_idx = (wrqu->encoding.flags & 0xf)-1 ; - write_cam(dev, (4*6), 0xffff0000|read_cam(dev, key_idx*6) ); - write_cam(dev, (4*6)+1, 0xffffffff); - write_cam(dev, (4*6)+2, read_cam(dev, (key_idx*6)+2) ); - write_cam(dev, (4*6)+3, read_cam(dev, (key_idx*6)+3) ); - write_cam(dev, (4*6)+4, read_cam(dev, (key_idx*6)+4) ); - write_cam(dev, (4*6)+5, read_cam(dev, (key_idx*6)+5) ); } -#endif priv->ieee80211->wx_set_enc = 0; @@ -929,14 +881,8 @@ static int r8192_wx_set_enc_ext(struct net_device *dev, u32 key[4] = {0}; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; struct iw_point *encoding = &wrqu->encoding; -#if 0 - static u8 CAM_CONST_ADDR[4][6] = { - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x02}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x03}}; -#endif u8 idx = 0, alg = 0, group = 0; + if ((encoding->flags & IW_ENCODE_DISABLED) || ext->alg == IW_ENCODE_ALG_NONE) //none is not allowed to use hwsec WB 2008.07.01 { diff --git a/drivers/staging/rtl8192e/r8192_pm.c b/drivers/staging/rtl8192e/r8192_pm.c index 75e1628..8781735 100644 --- a/drivers/staging/rtl8192e/r8192_pm.c +++ b/drivers/staging/rtl8192e/r8192_pm.c @@ -36,43 +36,8 @@ int rtl8192E_suspend (struct pci_dev *pdev, pm_message_t state) if (dev->netdev_ops->ndo_stop) dev->netdev_ops->ndo_stop(dev); -// dev->stop(dev); -#if 0 - netif_carrier_off(dev); - - ieee80211_softmac_stop_protocol(priv->ieee80211); - - write_nic_byte(priv, MSR,(read_nic_byte(dev,MSR)&0xfc)|MSR_LINK_NONE); - if(!priv->ieee80211->bSupportRemoteWakeUp) { - /* disable tx/rx. In 8185 we write 0x10 (Reset bit), - * but here we make reference to WMAC and wirte 0x0. - * 2006.11.21 Emily - */ - write_nic_byte(dev, CMDR, 0); - } - //disable interrupt - write_nic_dword(dev,INTA_MASK,0); - priv->irq_enabled = 0; - write_nic_dword(dev,ISR,read_nic_dword(dev, ISR)); - - /* need to free DM related functions */ - cancel_work_sync(&priv->reset_wq); - del_timer_sync(&priv->fsync_timer); - del_timer_sync(&priv->watch_dog_timer); - cancel_delayed_work(&priv->watch_dog_wq); - cancel_delayed_work(&priv->update_beacon_wq); - cancel_work_sync(&priv->qos_activate); - - /* TODO -#if ((DEV_BUS_TYPE == PCI_INTERFACE) && (HAL_CODE_BASE == RTL8192)) -pHalData->bHwRfOffAction = 2; -#endif -*/ -#endif // Call MgntActSet_RF_State instead to prevent RF config race condition. - // By Bruce, 2008-01-17. - // if(!priv->ieee80211->bSupportRemoteWakeUp) { MgntActSet_RF_State(dev, eRfOff, RF_CHANGE_BY_INIT); // 2006.11.30. System reset bit @@ -114,8 +79,6 @@ out_pci_suspend: int rtl8192E_resume (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - //struct r8192_priv *priv = ieee80211_priv(dev); - //union iwreq_data wrqu; int err; u32 val; @@ -155,7 +118,6 @@ int rtl8192E_resume (struct pci_dev *pdev) if (dev->netdev_ops->ndo_open) dev->netdev_ops->ndo_open(dev); -// dev->open(dev); out: RT_TRACE(COMP_POWER, "<================r8192E resume call.\n"); return 0; diff --git a/drivers/staging/rtl8192e/r819xE_cmdpkt.c b/drivers/staging/rtl8192e/r819xE_cmdpkt.c index 76beaa3..11ad7cf 100644 --- a/drivers/staging/rtl8192e/r819xE_cmdpkt.c +++ b/drivers/staging/rtl8192e/r819xE_cmdpkt.c @@ -189,55 +189,9 @@ cmpk_handle_tx_feedback( priv->stats.txfeedback++; - /* 0. Display received message. */ - //cmpk_Display_Message(CMPK_RX_TX_FB_SIZE, pMsg); - - /* 1. Extract TX feedback info from RFD to temp structure buffer. */ - /* It seems that FW use big endian(MIPS) and DRV use little endian in - windows OS. So we have to read the content byte by byte or transfer - endian type before copy the message copy. */ -#if 0 // The TX FEEDBACK packet element address - //rx_tx_fb.Element_ID = pMsg[0]; - //rx_tx_fb.Length = pMsg[1]; - rx_tx_fb.TOK = pMsg[2]>>7; - rx_tx_fb.Fail_Reason = (pMsg[2] & 0x70) >> 4; - rx_tx_fb.TID = (pMsg[2] & 0x0F); - rx_tx_fb.Qos_Pkt = pMsg[3] >> 7; - rx_tx_fb.Bandwidth = (pMsg[3] & 0x40) >> 6; - rx_tx_fb.Retry_Cnt = pMsg[5]; - rx_tx_fb.Pkt_ID = (pMsg[6] << 8) | pMsg[7]; - rx_tx_fb.Seq_Num = (pMsg[8] << 8) | pMsg[9]; - rx_tx_fb.S_Rate = pMsg[10]; - rx_tx_fb.F_Rate = pMsg[11]; - rx_tx_fb.S_RTS_Rate = pMsg[12]; - rx_tx_fb.F_RTS_Rate = pMsg[13]; - rx_tx_fb.pkt_length = (pMsg[14] << 8) | pMsg[15]; -#endif - /* 2007/07/05 MH Use pointer to transfer structure memory. */ - //memcpy((UINT8 *)&rx_tx_fb, pMsg, sizeof(CMPK_TXFB_T)); memcpy((u8*)&rx_tx_fb, pmsg, sizeof(cmpk_txfb_t)); - /* 2. Use tx feedback info to count TX statistics. */ + /* Use tx feedback info to count TX statistics. */ cmpk_count_txstatistic(dev, &rx_tx_fb); -#if 0 - /* 2007/07/11 MH Assign current operate rate. */ - if (pAdapter->RegWirelessMode == WIRELESS_MODE_A || - pAdapter->RegWirelessMode == WIRELESS_MODE_B || - pAdapter->RegWirelessMode == WIRELESS_MODE_G) - { - pMgntInfo->CurrentOperaRate = (rx_tx_fb.F_Rate & 0x7F); - } - else if (pAdapter->RegWirelessMode == WIRELESS_MODE_N_24G || - pAdapter->RegWirelessMode == WIRELESS_MODE_N_5G) - { - pMgntInfo->HTCurrentOperaRate = (rx_tx_fb.F_Rate & 0x8F); - } -#endif - /* 2007/01/17 MH Comment previous method for TX statistic function. */ - /* Collect info TX feedback packet to fill TCB. */ - /* We can not know the packet length and transmit type: broadcast or uni - or multicast. */ - //CountTxStatistics( pAdapter, &tcb ); - } @@ -257,9 +211,6 @@ cmpk_handle_interrupt_status( DMESG("---> cmpk_Handle_Interrupt_Status()\n"); - /* 0. Display received message. */ - //cmpk_Display_Message(CMPK_RX_BEACON_STATE_SIZE, pMsg); - /* 1. Extract TX feedback info from RFD to temp structure buffer. */ /* It seems that FW use big endian(MIPS) and DRV use little endian in windows OS. So we have to read the content byte by byte or transfer -- 1.7.4.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel