From 011fedb97f4f2285380597e11ff6eee4df637259 Mon Sep 17 00:00:00 2001 From: chewitt Date: Fri, 30 Oct 2020 07:16:42 +0000 Subject: [PATCH] fix fallthrough errors --- core/rtw_mlme_ext.c | 3 ++- hal/hal_intf.c | 1 + hal/halmac/halmac_88xx/halmac_common_88xx.c | 1 + hal/halmac/halmac_88xx/halmac_mimo_88xx.c | 2 ++ os_dep/linux/ioctl_cfg80211.c | 2 ++ os_dep/linux/ioctl_linux.c | 1 + 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index cc50458..aa02685 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -260,6 +260,7 @@ void rtw_txpwr_init_regd(struct rf_ctl_t *rfctl) ); if (rfctl->regd_name) break; + /* fallthrough */ default: rfctl->regd_name = regd_str(TXPWR_LMT_WW); RTW_PRINT("assign %s for default case\n", regd_str(TXPWR_LMT_WW)); @@ -1344,7 +1345,7 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) ptable->func = &OnAuth; else ptable->func = &OnAuthClient; - /* pass through */ + /* fallthrough */ case WIFI_ASSOCREQ: case WIFI_REASSOCREQ: _mgt_dispatcher(padapter, ptable, precv_frame); diff --git a/hal/hal_intf.c b/hal/hal_intf.c index b69a993..22f124d 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -1082,6 +1082,7 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload) case C2H_EXTEND: sub_id = payload[0]; /* no handle, goto default */ + /* fallthrough */ default: if (phydm_c2H_content_parsing(adapter_to_phydm(adapter), id, plen, payload) != TRUE) diff --git a/hal/halmac/halmac_88xx/halmac_common_88xx.c b/hal/halmac/halmac_88xx/halmac_common_88xx.c index 7e46511..27511df 100644 --- a/hal/halmac/halmac_88xx/halmac_common_88xx.c +++ b/hal/halmac/halmac_88xx/halmac_common_88xx.c @@ -535,6 +535,7 @@ set_hw_value_88xx(struct halmac_adapter *adapter, enum halmac_hw_id hw_id, case HALMAC_HW_TXFIFO_LIFETIME: cfg_txfifo_lt_88xx(adapter, (struct halmac_txfifo_lifetime_cfg *)value); + /* fallthrough */ default: return HALMAC_RET_PARA_NOT_SUPPORT; } diff --git a/hal/halmac/halmac_88xx/halmac_mimo_88xx.c b/hal/halmac/halmac_88xx/halmac_mimo_88xx.c index 5bbc890..5f7baaa 100644 --- a/hal/halmac/halmac_88xx/halmac_mimo_88xx.c +++ b/hal/halmac/halmac_88xx/halmac_mimo_88xx.c @@ -63,8 +63,10 @@ cfg_txbf_88xx(struct halmac_adapter *adapter, u8 userid, enum halmac_bw bw, switch (bw) { case HALMAC_BW_80: tmp42c |= BIT_R_TXBF0_80M; + /* fallthrough */ case HALMAC_BW_40: tmp42c |= BIT_R_TXBF0_40M; + /* fallthrough */ case HALMAC_BW_20: tmp42c |= BIT_R_TXBF0_20M; break; diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 8bc6827..dc4b46d 100755 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -2396,6 +2396,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, case NL80211_IFTYPE_P2P_CLIENT: is_p2p = _TRUE; #endif + /* fallthrough */ case NL80211_IFTYPE_STATION: networkType = Ndis802_11Infrastructure; @@ -2420,6 +2421,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, case NL80211_IFTYPE_P2P_GO: is_p2p = _TRUE; #endif + /* fallthrough */ case NL80211_IFTYPE_AP: networkType = Ndis802_11APMode; diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index 2e38776..f5f0fcf 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -10208,6 +10208,7 @@ static int rtw_priv_mp_get(struct net_device *dev, case MP_DPK: RTW_INFO("set MP_DPK\n"); status = rtw_mp_dpk(dev, info, wdata, extra); + /* fallthrough */ default: status = -EIO; }