staging: rtl8192u: remove bool comparisons
Remove explicit true/false comparisons to bool variables. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
047db9915e
commit
f9bd549aa9
|
@ -1014,7 +1014,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
|
||||||
goto rx_dropped;
|
goto rx_dropped;
|
||||||
|
|
||||||
// if QoS enabled, should check the sequence for each of the AC
|
// if QoS enabled, should check the sequence for each of the AC
|
||||||
if( (ieee->pHTInfo->bCurRxReorderEnable == false) || !ieee->current_network.qos_data.active|| !IsDataFrame(skb->data) || IsLegacyDataFrame(skb->data)){
|
if ((!ieee->pHTInfo->bCurRxReorderEnable) || !ieee->current_network.qos_data.active|| !IsDataFrame(skb->data) || IsLegacyDataFrame(skb->data)) {
|
||||||
if (is_duplicate_packet(ieee, hdr))
|
if (is_duplicate_packet(ieee, hdr))
|
||||||
goto rx_dropped;
|
goto rx_dropped;
|
||||||
|
|
||||||
|
@ -1307,7 +1307,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
|
||||||
}
|
}
|
||||||
|
|
||||||
//added by amy for reorder
|
//added by amy for reorder
|
||||||
if(ieee->pHTInfo->bCurRxReorderEnable == false ||pTS == NULL){
|
if (!ieee->pHTInfo->bCurRxReorderEnable || pTS == NULL){
|
||||||
//added by amy for reorder
|
//added by amy for reorder
|
||||||
for(i = 0; i<rxb->nr_subframes; i++) {
|
for(i = 0; i<rxb->nr_subframes; i++) {
|
||||||
struct sk_buff *sub_skb = rxb->subframes[i];
|
struct sk_buff *sub_skb = rxb->subframes[i];
|
||||||
|
|
|
@ -1964,7 +1964,7 @@ static void ieee80211_check_auth_response(struct ieee80211_device *ieee,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ieee->current_network.mode == IEEE_N_24G &&
|
if (ieee->current_network.mode == IEEE_N_24G &&
|
||||||
bHalfSupportNmode == true) {
|
bHalfSupportNmode) {
|
||||||
netdev_dbg(ieee->dev, "enter half N mode\n");
|
netdev_dbg(ieee->dev, "enter half N mode\n");
|
||||||
ieee->bHalfWirelessN24GMode = true;
|
ieee->bHalfWirelessN24GMode = true;
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -336,12 +336,12 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
|
||||||
printk("===>can't get TS\n");
|
printk("===>can't get TS\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pTxTs->TxAdmittedBARecord.bValid == false)
|
if (!pTxTs->TxAdmittedBARecord.bValid)
|
||||||
{
|
{
|
||||||
TsStartAddBaProcess(ieee, pTxTs);
|
TsStartAddBaProcess(ieee, pTxTs);
|
||||||
goto FORCED_AGG_SETTING;
|
goto FORCED_AGG_SETTING;
|
||||||
}
|
}
|
||||||
else if (pTxTs->bUsingBa == false)
|
else if (!pTxTs->bUsingBa)
|
||||||
{
|
{
|
||||||
if (SN_LESS(pTxTs->TxAdmittedBARecord.BaStartSeqCtrl.field.SeqNum, (pTxTs->TxCurSeq+1)%4096))
|
if (SN_LESS(pTxTs->TxAdmittedBARecord.BaStartSeqCtrl.field.SeqNum, (pTxTs->TxCurSeq+1)%4096))
|
||||||
pTxTs->bUsingBa = true;
|
pTxTs->bUsingBa = true;
|
||||||
|
|
|
@ -364,8 +364,8 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
|
||||||
printk("====================>rx ADDBAREQ from :%pM\n", dst);
|
printk("====================>rx ADDBAREQ from :%pM\n", dst);
|
||||||
//some other capability is not ready now.
|
//some other capability is not ready now.
|
||||||
if ((ieee->current_network.qos_data.active == 0) ||
|
if ((ieee->current_network.qos_data.active == 0) ||
|
||||||
(ieee->pHTInfo->bCurrentHTSupport == false)) //||
|
(!ieee->pHTInfo->bCurrentHTSupport)) //||
|
||||||
// (ieee->pStaQos->bEnableRxImmBA == false) )
|
// (!ieee->pStaQos->bEnableRxImmBA) )
|
||||||
{
|
{
|
||||||
rc = ADDBA_STATUS_REFUSED;
|
rc = ADDBA_STATUS_REFUSED;
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "Failed to reply on ADDBA_REQ as some capability is not ready(%d, %d)\n", ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport);
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "Failed to reply on ADDBA_REQ as some capability is not ready(%d, %d)\n", ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport);
|
||||||
|
@ -462,8 +462,8 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
|
||||||
// Check the capability
|
// Check the capability
|
||||||
// Since we can always receive A-MPDU, we just check if it is under HT mode.
|
// Since we can always receive A-MPDU, we just check if it is under HT mode.
|
||||||
if (ieee->current_network.qos_data.active == 0 ||
|
if (ieee->current_network.qos_data.active == 0 ||
|
||||||
ieee->pHTInfo->bCurrentHTSupport == false ||
|
!ieee->pHTInfo->bCurrentHTSupport ||
|
||||||
ieee->pHTInfo->bCurrentAMPDUEnable == false) {
|
!ieee->pHTInfo->bCurrentAMPDUEnable) {
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "reject to ADDBA_RSP as some capability is not ready(%d, %d, %d)\n",ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport, ieee->pHTInfo->bCurrentAMPDUEnable);
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "reject to ADDBA_RSP as some capability is not ready(%d, %d, %d)\n",ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport, ieee->pHTInfo->bCurrentAMPDUEnable);
|
||||||
ReasonCode = DELBA_REASON_UNKNOWN_BA;
|
ReasonCode = DELBA_REASON_UNKNOWN_BA;
|
||||||
goto OnADDBARsp_Reject;
|
goto OnADDBARsp_Reject;
|
||||||
|
@ -502,7 +502,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it! \n");
|
IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it! \n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if((pPendingBA->bValid == false) ||(*pDialogToken != pPendingBA->DialogToken))
|
else if((!pPendingBA->bValid) ||(*pDialogToken != pPendingBA->DialogToken))
|
||||||
{
|
{
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "OnADDBARsp(): Recv ADDBA Rsp. BA invalid, DELBA! \n");
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "OnADDBARsp(): Recv ADDBA Rsp. BA invalid, DELBA! \n");
|
||||||
ReasonCode = DELBA_REASON_UNKNOWN_BA;
|
ReasonCode = DELBA_REASON_UNKNOWN_BA;
|
||||||
|
@ -582,7 +582,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ieee->current_network.qos_data.active == 0 ||
|
if (ieee->current_network.qos_data.active == 0 ||
|
||||||
ieee->pHTInfo->bCurrentHTSupport == false )
|
!ieee->pHTInfo->bCurrentHTSupport)
|
||||||
{
|
{
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "received DELBA while QOS or HT is not supported(%d, %d)\n",ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport);
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "received DELBA while QOS or HT is not supported(%d, %d)\n",ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -224,9 +224,9 @@ static bool IsHTHalfNmode40Bandwidth(struct ieee80211_device *ieee)
|
||||||
bool retValue = false;
|
bool retValue = false;
|
||||||
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
||||||
|
|
||||||
if(pHTInfo->bCurrentHTSupport == false ) // wireless is n mode
|
if(!pHTInfo->bCurrentHTSupport) // wireless is n mode
|
||||||
retValue = false;
|
retValue = false;
|
||||||
else if(pHTInfo->bRegBW40MHz == false) // station supports 40 bw
|
else if(!pHTInfo->bRegBW40MHz) // station supports 40 bw
|
||||||
retValue = false;
|
retValue = false;
|
||||||
else if(!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) // station in half n mode
|
else if(!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) // station in half n mode
|
||||||
retValue = false;
|
retValue = false;
|
||||||
|
@ -243,7 +243,7 @@ static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz)
|
||||||
bool retValue = false;
|
bool retValue = false;
|
||||||
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
||||||
|
|
||||||
if(pHTInfo->bCurrentHTSupport == false ) // wireless is n mode
|
if(!pHTInfo->bCurrentHTSupport) // wireless is n mode
|
||||||
retValue = false;
|
retValue = false;
|
||||||
else if(!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) // station in half n mode
|
else if(!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) // station in half n mode
|
||||||
retValue = false;
|
retValue = false;
|
||||||
|
@ -675,7 +675,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le
|
||||||
if ( (ieee->iw_mode == IW_MODE_ADHOC) || (ieee->iw_mode == IW_MODE_MASTER)) //ap mode is not currently supported
|
if ( (ieee->iw_mode == IW_MODE_ADHOC) || (ieee->iw_mode == IW_MODE_MASTER)) //ap mode is not currently supported
|
||||||
{
|
{
|
||||||
pHTInfoEle->ControlChl = ieee->current_network.channel;
|
pHTInfoEle->ControlChl = ieee->current_network.channel;
|
||||||
pHTInfoEle->ExtChlOffset = ((pHT->bRegBW40MHz == false)?HT_EXTCHNL_OFFSET_NO_EXT:
|
pHTInfoEle->ExtChlOffset = ((!pHT->bRegBW40MHz)?HT_EXTCHNL_OFFSET_NO_EXT:
|
||||||
(ieee->current_network.channel<=6)?
|
(ieee->current_network.channel<=6)?
|
||||||
HT_EXTCHNL_OFFSET_UPPER:HT_EXTCHNL_OFFSET_LOWER);
|
HT_EXTCHNL_OFFSET_UPPER:HT_EXTCHNL_OFFSET_LOWER);
|
||||||
pHTInfoEle->RecommemdedTxWidth = pHT->bRegBW40MHz;
|
pHTInfoEle->RecommemdedTxWidth = pHT->bRegBW40MHz;
|
||||||
|
@ -945,7 +945,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
|
||||||
static u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33}; // For 11n EWC definition, 2007.07.17, by Emily
|
static u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33}; // For 11n EWC definition, 2007.07.17, by Emily
|
||||||
static u8 EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34}; // For 11n EWC definition, 2007.07.17, by Emily
|
static u8 EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34}; // For 11n EWC definition, 2007.07.17, by Emily
|
||||||
|
|
||||||
if (pHTInfo->bCurrentHTSupport == false) {
|
if (!pHTInfo->bCurrentHTSupport) {
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "<=== HTOnAssocRsp(): HT_DISABLE\n");
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "<=== HTOnAssocRsp(): HT_DISABLE\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -976,7 +976,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
|
||||||
//
|
//
|
||||||
HTSetConnectBwMode(ieee, (HT_CHANNEL_WIDTH)(pPeerHTCap->ChlWidth), (HT_EXTCHNL_OFFSET)(pPeerHTInfo->ExtChlOffset));
|
HTSetConnectBwMode(ieee, (HT_CHANNEL_WIDTH)(pPeerHTCap->ChlWidth), (HT_EXTCHNL_OFFSET)(pPeerHTInfo->ExtChlOffset));
|
||||||
|
|
||||||
// if(pHTInfo->bCurBW40MHz == true)
|
// if (pHTInfo->bCurBW40MHz)
|
||||||
pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1)?true:false);
|
pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1)?true:false);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1341,7 +1341,7 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, HT_CHANNEL_WIDTH Bandwidt
|
||||||
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
||||||
// u32 flags = 0;
|
// u32 flags = 0;
|
||||||
|
|
||||||
if(pHTInfo->bRegBW40MHz == false)
|
if(!pHTInfo->bRegBW40MHz)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -584,7 +584,7 @@ void RemoveAllTS(struct ieee80211_device *ieee)
|
||||||
|
|
||||||
void TsStartAddBaProcess(struct ieee80211_device *ieee, PTX_TS_RECORD pTxTS)
|
void TsStartAddBaProcess(struct ieee80211_device *ieee, PTX_TS_RECORD pTxTS)
|
||||||
{
|
{
|
||||||
if(pTxTS->bAddBaReqInProgress == false)
|
if(!pTxTS->bAddBaReqInProgress)
|
||||||
{
|
{
|
||||||
pTxTS->bAddBaReqInProgress = true;
|
pTxTS->bAddBaReqInProgress = true;
|
||||||
if(pTxTS->bAddBaReqDelayed)
|
if(pTxTS->bAddBaReqDelayed)
|
||||||
|
|
|
@ -2047,7 +2047,7 @@ static bool GetHalfNmodeSupportByAPs819xUsb(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 (ieee->bHalfWirelessN24GMode == true)
|
if (ieee->bHalfWirelessN24GMode)
|
||||||
Reval = true;
|
Reval = true;
|
||||||
else
|
else
|
||||||
Reval = false;
|
Reval = false;
|
||||||
|
@ -2762,7 +2762,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
|
||||||
//
|
//
|
||||||
#ifdef TO_DO_LIST
|
#ifdef TO_DO_LIST
|
||||||
if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
|
if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
|
||||||
if (pMgntInfo->RegRfOff == true) { /* User disable RF via registry. */
|
if (pMgntInfo->RegRfOff) { /* User disable RF via registry. */
|
||||||
RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
|
RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
|
||||||
MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
|
MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
|
||||||
// Those actions will be discard in MgntActSet_RF_State because of the same state
|
// Those actions will be discard in MgntActSet_RF_State because of the same state
|
||||||
|
@ -4406,7 +4406,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
|
||||||
/* RTL8190 set this bit to indicate that Hw does not decrypt packet */
|
/* RTL8190 set this bit to indicate that Hw does not decrypt packet */
|
||||||
stats->Decrypted = !desc->SWDec;
|
stats->Decrypted = !desc->SWDec;
|
||||||
|
|
||||||
if ((priv->ieee80211->pHTInfo->bCurrentHTSupport == true) && (priv->ieee80211->pairwise_key_type == KEY_TYPE_CCMP))
|
if ((priv->ieee80211->pHTInfo->bCurrentHTSupport) &&
|
||||||
|
(priv->ieee80211->pairwise_key_type == KEY_TYPE_CCMP))
|
||||||
stats->bHwError = false;
|
stats->bHwError = false;
|
||||||
else
|
else
|
||||||
stats->bHwError = stats->bCRC|stats->bICV;
|
stats->bHwError = stats->bCRC|stats->bICV;
|
||||||
|
|
|
@ -438,7 +438,7 @@ static void dm_bandwidth_autoswitch(struct net_device *dev)
|
||||||
|
|
||||||
if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 || !priv->ieee80211->bandwidth_auto_switch.bautoswitch_enable)
|
if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 || !priv->ieee80211->bandwidth_auto_switch.bautoswitch_enable)
|
||||||
return;
|
return;
|
||||||
if (priv->ieee80211->bandwidth_auto_switch.bforced_tx20Mhz == false) { /* If send packets in 40 Mhz in 20/40 */
|
if (!priv->ieee80211->bandwidth_auto_switch.bforced_tx20Mhz) { /* If send packets in 40 Mhz in 20/40 */
|
||||||
if (priv->undecorated_smoothed_pwdb <= priv->ieee80211->bandwidth_auto_switch.threshold_40Mhzto20Mhz)
|
if (priv->undecorated_smoothed_pwdb <= priv->ieee80211->bandwidth_auto_switch.threshold_40Mhzto20Mhz)
|
||||||
priv->ieee80211->bandwidth_auto_switch.bforced_tx20Mhz = true;
|
priv->ieee80211->bandwidth_auto_switch.bforced_tx20Mhz = true;
|
||||||
} else { /* in force send packets in 20 Mhz in 20/40 */
|
} else { /* in force send packets in 20 Mhz in 20/40 */
|
||||||
|
@ -1731,7 +1731,7 @@ static void dm_dig_init(struct net_device *dev)
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
static void dm_ctrl_initgain_byrssi(struct net_device *dev)
|
static void dm_ctrl_initgain_byrssi(struct net_device *dev)
|
||||||
{
|
{
|
||||||
if (dm_digtable.dig_enable_flag == false)
|
if (!dm_digtable.dig_enable_flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (dm_digtable.dig_algorithm == DIG_ALGO_BY_FALSE_ALARM)
|
if (dm_digtable.dig_algorithm == DIG_ALGO_BY_FALSE_ALARM)
|
||||||
|
@ -1750,7 +1750,7 @@ static void dm_ctrl_initgain_byrssi_by_driverrssi(
|
||||||
u8 i;
|
u8 i;
|
||||||
static u8 fw_dig;
|
static u8 fw_dig;
|
||||||
|
|
||||||
if (dm_digtable.dig_enable_flag == false)
|
if (!dm_digtable.dig_enable_flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*DbgPrint("Dig by Sw Rssi\n");*/
|
/*DbgPrint("Dig by Sw Rssi\n");*/
|
||||||
|
@ -1792,7 +1792,7 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
|
||||||
static u32 reset_cnt;
|
static u32 reset_cnt;
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
if (dm_digtable.dig_enable_flag == false)
|
if (!dm_digtable.dig_enable_flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (dm_digtable.dig_algorithm_switch) {
|
if (dm_digtable.dig_algorithm_switch) {
|
||||||
|
|
Loading…
Reference in New Issue