aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/rtl8192u/r8180_93cx6.c2
-rw-r--r--drivers/staging/rtl8192u/r8180_93cx6.h2
-rw-r--r--drivers/staging/rtl8192u/r8192U.h6
-rw-r--r--drivers/staging/rtl8192u/r8192U_core.c56
-rw-r--r--drivers/staging/rtl8192u/r8192U_dm.c50
-rw-r--r--drivers/staging/rtl8192u/r8192U_hw.h2
-rw-r--r--drivers/staging/rtl8192u/r8192U_wx.c8
-rw-r--r--drivers/staging/rtl8192u/r8192U_wx.h2
-rw-r--r--drivers/staging/rtl8192u/r819xU_HTType.h2
-rw-r--r--drivers/staging/rtl8192u/r819xU_cmdpkt.c8
-rw-r--r--drivers/staging/rtl8192u/r819xU_firmware.c4
-rw-r--r--drivers/staging/rtl8192u/r819xU_phy.c16
-rw-r--r--drivers/staging/rtl8192u/r819xU_phyreg.h2
13 files changed, 80 insertions, 80 deletions
diff --git a/drivers/staging/rtl8192u/r8180_93cx6.c b/drivers/staging/rtl8192u/r8180_93cx6.c
index 8878cfeb0fbb..0e8ff75e291b 100644
--- a/drivers/staging/rtl8192u/r8180_93cx6.c
+++ b/drivers/staging/rtl8192u/r8180_93cx6.c
@@ -14,7 +14,7 @@
14 14
15 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver. 15 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver.
16 16
17 We want to tanks the Authors of those projects and the Ndiswrapper 17 We want to thanks the Authors of those projects and the Ndiswrapper
18 project Authors. 18 project Authors.
19*/ 19*/
20 20
diff --git a/drivers/staging/rtl8192u/r8180_93cx6.h b/drivers/staging/rtl8192u/r8180_93cx6.h
index fb3ac9766ea5..3527d3280682 100644
--- a/drivers/staging/rtl8192u/r8180_93cx6.h
+++ b/drivers/staging/rtl8192u/r8180_93cx6.h
@@ -7,7 +7,7 @@
7 Parts of this driver are based on the rtl8180 driver skeleton from Patric Schenke & Andres Salomon 7 Parts of this driver are based on the rtl8180 driver skeleton from Patric Schenke & Andres Salomon
8 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver 8 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver
9 9
10 We want to tanks the Authors of such projects and the Ndiswrapper project Authors. 10 We want to thanks the Authors of such projects and the Ndiswrapper project Authors.
11*/ 11*/
12 12
13/*This files contains card eeprom (93c46 or 93c56) programming routines*/ 13/*This files contains card eeprom (93c46 or 93c56) programming routines*/
diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 43d459d81885..adeb724e0f61 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -11,7 +11,7 @@
11 11
12 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver 12 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver
13 13
14 We want to tanks the Authors of those projects and the Ndiswrapper 14 We want to thanks the Authors of those projects and the Ndiswrapper
15 project Authors. 15 project Authors.
16*/ 16*/
17 17
@@ -98,7 +98,7 @@ do { if(rt_global_debug_component & component) \
98#define COMP_INIT BIT2 // during driver initialization / halt / reset. 98#define COMP_INIT BIT2 // during driver initialization / halt / reset.
99 99
100 100
101#define COMP_RECV BIT3 // Reveive part data path. 101#define COMP_RECV BIT3 // Revive part data path.
102#define COMP_SEND BIT4 // Send part path. 102#define COMP_SEND BIT4 // Send part path.
103#define COMP_IO BIT5 // I/O Related. Added by Annie, 2006-03-02. 103#define COMP_IO BIT5 // I/O Related. Added by Annie, 2006-03-02.
104#define COMP_POWER BIT6 // 802.11 Power Save mode or System/Device Power state related. 104#define COMP_POWER BIT6 // 802.11 Power Save mode or System/Device Power state related.
@@ -322,7 +322,7 @@ typedef struct _tx_fwinfo_819x_usb {
322 u8 TxSubCarrier:2; // This is used for legacy OFDM rate only. 322 u8 TxSubCarrier:2; // This is used for legacy OFDM rate only.
323 u8 STBC:2; 323 u8 STBC:2;
324 u8 AllowAggregation:1; 324 u8 AllowAggregation:1;
325 u8 RtsHT:1; //Interpre RtsRate field as high throughput data rate 325 u8 RtsHT:1; //Interprete RtsRate field as high throughput data rate
326 u8 RtsShort:1; //Short PLCP for CCK, or short GI for 11n MCS 326 u8 RtsShort:1; //Short PLCP for CCK, or short GI for 11n MCS
327 u8 RtsBandwidth:1; // This is used for HT MCS rate only. 327 u8 RtsBandwidth:1; // This is used for HT MCS rate only.
328 u8 RtsSubcarrier:2; // This is used for legacy OFDM rate only. 328 u8 RtsSubcarrier:2; // This is used for legacy OFDM rate only.
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 9c00865f302a..be860456d726 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -203,7 +203,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv* priv)
203 { 203 {
204 Dot11d_Init(ieee); 204 Dot11d_Init(ieee);
205 ieee->bGlobalDomain = false; 205 ieee->bGlobalDomain = false;
206 //acturally 8225 & 8256 rf chip only support B,G,24N mode 206 //actually 8225 & 8256 rf chip only support B,G,24N mode
207 if ((priv->rf_chip == RF_8225) || (priv->rf_chip == RF_8256)) 207 if ((priv->rf_chip == RF_8225) || (priv->rf_chip == RF_8256))
208 { 208 {
209 min_chan = 1; 209 min_chan = 1;
@@ -1103,7 +1103,7 @@ inline u16 rtl8192_rate2rate(short rate)
1103} 1103}
1104 1104
1105 1105
1106/* The protype of rx_isr has changed since one verion of Linux Kernel */ 1106/* The prototype of rx_isr has changed since one version of Linux Kernel */
1107static void rtl8192_rx_isr(struct urb *urb) 1107static void rtl8192_rx_isr(struct urb *urb)
1108{ 1108{
1109 struct sk_buff *skb = (struct sk_buff *) urb->context; 1109 struct sk_buff *skb = (struct sk_buff *) urb->context;
@@ -1476,7 +1476,7 @@ static void rtl8192_tx_isr(struct urb *tx_urb)
1476 if(tcb_desc->queue_index != TXCMD_QUEUE) { 1476 if(tcb_desc->queue_index != TXCMD_QUEUE) {
1477 if(tx_urb->status == 0) { 1477 if(tx_urb->status == 0) {
1478 dev->trans_start = jiffies; 1478 dev->trans_start = jiffies;
1479 // As act as station mode, destion shall be unicast address. 1479 // As act as station mode, destination shall be unicast address.
1480 //priv->ieee80211->stats.tx_bytes+=(skb->len - priv->ieee80211->tx_headroom); 1480 //priv->ieee80211->stats.tx_bytes+=(skb->len - priv->ieee80211->tx_headroom);
1481 //priv->ieee80211->stats.tx_packets++; 1481 //priv->ieee80211->stats.tx_packets++;
1482 priv->stats.txoktotal++; 1482 priv->stats.txoktotal++;
@@ -1522,13 +1522,13 @@ static void rtl8192_tx_isr(struct urb *tx_urb)
1522 else if ((skb_queue_len(&priv->ieee80211->skb_drv_aggQ[queue_index])!= 0)&&\ 1522 else if ((skb_queue_len(&priv->ieee80211->skb_drv_aggQ[queue_index])!= 0)&&\
1523 (!(priv->ieee80211->queue_stop))) { 1523 (!(priv->ieee80211->queue_stop))) {
1524 // Tx Driver Aggregation process 1524 // Tx Driver Aggregation process
1525 /* The driver will aggregation the packets according to the following stets 1525 /* The driver will aggregation the packets according to the following stats
1526 * 1. check whether there's tx irq available, for it's a completion return 1526 * 1. check whether there's tx irq available, for it's a completion return
1527 * function, it should contain enough tx irq; 1527 * function, it should contain enough tx irq;
1528 * 2. check pakcet type; 1528 * 2. check packet type;
1529 * 3. initialize sendlist, check whether the to-be send packet no greater than 1 1529 * 3. initialize sendlist, check whether the to-be send packet no greater than 1
1530 * 4. aggregation the packets, and fill firmware info and tx desc to it, etc. 1530 * 4. aggregates the packets, and fill firmware info and tx desc to it, etc.
1531 * 5. check whehter the packet could be sent, otherwise just insert to wait head 1531 * 5. check whether the packet could be sent, otherwise just insert to wait head
1532 * */ 1532 * */
1533 skb = skb_dequeue(&priv->ieee80211->skb_drv_aggQ[queue_index]); 1533 skb = skb_dequeue(&priv->ieee80211->skb_drv_aggQ[queue_index]);
1534 if(!check_nic_enough_desc(dev, queue_index)) { 1534 if(!check_nic_enough_desc(dev, queue_index)) {
@@ -2447,7 +2447,7 @@ static int rtl8192_qos_handle_probe_response(struct r8192_priv *priv,
2447 return 0; 2447 return 0;
2448} 2448}
2449 2449
2450/* handle manage frame frame beacon and probe response */ 2450/* handle and manage frame from beacon and probe response */
2451static int rtl8192_handle_beacon(struct net_device * dev, 2451static int rtl8192_handle_beacon(struct net_device * dev,
2452 struct ieee80211_beacon * beacon, 2452 struct ieee80211_beacon * beacon,
2453 struct ieee80211_network * network) 2453 struct ieee80211_network * network)
@@ -2625,7 +2625,7 @@ bool GetHalfNmodeSupportByAPs819xUsb(struct net_device* dev)
2625void rtl8192_refresh_supportrate(struct r8192_priv* priv) 2625void rtl8192_refresh_supportrate(struct r8192_priv* priv)
2626{ 2626{
2627 struct ieee80211_device* ieee = priv->ieee80211; 2627 struct ieee80211_device* ieee = priv->ieee80211;
2628 //we donot consider set support rate for ABG mode, only HT MCS rate is set here. 2628 //we do not consider set support rate for ABG mode, only HT MCS rate is set here.
2629 if (ieee->mode == WIRELESS_MODE_N_24G || ieee->mode == WIRELESS_MODE_N_5G) 2629 if (ieee->mode == WIRELESS_MODE_N_24G || ieee->mode == WIRELESS_MODE_N_5G)
2630 { 2630 {
2631 memcpy(ieee->Regdot11HTOperationalRateSet, ieee->RegHTSuppRateSet, 16); 2631 memcpy(ieee->Regdot11HTOperationalRateSet, ieee->RegHTSuppRateSet, 16);
@@ -2780,10 +2780,10 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
2780 priv->TransmitConfig = 2780 priv->TransmitConfig =
2781 // TCR_DurProcMode | //for RTL8185B, duration setting by HW 2781 // TCR_DurProcMode | //for RTL8185B, duration setting by HW
2782 //? TCR_DISReqQsize | 2782 //? TCR_DISReqQsize |
2783 (TCR_MXDMA_2048<<TCR_MXDMA_OFFSET)| // Max DMA Burst Size per Tx DMA Burst, 7: reservied. 2783 (TCR_MXDMA_2048<<TCR_MXDMA_OFFSET)| // Max DMA Burst Size per Tx DMA Burst, 7: reserved.
2784 (priv->ShortRetryLimit<<TCR_SRL_OFFSET)| // Short retry limit 2784 (priv->ShortRetryLimit<<TCR_SRL_OFFSET)| // Short retry limit
2785 (priv->LongRetryLimit<<TCR_LRL_OFFSET) | // Long retry limit 2785 (priv->LongRetryLimit<<TCR_LRL_OFFSET) | // Long retry limit
2786 (false ? TCR_SAT: 0); // FALSE: HW provies PLCP length and LENGEXT, TURE: SW proiveds them 2786 (false ? TCR_SAT: 0); // FALSE: HW provides PLCP length and LENGEXT, TURE: SW provides them
2787#ifdef TO_DO_LIST 2787#ifdef TO_DO_LIST
2788 if(Adapter->bInHctTest) 2788 if(Adapter->bInHctTest)
2789 pHalData->ReceiveConfig = pHalData->CSMethod | 2789 pHalData->ReceiveConfig = pHalData->CSMethod |
@@ -3437,7 +3437,7 @@ if(Adapter->ResetProgress == RESET_TYPE_NORESET)
3437 { // User disable RF via registry. 3437 { // User disable RF via registry.
3438 RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n")); 3438 RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
3439 MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW); 3439 MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
3440 // Those action will be discard in MgntActSet_RF_State because off the same state 3440 // Those action will be discard in MgntActSet_RF_State because of the same state
3441 for(eRFPath = 0; eRFPath <pHalData->NumTotalRFPath; eRFPath++) 3441 for(eRFPath = 0; eRFPath <pHalData->NumTotalRFPath; eRFPath++)
3442 PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0); 3442 PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0);
3443 } 3443 }
@@ -3458,7 +3458,7 @@ if(Adapter->ResetProgress == RESET_TYPE_NORESET)
3458 if(pHalData->eRFPowerState == eRfOff) 3458 if(pHalData->eRFPowerState == eRfOff)
3459 { 3459 {
3460 MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason); 3460 MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason);
3461 // Those action will be discard in MgntActSet_RF_State because off the same state 3461 // Those action will be discard in MgntActSet_RF_State because of the same state
3462 for(eRFPath = 0; eRFPath <pHalData->NumTotalRFPath; eRFPath++) 3462 for(eRFPath = 0; eRFPath <pHalData->NumTotalRFPath; eRFPath++)
3463 PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0); 3463 PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0);
3464 } 3464 }
@@ -3586,7 +3586,7 @@ TxCheckStuck(struct net_device *dev)
3586 //unsigned long flags; 3586 //unsigned long flags;
3587 3587
3588 // 3588 //
3589 // Decide Stuch threshold according to current power save mode 3589 // Decide such threshold according to current power save mode
3590 // 3590 //
3591 3591
3592// RT_TRACE(COMP_RESET, " ==> TxCheckStuck()\n"); 3592// RT_TRACE(COMP_RESET, " ==> TxCheckStuck()\n");
@@ -3745,7 +3745,7 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
3745 3745
3746 // Driver should not check RX stuck in IBSS mode because it is required to 3746 // Driver should not check RX stuck in IBSS mode because it is required to
3747 // set Check BSSID in order to send beacon, however, if check BSSID is 3747 // set Check BSSID in order to send beacon, however, if check BSSID is
3748 // set, STA cannot hear any packet a all. Emily, 2008.04.12 3748 // set, STA cannot hear any packet at all. Emily, 2008.04.12
3749 RxResetType = RxCheckStuck(dev); 3749 RxResetType = RxCheckStuck(dev);
3750 } 3750 }
3751 if(TxResetType==RESET_TYPE_NORMAL || RxResetType==RESET_TYPE_NORMAL) 3751 if(TxResetType==RESET_TYPE_NORMAL || RxResetType==RESET_TYPE_NORMAL)
@@ -3962,7 +3962,7 @@ RESET_START:
3962 up(&priv->wx_sem); 3962 up(&priv->wx_sem);
3963 RT_TRACE(COMP_RESET,"%s():<==========down process is finished\n",__FUNCTION__); 3963 RT_TRACE(COMP_RESET,"%s():<==========down process is finished\n",__FUNCTION__);
3964 //rtl8192_irq_disable(dev); 3964 //rtl8192_irq_disable(dev);
3965 RT_TRACE(COMP_RESET,"%s():===========>start to up the driver\n",__FUNCTION__); 3965 RT_TRACE(COMP_RESET,"%s():===========>start up the driver\n",__FUNCTION__);
3966 reset_status = _rtl8192_up(dev); 3966 reset_status = _rtl8192_up(dev);
3967 3967
3968 RT_TRACE(COMP_RESET,"%s():<===========up process is finished\n",__FUNCTION__); 3968 RT_TRACE(COMP_RESET,"%s():<===========up process is finished\n",__FUNCTION__);
@@ -4155,7 +4155,7 @@ extern void rtl819x_watchdog_wqcallback(struct work_struct *work)
4155void watch_dog_timer_callback(unsigned long data) 4155void watch_dog_timer_callback(unsigned long data)
4156{ 4156{
4157 struct r8192_priv *priv = ieee80211_priv((struct net_device *) data); 4157 struct r8192_priv *priv = ieee80211_priv((struct net_device *) data);
4158 //printk("===============>watch_dog timer\n"); 4158 //printk("===============>watch_dog timer\n");
4159 queue_delayed_work(priv->priv_wq,&priv->watch_dog_wq, 0); 4159 queue_delayed_work(priv->priv_wq,&priv->watch_dog_wq, 0);
4160 mod_timer(&priv->watch_dog_timer, jiffies + MSECS(IEEE80211_WATCH_DOG_TIME)); 4160 mod_timer(&priv->watch_dog_timer, jiffies + MSECS(IEEE80211_WATCH_DOG_TIME));
4161} 4161}
@@ -4170,7 +4170,7 @@ int _rtl8192_up(struct net_device *dev)
4170 init_status = rtl8192_adapter_start(dev); 4170 init_status = rtl8192_adapter_start(dev);
4171 if(!init_status) 4171 if(!init_status)
4172 { 4172 {
4173 RT_TRACE(COMP_ERR,"ERR!!! %s(): initialization is failed!\n", __FUNCTION__); 4173 RT_TRACE(COMP_ERR,"ERR!!! %s(): initialization failed!\n", __FUNCTION__);
4174 priv->up=priv->ieee80211->ieee_up = 0; 4174 priv->up=priv->ieee80211->ieee_up = 0;
4175 return -EAGAIN; 4175 return -EAGAIN;
4176 } 4176 }
@@ -4256,7 +4256,7 @@ int rtl8192_down(struct net_device *dev)
4256 skb_queue_purge(&priv->ieee80211->skb_drv_aggQ [i]); 4256 skb_queue_purge(&priv->ieee80211->skb_drv_aggQ [i]);
4257 } 4257 }
4258 4258
4259 //as cancel_delayed_work will del work->timer, so if work is not definedas struct delayed_work, it will corrupt 4259 //as cancel_delayed_work will del work->timer, so if work is not defined as struct delayed_work, it will corrupt
4260// flush_scheduled_work(); 4260// flush_scheduled_work();
4261 rtl8192_cancel_deferred_work(priv); 4261 rtl8192_cancel_deferred_work(priv);
4262 deinit_hal_dm(dev); 4262 deinit_hal_dm(dev);
@@ -4516,7 +4516,7 @@ u8 HwRateToMRate90(bool bIsHT, u8 rate)
4516 4516
4517/** 4517/**
4518 * Function: UpdateRxPktTimeStamp 4518 * Function: UpdateRxPktTimeStamp
4519 * Overview: Recored down the TSF time stamp when receiving a packet 4519 * Overview: Record down the TSF time stamp when receiving a packet
4520 * 4520 *
4521 * Input: 4521 * Input:
4522 * PADAPTER Adapter 4522 * PADAPTER Adapter
@@ -4556,9 +4556,9 @@ long rtl819x_translate_todbm(u8 signal_strength_index )// 0-100 index.
4556} 4556}
4557 4557
4558 4558
4559/* 2008/01/22 MH We can not delcare RSSI/EVM total value of sliding window to 4559/* 2008/01/22 MH We can not declare RSSI/EVM total value of sliding window to
4560 be a local static. Otherwise, it may increase when we return from S3/S4. The 4560 be a local static. Otherwise, it may increase when we return from S3/S4. The
4561 value will be kept in memory or disk. We must delcare the value in adapter 4561 value will be kept in memory or disk. We must declare the value in adapter
4562 and it will be reinitialized when return from S3/S4. */ 4562 and it will be reinitialized when return from S3/S4. */
4563void rtl8192_process_phyinfo(struct r8192_priv * priv,u8* buffer, struct ieee80211_rx_stats * pprevious_stats, struct ieee80211_rx_stats * pcurrent_stats) 4563void rtl8192_process_phyinfo(struct r8192_priv * priv,u8* buffer, struct ieee80211_rx_stats * pprevious_stats, struct ieee80211_rx_stats * pcurrent_stats)
4564{ 4564{
@@ -5091,7 +5091,7 @@ static void rtl8192_query_rxphystatus(
5091 tmp_rxevm = pofdm_buf->rxevm_X[i]; 5091 tmp_rxevm = pofdm_buf->rxevm_X[i];
5092 rx_evmX = (char)(tmp_rxevm); 5092 rx_evmX = (char)(tmp_rxevm);
5093 5093
5094 // Do not use shift operation like "rx_evmX >>= 1" because the compilor of free build environment 5094 // Do not use shift operation like "rx_evmX >>= 1" because the compiler of free build environment
5095 // fill most significant bit to "zero" when doing shifting operation which may change a negative 5095 // fill most significant bit to "zero" when doing shifting operation which may change a negative
5096 // value to positive one, then the dbm value (which is supposed to be negative) is not correct anymore. 5096 // value to positive one, then the dbm value (which is supposed to be negative) is not correct anymore.
5097 rx_evmX /= 2; //dbm 5097 rx_evmX /= 2; //dbm
@@ -5171,7 +5171,7 @@ void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
5171 type = WLAN_FC_GET_TYPE(fc); 5171 type = WLAN_FC_GET_TYPE(fc);
5172 praddr = hdr->addr1; 5172 praddr = hdr->addr1;
5173 5173
5174 /* Check if the received packet is acceptabe. */ 5174 /* Check if the received packet is acceptable. */
5175 bpacket_match_bssid = ((IEEE80211_FTYPE_CTL != type) && 5175 bpacket_match_bssid = ((IEEE80211_FTYPE_CTL != type) &&
5176 (eqMacAddr(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS)? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS )? hdr->addr2 : hdr->addr3)) 5176 (eqMacAddr(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS)? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS )? hdr->addr2 : hdr->addr3))
5177 && (!pstats->bHwError) && (!pstats->bCRC)&& (!pstats->bICV)); 5177 && (!pstats->bHwError) && (!pstats->bCRC)&& (!pstats->bICV));
@@ -5211,7 +5211,7 @@ void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
5211 5211
5212/** 5212/**
5213* Function: UpdateReceivedRateHistogramStatistics 5213* Function: UpdateReceivedRateHistogramStatistics
5214* Overview: Recored down the received data rate 5214* Overview: Record down the received data rate
5215* 5215*
5216* Input: 5216* Input:
5217* struct net_device *dev 5217* struct net_device *dev
@@ -5401,7 +5401,7 @@ void query_rxdesc_status(struct sk_buff *skb, struct ieee80211_rx_stats *stats,
5401 } 5401 }
5402 5402
5403#ifdef USB_RX_AGGREGATION_SUPPORT 5403#ifdef USB_RX_AGGREGATION_SUPPORT
5404 /* for the rx aggregated sub frame, the redundant space truelly contained in the packet */ 5404 /* for the rx aggregated sub frame, the redundant space truly contained in the packet */
5405 if(bIsRxAggrSubframe) { 5405 if(bIsRxAggrSubframe) {
5406 skb_pull(skb, 8); 5406 skb_pull(skb, 8);
5407 } 5407 }
@@ -5480,7 +5480,7 @@ void rtl8192_rx_nomal(struct sk_buff* skb)
5480 PacketShiftBytes = GetRxPacketShiftBytes819xUsb(&stats, false); 5480 PacketShiftBytes = GetRxPacketShiftBytes819xUsb(&stats, false);
5481 } 5481 }
5482#endif 5482#endif
5483 /* Process the MPDU recevied */ 5483 /* Process the MPDU received */
5484 skb_trim(skb, skb->len - 4/*sCrcLng*/); 5484 skb_trim(skb, skb->len - 4/*sCrcLng*/);
5485 5485
5486 rx_pkt_len = skb->len; 5486 rx_pkt_len = skb->len;
@@ -5538,7 +5538,7 @@ void rtl8192_rx_nomal(struct sk_buff* skb)
5538 if(PacketLength > agg_skb->len) { 5538 if(PacketLength > agg_skb->len) {
5539 break; 5539 break;
5540 } 5540 }
5541 /* Process the MPDU recevied */ 5541 /* Process the MPDU received */
5542 skb = dev_alloc_skb(PacketLength); 5542 skb = dev_alloc_skb(PacketLength);
5543 memcpy(skb_put(skb,PacketLength),agg_skb->data, PacketLength); 5543 memcpy(skb_put(skb,PacketLength),agg_skb->data, PacketLength);
5544 skb_trim(skb, skb->len - 4/*sCrcLng*/); 5544 skb_trim(skb, skb->len - 4/*sCrcLng*/);
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 2dde9fa5c21e..3f79e61399ef 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -38,7 +38,7 @@ static u32 edca_setting_UL[HT_IOT_PEER_MAX] =
38/*------------------------Define global variable-----------------------------*/ 38/*------------------------Define global variable-----------------------------*/
39// Debug variable ? 39// Debug variable ?
40dig_t dm_digtable; 40dig_t dm_digtable;
41// Store current shoftware write register content for MAC PHY. 41// Store current software write register content for MAC PHY.
42u8 dm_shadow[16][256] = {{0}}; 42u8 dm_shadow[16][256] = {{0}};
43// For Dynamic Rx Path Selection by Signal Strength 43// For Dynamic Rx Path Selection by Signal Strength
44DRxPathSel DM_RxPathSelTable; 44DRxPathSel DM_RxPathSelTable;
@@ -119,7 +119,7 @@ static void dm_pd_th(struct net_device *dev);
119static void dm_cs_ratio(struct net_device *dev); 119static void dm_cs_ratio(struct net_device *dev);
120 120
121static void dm_init_ctstoself(struct net_device *dev); 121static void dm_init_ctstoself(struct net_device *dev);
122// DM --> EDCA turboe mode control 122// DM --> EDCA turbo mode control
123static void dm_check_edca_turbo(struct net_device *dev); 123static void dm_check_edca_turbo(struct net_device *dev);
124 124
125// DM --> HW RF control 125// DM --> HW RF control
@@ -348,7 +348,7 @@ extern void init_rate_adaptive(struct net_device * dev)
348 * 348 *
349 * Revised History: 349 * Revised History:
350 * When Who Remark 350 * When Who Remark
351 * 05/26/08 amy Create version 0 proting from windows code. 351 * 05/26/08 amy Create version 0 porting from windows code.
352 * 352 *
353 *---------------------------------------------------------------------------*/ 353 *---------------------------------------------------------------------------*/
354static void dm_check_rate_adaptive(struct net_device * dev) 354static void dm_check_rate_adaptive(struct net_device * dev)
@@ -543,7 +543,7 @@ static u32 OFDMSwingTable[OFDM_Table_Length] = {
543 0x5a400169, // 3, +3db 543 0x5a400169, // 3, +3db
544 0x50800142, // 4, +2db 544 0x50800142, // 4, +2db
545 0x47c0011f, // 5, +1db 545 0x47c0011f, // 5, +1db
546 0x40000100, // 6, +0db ===> default, upper for higher temprature, lower for low temprature 546 0x40000100, // 6, +0db ===> default, upper for higher temperature, lower for low temperature
547 0x390000e4, // 7, -1db 547 0x390000e4, // 7, -1db
548 0x32c000cb, // 8, -2db 548 0x32c000cb, // 8, -2db
549 0x2d4000b5, // 9, -3db 549 0x2d4000b5, // 9, -3db
@@ -678,7 +678,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device * dev)
678 { 678 {
679 write_nic_byte(dev, 0x1ba, 0); 679 write_nic_byte(dev, 0x1ba, 0);
680 viviflag = FALSE; 680 viviflag = FALSE;
681 RT_TRACE(COMP_POWER_TRACKING, "we filted this data\n"); 681 RT_TRACE(COMP_POWER_TRACKING, "we filtered the data\n");
682 for(k = 0;k < 5; k++) 682 for(k = 0;k < 5; k++)
683 tmp_report[k] = 0; 683 tmp_report[k] = 0;
684 break; 684 break;
@@ -864,14 +864,14 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device * dev)
864 RT_TRACE(COMP_POWER_TRACKING, "Readback ThermalMeterA = %d \n", tmpRegA); 864 RT_TRACE(COMP_POWER_TRACKING, "Readback ThermalMeterA = %d \n", tmpRegA);
865 if(tmpRegA < 3 || tmpRegA > 13) 865 if(tmpRegA < 3 || tmpRegA > 13)
866 return; 866 return;
867 if(tmpRegA >= 12) // if over 12, TP will be bad when high temprature 867 if(tmpRegA >= 12) // if over 12, TP will be bad when high temperature
868 tmpRegA = 12; 868 tmpRegA = 12;
869 RT_TRACE(COMP_POWER_TRACKING, "Valid ThermalMeterA = %d \n", tmpRegA); 869 RT_TRACE(COMP_POWER_TRACKING, "Valid ThermalMeterA = %d \n", tmpRegA);
870 priv->ThermalMeter[0] = ThermalMeterVal; //We use fixed value by Bryant's suggestion 870 priv->ThermalMeter[0] = ThermalMeterVal; //We use fixed value by Bryant's suggestion
871 priv->ThermalMeter[1] = ThermalMeterVal; //We use fixed value by Bryant's suggestion 871 priv->ThermalMeter[1] = ThermalMeterVal; //We use fixed value by Bryant's suggestion
872 872
873 //Get current RF-A temprature index 873 //Get current RF-A temperature index
874 if(priv->ThermalMeter[0] >= (u8)tmpRegA) //lower temprature 874 if(priv->ThermalMeter[0] >= (u8)tmpRegA) //lower temperature
875 { 875 {
876 tmpOFDMindex = tmpCCK20Mindex = 6+(priv->ThermalMeter[0]-(u8)tmpRegA); 876 tmpOFDMindex = tmpCCK20Mindex = 6+(priv->ThermalMeter[0]-(u8)tmpRegA);
877 tmpCCK40Mindex = tmpCCK20Mindex - 6; 877 tmpCCK40Mindex = tmpCCK20Mindex - 6;
@@ -885,7 +885,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device * dev)
885 else 885 else
886 { 886 {
887 tmpval = ((u8)tmpRegA - priv->ThermalMeter[0]); 887 tmpval = ((u8)tmpRegA - priv->ThermalMeter[0]);
888 if(tmpval >= 6) // higher temprature 888 if(tmpval >= 6) // higher temperature
889 tmpOFDMindex = tmpCCK20Mindex = 0; // max to +6dB 889 tmpOFDMindex = tmpCCK20Mindex = 0; // max to +6dB
890 else 890 else
891 tmpOFDMindex = tmpCCK20Mindex = 6 - tmpval; 891 tmpOFDMindex = tmpCCK20Mindex = 6 - tmpval;
@@ -1457,9 +1457,9 @@ static void dm_InitializeTXPowerTracking_ThermalMeter(struct net_device *dev)
1457{ 1457{
1458 struct r8192_priv *priv = ieee80211_priv(dev); 1458 struct r8192_priv *priv = ieee80211_priv(dev);
1459 1459
1460 // Tx Power tracking by Theremal Meter require Firmware R/W 3-wire. This mechanism 1460 // Tx Power tracking by Thermal Meter require Firmware R/W 3-wire. This mechanism
1461 // can be enabled only when Firmware R/W 3-wire is enabled. Otherwise, frequent r/w 1461 // can be enabled only when Firmware R/W 3-wire is enabled. Otherwise, frequent r/w
1462 // 3-wire by driver cause RF goes into wrong state. 1462 // 3-wire by driver causes RF to go into a wrong state.
1463 if(priv->ieee80211->FwRWRF) 1463 if(priv->ieee80211->FwRWRF)
1464 priv->btxpower_tracking = TRUE; 1464 priv->btxpower_tracking = TRUE;
1465 else 1465 else
@@ -1520,7 +1520,7 @@ static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev)
1520 1520
1521 if(!TM_Trigger) 1521 if(!TM_Trigger)
1522 { 1522 {
1523 //Attention!! You have to wirte all 12bits data to RF, or it may cause RF to crash 1523 //Attention!! You have to write all 12bits data to RF, or it may cause RF to crash
1524 //actually write reg0x02 bit1=0, then bit1=1. 1524 //actually write reg0x02 bit1=0, then bit1=1.
1525 //DbgPrint("Trigger ThermalMeter, write RF reg0x2 = 0x4d to 0x4f\n"); 1525 //DbgPrint("Trigger ThermalMeter, write RF reg0x2 = 0x4d to 0x4f\n");
1526 rtl8192_phy_SetRFReg(dev, RF90_PATH_A, 0x02, bMask12Bits, 0x4d); 1526 rtl8192_phy_SetRFReg(dev, RF90_PATH_A, 0x02, bMask12Bits, 0x4d);
@@ -1744,7 +1744,7 @@ extern void dm_restore_dynamic_mechanism_state(struct net_device *dev)
1744 write_nic_dword(dev, RATR0, ratr_value); 1744 write_nic_dword(dev, RATR0, ratr_value);
1745 write_nic_byte(dev, UFWP, 1); 1745 write_nic_byte(dev, UFWP, 1);
1746 } 1746 }
1747 //Resore TX Power Tracking Index 1747 //Restore TX Power Tracking Index
1748 if(priv->btxpower_trackingInit && priv->btxpower_tracking){ 1748 if(priv->btxpower_trackingInit && priv->btxpower_tracking){
1749 dm_txpower_reset_recovery(dev); 1749 dm_txpower_reset_recovery(dev);
1750 } 1750 }
@@ -2031,7 +2031,7 @@ static void dm_dig_init(struct net_device *dev)
2031 dm_digtable.dbg_mode = DM_DBG_OFF; //off=by real rssi value, on=by DM_DigTable.Rssi_val for new dig 2031 dm_digtable.dbg_mode = DM_DBG_OFF; //off=by real rssi value, on=by DM_DigTable.Rssi_val for new dig
2032 dm_digtable.dig_algorithm_switch = 0; 2032 dm_digtable.dig_algorithm_switch = 0;
2033 2033
2034 /* 2007/10/04 MH Define init gain threshol. */ 2034 /* 2007/10/04 MH Define init gain threshold. */
2035 dm_digtable.dig_state = DM_STA_DIG_MAX; 2035 dm_digtable.dig_state = DM_STA_DIG_MAX;
2036 dm_digtable.dig_highpwr_state = DM_STA_DIG_MAX; 2036 dm_digtable.dig_highpwr_state = DM_STA_DIG_MAX;
2037 dm_digtable.initialgain_lowerbound_state = false; 2037 dm_digtable.initialgain_lowerbound_state = false;
@@ -2097,7 +2097,7 @@ static void dm_ctrl_initgain_byrssi_by_driverrssi(
2097 return; 2097 return;
2098 2098
2099 //DbgPrint("Dig by Sw Rssi \n"); 2099 //DbgPrint("Dig by Sw Rssi \n");
2100 if(dm_digtable.dig_algorithm_switch) // if swithed algorithm, we have to disable FW Dig. 2100 if(dm_digtable.dig_algorithm_switch) // if switched algorithm, we have to disable FW Dig.
2101 fw_dig = 0; 2101 fw_dig = 0;
2102 if(fw_dig <= 3) // execute several times to make sure the FW Dig is disabled 2102 if(fw_dig <= 3) // execute several times to make sure the FW Dig is disabled
2103 {// FW DIG Off 2103 {// FW DIG Off
@@ -2160,7 +2160,7 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
2160 /*DbgPrint("DIG Check\n\r RSSI=%d LOW=%d HIGH=%d STATE=%d", 2160 /*DbgPrint("DIG Check\n\r RSSI=%d LOW=%d HIGH=%d STATE=%d",
2161 pHalData->UndecoratedSmoothedPWDB, DM_DigTable.RssiLowThresh, 2161 pHalData->UndecoratedSmoothedPWDB, DM_DigTable.RssiLowThresh,
2162 DM_DigTable.RssiHighThresh, DM_DigTable.Dig_State);*/ 2162 DM_DigTable.RssiHighThresh, DM_DigTable.Dig_State);*/
2163 /* 1. When RSSI decrease, We have to judge if it is smaller than a treshold 2163 /* 1. When RSSI decrease, We have to judge if it is smaller than a threshold
2164 and then execute below step. */ 2164 and then execute below step. */
2165 if ((priv->undecorated_smoothed_pwdb <= dm_digtable.rssi_low_thresh)) 2165 if ((priv->undecorated_smoothed_pwdb <= dm_digtable.rssi_low_thresh))
2166 { 2166 {
@@ -2220,7 +2220,7 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
2220 2220
2221 } 2221 }
2222 2222
2223 /* 2. When RSSI increase, We have to judge if it is larger than a treshold 2223 /* 2. When RSSI increase, We have to judge if it is larger than a threshold
2224 and then execute below step. */ 2224 and then execute below step. */
2225 if ((priv->undecorated_smoothed_pwdb >= dm_digtable.rssi_high_thresh) ) 2225 if ((priv->undecorated_smoothed_pwdb >= dm_digtable.rssi_high_thresh) )
2226 { 2226 {
@@ -2329,7 +2329,7 @@ static void dm_ctrl_initgain_byrssi_highpwr(
2329 } 2329 }
2330 2330
2331 /* 3. When RSSI >75% or <70%, it is a high power issue. We have to judge if 2331 /* 3. When RSSI >75% or <70%, it is a high power issue. We have to judge if
2332 it is larger than a treshold and then execute below step. */ 2332 it is larger than a threshold and then execute below step. */
2333 // 2008/02/05 MH SD3-Jerry Modify PD_TH for high power issue. 2333 // 2008/02/05 MH SD3-Jerry Modify PD_TH for high power issue.
2334 if (priv->undecorated_smoothed_pwdb >= dm_digtable.rssi_high_power_highthresh) 2334 if (priv->undecorated_smoothed_pwdb >= dm_digtable.rssi_high_power_highthresh)
2335 { 2335 {
@@ -2841,8 +2841,8 @@ static void dm_check_rfctrl_gpio(struct net_device * dev)
2841{ 2841{
2842 //struct r8192_priv *priv = ieee80211_priv(dev); 2842 //struct r8192_priv *priv = ieee80211_priv(dev);
2843 2843
2844 // Walk around for DTM test, we will not enable HW - radio on/off because r/w 2844 // Work around for DTM test, we will not enable HW - radio on/off because r/w
2845 // page 1 register before Lextra bus is enabled cause system fails when resuming 2845 // page 1 register before extra bus is enabled causing system fails when resuming
2846 // from S4. 20080218, Emily 2846 // from S4. 20080218, Emily
2847 2847
2848 // Stop to execute workitem to prevent S3/S4 bug. 2848 // Stop to execute workitem to prevent S3/S4 bug.
@@ -3377,13 +3377,13 @@ extern void dm_fsync_timer_callback(unsigned long data)
3377 { 3377 {
3378 3378
3379 u32 DiffNum = priv->rateCountDiffRecord - rate_count_diff; 3379 u32 DiffNum = priv->rateCountDiffRecord - rate_count_diff;
3380 // Contiune count 3380 // Continue count
3381 if(DiffNum >= priv->ieee80211->fsync_seconddiff_ratethreshold) 3381 if(DiffNum >= priv->ieee80211->fsync_seconddiff_ratethreshold)
3382 priv->ContiuneDiffCount++; 3382 priv->ContiuneDiffCount++;
3383 else 3383 else
3384 priv->ContiuneDiffCount = 0; 3384 priv->ContiuneDiffCount = 0;
3385 3385
3386 // Contiune count over 3386 // Continue count over
3387 if(priv->ContiuneDiffCount >=2) 3387 if(priv->ContiuneDiffCount >=2)
3388 { 3388 {
3389 bSwitchFromCountDiff = true; 3389 bSwitchFromCountDiff = true;
@@ -3392,7 +3392,7 @@ extern void dm_fsync_timer_callback(unsigned long data)
3392 } 3392 }
3393 else 3393 else
3394 { 3394 {
3395 // Stop contiune count 3395 // Stop continue count
3396 priv->ContiuneDiffCount = 0; 3396 priv->ContiuneDiffCount = 0;
3397 } 3397 }
3398 3398
@@ -3523,7 +3523,7 @@ static void dm_StartSWFsync(struct net_device *dev)
3523 RT_TRACE(COMP_HALDM,"%s\n", __FUNCTION__); 3523 RT_TRACE(COMP_HALDM,"%s\n", __FUNCTION__);
3524 // Initial rate record to zero, start to record. 3524 // Initial rate record to zero, start to record.
3525 priv->rate_record = 0; 3525 priv->rate_record = 0;
3526 // Initial contiune diff count to zero, start to record. 3526 // Initial continue diff count to zero, start to record.
3527 priv->ContiuneDiffCount = 0; 3527 priv->ContiuneDiffCount = 0;
3528 priv->rateCountDiffRecord = 0; 3528 priv->rateCountDiffRecord = 0;
3529 priv->bswitch_fsync = false; 3529 priv->bswitch_fsync = false;
@@ -3875,7 +3875,7 @@ static void dm_send_rssi_tofw(struct net_device *dev)
3875 3875
3876 // If we test chariot, we should stop the TX command ? 3876 // If we test chariot, we should stop the TX command ?
3877 // Because 92E will always silent reset when we send tx command. We use register 3877 // Because 92E will always silent reset when we send tx command. We use register
3878 // 0x1e0(byte) to botify driver. 3878 // 0x1e0(byte) to notify driver.
3879 write_nic_byte(dev, DRIVER_RSSI, (u8)priv->undecorated_smoothed_pwdb); 3879 write_nic_byte(dev, DRIVER_RSSI, (u8)priv->undecorated_smoothed_pwdb);
3880 return; 3880 return;
3881 tx_cmd.Op = TXCMD_SET_RX_RSSI; 3881 tx_cmd.Op = TXCMD_SET_RX_RSSI;
diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h
index e89aaf70143b..b0ee4ddc3766 100644
--- a/drivers/staging/rtl8192u/r8192U_hw.h
+++ b/drivers/staging/rtl8192u/r8192U_hw.h
@@ -10,7 +10,7 @@
10 Parts of this driver are based on the Intel Pro Wireless 10 Parts of this driver are based on the Intel Pro Wireless
11 2100 GPL driver. 11 2100 GPL driver.
12 12
13 We want to tanks the Authors of those projects 13 We want to thanks the Authors of those projects
14 and the Ndiswrapper project Authors. 14 and the Ndiswrapper project Authors.
15*/ 15*/
16 16
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index 981de9b87d68..2ce0fc8e3476 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -13,7 +13,7 @@
13 13
14 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver. 14 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver.
15 15
16 We want to tanks the Authors of those projects and the Ndiswrapper 16 We want to thanks the Authors of those projects and the Ndiswrapper
17 project Authors. 17 project Authors.
18*/ 18*/
19 19
@@ -256,7 +256,7 @@ static int r8192_wx_get_ap_status(struct net_device *dev,
256 //count the length of input ssid 256 //count the length of input ssid
257 for(name_len=0 ; ((char*)wrqu->data.pointer)[name_len]!='\0' ; name_len++); 257 for(name_len=0 ; ((char*)wrqu->data.pointer)[name_len]!='\0' ; name_len++);
258 258
259 //search for the correspoding info which is received 259 //search for the corresponding info which is received
260 list_for_each_entry(target, &ieee->network_list, list) { 260 list_for_each_entry(target, &ieee->network_list, list) {
261 if ( (target->ssid_len == name_len) && 261 if ( (target->ssid_len == name_len) &&
262 (strncmp(target->ssid, (char*)wrqu->data.pointer, name_len)==0)){ 262 (strncmp(target->ssid, (char*)wrqu->data.pointer, name_len)==0)){
@@ -419,7 +419,7 @@ static int rtl8180_wx_get_range(struct net_device *dev,
419 range->max_qual.updated = 7; /* Updated all three */ 419 range->max_qual.updated = 7; /* Updated all three */
420 420
421 range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */ 421 range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */
422 /* TODO: Find real 'good' to 'bad' threshol value for RSSI */ 422 /* TODO: Find real 'good' to 'bad' threshold value for RSSI */
423 range->avg_qual.level = 20 + -98; 423 range->avg_qual.level = 20 + -98;
424 range->avg_qual.noise = 0; 424 range->avg_qual.noise = 0;
425 range->avg_qual.updated = 7; /* Updated all three */ 425 range->avg_qual.updated = 7; /* Updated all three */
@@ -1047,7 +1047,7 @@ static iw_handler r8192_wx_handlers[] =
1047#else 1047#else
1048 NULL, 1048 NULL,
1049#endif 1049#endif
1050 dummy, /* SIOCGIWAPLIST -- depricated */ 1050 dummy, /* SIOCGIWAPLIST -- deprecated */
1051 r8192_wx_set_scan, /* SIOCSIWSCAN */ 1051 r8192_wx_set_scan, /* SIOCSIWSCAN */
1052 r8192_wx_get_scan, /* SIOCGIWSCAN */ 1052 r8192_wx_get_scan, /* SIOCGIWSCAN */
1053 r8192_wx_set_essid, /* SIOCSIWESSID */ 1053 r8192_wx_set_essid, /* SIOCSIWESSID */
diff --git a/drivers/staging/rtl8192u/r8192U_wx.h b/drivers/staging/rtl8192u/r8192U_wx.h
index f4cf2801136a..138866433c71 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.h
+++ b/drivers/staging/rtl8192u/r8192U_wx.h
@@ -7,7 +7,7 @@
7 Parts of this driver are based on the rtl8180 driver skeleton from Patric Schenke & Andres Salomon 7 Parts of this driver are based on the rtl8180 driver skeleton from Patric Schenke & Andres Salomon
8 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver 8 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver
9 9
10 We want to tanks the Authors of such projects and the Ndiswrapper project Authors. 10 We want to thanks the Authors of such projects and the Ndiswrapper project Authors.
11*/ 11*/
12 12
13/* this file (will) contains wireless extension handlers*/ 13/* this file (will) contains wireless extension handlers*/
diff --git a/drivers/staging/rtl8192u/r819xU_HTType.h b/drivers/staging/rtl8192u/r819xU_HTType.h
index 2ac421626e7c..e07f8b17a0d6 100644
--- a/drivers/staging/rtl8192u/r819xU_HTType.h
+++ b/drivers/staging/rtl8192u/r819xU_HTType.h
@@ -211,7 +211,7 @@ typedef struct _RT_HIGH_THROUGHPUT{
211 u8 bEnableHT; 211 u8 bEnableHT;
212 u8 bCurrentHTSupport; 212 u8 bCurrentHTSupport;
213 213
214 u8 bRegBW40MHz; // Tx 40MHz channel capablity 214 u8 bRegBW40MHz; // Tx 40MHz channel capability
215 u8 bCurBW40MHz; // Tx 40MHz channel capability 215 u8 bCurBW40MHz; // Tx 40MHz channel capability
216 216
217 u8 bRegShortGI40MHz; // Tx Short GI for 40Mhz 217 u8 bRegShortGI40MHz; // Tx Short GI for 40Mhz
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 9348f429d590..ec1eeb724b01 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -157,7 +157,7 @@ SendTxCommandPacket(
157 seg_ptr = skb_put(skb, buffer_len); 157 seg_ptr = skb_put(skb, buffer_len);
158 /* 158 /*
159 * Transform from little endian to big endian 159 * Transform from little endian to big endian
160 * and pending zero 160 * and pending zero
161 */ 161 */
162 memcpy(seg_ptr,codevirtualaddress,buffer_len); 162 memcpy(seg_ptr,codevirtualaddress,buffer_len);
163 tcb_desc->txbuf_size= (u16)buffer_len; 163 tcb_desc->txbuf_size= (u16)buffer_len;
@@ -718,15 +718,15 @@ cmpk_message_handle_rx(
718 /* 2. Read virtual address from RFD. */ 718 /* 2. Read virtual address from RFD. */
719 pcmd_buff = pstats->virtual_address; 719 pcmd_buff = pstats->virtual_address;
720 720
721 /* 3. Read command pakcet element id and length. */ 721 /* 3. Read command packet element id and length. */
722 element_id = pcmd_buff[0]; 722 element_id = pcmd_buff[0];
723 /*RT_TRACE(COMP_SEND, DebugLevel, 723 /*RT_TRACE(COMP_SEND, DebugLevel,
724 ("\n\r[CMPK]-->element ID=%d Len=%d", element_id, total_length));*/ 724 ("\n\r[CMPK]-->element ID=%d Len=%d", element_id, total_length));*/
725 725
726 /* 4. Check every received command packet conent according to different 726 /* 4. Check every received command packet content according to different
727 element type. Because FW may aggregate RX command packet to minimize 727 element type. Because FW may aggregate RX command packet to minimize
728 transmit time between DRV and FW.*/ 728 transmit time between DRV and FW.*/
729 // Add a counter to prevent to locked in the loop too long 729 // Add a counter to prevent the lock in the loop to be to long
730 while (total_length > 0 || exe_cnt++ >100) 730 while (total_length > 0 || exe_cnt++ >100)
731 { 731 {
732 /* 2007/01/17 MH We support aggregation of different cmd in the same packet. */ 732 /* 2007/01/17 MH We support aggregation of different cmd in the same packet. */
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index 4bb5fffca5b9..fe5776d642f3 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -275,11 +275,11 @@ bool init_firmware(struct net_device *dev)
275 275
276 /* 276 /*
277 * Download boot, main, and data image for System reset. 277 * Download boot, main, and data image for System reset.
278 * Download data image for firmware reseta 278 * Download data image for firmware reset
279 */ 279 */
280 for(init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) { 280 for(init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) {
281 /* 281 /*
282 * Open Image file, and map file to contineous memory if open file success. 282 * Open Image file, and map file to continuous memory if open file success.
283 * or read image file from array. Default load from IMG file 283 * or read image file from array. Default load from IMG file
284 */ 284 */
285 if(rst_opt == OPT_SYSTEM_RESET) { 285 if(rst_opt == OPT_SYSTEM_RESET) {
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index c4586b0817d1..636d6fd5b704 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -40,7 +40,7 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = {
40 * and do register read/write 40 * and do register read/write
41 * input: u32 dwBitMask //taget bit pos in the addr to be modified 41 * input: u32 dwBitMask //taget bit pos in the addr to be modified
42 * output: none 42 * output: none
43 * return: u32 return the shift bit bit position of the mask 43 * return: u32 return the shift bit position of the mask
44 * ****************************************************************************/ 44 * ****************************************************************************/
45u32 rtl8192_CalculateBitShift(u32 dwBitMask) 45u32 rtl8192_CalculateBitShift(u32 dwBitMask)
46{ 46{
@@ -176,7 +176,7 @@ u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath,
176 rtl8192_setBBreg(dev, pPhyReg->rfHSSIPara2, bLSSIReadEdge, 0x1); 176 rtl8192_setBBreg(dev, pPhyReg->rfHSSIPara2, bLSSIReadEdge, 0x1);
177 177
178 178
179 // TODO: we should not delay such a long time. Ask help from SD3 179 // TODO: we should not delay such a long time. Ask help from SD3
180 msleep(1); 180 msleep(1);
181 181
182 ret = rtl8192_QueryBBReg(dev, pPhyReg->rfLSSIReadBack, bLSSIReadBackData); 182 ret = rtl8192_QueryBBReg(dev, pPhyReg->rfLSSIReadBack, bLSSIReadBackData);
@@ -252,7 +252,7 @@ void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath
252 NewOffset = Offset; 252 NewOffset = Offset;
253 } 253 }
254 254
255 // Put write addr in [5:0] and write data in [31:16] 255 // Put write addr in [5:0] and write data in [31:16]
256 DataAndAddr = (Data<<16) | (NewOffset&0x3f); 256 DataAndAddr = (Data<<16) | (NewOffset&0x3f);
257 257
258 // Write Operation 258 // Write Operation
@@ -525,7 +525,7 @@ void rtl8192_phy_configmac(struct net_device* dev)
525} 525}
526 526
527/****************************************************************************** 527/******************************************************************************
528 *function: This function do dirty work 528 *function: This function does dirty work
529 * input: dev 529 * input: dev
530 * output: none 530 * output: none
531 * return: none 531 * return: none
@@ -578,7 +578,7 @@ void rtl8192_phyConfigBB(struct net_device* dev, u8 ConfigType)
578void rtl8192_InitBBRFRegDef(struct net_device* dev) 578void rtl8192_InitBBRFRegDef(struct net_device* dev)
579{ 579{
580 struct r8192_priv *priv = ieee80211_priv(dev); 580 struct r8192_priv *priv = ieee80211_priv(dev);
581// RF Interface Sowrtware Control 581// RF Interface Software Control
582 priv->PHYRegDef[RF90_PATH_A].rfintfs = rFPGA0_XAB_RFInterfaceSW; // 16 LSBs if read 32-bit from 0x870 582 priv->PHYRegDef[RF90_PATH_A].rfintfs = rFPGA0_XAB_RFInterfaceSW; // 16 LSBs if read 32-bit from 0x870
583 priv->PHYRegDef[RF90_PATH_B].rfintfs = rFPGA0_XAB_RFInterfaceSW; // 16 MSBs if read 32-bit from 0x870 (16-bit for 0x872) 583 priv->PHYRegDef[RF90_PATH_B].rfintfs = rFPGA0_XAB_RFInterfaceSW; // 16 MSBs if read 32-bit from 0x870 (16-bit for 0x872)
584 priv->PHYRegDef[RF90_PATH_C].rfintfs = rFPGA0_XCD_RFInterfaceSW;// 16 LSBs if read 32-bit from 0x874 584 priv->PHYRegDef[RF90_PATH_C].rfintfs = rFPGA0_XCD_RFInterfaceSW;// 16 LSBs if read 32-bit from 0x874
@@ -602,7 +602,7 @@ void rtl8192_InitBBRFRegDef(struct net_device* dev)
602 priv->PHYRegDef[RF90_PATH_C].rfintfe = rFPGA0_XC_RFInterfaceOE;// 16 MSBs if read 32-bit from 0x86A (16-bit for 0x86A) 602 priv->PHYRegDef[RF90_PATH_C].rfintfe = rFPGA0_XC_RFInterfaceOE;// 16 MSBs if read 32-bit from 0x86A (16-bit for 0x86A)
603 priv->PHYRegDef[RF90_PATH_D].rfintfe = rFPGA0_XD_RFInterfaceOE;// 16 MSBs if read 32-bit from 0x86C (16-bit for 0x86E) 603 priv->PHYRegDef[RF90_PATH_D].rfintfe = rFPGA0_XD_RFInterfaceOE;// 16 MSBs if read 32-bit from 0x86C (16-bit for 0x86E)
604 604
605 //Addr of LSSI. Wirte RF register by driver 605 //Addr of LSSI. Write RF register by driver
606 priv->PHYRegDef[RF90_PATH_A].rf3wireOffset = rFPGA0_XA_LSSIParameter; //LSSI Parameter 606 priv->PHYRegDef[RF90_PATH_A].rf3wireOffset = rFPGA0_XA_LSSIParameter; //LSSI Parameter
607 priv->PHYRegDef[RF90_PATH_B].rf3wireOffset = rFPGA0_XB_LSSIParameter; 607 priv->PHYRegDef[RF90_PATH_B].rf3wireOffset = rFPGA0_XB_LSSIParameter;
608 priv->PHYRegDef[RF90_PATH_C].rf3wireOffset = rFPGA0_XC_LSSIParameter; 608 priv->PHYRegDef[RF90_PATH_C].rf3wireOffset = rFPGA0_XC_LSSIParameter;
@@ -1384,7 +1384,7 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u
1384} 1384}
1385 1385
1386/****************************************************************************** 1386/******************************************************************************
1387 *function: This function does acturally set channel work 1387 *function: This function does actually set channel work
1388 * input: struct net_device *dev 1388 * input: struct net_device *dev
1389 * u8 channel 1389 * u8 channel
1390 * output: none 1390 * output: none
@@ -1425,7 +1425,7 @@ void rtl8192_SwChnl_WorkItem(struct net_device *dev)
1425} 1425}
1426 1426
1427/****************************************************************************** 1427/******************************************************************************
1428 *function: This function scheduled actural workitem to set channel 1428 *function: This function scheduled actual workitem to set channel
1429 * input: net_device dev 1429 * input: net_device dev
1430 * u8 channel //channel to set 1430 * u8 channel //channel to set
1431 * output: none 1431 * output: none
diff --git a/drivers/staging/rtl8192u/r819xU_phyreg.h b/drivers/staging/rtl8192u/r819xU_phyreg.h
index 06b0b539e1bc..50f24dce8b16 100644
--- a/drivers/staging/rtl8192u/r819xU_phyreg.h
+++ b/drivers/staging/rtl8192u/r819xU_phyreg.h
@@ -443,7 +443,7 @@
443#define bCCKRxIG 0x7f00 443#define bCCKRxIG 0x7f00
444#define bCCKLNAPolarity 0x800000 444#define bCCKLNAPolarity 0x800000
445#define bCCKRx1stGain 0x7f0000 445#define bCCKRx1stGain 0x7f0000
446#define bCCKRFExtend 0x20000000 //CCK Rx Iinital gain polarity 446#define bCCKRFExtend 0x20000000 //CCK Rx inital gain polarity
447#define bCCKRxAGCSatLevel 0x1f000000 447#define bCCKRxAGCSatLevel 0x1f000000
448#define bCCKRxAGCSatCount 0xe0 448#define bCCKRxAGCSatCount 0xe0
449#define bCCKRxRFSettle 0x1f //AGCsamp_dly 449#define bCCKRxRFSettle 0x1f //AGCsamp_dly