Commit 7b506ff6 authored by Miaohe Lin's avatar Miaohe Lin Committed by Johannes Berg

net: wireless: Convert to use the preferred fallthrough macro

Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Link: https://lore.kernel.org/r/20200822082323.45495-1-linmiaohe@huawei.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent eee79f80
...@@ -957,7 +957,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, ...@@ -957,7 +957,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
if (!ht_cap->ht_supported && if (!ht_cap->ht_supported &&
chandef->chan->band != NL80211_BAND_6GHZ) chandef->chan->band != NL80211_BAND_6GHZ)
return false; return false;
/* fall through */ fallthrough;
case NL80211_CHAN_WIDTH_20_NOHT: case NL80211_CHAN_WIDTH_20_NOHT:
prohibited_flags |= IEEE80211_CHAN_NO_20MHZ; prohibited_flags |= IEEE80211_CHAN_NO_20MHZ;
width = 20; width = 20;
...@@ -983,7 +983,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, ...@@ -983,7 +983,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
if (chandef->chan->band != NL80211_BAND_6GHZ && if (chandef->chan->band != NL80211_BAND_6GHZ &&
cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ) cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)
return false; return false;
/* fall through */ fallthrough;
case NL80211_CHAN_WIDTH_80: case NL80211_CHAN_WIDTH_80:
prohibited_flags |= IEEE80211_CHAN_NO_80MHZ; prohibited_flags |= IEEE80211_CHAN_NO_80MHZ;
width = 80; width = 80;
......
...@@ -941,7 +941,7 @@ void cfg80211_cac_event(struct net_device *netdev, ...@@ -941,7 +941,7 @@ void cfg80211_cac_event(struct net_device *netdev,
sizeof(struct cfg80211_chan_def)); sizeof(struct cfg80211_chan_def));
queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk); queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk);
cfg80211_sched_dfs_chan_update(rdev); cfg80211_sched_dfs_chan_update(rdev);
/* fall through */ fallthrough;
case NL80211_RADAR_CAC_ABORTED: case NL80211_RADAR_CAC_ABORTED:
wdev->cac_started = false; wdev->cac_started = false;
break; break;
......
...@@ -2105,7 +2105,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2105,7 +2105,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
state->split_start++; state->split_start++;
if (state->split) if (state->split)
break; break;
/* fall through */ fallthrough;
case 1: case 1:
if (nla_put(msg, NL80211_ATTR_CIPHER_SUITES, if (nla_put(msg, NL80211_ATTR_CIPHER_SUITES,
sizeof(u32) * rdev->wiphy.n_cipher_suites, sizeof(u32) * rdev->wiphy.n_cipher_suites,
...@@ -2152,7 +2152,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2152,7 +2152,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
state->split_start++; state->split_start++;
if (state->split) if (state->split)
break; break;
/* fall through */ fallthrough;
case 2: case 2:
if (nl80211_put_iftypes(msg, NL80211_ATTR_SUPPORTED_IFTYPES, if (nl80211_put_iftypes(msg, NL80211_ATTR_SUPPORTED_IFTYPES,
rdev->wiphy.interface_modes)) rdev->wiphy.interface_modes))
...@@ -2160,7 +2160,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2160,7 +2160,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
state->split_start++; state->split_start++;
if (state->split) if (state->split)
break; break;
/* fall through */ fallthrough;
case 3: case 3:
nl_bands = nla_nest_start_noflag(msg, nl_bands = nla_nest_start_noflag(msg,
NL80211_ATTR_WIPHY_BANDS); NL80211_ATTR_WIPHY_BANDS);
...@@ -2187,7 +2187,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2187,7 +2187,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
state->chan_start++; state->chan_start++;
if (state->split) if (state->split)
break; break;
/* fall through */ fallthrough;
default: default:
/* add frequencies */ /* add frequencies */
nl_freqs = nla_nest_start_noflag(msg, nl_freqs = nla_nest_start_noflag(msg,
...@@ -2242,7 +2242,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2242,7 +2242,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
state->split_start++; state->split_start++;
if (state->split) if (state->split)
break; break;
/* fall through */ fallthrough;
case 4: case 4:
nl_cmds = nla_nest_start_noflag(msg, nl_cmds = nla_nest_start_noflag(msg,
NL80211_ATTR_SUPPORTED_COMMANDS); NL80211_ATTR_SUPPORTED_COMMANDS);
...@@ -2271,7 +2271,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2271,7 +2271,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
state->split_start++; state->split_start++;
if (state->split) if (state->split)
break; break;
/* fall through */ fallthrough;
case 5: case 5:
if (rdev->ops->remain_on_channel && if (rdev->ops->remain_on_channel &&
(rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) && (rdev->wiphy.flags & WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL) &&
...@@ -2289,7 +2289,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2289,7 +2289,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
state->split_start++; state->split_start++;
if (state->split) if (state->split)
break; break;
/* fall through */ fallthrough;
case 6: case 6:
#ifdef CONFIG_PM #ifdef CONFIG_PM
if (nl80211_send_wowlan(msg, rdev, state->split)) if (nl80211_send_wowlan(msg, rdev, state->split))
...@@ -2300,7 +2300,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2300,7 +2300,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
#else #else
state->split_start++; state->split_start++;
#endif #endif
/* fall through */ fallthrough;
case 7: case 7:
if (nl80211_put_iftypes(msg, NL80211_ATTR_SOFTWARE_IFTYPES, if (nl80211_put_iftypes(msg, NL80211_ATTR_SOFTWARE_IFTYPES,
rdev->wiphy.software_iftypes)) rdev->wiphy.software_iftypes))
...@@ -2313,7 +2313,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, ...@@ -2313,7 +2313,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
state->split_start++; state->split_start++;
if (state->split) if (state->split)
break; break;
/* fall through */ fallthrough;
case 8: case 8:
if ((rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME) && if ((rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME) &&
nla_put_u32(msg, NL80211_ATTR_DEVICE_AP_SME, nla_put_u32(msg, NL80211_ATTR_DEVICE_AP_SME,
...@@ -5205,7 +5205,7 @@ bool nl80211_put_sta_rate(struct sk_buff *msg, struct rate_info *info, int attr) ...@@ -5205,7 +5205,7 @@ bool nl80211_put_sta_rate(struct sk_buff *msg, struct rate_info *info, int attr)
break; break;
default: default:
WARN_ON(1); WARN_ON(1);
/* fall through */ fallthrough;
case RATE_INFO_BW_20: case RATE_INFO_BW_20:
rate_flg = 0; rate_flg = 0;
break; break;
......
...@@ -1433,7 +1433,7 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy, ...@@ -1433,7 +1433,7 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,
switch (ftype) { switch (ftype) {
case CFG80211_BSS_FTYPE_BEACON: case CFG80211_BSS_FTYPE_BEACON:
ies->from_beacon = true; ies->from_beacon = true;
/* fall through */ fallthrough;
case CFG80211_BSS_FTYPE_UNKNOWN: case CFG80211_BSS_FTYPE_UNKNOWN:
rcu_assign_pointer(tmp.pub.beacon_ies, ies); rcu_assign_pointer(tmp.pub.beacon_ies, ies);
break; break;
......
...@@ -205,7 +205,7 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev, ...@@ -205,7 +205,7 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev,
return err; return err;
case CFG80211_CONN_ASSOC_FAILED_TIMEOUT: case CFG80211_CONN_ASSOC_FAILED_TIMEOUT:
*treason = NL80211_TIMEOUT_ASSOC; *treason = NL80211_TIMEOUT_ASSOC;
/* fall through */ fallthrough;
case CFG80211_CONN_ASSOC_FAILED: case CFG80211_CONN_ASSOC_FAILED:
cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
NULL, 0, NULL, 0,
...@@ -215,7 +215,7 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev, ...@@ -215,7 +215,7 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev,
cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
NULL, 0, NULL, 0,
WLAN_REASON_DEAUTH_LEAVING, false); WLAN_REASON_DEAUTH_LEAVING, false);
/* fall through */ fallthrough;
case CFG80211_CONN_ABANDON: case CFG80211_CONN_ABANDON:
/* free directly, disconnected event already sent */ /* free directly, disconnected event already sent */
cfg80211_sme_free(wdev); cfg80211_sme_free(wdev);
......
...@@ -198,7 +198,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband) ...@@ -198,7 +198,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband)
sband->bitrates[i].flags |= sband->bitrates[i].flags |=
IEEE80211_RATE_MANDATORY_G; IEEE80211_RATE_MANDATORY_G;
want--; want--;
/* fall through */ fallthrough;
default: default:
sband->bitrates[i].flags |= sband->bitrates[i].flags |=
IEEE80211_RATE_ERP_G; IEEE80211_RATE_ERP_G;
...@@ -1008,7 +1008,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, ...@@ -1008,7 +1008,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
if (dev->ieee80211_ptr->use_4addr) if (dev->ieee80211_ptr->use_4addr)
break; break;
/* fall through */ fallthrough;
case NL80211_IFTYPE_OCB: case NL80211_IFTYPE_OCB:
case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_P2P_CLIENT:
case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_ADHOC:
......
...@@ -1334,7 +1334,7 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) ...@@ -1334,7 +1334,7 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
wstats.qual.qual = sig + 110; wstats.qual.qual = sig + 110;
break; break;
} }
/* fall through */ fallthrough;
case CFG80211_SIGNAL_TYPE_UNSPEC: case CFG80211_SIGNAL_TYPE_UNSPEC:
if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_SIGNAL)) { if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_SIGNAL)) {
wstats.qual.updated |= IW_QUAL_LEVEL_UPDATED; wstats.qual.updated |= IW_QUAL_LEVEL_UPDATED;
...@@ -1343,7 +1343,7 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) ...@@ -1343,7 +1343,7 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
wstats.qual.qual = sinfo.signal; wstats.qual.qual = sinfo.signal;
break; break;
} }
/* fall through */ fallthrough;
default: default:
wstats.qual.updated |= IW_QUAL_LEVEL_INVALID; wstats.qual.updated |= IW_QUAL_LEVEL_INVALID;
wstats.qual.updated |= IW_QUAL_QUAL_INVALID; wstats.qual.updated |= IW_QUAL_QUAL_INVALID;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment