Commit f500e256 authored by Mike McCormack's avatar Mike McCormack Committed by Greg Kroah-Hartman

Staging: rtl8192e: Don't compare bHwRadioOff with true

Signed-off-by: default avatarMike McCormack <mikem@ring3k.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5b3b1a7b
...@@ -1165,7 +1165,7 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, ...@@ -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 */ /* shall not be referred by command packet */
assert(queue_index != TXCMD_QUEUE); assert(queue_index != TXCMD_QUEUE);
if((priv->bHwRadioOff == true)||(!priv->up)) if (priv->bHwRadioOff ||(!priv->up))
{ {
kfree_skb(skb); kfree_skb(skb);
return; return;
...@@ -1213,7 +1213,7 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev) ...@@ -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; u8 queue_index = tcb_desc->queue_index;
if(queue_index != TXCMD_QUEUE){ if(queue_index != TXCMD_QUEUE){
if((priv->bHwRadioOff == true)||(!priv->up)) if (priv->bHwRadioOff ||(!priv->up))
{ {
kfree_skb(skb); kfree_skb(skb);
return 0; return 0;
...@@ -4654,7 +4654,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work) ...@@ -4654,7 +4654,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
static u8 last_time = 0; static u8 last_time = 0;
bool bEnterPS = false; bool bEnterPS = false;
if((!priv->up) || (priv->bHwRadioOff == true)) if ((!priv->up) || priv->bHwRadioOff)
return; return;
if(!priv->up) if(!priv->up)
......
...@@ -2945,14 +2945,14 @@ void dm_gpio_change_rf_callback(struct work_struct *work) ...@@ -2945,14 +2945,14 @@ void dm_gpio_change_rf_callback(struct work_struct *work)
eRfPowerStateToSet = (tmp1byte&BIT1) ? eRfOn : eRfOff; 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"); RT_TRACE(COMP_RF, "gpiochangeRF - HW Radio ON\n");
priv->bHwRadioOff = false; priv->bHwRadioOff = false;
bActuallySet = true; bActuallySet = true;
} }
else if ( (priv->bHwRadioOff == false) && (eRfPowerStateToSet == eRfOff)) else if ( (!priv->bHwRadioOff) && (eRfPowerStateToSet == eRfOff))
{ {
RT_TRACE(COMP_RF, "gpiochangeRF - HW Radio OFF\n"); RT_TRACE(COMP_RF, "gpiochangeRF - HW Radio OFF\n");
priv->bHwRadioOff = true; priv->bHwRadioOff = true;
......
...@@ -70,7 +70,7 @@ static int r8192_wx_set_rate(struct net_device *dev, ...@@ -70,7 +70,7 @@ static int r8192_wx_set_rate(struct net_device *dev,
int ret; int ret;
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -90,7 +90,7 @@ static int r8192_wx_set_rts(struct net_device *dev, ...@@ -90,7 +90,7 @@ static int r8192_wx_set_rts(struct net_device *dev,
int ret; int ret;
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -117,7 +117,7 @@ static int r8192_wx_set_power(struct net_device *dev, ...@@ -117,7 +117,7 @@ static int r8192_wx_set_power(struct net_device *dev,
int ret; int ret;
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -144,7 +144,7 @@ static int r8192_wx_set_rawtx(struct net_device *dev, ...@@ -144,7 +144,7 @@ static int r8192_wx_set_rawtx(struct net_device *dev,
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
int ret; int ret;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -182,7 +182,7 @@ static int r8192_wx_set_crcmon(struct net_device *dev, ...@@ -182,7 +182,7 @@ static int r8192_wx_set_crcmon(struct net_device *dev,
int enable = (parms[0] > 0); int enable = (parms[0] > 0);
short prev = priv->crcmon; short prev = priv->crcmon;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -212,7 +212,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a, ...@@ -212,7 +212,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
RT_RF_POWER_STATE rtState; RT_RF_POWER_STATE rtState;
int ret; int ret;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
rtState = priv->ieee80211->eRFPowerState; rtState = priv->ieee80211->eRFPowerState;
...@@ -383,7 +383,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a, ...@@ -383,7 +383,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
RT_RF_POWER_STATE rtState; RT_RF_POWER_STATE rtState;
int ret; int ret;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
rtState = priv->ieee80211->eRFPowerState; rtState = priv->ieee80211->eRFPowerState;
...@@ -452,7 +452,7 @@ static int r8192_wx_get_scan(struct net_device *dev, struct iw_request_info *a, ...@@ -452,7 +452,7 @@ static int r8192_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
int ret; int ret;
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
if(!priv->up) return -ENETDOWN; if(!priv->up) return -ENETDOWN;
...@@ -474,7 +474,7 @@ static int r8192_wx_set_essid(struct net_device *dev, ...@@ -474,7 +474,7 @@ static int r8192_wx_set_essid(struct net_device *dev,
RT_RF_POWER_STATE rtState; RT_RF_POWER_STATE rtState;
int ret; int ret;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
rtState = priv->ieee80211->eRFPowerState; rtState = priv->ieee80211->eRFPowerState;
...@@ -518,7 +518,7 @@ static int r8192_wx_set_freq(struct net_device *dev, struct iw_request_info *a, ...@@ -518,7 +518,7 @@ static int r8192_wx_set_freq(struct net_device *dev, struct iw_request_info *a,
int ret; int ret;
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -544,7 +544,7 @@ static int r8192_wx_set_frag(struct net_device *dev, ...@@ -544,7 +544,7 @@ static int r8192_wx_set_frag(struct net_device *dev,
{ {
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
if (wrqu->frag.disabled) if (wrqu->frag.disabled)
...@@ -585,7 +585,7 @@ static int r8192_wx_set_wap(struct net_device *dev, ...@@ -585,7 +585,7 @@ static int r8192_wx_set_wap(struct net_device *dev,
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
// struct sockaddr *temp = (struct sockaddr *)awrq; // struct sockaddr *temp = (struct sockaddr *)awrq;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -641,7 +641,7 @@ static int r8192_wx_set_enc(struct net_device *dev, ...@@ -641,7 +641,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
{0x00,0x00,0x00,0x00,0x00,0x03} }; {0x00,0x00,0x00,0x00,0x00,0x03} };
int i; int i;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
if(!priv->up) return -ENETDOWN; if(!priv->up) return -ENETDOWN;
...@@ -786,7 +786,7 @@ static int r8192_wx_set_retry(struct net_device *dev, ...@@ -786,7 +786,7 @@ static int r8192_wx_set_retry(struct net_device *dev,
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
int err = 0; int err = 0;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -882,7 +882,7 @@ static int r8192_wx_set_sens(struct net_device *dev, ...@@ -882,7 +882,7 @@ static int r8192_wx_set_sens(struct net_device *dev,
short err = 0; short err = 0;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -911,7 +911,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev, ...@@ -911,7 +911,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
struct ieee80211_device* ieee = priv->ieee80211; struct ieee80211_device* ieee = priv->ieee80211;
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -1016,7 +1016,7 @@ static int r8192_wx_set_auth(struct net_device *dev, ...@@ -1016,7 +1016,7 @@ static int r8192_wx_set_auth(struct net_device *dev,
//printk("====>%s()\n", __FUNCTION__); //printk("====>%s()\n", __FUNCTION__);
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -1034,7 +1034,7 @@ static int r8192_wx_set_mlme(struct net_device *dev, ...@@ -1034,7 +1034,7 @@ static int r8192_wx_set_mlme(struct net_device *dev,
int ret=0; int ret=0;
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
...@@ -1051,7 +1051,7 @@ static int r8192_wx_set_gen_ie(struct net_device *dev, ...@@ -1051,7 +1051,7 @@ static int r8192_wx_set_gen_ie(struct net_device *dev,
int ret=0; int ret=0;
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
if(priv->bHwRadioOff == true) if (priv->bHwRadioOff)
return 0; return 0;
down(&priv->wx_sem); down(&priv->wx_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment