Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236526
b: refs/heads/master
c: d1c580a
h: refs/heads/master
v: v3
  • Loading branch information
Mike McCormack authored and Greg Kroah-Hartman committed Mar 14, 2011
1 parent 9b5e2ca commit b59cfb0
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 47 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09145962d6fdcecc229e685bc2321bd29fdc94c9
refs/heads/master: d1c580aa706ad49a670af9c7188d1e13c319bd9a
12 changes: 6 additions & 6 deletions trunk/drivers/staging/rtl8192e/ieee80211/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1803,18 +1803,18 @@ struct ieee80211_device {
u8 LPSDelayCnt;
bool bIsAggregateFrame;
bool polling;
void (*LeisurePSLeave)(struct net_device *dev);
void (*LeisurePSLeave)(struct ieee80211_device *ieee);
#endif

#ifdef ENABLE_IPS
bool proto_stoppping;
bool wx_set_enc;
struct semaphore ips_sem;
struct work_struct ips_leave_wq;
void (*ieee80211_ips_leave_wq) (struct net_device *dev);
void (*ieee80211_ips_leave)(struct net_device *dev);
void (*ieee80211_ips_leave_wq) (struct ieee80211_device *ieee);
void (*ieee80211_ips_leave)(struct ieee80211_device *ieee);
#endif
void (*SetHwRegHandler)(struct net_device *dev,u8 variable,u8* val);
void (*SetHwRegHandler)(struct ieee80211_device *ieee, u8 variable, u8 *val);
u8 (*rtllib_ap_sec_type)(struct ieee80211_device *ieee);

//hw security related
Expand Down Expand Up @@ -2099,15 +2099,15 @@ struct ieee80211_device {
struct workqueue_struct *wq;

/* Callback functions */
void (*set_security)(struct net_device *dev,
void (*set_security)(struct ieee80211_device *ieee,
struct ieee80211_security *sec);

/* Used to TX data frame by using txb structs.
* this is not used if in the softmac_features
* is set the flag IEEE_SOFTMAC_TX_QUEUE
*/
int (*hard_start_xmit)(struct ieee80211_txb *txb,
struct net_device *dev);
struct ieee80211_device *ieee);

int (*reset_port)(struct net_device *dev);
int (*is_queue_full) (struct net_device * dev, int pri);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
(ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) )
{
if(ieee->LeisurePSLeave)
ieee->LeisurePSLeave(dev);
ieee->LeisurePSLeave(ieee);
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ void ieee80211_rtl_start_scan(struct ieee80211_device *ieee)
{
#ifdef ENABLE_IPS
if(ieee->ieee80211_ips_leave_wq != NULL)
ieee->ieee80211_ips_leave_wq(ieee->dev);
ieee->ieee80211_ips_leave_wq(ieee);
#endif

#ifdef ENABLE_DOT11D
Expand Down Expand Up @@ -1408,7 +1408,7 @@ void ieee80211_associate_procedure_wq(struct work_struct *work)
ieee->sync_scan_hurryup = 1;
#ifdef ENABLE_IPS
if(ieee->ieee80211_ips_leave != NULL)
ieee->ieee80211_ips_leave(ieee->dev);
ieee->ieee80211_ips_leave(ieee);
#endif

down(&ieee->wx_sem);
Expand Down Expand Up @@ -2522,7 +2522,7 @@ void ieee80211_start_bss(struct ieee80211_device *ieee)
if (ieee->state == IEEE80211_NOLINK){
#ifdef ENABLE_IPS
if(ieee->ieee80211_ips_leave_wq != NULL)
ieee->ieee80211_ips_leave_wq(ieee->dev);
ieee->ieee80211_ips_leave_wq(ieee);
#endif
ieee->actscanning = true;
ieee80211_rtl_start_scan(ieee);
Expand Down Expand Up @@ -2933,7 +2933,7 @@ static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value)


if (ieee->set_security)
ieee->set_security(ieee->dev, &sec);
ieee->set_security(ieee, &sec);

return ret;
}
Expand Down Expand Up @@ -2981,7 +2981,7 @@ static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 v
sec.level = SEC_LEVEL_1;
}
if (ieee->set_security)
ieee->set_security(ieee->dev, &sec);
ieee->set_security(ieee, &sec);
break;
}

Expand Down Expand Up @@ -3147,7 +3147,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
}
done:
if (ieee->set_security)
ieee->set_security(ieee->dev, &sec);
ieee->set_security(ieee, &sec);

/* Do not reset port if card is in Managed mode since resetting will
* generate new IEEE 802.11 authentication which may end up in looping
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info
}
#endif
ieee->current_network.channel = fwrq->m;
ieee->set_chan(ieee->dev, ieee->current_network.channel);
ieee->set_chan(ieee, ieee->current_network.channel);

if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
if(ieee->state == IEEE80211_LINKED){
Expand Down Expand Up @@ -307,7 +307,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)

#ifdef ENABLE_LPS
if (ieee->LeisurePSLeave) {
ieee->LeisurePSLeave(ieee->dev);
ieee->LeisurePSLeave(ieee);
}

/* notify AP to be in PS mode */
Expand All @@ -334,14 +334,14 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
if (b40M) {
printk("Scan in 20M, back to 40M\n");
if (chan_offset == HT_EXTCHNL_OFFSET_UPPER)
ieee->set_chan(ieee->dev, chan + 2);
ieee->set_chan(ieee, chan + 2);
else if (chan_offset == HT_EXTCHNL_OFFSET_LOWER)
ieee->set_chan(ieee->dev, chan - 2);
ieee->set_chan(ieee, chan - 2);
else
ieee->set_chan(ieee->dev, chan);
ieee->set_chan(ieee, chan);
ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset);
} else {
ieee->set_chan(ieee->dev, chan);
ieee->set_chan(ieee, chan);
}

ieee->InitialGainHandler(ieee->dev,IG_Restore);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, struct net_device *dev)
if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE){
ieee80211_softmac_xmit(txb, ieee);
}else{
if ((*ieee->hard_start_xmit)(txb, dev) == 0) {
if ((*ieee->hard_start_xmit)(txb, ieee) == 0) {
stats->tx_packets++;
stats->tx_bytes += txb->payload_size;
return 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
sec.level = SEC_LEVEL_1; /* 40 and 104 bit WEP */

if (ieee->set_security)
ieee->set_security(dev, &sec);
ieee->set_security(ieee, &sec);

/* Do not reset port if card is in Managed mode since resetting will
* generate new IEEE 802.11 authentication which may end up in looping
Expand Down Expand Up @@ -696,7 +696,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
#endif
done:
if (ieee->set_security)
ieee->set_security(ieee->dev, &sec);
ieee->set_security(ieee, &sec);

if (ieee->reset_on_keychange &&
ieee->iw_mode != IW_MODE_INFRA &&
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/rtl8192e/r8192E.h
Original file line number Diff line number Diff line change
Expand Up @@ -1133,12 +1133,12 @@ RT_STATUS cmpk_message_handle_tx(struct net_device *dev, u8* codevirtualaddress,
void IPSEnter(struct r8192_priv *priv);
void IPSLeave(struct r8192_priv *priv);
void IPSLeave_wq(struct work_struct *work);
void ieee80211_ips_leave_wq(struct net_device *dev);
void ieee80211_ips_leave(struct net_device *dev);
void ieee80211_ips_leave_wq(struct ieee80211_device *ieee80211);
void ieee80211_ips_leave(struct ieee80211_device *ieee80211);
#endif
#ifdef ENABLE_LPS
void LeisurePSEnter(struct net_device *dev);
void LeisurePSLeave(struct net_device *dev);
void LeisurePSEnter(struct ieee80211_device *ieee80211);
void LeisurePSLeave(struct ieee80211_device *ieee80211);
#endif

bool NicIFEnableNIC(struct r8192_priv *priv);
Expand Down
36 changes: 17 additions & 19 deletions trunk/drivers/staging/rtl8192e/r8192E_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,9 @@ u8 rtl8192e_ap_sec_type(struct ieee80211_device *ieee)
}
}

void
rtl8192e_SetHwReg(struct net_device *dev,u8 variable,u8* val)
void rtl8192e_SetHwReg(struct ieee80211_device *ieee80211, u8 variable, u8 *val)
{
struct r8192_priv* priv = ieee80211_priv(dev);
struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);

switch(variable)
{
Expand Down Expand Up @@ -748,13 +747,12 @@ void PHY_SetRtl8192eRfOff(struct r8192_priv *priv)

static void rtl8192_halt_adapter(struct r8192_priv *priv, bool reset)
{
struct net_device *dev = priv->ieee80211->dev;
int i;
u8 OpMode;
u32 ulRegRead;

OpMode = RT_OP_MODE_NO_LINK;
priv->ieee80211->SetHwRegHandler(dev, HW_VAR_MEDIA_STATUS, &OpMode);
priv->ieee80211->SetHwRegHandler(priv->ieee80211, HW_VAR_MEDIA_STATUS, &OpMode);

if (!priv->ieee80211->bSupportRemoteWakeUp) {
/*
Expand Down Expand Up @@ -3071,9 +3069,9 @@ bool MgntActSet_802_11_PowerSaveMode(struct r8192_priv *priv, u8 rtPsMode)
}

/* Enter the leisure power save mode. */
void LeisurePSEnter(struct net_device *dev)
void LeisurePSEnter(struct ieee80211_device *ieee80211)
{
struct r8192_priv *priv = ieee80211_priv(dev);
struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;

if(!((priv->ieee80211->iw_mode == IW_MODE_INFRA) &&
Expand Down Expand Up @@ -3101,9 +3099,9 @@ void LeisurePSEnter(struct net_device *dev)


/* Leave leisure power save mode. */
void LeisurePSLeave(struct net_device *dev)
void LeisurePSLeave(struct ieee80211_device *ieee80211)
{
struct r8192_priv *priv = ieee80211_priv(dev);
struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;

if (pPSC->bLeisurePs)
Expand Down Expand Up @@ -3181,9 +3179,9 @@ void IPSLeave_wq(struct work_struct *work)
up(&priv->ieee80211->ips_sem);
}

void ieee80211_ips_leave_wq(struct net_device *dev)
void ieee80211_ips_leave_wq(struct ieee80211_device *ieee80211)
{
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
RT_RF_POWER_STATE rtState;
rtState = priv->eRFPowerState;

Expand All @@ -3202,12 +3200,12 @@ void ieee80211_ips_leave_wq(struct net_device *dev)
}
}
//added by amy 090331 end
void ieee80211_ips_leave(struct net_device *dev)
void ieee80211_ips_leave(struct ieee80211_device *ieee80211)
{
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
down(&priv->ieee80211->ips_sem);
struct r8192_priv *priv = ieee80211_priv(ieee80211->dev);
down(&ieee80211->ips_sem);
IPSLeave(priv);
up(&priv->ieee80211->ips_sem);
up(&ieee80211->ips_sem);
}
#endif

Expand Down Expand Up @@ -3283,19 +3281,19 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
// LeisurePS only work in infra mode.
if(bEnterPS)
{
LeisurePSEnter(dev);
LeisurePSEnter(priv->ieee80211);
}
else
{
LeisurePSLeave(dev);
LeisurePSLeave(priv->ieee80211);
}
#endif

}
else
{
#ifdef ENABLE_LPS
LeisurePSLeave(dev);
LeisurePSLeave(priv->ieee80211);
#endif
}

Expand Down Expand Up @@ -3449,7 +3447,7 @@ int rtl8192_down(struct net_device *dev)
#ifdef ENABLE_LPS
//LZM for PS-Poll AID issue. 090429
if(priv->ieee80211->state == IEEE80211_LINKED)
LeisurePSLeave(dev);
LeisurePSLeave(priv->ieee80211);
#endif

priv->up=0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/rtl8192e/r8192E_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ static int r8192_wx_adapter_power_status(struct net_device *dev,
} else {
//LZM for PS-Poll AID issue. 090429
if(priv->ieee80211->state == IEEE80211_LINKED)
LeisurePSLeave(dev);
LeisurePSLeave(priv->ieee80211);

priv->ps_force = true;
pPSC->bLeisurePs = false;
Expand Down

0 comments on commit b59cfb0

Please sign in to comment.