Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236287
b: refs/heads/master
c: 480ab9d
h: refs/heads/master
i:
  236285: 395ad70
  236283: c35633c
  236279: 4ee131b
  236271: 3aa2ef6
  236255: c7ca0c6
  236223: 2a5ac4f
  236159: 9f2b061
  236031: 632ccd8
v: v3
  • Loading branch information
Mike McCormack authored and Greg Kroah-Hartman committed Mar 7, 2011
1 parent 7789cb1 commit f19aec5
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 89 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: d9ffa6c2e9752bb3c87995e2d97444c713dbc07f
refs/heads/master: 480ab9dccb9b82ff9fca3118abd65e9f7908a085
49 changes: 16 additions & 33 deletions trunk/drivers/staging/rtl8192e/r8190_rtl8256.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,9 @@ static void r8192e_drain_tx_queues(struct r8192_priv *priv)
}
}

static bool
SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
static bool SetRFPowerState8190(struct r8192_priv *priv,
RT_RF_POWER_STATE eRFPowerState)
{
struct r8192_priv *priv = ieee80211_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = &priv->PowerSaveControl;
bool bResult = true;

Expand All @@ -342,7 +341,7 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
* The current RF state is OFF and the RF OFF level
* is halting the NIC, re-initialize the NIC.
*/
if (!NicIFEnableNIC(dev)) {
if (!NicIFEnableNIC(priv)) {
RT_TRACE(COMP_ERR, "%s(): NicIFEnableNIC failed\n",__FUNCTION__);
bResult = false;
goto out;
Expand Down Expand Up @@ -386,7 +385,7 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)

r8192e_drain_tx_queues(priv);

PHY_SetRtl8192eRfOff(dev);
PHY_SetRtl8192eRfOff(priv);

break;

Expand All @@ -401,13 +400,13 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)
if (pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC && !RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC))
{
/* Disable all components. */
NicIFDisableNIC(dev);
NicIFDisableNIC(priv);
RT_SET_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC);
}
else if (!(pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC))
{
/* Normal case - IPS should go to this. */
PHY_SetRtl8192eRfOff(dev);
PHY_SetRtl8192eRfOff(priv);
}
break;

Expand All @@ -431,12 +430,8 @@ SetRFPowerState8190(struct net_device *dev, RT_RF_POWER_STATE eRFPowerState)



static void
MgntDisconnectIBSS(
struct net_device* dev
)
static void MgntDisconnectIBSS(struct r8192_priv *priv)
{
struct r8192_priv *priv = ieee80211_priv(dev);
u8 i;
bool bFilterOutNonAssociatedBSSID = false;

Expand Down Expand Up @@ -498,14 +493,9 @@ MgntDisconnectIBSS(

}

static void
MlmeDisassociateRequest(
struct net_device* dev,
u8* asSta,
u8 asRsn
)
static void MlmeDisassociateRequest(struct r8192_priv *priv, u8 *asSta,
u8 asRsn)
{
struct r8192_priv *priv = ieee80211_priv(dev);
u8 i;

RemovePeerTS(priv->ieee80211, asSta);
Expand Down Expand Up @@ -557,9 +547,8 @@ MlmeDisassociateRequest(
}


static void MgntDisconnectAP(struct net_device *dev, u8 asRsn)
static void MgntDisconnectAP(struct r8192_priv *priv, u8 asRsn)
{
struct r8192_priv *priv = ieee80211_priv(dev);
bool bFilterOutNonAssociatedBSSID = false;
u32 RegRCR, Type;

Expand All @@ -578,26 +567,20 @@ static void MgntDisconnectAP(struct net_device *dev, u8 asRsn)
write_nic_dword(priv, RCR, RegRCR);
priv->ReceiveConfig = RegRCR;

MlmeDisassociateRequest(dev, priv->ieee80211->current_network.bssid, asRsn);
MlmeDisassociateRequest(priv, priv->ieee80211->current_network.bssid, asRsn);

priv->ieee80211->state = IEEE80211_NOLINK;
}


static bool
MgntDisconnect(
struct net_device* dev,
u8 asRsn
)
static bool MgntDisconnect(struct r8192_priv *priv, u8 asRsn)
{
struct r8192_priv *priv = ieee80211_priv(dev);

// In adhoc mode, update beacon frame.
if( priv->ieee80211->state == IEEE80211_LINKED )
{
if( priv->ieee80211->iw_mode == IW_MODE_ADHOC )
{
MgntDisconnectIBSS(dev);
MgntDisconnectIBSS(priv);
}
if( priv->ieee80211->iw_mode == IW_MODE_INFRA )
{
Expand All @@ -606,7 +589,7 @@ MgntDisconnect(
// e.g. OID_802_11_DISASSOCIATE in Windows while as MgntDisconnectAP() is
// used to handle disassociation related things to AP, e.g. send Disassoc
// frame to AP. 2005.01.27, by rcnjko.
MgntDisconnectAP(dev, asRsn);
MgntDisconnectAP(priv, asRsn);
}
}

Expand Down Expand Up @@ -665,7 +648,7 @@ MgntActSet_RF_State(
if (priv->RfOffReason > RF_CHANGE_BY_IPS)
{
// Disconnect to current BSS when radio off. Asked by QuanTa.
MgntDisconnect(dev, disas_lv_ss);
MgntDisconnect(priv, disas_lv_ss);
}

priv->RfOffReason |= ChangeSource;
Expand All @@ -682,7 +665,7 @@ MgntActSet_RF_State(
{
RT_TRACE(COMP_POWER, "MgntActSet_RF_State(): Action is allowed.... StateToSet(%d), RfOffReason(%#X)\n", StateToSet, priv->RfOffReason);
// Config HW to the specified mode.
SetRFPowerState8190(dev, StateToSet);
SetRFPowerState8190(priv, StateToSet);
}
else
{
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 @@ -1059,7 +1059,7 @@ int rtl8192_down(struct net_device *dev);
int rtl8192_up(struct net_device *dev);
void rtl8192_commit(struct net_device *dev);
void write_phy(struct net_device *dev, u8 adr, u8 data);
void CamResetAllEntry(struct net_device* dev);
void CamResetAllEntry(struct r8192_priv *priv);
void EnableHWSecurityConfig8192(struct net_device *dev);
void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType, const u8 *MacAddr, u8 DefaultKey, u32 *KeyContent );
void dm_cck_txpower_adjust(struct net_device *dev, bool binch14);
Expand All @@ -1079,8 +1079,8 @@ void LeisurePSEnter(struct net_device *dev);
void LeisurePSLeave(struct net_device *dev);
#endif

bool NicIFEnableNIC(struct net_device* dev);
bool NicIFDisableNIC(struct net_device* dev);
bool NicIFEnableNIC(struct r8192_priv *priv);
bool NicIFDisableNIC(struct r8192_priv *priv);

void PHY_SetRtl8192eRfOff(struct net_device* dev);
void PHY_SetRtl8192eRfOff(struct r8192_priv *priv);
#endif
Loading

0 comments on commit f19aec5

Please sign in to comment.