qcacld-3.0: Fix implicit-fallthrough compile error casued by gcc 9.3

Compiling with gcc 9.3 will cause many implicit-fallthrough
compile errors.

Fix is to add keyword fallthrough to resolve such compile error.

Change-Id: I3fdc48b1a9ab2345a47ae644e3217b4d29238364
CRs-Fixed: 2785172
This commit is contained in:
hqu 2020-09-04 22:53:37 +08:00 • committed by snandini
commit f88549090b
15 changed files with 34 additions and 18 deletions

View file

@ -1392,9 +1392,10 @@ QDF_STATUS p2p_status_connect(struct wlan_objmgr_vdev *vdev)
case P2P_CLIENT_DISCONNECTED_STATE:
p2p_debug("No scan before 4-way handshake");
/*
* Fall thru since no scan before 4-way handshake and
* since no scan before 4-way handshake and
* won't enter state P2P_CLIENT_CONNECTING_STATE_2:
*/
/* fallthrough */
case P2P_CLIENT_CONNECTING_STATE_2:
p2p_soc_obj->connection_status =
P2P_CLIENT_COMPLETED_STATE;

View file

@ -758,7 +758,8 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc,
default:
pmo_err("Invalid interface pause setting: %d",
wow_params->interface_pause);
/* intentional fall-through to default */
/* intentional to default */
/* fallthrough */
case PMO_WOW_INTERFACE_PAUSE_DEFAULT:
param.can_suspend_link =
htc_can_suspend_link(

View file

@ -606,7 +606,8 @@ QDF_STATUS tdls_process_cmd(struct scheduler_msg *msg)
break;
case TDLS_CMD_SESSION_DECREMENT:
tdls_process_decrement_active_session(msg->bodyptr);
/*Fall through to take decision on connection tracker.*/
/* take decision on connection tracker */
/* fallthrough */
case TDLS_CMD_SESSION_INCREMENT:
tdls_process_policy_mgr_notification(msg->bodyptr);
break;

View file

@ -4463,6 +4463,7 @@ hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
WLAN_CONTROL_PATH);
break;
}
/* fallthrough */
case eCSR_ROAM_DISASSOCIATED:
{
hdd_debug("****eCSR_ROAM_DISASSOCIATED****");

View file

@ -3841,7 +3841,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit)
case DRIVER_MODULES_UNINITIALIZED:
hdd_nofl_debug("Wlan transitioning (UNINITIALIZED -> CLOSED)");
unint = true;
/* Fall through dont add break here */
/* fallthrough */
case DRIVER_MODULES_CLOSED:
hdd_nofl_debug("Wlan transitioning (CLOSED -> ENABLED)");

View file

@ -477,6 +477,7 @@ int hdd_softap_inspect_dhcp_packet(struct hdd_adapter *adapter,
hdd_sta_info->sta_mac.bytes,
WMA_DHCP_START_IND);
hdd_sta_info->dhcp_nego_status = DHCP_NEGO_IN_PROGRESS;
/* fallthrough */
case QDF_PROTO_DHCP_DECLINE:
if (dir == QDF_RX)
hdd_sta_info->dhcp_phase = DHCP_PHASE_REQUEST;

View file

@ -1467,8 +1467,8 @@ static void __hdd_wmm_do_implicit_qos(struct hdd_wmm_qos_context *qos_context)
* record
*/
hdd_wmm_free_context(qos_context);
/* fall through and start packets flowing */
/* start packets flowing */
/* fallthrough */
case SME_QOS_STATUS_SETUP_SUCCESS_NO_ACM_NO_APSD_RSP:
/* no ACM in effect, no need to setup U-APSD */
case SME_QOS_STATUS_SETUP_SUCCESS_APSD_SET_ALREADY:

View file

@ -433,6 +433,7 @@ static uint8_t lim_calculate_dot11_mode(struct mac_context *mac_ctx,
return MLME_DOT11_MODE_11AC;
else if (bcn->HTCaps.present)
return MLME_DOT11_MODE_11N;
/* fallthrough */
case MLME_DOT11_MODE_11AC:
case MLME_DOT11_MODE_11AC_ONLY:
if ((bcn->VHTCaps.present ||
@ -443,10 +444,12 @@ static uint8_t lim_calculate_dot11_mode(struct mac_context *mac_ctx,
return MLME_DOT11_MODE_11AC;
else if (bcn->HTCaps.present)
return MLME_DOT11_MODE_11N;
/* fallthrough */
case MLME_DOT11_MODE_11N:
case MLME_DOT11_MODE_11N_ONLY:
if (bcn->HTCaps.present)
return MLME_DOT11_MODE_11N;
/* fallthrough */
default:
return new_dot11_mode;
}

View file

@ -1742,6 +1742,7 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
pe_debug("p2p session active drop BTM frame");
break;
}
/* fallthrough */
case WNM_NOTIF_REQUEST:
case WNM_NOTIF_RESPONSE:
rssi = WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info);
@ -1884,7 +1885,8 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
pub_action->Oui[2], pub_action->Oui[3]);
break;
}
/* Fall through to send the frame to supplicant */
/* send the frame to supplicant */
/* fallthrough */
case SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY:
case SIR_MAC_ACTION_2040_BSS_COEXISTENCE:
case SIR_MAC_ACTION_GAS_INITIAL_REQUEST:
@ -2080,7 +2082,7 @@ void lim_process_action_frame_no_session(struct mac_context *mac, uint8_t *pBd)
vendor_specific->Oui[3]);
break;
}
/* Fall through to send the frame to supplicant */
/* fallthrough */
case SIR_MAC_ACTION_GAS_INITIAL_REQUEST:
case SIR_MAC_ACTION_GAS_INITIAL_RESPONSE:
case SIR_MAC_ACTION_GAS_COMEBACK_REQUEST:

View file

@ -2122,7 +2122,7 @@ wlansap_reset_sap_config_add_ie(struct sap_config *config,
}
if (eUPDATE_IE_ALL != updateType)
break;
/* fallthrough */
case eUPDATE_IE_ASSOC_RESP:
if (config->pAssocRespIEsBuffer) {
qdf_mem_free(config->pAssocRespIEsBuffer);
@ -2131,7 +2131,7 @@ wlansap_reset_sap_config_add_ie(struct sap_config *config,
}
if (eUPDATE_IE_ALL != updateType)
break;
/* fallthrough */
case eUPDATE_IE_PROBE_BCN:
if (config->pProbeRespBcnIEsBuffer) {
qdf_mem_free(config->pProbeRespBcnIEsBuffer);
@ -2140,7 +2140,7 @@ wlansap_reset_sap_config_add_ie(struct sap_config *config,
}
if (eUPDATE_IE_ALL != updateType)
break;
/* fallthrough */
default:
if (eUPDATE_IE_ALL != updateType)
sap_err("Invalid buffer type %d", updateType);

View file

@ -249,6 +249,7 @@ QDF_STATUS sme_check_ft_status(mac_handle_t mac_handle, uint32_t session_id)
sme_release_global_lock(&mac->sme);
return QDF_STATUS_SUCCESS;
}
/* fallthrough */
default:
sme_debug("Unhandled state:%d", session->ftSmeContext.FTState);
status = QDF_STATUS_E_FAILURE;

View file

@ -6204,8 +6204,8 @@ QDF_STATUS csr_roam_process_command(struct mac_context *mac, tSmeCmd *pCommand)
status = QDF_STATUS_E_FAILURE;
break;
}
/* Fall through for success case */
/* for success case */
/* fallthrough */
default:
csr_roam_state_change(mac, eCSR_ROAMING_STATE_JOINING,
sessionId);
@ -19207,6 +19207,7 @@ csr_roam_switch_to_roam_start(struct mac_context *mac, uint8_t vdev_id,
WLAN_ROAMING_IN_PROG);
break;
}
/* fallthrough */
case WLAN_ROAM_INIT:
case WLAN_ROAM_DEINIT:
case WLAN_ROAM_SYNCH_IN_PROG:
@ -19256,8 +19257,9 @@ csr_roam_switch_to_roam_sync(struct mac_context *mac, uint8_t vdev_id,
/*
* transition to WLAN_ROAM_SYNCH_IN_PROG not allowed otherwise
* if we're already RSO stopped, fall through to return failure
* if we're already RSO stopped, return failure
*/
/* fallthrough */
case WLAN_ROAM_INIT:
case WLAN_ROAM_DEINIT:
case WLAN_ROAM_SYNCH_IN_PROG:

View file

@ -735,6 +735,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(struct mac_context *mac,
/* Stop pre-auth to reassoc interval timer */
qdf_mc_timer_stop(&pSession->ftSmeContext.
preAuthReassocIntvlTimer);
/* fallthrough */
case eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING:
csr_neighbor_roam_state_transition(mac,
eCSR_NEIGHBOR_ROAM_STATE_INIT, sessionId);
@ -970,7 +971,8 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
ngbr_roam_info->uOsRequestedHandoff = 0;
break;
}
/* Fall through if the status is SUCCESS */
/* if the status is SUCCESS */
/* fallthrough */
case eCSR_NEIGHBOR_ROAM_STATE_INIT:
/* Reset all the data structures here */
csr_neighbor_roam_reset_init_state_control_info(mac,

View file

@ -4800,7 +4800,7 @@ static QDF_STATUS sme_qos_process_handoff_assoc_req_ev(struct mac_context *mac,
__func__, __LINE__);
break;
}
/* fallthrough */
case SME_QOS_CLOSED:
case SME_QOS_INIT:
default:
@ -6796,8 +6796,9 @@ static QDF_STATUS sme_qos_add_ts_failure_fnp(struct mac_context *mac, tListElem
break;
case SME_QOS_REASON_MODIFY:
flow_info->reason = SME_QOS_REASON_REQ_SUCCESS;
/* fallthrough */
case SME_QOS_REASON_REQ_SUCCESS:
/* fallthrough */
/* fallthrough */
default:
inform_hdd = false;
break;

View file

@ -800,7 +800,7 @@ static int32_t wma_set_priv_cfg(tp_wma_handle wma_handle,
adapter_1_quota,
adapter_2_chan_number);
}
break;
default:
wma_err("Invalid wma config command id:%d", privcmd->param_id);
ret = -EINVAL;