浏览代码

qcacld-3.0: mac: Replace fallthrough comment with attribute

-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: If9751a727345c94687d6075f41b3e53b1cdf9046
CRs-Fixed: 3217415
David Oladunjoye 2 年之前
父节点
当前提交
b4fdfdda0b

+ 4 - 4
core/mac/src/pe/lim/lim_ft.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -428,7 +428,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 */
+		fallthrough;
 	case MLME_DOT11_MODE_11AC:
 	case MLME_DOT11_MODE_11AC_ONLY:
 		if ((bcn->VHTCaps.present ||
@@ -439,12 +439,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 */
+		fallthrough;
 	case MLME_DOT11_MODE_11N:
 	case MLME_DOT11_MODE_11N_ONLY:
 		if (bcn->HTCaps.present)
 			return MLME_DOT11_MODE_11N;
-		/* fallthrough */
+		fallthrough;
 	default:
 			return new_dot11_mode;
 	}

+ 4 - 4
core/mac/src/pe/lim/lim_process_action_frame.c

@@ -1798,7 +1798,7 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
 				pe_debug("p2p session active drop BTM frame");
 				break;
 			}
-			/* fallthrough */
+			fallthrough;
 		case WNM_NOTIF_REQUEST:
 		case WNM_NOTIF_RESPONSE:
 			rssi = WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info);
@@ -1938,7 +1938,7 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
 				break;
 			}
 			/* send the frame to supplicant */
-			/* fallthrough */
+			fallthrough;
 		case SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY:
 		case SIR_MAC_PROT_ACTION_VENDOR_SPECIFIC_CATEGORY:
 		case SIR_MAC_ACTION_2040_BSS_COEXISTENCE:
@@ -1953,7 +1953,7 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
 						    (void *)action_hdr,
 						    &mac_hdr->sa[0]);
 			}
-			/* fallthrough */
+			fallthrough;
 		case SIR_MAC_ACTION_GAS_INITIAL_RESPONSE:
 		case SIR_MAC_ACTION_GAS_COMEBACK_REQUEST:
 		case SIR_MAC_ACTION_GAS_COMEBACK_RESPONSE:
@@ -2142,7 +2142,7 @@ void lim_process_action_frame_no_session(struct mac_context *mac, uint8_t *pBd)
 					vendor_specific->Oui[3]);
 				break;
 			}
-			/* fallthrough */
+			fallthrough;
 		case SIR_MAC_ACTION_GAS_INITIAL_REQUEST:
 		case SIR_MAC_ACTION_GAS_INITIAL_RESPONSE:
 		case SIR_MAC_ACTION_GAS_COMEBACK_REQUEST:

+ 0 - 1
core/mac/src/pe/lim/lim_process_message_queue.c

@@ -1708,7 +1708,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
 #endif  /* FEATURE_WLAN_ESE */
 	case eWNI_SME_REGISTER_MGMT_FRAME_CB:
 	case eWNI_SME_EXT_CHANGE_CHANNEL:
-		/* fall through */
 	case eWNI_SME_SET_ADDBA_ACCEPT:
 	case eWNI_SME_UPDATE_EDCA_PROFILE:
 	case WNI_SME_UPDATE_MU_EDCA_PARAMS:

+ 3 - 37
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -2029,18 +2029,14 @@ lim_handle_11a_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 
 	switch (bss_dot11_mode) {
 	case MLME_DOT11_MODE_11B:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11G:
 		/* Self 11A and BSS 11B/G cannot connect */
 		pe_err("Self dot11mode 11A, bss dot11mode %d not compatible",
 		       bss_dot11_mode);
 		return QDF_STATUS_E_INVAL;
 	case MLME_DOT11_MODE_11A:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11N:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AC:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AX:
 		*intersected_mode = MLME_DOT11_MODE_11A;
 		break;
@@ -2065,13 +2061,9 @@ lim_handle_11b_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 
 	switch (bss_dot11_mode) {
 	case MLME_DOT11_MODE_11N:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AC:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AX:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11B:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11G:
 		/* Self 11B and BSS 11A cannot connect */
 		*intersected_mode = MLME_DOT11_MODE_11B;
@@ -2101,11 +2093,8 @@ lim_handle_11g_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 
 	switch (bss_dot11_mode) {
 	case MLME_DOT11_MODE_11N:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AC:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AX:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11G:
 		/* Self 11B and BSS 11A cannot connect */
 		*intersected_mode = MLME_DOT11_MODE_11G;
@@ -2142,9 +2131,7 @@ lim_handle_11n_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 		*intersected_mode = MLME_DOT11_MODE_11N;
 		break;
 	case MLME_DOT11_MODE_11AC:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11BE:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AX:
 		if (ie_struct->HTCaps.present) {
 			*intersected_mode = MLME_DOT11_MODE_11N;
@@ -2337,17 +2324,13 @@ lim_handle_11g_only_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 
 	switch (bss_dot11_mode) {
 	case MLME_DOT11_MODE_11N:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AC:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AX:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11G:
 		/* Self 11B and BSS 11A cannot connect */
 		*intersected_mode = MLME_DOT11_MODE_11G;
 		break;
 	case MLME_DOT11_MODE_11B:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11A:
 		pe_err("Self dot11mode 11G only, bss dot11mode %d not compatible",
 		       bss_dot11_mode);
@@ -2377,7 +2360,6 @@ lim_handle_11n_only_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 		*intersected_mode = MLME_DOT11_MODE_11N;
 		break;
 	case MLME_DOT11_MODE_11AC:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AX:
 		if (ie_struct->HTCaps.present) {
 			*intersected_mode = MLME_DOT11_MODE_11N;
@@ -2386,9 +2368,7 @@ lim_handle_11n_only_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 		pe_err("Self dot11mode is 11N ONLY peer is not HT capable");
 		return QDF_STATUS_E_INVAL;
 	case MLME_DOT11_MODE_11G:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11B:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11A:
 		pe_err("Self dot11mode 11N only, bss dot11mode %d not compatible",
 		       bss_dot11_mode);
@@ -2431,11 +2411,8 @@ lim_handle_11ac_only_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 		pe_err("Self dot11mode is 11AC ONLY peer is not VHT capable");
 		return QDF_STATUS_E_INVAL;
 	case MLME_DOT11_MODE_11N:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11G:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11B:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11A:
 		pe_err("Self dot11mode 11AC only, bss dot11mode %d not compatible",
 		       bss_dot11_mode);
@@ -2462,15 +2439,11 @@ lim_handle_11ax_only_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 			*intersected_mode = MLME_DOT11_MODE_11AX;
 			break;
 		}
-		/* fallthrough */
+		fallthrough;
 	case MLME_DOT11_MODE_11N:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AC:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11G:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11B:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11A:
 		pe_err("Self dot11mode 11AX only, bss dot11mode %d not compatible",
 		       bss_dot11_mode);
@@ -2492,15 +2465,10 @@ lim_handle_11be_only_dot11_mode(enum mlme_dot11_mode bss_dot11_mode,
 		*intersected_mode = MLME_DOT11_MODE_11BE;
 		break;
 	case MLME_DOT11_MODE_11N:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AC:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11AX:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11G:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11B:
-		/* fallthrough */
 	case MLME_DOT11_MODE_11A:
 		pe_err("Self dot11mode 11BE only, bss dot11mode %d not compatible",
 		       bss_dot11_mode);
@@ -4242,7 +4210,7 @@ static void lim_process_nb_disconnect_req(struct mac_context *mac_ctx,
 	case REASON_OPER_CHANNEL_DISABLED_INDOOR:
 		/* Set reason REASON_DEAUTH_NETWORK_LEAVING for prop deauth */
 		req->req.reason_code = REASON_DEAUTH_NETWORK_LEAVING;
-		/* fallthrough */
+		fallthrough;
 	case REASON_PREV_AUTH_NOT_VALID:
 	case REASON_CLASS2_FRAME_FROM_NON_AUTH_STA:
 		lim_prepare_and_send_deauth(mac_ctx, pe_session, req);
@@ -5622,7 +5590,6 @@ static void __lim_process_sme_disassoc_req(struct mac_context *mac,
 		break;
 
 	case eLIM_AP_ROLE:
-		/* Fall through */
 		break;
 
 	default:
@@ -5768,7 +5735,6 @@ void __lim_process_sme_disassoc_cnf(struct mac_context *mac, uint32_t *msg_buf)
 		break;
 
 	case eLIM_AP_ROLE:
-		/* Fall through */
 		break;
 	default:                /* eLIM_UNKNOWN_ROLE */
 		pe_err("received unexpected SME_DISASSOC_CNF role %d",
@@ -5908,7 +5874,7 @@ static void __lim_process_sme_deauth_req(struct mac_context *mac_ctx,
 		case eLIM_SME_LINK_EST_STATE:
 			/* Delete all TDLS peers connected before leaving BSS */
 			lim_delete_tdls_peers(mac_ctx, session_entry);
-		/* fallthrough */
+			fallthrough;
 		case eLIM_SME_WT_ASSOC_STATE:
 		case eLIM_SME_JOIN_FAILURE_STATE:
 		case eLIM_SME_IDLE_STATE:

+ 1 - 1
core/mac/src/pe/lim/lim_send_frames_host_roam.c

@@ -975,7 +975,7 @@ void lim_process_rx_scan_handler(struct wlan_objmgr_vdev *vdev,
 	case SIR_SCAN_EVENT_COMPLETED:
 		pe_debug("No.of beacons and probe response received per scan %d",
 			 mac_ctx->lim.beacon_probe_rsp_cnt_per_scan);
-	/* Fall through */
+		fallthrough;
 	case SIR_SCAN_EVENT_FOREIGN_CHANNEL:
 	case SIR_SCAN_EVENT_START_FAILED:
 		if ((mac_ctx->lim.req_id | PREAUTH_REQUESTOR_ID) ==

+ 2 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -8201,10 +8201,10 @@ QDF_STATUS lim_populate_eht_mcs_set(struct mac_context *mac_ctx,
 	switch (session_entry->ch_width) {
 	case CH_WIDTH_320MHZ:
 		lim_populate_eht_320_mcs_set(mac_ctx, rates, peer_eht_caps);
-			/* fall through */
+		fallthrough;
 	case CH_WIDTH_160MHZ:
 		lim_populate_eht_160_mcs_set(mac_ctx, rates, peer_eht_caps);
-			/*fall through */
+		fallthrough;
 	case CH_WIDTH_80MHZ:
 	case CH_WIDTH_40MHZ:
 		lim_populate_eht_le80_mcs_set(mac_ctx, rates, peer_eht_caps);