Skip to content

Commit

Permalink
Staging: rtl8192e: Don't compare bHwRadioOff with true
Browse files Browse the repository at this point in the history
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mike McCormack authored and Greg Kroah-Hartman committed Aug 31, 2010
1 parent 5b3b1a7 commit f500e25
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/rtl8192e/r8192E_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
/* shall not be referred by command packet */
assert(queue_index != TXCMD_QUEUE);

if((priv->bHwRadioOff == true)||(!priv->up))
if (priv->bHwRadioOff ||(!priv->up))
{
kfree_skb(skb);
return;
Expand Down Expand Up @@ -1213,7 +1213,7 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev)
u8 queue_index = tcb_desc->queue_index;

if(queue_index != TXCMD_QUEUE){
if((priv->bHwRadioOff == true)||(!priv->up))
if (priv->bHwRadioOff ||(!priv->up))
{
kfree_skb(skb);
return 0;
Expand Down Expand Up @@ -4654,7 +4654,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
static u8 last_time = 0;
bool bEnterPS = false;

if((!priv->up) || (priv->bHwRadioOff == true))
if ((!priv->up) || priv->bHwRadioOff)
return;

if(!priv->up)
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/rtl8192e/r8192E_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2945,14 +2945,14 @@ void dm_gpio_change_rf_callback(struct work_struct *work)

eRfPowerStateToSet = (tmp1byte&BIT1) ? eRfOn : eRfOff;

if( (priv->bHwRadioOff == true) && (eRfPowerStateToSet == eRfOn))
if (priv->bHwRadioOff && (eRfPowerStateToSet == eRfOn))
{
RT_TRACE(COMP_RF, "gpiochangeRF - HW Radio ON\n");

priv->bHwRadioOff = false;
bActuallySet = true;
}
else if ( (priv->bHwRadioOff == false) && (eRfPowerStateToSet == eRfOff))
else if ( (!priv->bHwRadioOff) && (eRfPowerStateToSet == eRfOff))
{
RT_TRACE(COMP_RF, "gpiochangeRF - HW Radio OFF\n");
priv->bHwRadioOff = true;
Expand Down
38 changes: 19 additions & 19 deletions drivers/staging/rtl8192e/r8192E_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int r8192_wx_set_rate(struct net_device *dev,
int ret;
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand All @@ -90,7 +90,7 @@ static int r8192_wx_set_rts(struct net_device *dev,
int ret;
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand All @@ -117,7 +117,7 @@ static int r8192_wx_set_power(struct net_device *dev,
int ret;
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand All @@ -144,7 +144,7 @@ static int r8192_wx_set_rawtx(struct net_device *dev,
struct r8192_priv *priv = ieee80211_priv(dev);
int ret;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand Down Expand Up @@ -182,7 +182,7 @@ static int r8192_wx_set_crcmon(struct net_device *dev,
int enable = (parms[0] > 0);
short prev = priv->crcmon;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand Down Expand Up @@ -212,7 +212,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
RT_RF_POWER_STATE rtState;
int ret;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

rtState = priv->ieee80211->eRFPowerState;
Expand Down Expand Up @@ -383,7 +383,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
RT_RF_POWER_STATE rtState;
int ret;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

rtState = priv->ieee80211->eRFPowerState;
Expand Down Expand Up @@ -452,7 +452,7 @@ static int r8192_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
int ret;
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

if(!priv->up) return -ENETDOWN;
Expand All @@ -474,7 +474,7 @@ static int r8192_wx_set_essid(struct net_device *dev,
RT_RF_POWER_STATE rtState;
int ret;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

rtState = priv->ieee80211->eRFPowerState;
Expand Down Expand Up @@ -518,7 +518,7 @@ static int r8192_wx_set_freq(struct net_device *dev, struct iw_request_info *a,
int ret;
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand All @@ -544,7 +544,7 @@ static int r8192_wx_set_frag(struct net_device *dev,
{
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

if (wrqu->frag.disabled)
Expand Down Expand Up @@ -585,7 +585,7 @@ static int r8192_wx_set_wap(struct net_device *dev,
struct r8192_priv *priv = ieee80211_priv(dev);
// struct sockaddr *temp = (struct sockaddr *)awrq;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand Down Expand Up @@ -641,7 +641,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
{0x00,0x00,0x00,0x00,0x00,0x03} };
int i;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

if(!priv->up) return -ENETDOWN;
Expand Down Expand Up @@ -786,7 +786,7 @@ static int r8192_wx_set_retry(struct net_device *dev,
struct r8192_priv *priv = ieee80211_priv(dev);
int err = 0;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand Down Expand Up @@ -882,7 +882,7 @@ static int r8192_wx_set_sens(struct net_device *dev,

short err = 0;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand Down Expand Up @@ -911,7 +911,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
struct r8192_priv *priv = ieee80211_priv(dev);
struct ieee80211_device* ieee = priv->ieee80211;

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand Down Expand Up @@ -1016,7 +1016,7 @@ static int r8192_wx_set_auth(struct net_device *dev,
//printk("====>%s()\n", __FUNCTION__);
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand All @@ -1034,7 +1034,7 @@ static int r8192_wx_set_mlme(struct net_device *dev,
int ret=0;
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand All @@ -1051,7 +1051,7 @@ static int r8192_wx_set_gen_ie(struct net_device *dev,
int ret=0;
struct r8192_priv *priv = ieee80211_priv(dev);

if(priv->bHwRadioOff == true)
if (priv->bHwRadioOff)
return 0;

down(&priv->wx_sem);
Expand Down

0 comments on commit f500e25

Please sign in to comment.