mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 12:11:59 +02:00
staging: rtl8723bs: core/rtw_mlme_ext.c: flatten indentation with early loop continue in OnAssocReq()
Replace large if (memcmp(p+2, WMM_IE, 6)) inside the for (;;) loop, which ends with a break, with an early continue. This reduces deep nesting and is purely stylistic. Signed-off-by: William Hansen-Baird <william.hansen.baird@gmail.com> Link: https://patch.msgid.link/20260113211433.89512-2-william.hansen.baird@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ccfab310ee
commit
f51af069a9
|
|
@ -1184,46 +1184,47 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
|||
if (!p)
|
||||
break;
|
||||
|
||||
if (!memcmp(p+2, WMM_IE, 6)) {
|
||||
|
||||
pstat->flags |= WLAN_STA_WME;
|
||||
|
||||
pstat->qos_option = 1;
|
||||
pstat->qos_info = *(p+8);
|
||||
|
||||
pstat->max_sp_len = (pstat->qos_info>>5)&0x3;
|
||||
|
||||
if ((pstat->qos_info&0xf) != 0xf)
|
||||
pstat->has_legacy_ac = true;
|
||||
else
|
||||
pstat->has_legacy_ac = false;
|
||||
|
||||
if (pstat->qos_info&0xf) {
|
||||
if (pstat->qos_info&BIT(0))
|
||||
pstat->uapsd_vo = BIT(0)|BIT(1);
|
||||
else
|
||||
pstat->uapsd_vo = 0;
|
||||
|
||||
if (pstat->qos_info&BIT(1))
|
||||
pstat->uapsd_vi = BIT(0)|BIT(1);
|
||||
else
|
||||
pstat->uapsd_vi = 0;
|
||||
|
||||
if (pstat->qos_info&BIT(2))
|
||||
pstat->uapsd_bk = BIT(0)|BIT(1);
|
||||
else
|
||||
pstat->uapsd_bk = 0;
|
||||
|
||||
if (pstat->qos_info&BIT(3))
|
||||
pstat->uapsd_be = BIT(0)|BIT(1);
|
||||
else
|
||||
pstat->uapsd_be = 0;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
if (memcmp(p+2, WMM_IE, 6)) {
|
||||
p = p + ie_len + 2;
|
||||
continue;
|
||||
}
|
||||
p = p + ie_len + 2;
|
||||
|
||||
pstat->flags |= WLAN_STA_WME;
|
||||
|
||||
pstat->qos_option = 1;
|
||||
pstat->qos_info = *(p+8);
|
||||
|
||||
pstat->max_sp_len = (pstat->qos_info>>5)&0x3;
|
||||
|
||||
if ((pstat->qos_info&0xf) != 0xf)
|
||||
pstat->has_legacy_ac = true;
|
||||
else
|
||||
pstat->has_legacy_ac = false;
|
||||
|
||||
if (pstat->qos_info&0xf) {
|
||||
if (pstat->qos_info&BIT(0))
|
||||
pstat->uapsd_vo = BIT(0)|BIT(1);
|
||||
else
|
||||
pstat->uapsd_vo = 0;
|
||||
|
||||
if (pstat->qos_info&BIT(1))
|
||||
pstat->uapsd_vi = BIT(0)|BIT(1);
|
||||
else
|
||||
pstat->uapsd_vi = 0;
|
||||
|
||||
if (pstat->qos_info&BIT(2))
|
||||
pstat->uapsd_bk = BIT(0)|BIT(1);
|
||||
else
|
||||
pstat->uapsd_bk = 0;
|
||||
|
||||
if (pstat->qos_info&BIT(3))
|
||||
pstat->uapsd_be = BIT(0)|BIT(1);
|
||||
else
|
||||
pstat->uapsd_be = 0;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user