From: Mike McCormack Date: Tue, 10 Aug 2010 14:44:45 +0000 (+0900) Subject: Staging: rtl8192e: Don't compare bHwRadioOff with true X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f500e256ddce7c82b80deb2c4dd148742c60d4a0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Staging: rtl8192e: Don't compare bHwRadioOff with true Signed-off-by: Mike McCormack Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 3bfa581a57e1..1098f65f0694 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -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; @@ -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; @@ -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) diff --git a/drivers/staging/rtl8192e/r8192E_dm.c b/drivers/staging/rtl8192e/r8192E_dm.c index 69b834ad8f21..1bef5f3c5744 100644 --- a/drivers/staging/rtl8192e/r8192E_dm.c +++ b/drivers/staging/rtl8192e/r8192E_dm.c @@ -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; diff --git a/drivers/staging/rtl8192e/r8192E_wx.c b/drivers/staging/rtl8192e/r8192E_wx.c index 5742cee81203..5ae65164af5c 100644 --- a/drivers/staging/rtl8192e/r8192E_wx.c +++ b/drivers/staging/rtl8192e/r8192E_wx.c @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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; @@ -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; @@ -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; @@ -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; @@ -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); @@ -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) @@ -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); @@ -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; @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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);