Commit 6b6da622 authored by Janani Sankara Babu's avatar Janani Sankara Babu Committed by Greg Kroah-Hartman

Staging:rtl8192e Fix Comparison to False is error prone

This patch removes comparison to False and boolean values in the code
which can be written as !var
Signed-off-by: default avatarJanani Sankara Babu <jananis37@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ca7a855
...@@ -257,8 +257,8 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb) ...@@ -257,8 +257,8 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
pBaStartSeqCtrl = (union sequence_control *)(req + 7); pBaStartSeqCtrl = (union sequence_control *)(req + 7);
RT_TRACE(COMP_DBG, "====>rx ADDBAREQ from : %pM\n", dst); RT_TRACE(COMP_DBG, "====>rx ADDBAREQ from : %pM\n", dst);
if (ieee->current_network.qos_data.active == 0 || if (!ieee->current_network.qos_data.active ||
(ieee->pHTInfo->bCurrentHTSupport == false) || !ieee->pHTInfo->bCurrentHTSupport ||
(ieee->pHTInfo->IOTAction & HT_IOT_ACT_REJECT_ADDBA_REQ)) { (ieee->pHTInfo->IOTAction & HT_IOT_ACT_REJECT_ADDBA_REQ)) {
rc = ADDBA_STATUS_REFUSED; rc = ADDBA_STATUS_REFUSED;
netdev_warn(ieee->dev, netdev_warn(ieee->dev,
...@@ -340,9 +340,9 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb) ...@@ -340,9 +340,9 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
pBaTimeoutVal = (u16 *)(tag + 7); pBaTimeoutVal = (u16 *)(tag + 7);
RT_TRACE(COMP_DBG, "====>rx ADDBARSP from : %pM\n", dst); RT_TRACE(COMP_DBG, "====>rx ADDBARSP from : %pM\n", dst);
if (ieee->current_network.qos_data.active == 0 || if (!ieee->current_network.qos_data.active ||
ieee->pHTInfo->bCurrentHTSupport == false || !ieee->pHTInfo->bCurrentHTSupport ||
ieee->pHTInfo->bCurrentAMPDUEnable == false) { !ieee->pHTInfo->bCurrentAMPDUEnable) {
netdev_warn(ieee->dev, netdev_warn(ieee->dev,
"reject to ADDBA_RSP as some capability is not ready(%d, %d, %d)\n", "reject to ADDBA_RSP as some capability is not ready(%d, %d, %d)\n",
ieee->current_network.qos_data.active, ieee->current_network.qos_data.active,
...@@ -369,7 +369,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb) ...@@ -369,7 +369,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
netdev_dbg(ieee->dev, "%s(): ADDBA response already admitted\n", netdev_dbg(ieee->dev, "%s(): ADDBA response already admitted\n",
__func__); __func__);
return -1; return -1;
} else if ((pPendingBA->bValid == false) || } else if (!pPendingBA->bValid ||
(*pDialogToken != pPendingBA->DialogToken)) { (*pDialogToken != pPendingBA->DialogToken)) {
netdev_warn(ieee->dev, netdev_warn(ieee->dev,
"%s(): ADDBA Rsp. BA invalid, DELBA!\n", "%s(): ADDBA Rsp. BA invalid, DELBA!\n",
...@@ -431,8 +431,8 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb) ...@@ -431,8 +431,8 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
return -1; return -1;
} }
if (ieee->current_network.qos_data.active == 0 || if (!ieee->current_network.qos_data.active ||
ieee->pHTInfo->bCurrentHTSupport == false) { !ieee->pHTInfo->bCurrentHTSupport) {
netdev_warn(ieee->dev, netdev_warn(ieee->dev,
"received DELBA while QOS or HT is not supported(%d, %d)\n", "received DELBA while QOS or HT is not supported(%d, %d)\n",
ieee->current_network. qos_data.active, ieee->current_network. qos_data.active,
......
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