staging: rtl8723bs: clean up logical continuations

Move operators to fix coding style issues and clear checkpatch checks.

CHECK: Logical continuations should be on the previous line

Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
Link: https://lore.kernel.org/r/20201110041008.15847-8-ross.schm.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ross Schmidt 2020-11-09 22:10:06 -06:00 committed by Greg Kroah-Hartman
parent cf05a0086e
commit 8ec06b9ff8
4 changed files with 34 additions and 46 deletions

View File

@ -451,9 +451,8 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
hal_btcoex_LpsNotify(padapter, ps_mode); hal_btcoex_LpsNotify(padapter, ps_mode);
} }
} else { } else {
if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE)) if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE)) ||
|| ((hal_btcoex_IsBtControlLps(padapter)) ((hal_btcoex_IsBtControlLps(padapter)) && (hal_btcoex_IsLpsOn(padapter)))
&& (hal_btcoex_IsLpsOn(padapter)))
) { ) {
u8 pslv; u8 pslv;
@ -472,8 +471,8 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
if (pwrpriv->alives == 0) if (pwrpriv->alives == 0)
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
if (!(hal_btcoex_IsBtDisabled(padapter)) if (!(hal_btcoex_IsBtDisabled(padapter)) &&
&& (hal_btcoex_IsBtControlLps(padapter))) { (hal_btcoex_IsBtControlLps(padapter))) {
u8 val8; u8 val8;
val8 = hal_btcoex_LpsVal(padapter); val8 = hal_btcoex_LpsVal(padapter);
@ -688,9 +687,9 @@ void LPS_Leave_check(struct adapter *padapter)
while (1) { while (1) {
mutex_lock(&pwrpriv->lock); mutex_lock(&pwrpriv->lock);
if (padapter->bSurpriseRemoved if (padapter->bSurpriseRemoved ||
|| !(padapter->hw_init_completed) !(padapter->hw_init_completed) ||
|| (pwrpriv->pwr_mode == PS_MODE_ACTIVE)) (pwrpriv->pwr_mode == PS_MODE_ACTIVE))
bReady = true; bReady = true;
mutex_unlock(&pwrpriv->lock); mutex_unlock(&pwrpriv->lock);
@ -897,8 +896,7 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
if (!(hal_btcoex_IsBtDisabled(padapter)) if (!(hal_btcoex_IsBtDisabled(padapter)) && hal_btcoex_IsBtControlLps(padapter)) {
&& hal_btcoex_IsBtControlLps(padapter)) {
u8 val8; u8 val8;
val8 = hal_btcoex_LpsVal(padapter); val8 = hal_btcoex_LpsVal(padapter);
@ -910,8 +908,7 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task)
unregister_task_alive(pwrctrl, task); unregister_task_alive(pwrctrl, task);
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
&& pwrctrl->bFwCurrentInPSMode) {
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
("%s: cpwm = 0x%02x alives = 0x%08x\n", ("%s: cpwm = 0x%02x alives = 0x%08x\n",
__func__, pwrctrl->cpwm, pwrctrl->alives)); __func__, pwrctrl->cpwm, pwrctrl->alives));
@ -1038,8 +1035,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
if (!(hal_btcoex_IsBtDisabled(padapter)) if (!(hal_btcoex_IsBtDisabled(padapter)) && hal_btcoex_IsBtControlLps(padapter)) {
&& hal_btcoex_IsBtControlLps(padapter)) {
u8 val8; u8 val8;
val8 = hal_btcoex_LpsVal(padapter); val8 = hal_btcoex_LpsVal(padapter);
@ -1051,8 +1047,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter)
unregister_task_alive(pwrctrl, XMIT_ALIVE); unregister_task_alive(pwrctrl, XMIT_ALIVE);
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
&& pwrctrl->bFwCurrentInPSMode) {
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_,
("%s: cpwm = 0x%02x alives = 0x%08x\n", ("%s: cpwm = 0x%02x alives = 0x%08x\n",
__func__, pwrctrl->cpwm, pwrctrl->alives)); __func__, pwrctrl->cpwm, pwrctrl->alives));
@ -1080,8 +1075,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter)
pwrctrl = adapter_to_pwrctl(padapter); pwrctrl = adapter_to_pwrctl(padapter);
pslv = PS_STATE_S0; pslv = PS_STATE_S0;
if (!(hal_btcoex_IsBtDisabled(padapter)) if (!(hal_btcoex_IsBtDisabled(padapter)) && hal_btcoex_IsBtControlLps(padapter)) {
&& hal_btcoex_IsBtControlLps(padapter)) {
u8 val8; u8 val8;
val8 = hal_btcoex_LpsVal(padapter); val8 = hal_btcoex_LpsVal(padapter);
@ -1093,8 +1087,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter)
unregister_task_alive(pwrctrl, CMD_ALIVE); unregister_task_alive(pwrctrl, CMD_ALIVE);
if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
&& pwrctrl->bFwCurrentInPSMode) {
RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_, RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_info_,
("%s: cpwm = 0x%02x alives = 0x%08x\n", ("%s: cpwm = 0x%02x alives = 0x%08x\n",
__func__, pwrctrl->cpwm, pwrctrl->alives)); __func__, pwrctrl->cpwm, pwrctrl->alives));
@ -1226,8 +1219,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
if (!(pwrpriv->bInternalAutoSuspend) && pwrpriv->bInSuspend) { if (!(pwrpriv->bInternalAutoSuspend) && pwrpriv->bInSuspend) {
DBG_871X("%s wait bInSuspend...\n", __func__); DBG_871X("%s wait bInSuspend...\n", __func__);
while (pwrpriv->bInSuspend while (pwrpriv->bInSuspend && jiffies_to_msecs(jiffies - start) <= 3000
&& jiffies_to_msecs(jiffies - start) <= 3000
) { ) {
mdelay(10); mdelay(10);
} }
@ -1267,10 +1259,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
} }
/* TODO: the following checking need to be merged... */ /* TODO: the following checking need to be merged... */
if (padapter->bDriverStopped if (padapter->bDriverStopped || !padapter->bup || !padapter->hw_init_completed) {
|| !padapter->bup
|| !padapter->hw_init_completed
) {
DBG_8192C("%s: bDriverStopped =%d, bup =%d, hw_init_completed =%u\n" DBG_8192C("%s: bDriverStopped =%d, bup =%d, hw_init_completed =%u\n"
, caller , caller
, padapter->bDriverStopped , padapter->bDriverStopped

View File

@ -499,9 +499,8 @@ union recv_frame *decryptor(struct adapter *padapter, union recv_frame *precv_fr
default: default:
break; break;
} }
} else if (prxattrib->bdecrypted == 1 } else if (prxattrib->bdecrypted == 1 && prxattrib->encrypt > 0 &&
&& prxattrib->encrypt > 0 (psecuritypriv->busetkipkey == 1 || prxattrib->encrypt != _TKIP_)
&& (psecuritypriv->busetkipkey == 1 || prxattrib->encrypt != _TKIP_)
) { ) {
DBG_COUNTER(padapter->rx_logs.core_rx_post_decrypt_hw); DBG_COUNTER(padapter->rx_logs.core_rx_post_decrypt_hw);
@ -874,9 +873,9 @@ sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
u8 *myhwaddr = myid(&adapter->eeprompriv); u8 *myhwaddr = myid(&adapter->eeprompriv);
sint bmcast = IS_MCAST(pattrib->dst); sint bmcast = IS_MCAST(pattrib->dst);
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) &&
&& (check_fwstate(pmlmepriv, _FW_LINKED) == true (check_fwstate(pmlmepriv, _FW_LINKED) == true ||
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
) { ) {
/* filter packets that SA is myself or multicast or broadcast */ /* filter packets that SA is myself or multicast or broadcast */
@ -1226,8 +1225,8 @@ sint validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame *precv_
else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) { else if (GetFrameSubType(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) {
if (!memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN)) if (!memcmp(padapter->eeprompriv.mac_addr, GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN))
psta->sta_stats.rx_probersp_pkts++; psta->sta_stats.rx_probersp_pkts++;
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)) else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)) ||
|| is_multicast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data))) is_multicast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)))
psta->sta_stats.rx_probersp_bm_pkts++; psta->sta_stats.rx_probersp_bm_pkts++;
else else
psta->sta_stats.rx_probersp_uo_pkts++; psta->sta_stats.rx_probersp_uo_pkts++;
@ -1388,8 +1387,8 @@ static sint validate_80211w_mgmt(struct adapter *adapter, union recv_frame *prec
subtype = GetFrameSubType(ptr); /* bit(7)~bit(2) */ subtype = GetFrameSubType(ptr); /* bit(7)~bit(2) */
/* only support station mode */ /* only support station mode */
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && check_fwstate(pmlmepriv, _FW_LINKED) if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && check_fwstate(pmlmepriv, _FW_LINKED) &&
&& adapter->securitypriv.binstallBIPkey == true) { adapter->securitypriv.binstallBIPkey == true) {
/* unicast management frame decrypt */ /* unicast management frame decrypt */
if (pattrib->privacy && !(IS_MCAST(GetAddr1Ptr(ptr))) && if (pattrib->privacy && !(IS_MCAST(GetAddr1Ptr(ptr))) &&
(subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || subtype == WIFI_ACTION)) { (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC || subtype == WIFI_ACTION)) {
@ -2601,15 +2600,15 @@ static void rtw_signal_stat_timer_hdl(struct timer_list *t)
} }
if (num_signal_strength == 0) { if (num_signal_strength == 0) {
if (rtw_get_on_cur_ch_time(adapter) == 0 if (rtw_get_on_cur_ch_time(adapter) == 0 ||
|| jiffies_to_msecs(jiffies - rtw_get_on_cur_ch_time(adapter)) < 2 * adapter->mlmeextpriv.mlmext_info.bcn_interval jiffies_to_msecs(jiffies - rtw_get_on_cur_ch_time(adapter)) < 2 * adapter->mlmeextpriv.mlmext_info.bcn_interval
) { ) {
goto set_timer; goto set_timer;
} }
} }
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == true if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == true ||
|| check_fwstate(&adapter->mlmepriv, _FW_LINKED) == false check_fwstate(&adapter->mlmepriv, _FW_LINKED) == false
) { ) {
goto set_timer; goto set_timer;
} }

View File

@ -1584,9 +1584,9 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
if ((!memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (!memcmp(pIE->data, ARTHEROS_OUI2, 3))) { if ((!memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (!memcmp(pIE->data, ARTHEROS_OUI2, 3))) {
DBG_871X("link to Artheros AP\n"); DBG_871X("link to Artheros AP\n");
return HT_IOT_PEER_ATHEROS; return HT_IOT_PEER_ATHEROS;
} else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) } else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) ||
|| (!memcmp(pIE->data, BROADCOM_OUI2, 3)) (!memcmp(pIE->data, BROADCOM_OUI2, 3)) ||
|| (!memcmp(pIE->data, BROADCOM_OUI3, 3))) { (!memcmp(pIE->data, BROADCOM_OUI3, 3))) {
DBG_871X("link to Broadcom AP\n"); DBG_871X("link to Broadcom AP\n");
return HT_IOT_PEER_BROADCOM; return HT_IOT_PEER_BROADCOM;
} else if (!memcmp(pIE->data, MARVELL_OUI, 3)) { } else if (!memcmp(pIE->data, MARVELL_OUI, 3)) {

View File

@ -2173,9 +2173,9 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_SPECIAL) { if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_SPECIAL) {
struct pkt_attrib *attrib = &xmitframe->attrib; struct pkt_attrib *attrib = &xmitframe->attrib;
if (attrib->ether_type == 0x0806 if (attrib->ether_type == 0x0806 ||
|| attrib->ether_type == 0x888e attrib->ether_type == 0x888e ||
|| attrib->dhcp_pkt attrib->dhcp_pkt
) { ) {
DBG_871X(FUNC_ADPT_FMT" ether_type:0x%04x%s\n", FUNC_ADPT_ARG(xmitframe->padapter) DBG_871X(FUNC_ADPT_FMT" ether_type:0x%04x%s\n", FUNC_ADPT_ARG(xmitframe->padapter)
, attrib->ether_type, attrib->dhcp_pkt?" DHCP":""); , attrib->ether_type, attrib->dhcp_pkt?" DHCP":"");