diff options
author | Mateusz Kulikowski <mateusz.kulikowski@gmail.com> | 2015-09-20 21:04:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-29 04:26:06 +0200 |
commit | 4c29207a96885b82175979c723a63de05d5fb2f9 (patch) | |
tree | 5f3e98eaf535f613e32ce108c73031baaaaaa92e /drivers/staging/rtl8192e/rtl8192e | |
parent | staging: rtl8192e: Fix SUSPECT_CODE_INDENT warnings (diff) | |
download | linux-dev-4c29207a96885b82175979c723a63de05d5fb2f9.tar.xz linux-dev-4c29207a96885b82175979c723a63de05d5fb2f9.zip |
staging: rtl8192e: Fix CONSTANT_COMPARISON warnings
Remove yoda conditions where pointed by checkpatch.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index dc8419d4ec76..e8a890c1abd6 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -995,8 +995,8 @@ void rtl92e_link_change(struct net_device *dev) if (ieee->state == RTLLIB_LINKED) { _rtl92e_net_update(dev); priv->ops->update_ratr_table(dev); - if ((KEY_TYPE_WEP40 == ieee->pairwise_key_type) || - (KEY_TYPE_WEP104 == ieee->pairwise_key_type)) + if ((ieee->pairwise_key_type == KEY_TYPE_WEP40) || + (ieee->pairwise_key_type == KEY_TYPE_WEP104)) rtl92e_enable_hw_security_config(dev); } else { rtl92e_writeb(dev, 0x173, 0); @@ -1885,7 +1885,7 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev, praddr = hdr->addr1; bpacket_match_bssid = - ((RTLLIB_FTYPE_CTL != type) && + ((type != RTLLIB_FTYPE_CTL) && ether_addr_equal(priv->rtllib->current_network.bssid, (fc & RTLLIB_FCTL_TODS) ? hdr->addr1 : (fc & RTLLIB_FCTL_FROMDS) ? hdr->addr2 : diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c index 29dd93ac5e93..574129a72f31 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c @@ -43,8 +43,8 @@ void rtl92e_enable_hw_security_config(struct net_device *dev) struct rtllib_device *ieee = priv->rtllib; SECR_value = SCR_TxEncEnable | SCR_RxDecEnable; - if (((KEY_TYPE_WEP40 == ieee->pairwise_key_type) || - (KEY_TYPE_WEP104 == ieee->pairwise_key_type)) && + if (((ieee->pairwise_key_type == KEY_TYPE_WEP40) || + (ieee->pairwise_key_type == KEY_TYPE_WEP104)) && (priv->rtllib->auth_mode != 2)) { SECR_value |= SCR_RxUseDK; SECR_value |= SCR_TxUseDK; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index 18dc3da2420a..606dbbe001e6 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -938,7 +938,7 @@ static int _rtl92e_wx_set_encode_ext(struct net_device *dev, idx--; group = ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY; - if ((!group) || (IW_MODE_ADHOC == ieee->iw_mode) || + if ((!group) || (ieee->iw_mode == IW_MODE_ADHOC) || (alg == KEY_TYPE_WEP40)) { if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40)) alg = KEY_TYPE_WEP104; @@ -1073,7 +1073,7 @@ static int _rtl92e_wx_set_promisc_mode(struct net_device *dev, bPromiscuousOn = info_buf[1]; bFilterSourceStationFrame = info_buf[2]; - if (OID_RT_INTEL_PROMISCUOUS_MODE == oid) { + if (oid == OID_RT_INTEL_PROMISCUOUS_MODE) { ieee->IntelPromiscuousModeInfo.bPromiscuousOn = (bPromiscuousOn) ? (true) : (false); ieee->IntelPromiscuousModeInfo.bFilterSourceStationFrame = |