iwlwifi: dvm: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly using the fallthrough pseudo-keyword as a replacement for a number of "fall through" markings. Notice that Clang doesn't recognize "fall through" comments as implicit fall-through. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20201117155904.GA14551@embeddedor
This commit is contained in:
parent
5a2abdcadc
commit
ff08b5368c
@ -619,7 +619,7 @@ static int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
|||||||
switch (key->cipher) {
|
switch (key->cipher) {
|
||||||
case WLAN_CIPHER_SUITE_TKIP:
|
case WLAN_CIPHER_SUITE_TKIP:
|
||||||
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
|
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case WLAN_CIPHER_SUITE_CCMP:
|
case WLAN_CIPHER_SUITE_CCMP:
|
||||||
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
|
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
|
||||||
break;
|
break;
|
||||||
|
@ -582,7 +582,7 @@ static int iwlagn_set_decrypted_flag(struct iwl_priv *priv,
|
|||||||
if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
|
if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
|
||||||
RX_RES_STATUS_BAD_KEY_TTAK)
|
RX_RES_STATUS_BAD_KEY_TTAK)
|
||||||
break;
|
break;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case RX_RES_STATUS_SEC_TYPE_WEP:
|
case RX_RES_STATUS_SEC_TYPE_WEP:
|
||||||
if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
|
if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
|
||||||
RX_RES_STATUS_BAD_ICV_MIC) {
|
RX_RES_STATUS_BAD_ICV_MIC) {
|
||||||
@ -591,7 +591,7 @@ static int iwlagn_set_decrypted_flag(struct iwl_priv *priv,
|
|||||||
IWL_DEBUG_RX(priv, "Packet destroyed\n");
|
IWL_DEBUG_RX(priv, "Packet destroyed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case RX_RES_STATUS_SEC_TYPE_CCMP:
|
case RX_RES_STATUS_SEC_TYPE_CCMP:
|
||||||
if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
|
if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) ==
|
||||||
RX_RES_STATUS_DECRYPT_OK) {
|
RX_RES_STATUS_DECRYPT_OK) {
|
||||||
@ -720,7 +720,7 @@ static u32 iwlagn_translate_rx_status(struct iwl_priv *priv, u32 decrypt_in)
|
|||||||
decrypt_out |= RX_RES_STATUS_BAD_KEY_TTAK;
|
decrypt_out |= RX_RES_STATUS_BAD_KEY_TTAK;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
if (!(decrypt_in & RX_MPDU_RES_STATUS_ICV_OK))
|
if (!(decrypt_in & RX_MPDU_RES_STATUS_ICV_OK))
|
||||||
decrypt_out |= RX_RES_STATUS_BAD_ICV_MIC;
|
decrypt_out |= RX_RES_STATUS_BAD_ICV_MIC;
|
||||||
|
@ -405,7 +405,7 @@ static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time)
|
|||||||
limit = (limits[1] * 98) / 100 - IWL_CHANNEL_TUNE_TIME * 2;
|
limit = (limits[1] * 98) / 100 - IWL_CHANNEL_TUNE_TIME * 2;
|
||||||
limit /= 2;
|
limit /= 2;
|
||||||
dwell_time = min(limit, dwell_time);
|
dwell_time = min(limit, dwell_time);
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case 1:
|
case 1:
|
||||||
limit = (limits[0] * 98) / 100 - IWL_CHANNEL_TUNE_TIME * 2;
|
limit = (limits[0] * 98) / 100 - IWL_CHANNEL_TUNE_TIME * 2;
|
||||||
limit /= n_active;
|
limit /= n_active;
|
||||||
|
@ -1109,7 +1109,7 @@ static int iwlagn_send_sta_key(struct iwl_priv *priv,
|
|||||||
break;
|
break;
|
||||||
case WLAN_CIPHER_SUITE_WEP104:
|
case WLAN_CIPHER_SUITE_WEP104:
|
||||||
key_flags |= STA_KEY_FLG_KEY_SIZE_MSK;
|
key_flags |= STA_KEY_FLG_KEY_SIZE_MSK;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case WLAN_CIPHER_SUITE_WEP40:
|
case WLAN_CIPHER_SUITE_WEP40:
|
||||||
key_flags |= STA_KEY_FLG_WEP;
|
key_flags |= STA_KEY_FLG_WEP;
|
||||||
memcpy(&sta_cmd.key.key[3], keyconf->key, keyconf->keylen);
|
memcpy(&sta_cmd.key.key[3], keyconf->key, keyconf->keylen);
|
||||||
|
@ -210,7 +210,7 @@ static void iwlagn_tx_cmd_build_hwcrypto(struct iwl_priv *priv,
|
|||||||
|
|
||||||
case WLAN_CIPHER_SUITE_WEP104:
|
case WLAN_CIPHER_SUITE_WEP104:
|
||||||
tx_cmd->sec_ctl |= TX_CMD_SEC_KEY128;
|
tx_cmd->sec_ctl |= TX_CMD_SEC_KEY128;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case WLAN_CIPHER_SUITE_WEP40:
|
case WLAN_CIPHER_SUITE_WEP40:
|
||||||
tx_cmd->sec_ctl |= (TX_CMD_SEC_WEP |
|
tx_cmd->sec_ctl |= (TX_CMD_SEC_WEP |
|
||||||
(keyconf->keyidx & TX_CMD_SEC_MSK) << TX_CMD_SEC_SHIFT);
|
(keyconf->keyidx & TX_CMD_SEC_MSK) << TX_CMD_SEC_SHIFT);
|
||||||
|
Loading…
Reference in New Issue
Block a user