2015-01-19 19:45:24

by John W. Linville

[permalink] [raw]
Subject: [PATCH] ath5k: document a fall-through case in ath5k_hw_set_opmode

Coverity: CID 114932

Signed-off-by: John W. Linville <[email protected]>
---
I'm guessing this is OK, since it seems to work?

drivers/net/wireless/ath/ath5k/pcu.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index c60d36aa13e2..bf29da5e90da 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -912,6 +912,7 @@ ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype op_mode)
pcu_reg |= AR5K_STA_ID1_KEYSRCH_MODE
| (ah->ah_version == AR5K_AR5210 ?
AR5K_STA_ID1_PWR_SV : 0);
+ /* fall through */
case NL80211_IFTYPE_MONITOR:
pcu_reg |= AR5K_STA_ID1_KEYSRCH_MODE
| (ah->ah_version == AR5K_AR5210 ?
--
2.1.0



2015-01-23 19:18:10

by Kalle Valo

[permalink] [raw]
Subject: Re: ath5k: document a fall-through case in ath5k_hw_set_opmode


> Coverity: CID 114932
>
> Signed-off-by: John W. Linville <[email protected]>
> Acked-by: Nick Kossifidis <[email protected]>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

2015-01-23 16:59:17

by Nick Kossifidis

[permalink] [raw]
Subject: Re: [PATCH] ath5k: document a fall-through case in ath5k_hw_set_opmode

It's AR5210 related, we haven't worked much on that chip but I think that's ok.
AR5K_STA_ID1_NO_PSPOLL is set in every case on AR5210 so this
fall-through makes sure it gets set on station and monitor mode too.

Acked-by: Nick Kossifidis <[email protected]>

2015-01-19 21:09 GMT+02:00 John W. Linville <[email protected]>:
> Coverity: CID 114932
>
> Signed-off-by: John W. Linville <[email protected]>
> ---
> I'm guessing this is OK, since it seems to work?
>
> drivers/net/wireless/ath/ath5k/pcu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
> index c60d36aa13e2..bf29da5e90da 100644
> --- a/drivers/net/wireless/ath/ath5k/pcu.c
> +++ b/drivers/net/wireless/ath/ath5k/pcu.c
> @@ -912,6 +912,7 @@ ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype op_mode)
> pcu_reg |= AR5K_STA_ID1_KEYSRCH_MODE
> | (ah->ah_version == AR5K_AR5210 ?
> AR5K_STA_ID1_PWR_SV : 0);
> + /* fall through */
> case NL80211_IFTYPE_MONITOR:
> pcu_reg |= AR5K_STA_ID1_KEYSRCH_MODE
> | (ah->ah_version == AR5K_AR5210 ?
> --
> 2.1.0
>



--
GPG ID: 0xEE878588
As you read this post global entropy rises. Have Fun ;-)
Nick