99f971b95fdbc6059d6ee6a86cff3a4fa998cf94
[openwrt/staging/dangole.git] /
1 From 916e6bbcfcff6cc5d7d33bba8557a30f3af50326 Mon Sep 17 00:00:00 2001
2 From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
3 Date: Mon, 22 Oct 2018 22:46:03 +0200
4 Subject: [PATCH 09/28] rt2x00: rt2800lib: mark expected switch fall-throughs
5
6 In preparation to enabling -Wimplicit-fallthrough, mark switch cases
7 where we are expecting to fall through.
8
9 Addresses-Coverity-ID: 145198 ("Missing break in switch")
10 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
11 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
12 ---
13 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++++
14 1 file changed, 4 insertions(+)
15
16 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
17 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
18 @@ -2482,6 +2482,7 @@ static void rt2800_config_channel_rf3052
19 switch (rt2x00dev->default_ant.tx_chain_num) {
20 case 1:
21 rt2x00_set_field8(&rfcsr, RFCSR1_TX1_PD, 1);
22 + /* fall through */
23 case 2:
24 rt2x00_set_field8(&rfcsr, RFCSR1_TX2_PD, 1);
25 break;
26 @@ -2490,6 +2491,7 @@ static void rt2800_config_channel_rf3052
27 switch (rt2x00dev->default_ant.rx_chain_num) {
28 case 1:
29 rt2x00_set_field8(&rfcsr, RFCSR1_RX1_PD, 1);
30 + /* fall through */
31 case 2:
32 rt2x00_set_field8(&rfcsr, RFCSR1_RX2_PD, 1);
33 break;
34 @@ -9457,8 +9459,10 @@ static int rt2800_probe_hw_mode(struct r
35 switch (rx_chains) {
36 case 3:
37 spec->ht.mcs.rx_mask[2] = 0xff;
38 + /* fall through */
39 case 2:
40 spec->ht.mcs.rx_mask[1] = 0xff;
41 + /* fall through */
42 case 1:
43 spec->ht.mcs.rx_mask[0] = 0xff;
44 spec->ht.mcs.rx_mask[4] = 0x1; /* MCS32 */