aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMike McCormack <mikem@ring3k.org>2011-03-10 08:33:47 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-14 15:24:45 -0400
commitd1c580aa706ad49a670af9c7188d1e13c319bd9a (patch)
treeadf419679e5f69f56ca819ce16445c4ff78bf3e4 /drivers/staging
parent09145962d6fdcecc229e685bc2321bd29fdc94c9 (diff)
staging: rtl8192e: Pass ieee80211_device to callbacks
Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8192e/ieee80211/ieee80211.h12
-rw-r--r--drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c2
-rw-r--r--drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c12
-rw-r--r--drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c12
-rw-r--r--drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c2
-rw-r--r--drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c4
-rw-r--r--drivers/staging/rtl8192e/r8192E.h8
-rw-r--r--drivers/staging/rtl8192e/r8192E_core.c36
-rw-r--r--drivers/staging/rtl8192e/r8192E_wx.c2
9 files changed, 44 insertions, 46 deletions
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
index 57ff8e55bd63..8bbf79d29300 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
@@ -1803,7 +1803,7 @@ struct ieee80211_device {
1803 u8 LPSDelayCnt; 1803 u8 LPSDelayCnt;
1804 bool bIsAggregateFrame; 1804 bool bIsAggregateFrame;
1805 bool polling; 1805 bool polling;
1806 void (*LeisurePSLeave)(struct net_device *dev); 1806 void (*LeisurePSLeave)(struct ieee80211_device *ieee);
1807#endif 1807#endif
1808 1808
1809#ifdef ENABLE_IPS 1809#ifdef ENABLE_IPS
@@ -1811,10 +1811,10 @@ struct ieee80211_device {
1811 bool wx_set_enc; 1811 bool wx_set_enc;
1812 struct semaphore ips_sem; 1812 struct semaphore ips_sem;
1813 struct work_struct ips_leave_wq; 1813 struct work_struct ips_leave_wq;
1814 void (*ieee80211_ips_leave_wq) (struct net_device *dev); 1814 void (*ieee80211_ips_leave_wq) (struct ieee80211_device *ieee);
1815 void (*ieee80211_ips_leave)(struct net_device *dev); 1815 void (*ieee80211_ips_leave)(struct ieee80211_device *ieee);
1816#endif 1816#endif
1817 void (*SetHwRegHandler)(struct net_device *dev,u8 variable,u8* val); 1817 void (*SetHwRegHandler)(struct ieee80211_device *ieee, u8 variable, u8 *val);
1818 u8 (*rtllib_ap_sec_type)(struct ieee80211_device *ieee); 1818 u8 (*rtllib_ap_sec_type)(struct ieee80211_device *ieee);
1819 1819
1820 //hw security related 1820 //hw security related
@@ -2099,7 +2099,7 @@ struct ieee80211_device {
2099 struct workqueue_struct *wq; 2099 struct workqueue_struct *wq;
2100 2100
2101 /* Callback functions */ 2101 /* Callback functions */
2102 void (*set_security)(struct net_device *dev, 2102 void (*set_security)(struct ieee80211_device *ieee,
2103 struct ieee80211_security *sec); 2103 struct ieee80211_security *sec);
2104 2104
2105 /* Used to TX data frame by using txb structs. 2105 /* Used to TX data frame by using txb structs.
@@ -2107,7 +2107,7 @@ struct ieee80211_device {
2107 * is set the flag IEEE_SOFTMAC_TX_QUEUE 2107 * is set the flag IEEE_SOFTMAC_TX_QUEUE
2108 */ 2108 */
2109 int (*hard_start_xmit)(struct ieee80211_txb *txb, 2109 int (*hard_start_xmit)(struct ieee80211_txb *txb,
2110 struct net_device *dev); 2110 struct ieee80211_device *ieee);
2111 2111
2112 int (*reset_port)(struct net_device *dev); 2112 int (*reset_port)(struct net_device *dev);
2113 int (*is_queue_full) (struct net_device * dev, int pri); 2113 int (*is_queue_full) (struct net_device * dev, int pri);
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c
index 57acb3f21adf..c57a90e41058 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c
@@ -1341,7 +1341,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
1341 (ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) ) 1341 (ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) )
1342 { 1342 {
1343 if(ieee->LeisurePSLeave) 1343 if(ieee->LeisurePSLeave)
1344 ieee->LeisurePSLeave(dev); 1344 ieee->LeisurePSLeave(ieee);
1345 } 1345 }
1346 } 1346 }
1347 } 1347 }
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
index b4fea6f7509e..d75c731157ba 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
@@ -609,7 +609,7 @@ void ieee80211_rtl_start_scan(struct ieee80211_device *ieee)
609{ 609{
610#ifdef ENABLE_IPS 610#ifdef ENABLE_IPS
611 if(ieee->ieee80211_ips_leave_wq != NULL) 611 if(ieee->ieee80211_ips_leave_wq != NULL)
612 ieee->ieee80211_ips_leave_wq(ieee->dev); 612 ieee->ieee80211_ips_leave_wq(ieee);
613#endif 613#endif
614 614
615#ifdef ENABLE_DOT11D 615#ifdef ENABLE_DOT11D
@@ -1408,7 +1408,7 @@ void ieee80211_associate_procedure_wq(struct work_struct *work)
1408 ieee->sync_scan_hurryup = 1; 1408 ieee->sync_scan_hurryup = 1;
1409#ifdef ENABLE_IPS 1409#ifdef ENABLE_IPS
1410 if(ieee->ieee80211_ips_leave != NULL) 1410 if(ieee->ieee80211_ips_leave != NULL)
1411 ieee->ieee80211_ips_leave(ieee->dev); 1411 ieee->ieee80211_ips_leave(ieee);
1412#endif 1412#endif
1413 1413
1414 down(&ieee->wx_sem); 1414 down(&ieee->wx_sem);
@@ -2522,7 +2522,7 @@ void ieee80211_start_bss(struct ieee80211_device *ieee)
2522 if (ieee->state == IEEE80211_NOLINK){ 2522 if (ieee->state == IEEE80211_NOLINK){
2523#ifdef ENABLE_IPS 2523#ifdef ENABLE_IPS
2524 if(ieee->ieee80211_ips_leave_wq != NULL) 2524 if(ieee->ieee80211_ips_leave_wq != NULL)
2525 ieee->ieee80211_ips_leave_wq(ieee->dev); 2525 ieee->ieee80211_ips_leave_wq(ieee);
2526#endif 2526#endif
2527 ieee->actscanning = true; 2527 ieee->actscanning = true;
2528 ieee80211_rtl_start_scan(ieee); 2528 ieee80211_rtl_start_scan(ieee);
@@ -2933,7 +2933,7 @@ static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value)
2933 2933
2934 2934
2935 if (ieee->set_security) 2935 if (ieee->set_security)
2936 ieee->set_security(ieee->dev, &sec); 2936 ieee->set_security(ieee, &sec);
2937 2937
2938 return ret; 2938 return ret;
2939} 2939}
@@ -2981,7 +2981,7 @@ static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 v
2981 sec.level = SEC_LEVEL_1; 2981 sec.level = SEC_LEVEL_1;
2982 } 2982 }
2983 if (ieee->set_security) 2983 if (ieee->set_security)
2984 ieee->set_security(ieee->dev, &sec); 2984 ieee->set_security(ieee, &sec);
2985 break; 2985 break;
2986 } 2986 }
2987 2987
@@ -3147,7 +3147,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
3147 } 3147 }
3148 done: 3148 done:
3149 if (ieee->set_security) 3149 if (ieee->set_security)
3150 ieee->set_security(ieee->dev, &sec); 3150 ieee->set_security(ieee, &sec);
3151 3151
3152 /* Do not reset port if card is in Managed mode since resetting will 3152 /* Do not reset port if card is in Managed mode since resetting will
3153 * generate new IEEE 802.11 authentication which may end up in looping 3153 * generate new IEEE 802.11 authentication which may end up in looping
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c
index 427dfc1d0ffa..f82bb7d6203d 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c
@@ -70,7 +70,7 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info
70 } 70 }
71#endif 71#endif
72 ieee->current_network.channel = fwrq->m; 72 ieee->current_network.channel = fwrq->m;
73 ieee->set_chan(ieee->dev, ieee->current_network.channel); 73 ieee->set_chan(ieee, ieee->current_network.channel);
74 74
75 if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER) 75 if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
76 if(ieee->state == IEEE80211_LINKED){ 76 if(ieee->state == IEEE80211_LINKED){
@@ -307,7 +307,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
307 307
308#ifdef ENABLE_LPS 308#ifdef ENABLE_LPS
309 if (ieee->LeisurePSLeave) { 309 if (ieee->LeisurePSLeave) {
310 ieee->LeisurePSLeave(ieee->dev); 310 ieee->LeisurePSLeave(ieee);
311 } 311 }
312 312
313 /* notify AP to be in PS mode */ 313 /* notify AP to be in PS mode */
@@ -334,14 +334,14 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
334 if (b40M) { 334 if (b40M) {
335 printk("Scan in 20M, back to 40M\n"); 335 printk("Scan in 20M, back to 40M\n");
336 if (chan_offset == HT_EXTCHNL_OFFSET_UPPER) 336 if (chan_offset == HT_EXTCHNL_OFFSET_UPPER)
337 ieee->set_chan(ieee->dev, chan + 2); 337 ieee->set_chan(ieee, chan + 2);
338 else if (chan_offset == HT_EXTCHNL_OFFSET_LOWER) 338 else if (chan_offset == HT_EXTCHNL_OFFSET_LOWER)
339 ieee->set_chan(ieee->dev, chan - 2); 339 ieee->set_chan(ieee, chan - 2);
340 else 340 else
341 ieee->set_chan(ieee->dev, chan); 341 ieee->set_chan(ieee, chan);
342 ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset); 342 ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset);
343 } else { 343 } else {
344 ieee->set_chan(ieee->dev, chan); 344 ieee->set_chan(ieee, chan);
345 } 345 }
346 346
347 ieee->InitialGainHandler(ieee->dev,IG_Restore); 347 ieee->InitialGainHandler(ieee->dev,IG_Restore);
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c
index 17535a23c57b..ea715a2d4dc3 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c
@@ -935,7 +935,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, struct net_device *dev)
935 if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE){ 935 if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE){
936 ieee80211_softmac_xmit(txb, ieee); 936 ieee80211_softmac_xmit(txb, ieee);
937 }else{ 937 }else{
938 if ((*ieee->hard_start_xmit)(txb, dev) == 0) { 938 if ((*ieee->hard_start_xmit)(txb, ieee) == 0) {
939 stats->tx_packets++; 939 stats->tx_packets++;
940 stats->tx_bytes += txb->payload_size; 940 stats->tx_bytes += txb->payload_size;
941 return 0; 941 return 0;
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c
index bb0ff26bd843..ef3a9b202d42 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c
@@ -463,7 +463,7 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
463 sec.level = SEC_LEVEL_1; /* 40 and 104 bit WEP */ 463 sec.level = SEC_LEVEL_1; /* 40 and 104 bit WEP */
464 464
465 if (ieee->set_security) 465 if (ieee->set_security)
466 ieee->set_security(dev, &sec); 466 ieee->set_security(ieee, &sec);
467 467
468 /* Do not reset port if card is in Managed mode since resetting will 468 /* Do not reset port if card is in Managed mode since resetting will
469 * generate new IEEE 802.11 authentication which may end up in looping 469 * generate new IEEE 802.11 authentication which may end up in looping
@@ -696,7 +696,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
696#endif 696#endif
697done: 697done:
698 if (ieee->set_security) 698 if (ieee->set_security)
699 ieee->set_security(ieee->dev, &sec); 699 ieee->set_security(ieee, &sec);
700 700
701 if (ieee->reset_on_keychange && 701 if (ieee->reset_on_keychange &&
702 ieee->iw_mode != IW_MODE_INFRA && 702 ieee->iw_mode != IW_MODE_INFRA &&
diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h
index 9ff0548f188e..8052d0cf9fb9 100644
--- a/drivers/staging/rtl8192e/r8192E.h
+++ b/drivers/staging/rtl8192e/r8192E.h
@@ -1133,12 +1133,12 @@ RT_STATUS cmpk_message_handle_tx(struct net_device *dev, u8* codevirtualaddress,
1133void IPSEnter(struct r8192_priv *priv); 1133void IPSEnter(struct r8192_priv *priv);
1134void IPSLeave(struct r8192_priv *priv); 1134void IPSLeave(struct r8192_priv *priv);
1135void IPSLeave_wq(struct work_struct *work); 1135void IPSLeave_wq(struct work_struct *work);
1136void ieee80211_ips_leave_wq(struct net_device *dev); 1136void ieee80211_ips_leave_wq(struct ieee80211_device *ieee80211);
1137void ieee80211_ips_leave(struct net_device *dev); 1137void ieee80211_ips_leave(struct ieee80211_device *ieee80211);
1138#endif 1138#endif
1139#ifdef ENABLE_LPS 1139#ifdef ENABLE_LPS
1140void LeisurePSEnter(struct net_device *dev); 1140void LeisurePSEnter(struct ieee80211_device *ieee80211);
1141void LeisurePSLeave(struct net_device *dev); 1141void LeisurePSLeave(struct ieee80211_device *ieee80211);
1142#endif 1142#endif
1143 1143
1144bool NicIFEnableNIC(struct r8192_priv *priv); 1144bool NicIFEnableNIC(struct r8192_priv *priv);
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c
index c392f19b0bdb..efd7e7f0a4f0 100644
--- a/drivers/staging/rtl8192e/r8192E_core.c
+++ b/drivers/staging/rtl8192e/r8192E_core.c
@@ -271,10 +271,9 @@ u8 rtl8192e_ap_sec_type(struct ieee80211_device *ieee)
271 } 271 }
272} 272}
273 273
274void 274void rtl8192e_SetHwReg(struct ieee80211_device *ieee80211, u8 variable, u8 *val)
275rtl8192e_SetHwReg(struct net_device *dev,u8 variable,u8* val)
276{ 275{
277 struct r8192_priv* priv = ieee80211_priv(dev); 276 struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
278 277
279 switch(variable) 278 switch(variable)
280 { 279 {
@@ -748,13 +747,12 @@ void PHY_SetRtl8192eRfOff(struct r8192_priv *priv)
748 747
749static void rtl8192_halt_adapter(struct r8192_priv *priv, bool reset) 748static void rtl8192_halt_adapter(struct r8192_priv *priv, bool reset)
750{ 749{
751 struct net_device *dev = priv->ieee80211->dev;
752 int i; 750 int i;
753 u8 OpMode; 751 u8 OpMode;
754 u32 ulRegRead; 752 u32 ulRegRead;
755 753
756 OpMode = RT_OP_MODE_NO_LINK; 754 OpMode = RT_OP_MODE_NO_LINK;
757 priv->ieee80211->SetHwRegHandler(dev, HW_VAR_MEDIA_STATUS, &OpMode); 755 priv->ieee80211->SetHwRegHandler(priv->ieee80211, HW_VAR_MEDIA_STATUS, &OpMode);
758 756
759 if (!priv->ieee80211->bSupportRemoteWakeUp) { 757 if (!priv->ieee80211->bSupportRemoteWakeUp) {
760 /* 758 /*
@@ -3071,9 +3069,9 @@ bool MgntActSet_802_11_PowerSaveMode(struct r8192_priv *priv, u8 rtPsMode)
3071} 3069}
3072 3070
3073/* Enter the leisure power save mode. */ 3071/* Enter the leisure power save mode. */
3074void LeisurePSEnter(struct net_device *dev) 3072void LeisurePSEnter(struct ieee80211_device *ieee80211)
3075{ 3073{
3076 struct r8192_priv *priv = ieee80211_priv(dev); 3074 struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
3077 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl; 3075 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
3078 3076
3079 if(!((priv->ieee80211->iw_mode == IW_MODE_INFRA) && 3077 if(!((priv->ieee80211->iw_mode == IW_MODE_INFRA) &&
@@ -3101,9 +3099,9 @@ void LeisurePSEnter(struct net_device *dev)
3101 3099
3102 3100
3103/* Leave leisure power save mode. */ 3101/* Leave leisure power save mode. */
3104void LeisurePSLeave(struct net_device *dev) 3102void LeisurePSLeave(struct ieee80211_device *ieee80211)
3105{ 3103{
3106 struct r8192_priv *priv = ieee80211_priv(dev); 3104 struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
3107 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl; 3105 PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
3108 3106
3109 if (pPSC->bLeisurePs) 3107 if (pPSC->bLeisurePs)
@@ -3181,9 +3179,9 @@ void IPSLeave_wq(struct work_struct *work)
3181 up(&priv->ieee80211->ips_sem); 3179 up(&priv->ieee80211->ips_sem);
3182} 3180}
3183 3181
3184void ieee80211_ips_leave_wq(struct net_device *dev) 3182void ieee80211_ips_leave_wq(struct ieee80211_device *ieee80211)
3185{ 3183{
3186 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 3184 struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
3187 RT_RF_POWER_STATE rtState; 3185 RT_RF_POWER_STATE rtState;
3188 rtState = priv->eRFPowerState; 3186 rtState = priv->eRFPowerState;
3189 3187
@@ -3202,12 +3200,12 @@ void ieee80211_ips_leave_wq(struct net_device *dev)
3202 } 3200 }
3203} 3201}
3204//added by amy 090331 end 3202//added by amy 090331 end
3205void ieee80211_ips_leave(struct net_device *dev) 3203void ieee80211_ips_leave(struct ieee80211_device *ieee80211)
3206{ 3204{
3207 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 3205 struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
3208 down(&priv->ieee80211->ips_sem); 3206 down(&ieee80211->ips_sem);
3209 IPSLeave(priv); 3207 IPSLeave(priv);
3210 up(&priv->ieee80211->ips_sem); 3208 up(&ieee80211->ips_sem);
3211} 3209}
3212#endif 3210#endif
3213 3211
@@ -3283,11 +3281,11 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
3283 // LeisurePS only work in infra mode. 3281 // LeisurePS only work in infra mode.
3284 if(bEnterPS) 3282 if(bEnterPS)
3285 { 3283 {
3286 LeisurePSEnter(dev); 3284 LeisurePSEnter(priv->ieee80211);
3287 } 3285 }
3288 else 3286 else
3289 { 3287 {
3290 LeisurePSLeave(dev); 3288 LeisurePSLeave(priv->ieee80211);
3291 } 3289 }
3292#endif 3290#endif
3293 3291
@@ -3295,7 +3293,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
3295 else 3293 else
3296 { 3294 {
3297#ifdef ENABLE_LPS 3295#ifdef ENABLE_LPS
3298 LeisurePSLeave(dev); 3296 LeisurePSLeave(priv->ieee80211);
3299#endif 3297#endif
3300 } 3298 }
3301 3299
@@ -3449,7 +3447,7 @@ int rtl8192_down(struct net_device *dev)
3449#ifdef ENABLE_LPS 3447#ifdef ENABLE_LPS
3450 //LZM for PS-Poll AID issue. 090429 3448 //LZM for PS-Poll AID issue. 090429
3451 if(priv->ieee80211->state == IEEE80211_LINKED) 3449 if(priv->ieee80211->state == IEEE80211_LINKED)
3452 LeisurePSLeave(dev); 3450 LeisurePSLeave(priv->ieee80211);
3453#endif 3451#endif
3454 3452
3455 priv->up=0; 3453 priv->up=0;
diff --git a/drivers/staging/rtl8192e/r8192E_wx.c b/drivers/staging/rtl8192e/r8192E_wx.c
index f76377602da6..adad91b0b6b1 100644
--- a/drivers/staging/rtl8192e/r8192E_wx.c
+++ b/drivers/staging/rtl8192e/r8192E_wx.c
@@ -1006,7 +1006,7 @@ static int r8192_wx_adapter_power_status(struct net_device *dev,
1006 } else { 1006 } else {
1007 //LZM for PS-Poll AID issue. 090429 1007 //LZM for PS-Poll AID issue. 090429
1008 if(priv->ieee80211->state == IEEE80211_LINKED) 1008 if(priv->ieee80211->state == IEEE80211_LINKED)
1009 LeisurePSLeave(dev); 1009 LeisurePSLeave(priv->ieee80211);
1010 1010
1011 priv->ps_force = true; 1011 priv->ps_force = true;
1012 pPSC->bLeisurePs = false; 1012 pPSC->bLeisurePs = false;