2015-09-15 06:07:47

by Priit Laes

[permalink] [raw]
Subject: [PATCH RFC] rtlwifi: rtl8192cu: Add missing case in rtl92cu_get_hw_reg

Driver was reporting 'switch case not processed' after association,
so HW_VAR_KEEP_ALIVE was added and filled similarily to other drivers.

Positive side effect to this seems to be a bit more stable connection.

Signed-off-by: Priit Laes <[email protected]>
---
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
index 25db369..34ce064 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -1946,6 +1946,14 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
rtl_write_word(rtlpriv, REG_RXFLTMAP2, *(u16 *)val);
mac->rx_data_filter = *(u16 *)val;
break;
+ case HW_VAR_KEEP_ALIVE:{
+ u8 array[2];
+ array[0] = 0xff;
+ array[1] = *((u8 *)val);
+ rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2,
+ array);
+ break;
+ }
default:
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
"switch case not processed\n");
--
2.5.2



2015-09-17 01:43:54

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH RFC] rtlwifi: rtl8192cu: Add missing case in rtl92cu_get_hw_reg

On 09/15/2015 01:01 AM, Priit Laes wrote:
> Driver was reporting 'switch case not processed' after association,
> so HW_VAR_KEEP_ALIVE was added and filled similarily to other drivers.
>
> Positive side effect to this seems to be a bit more stable connection.
>
> Signed-off-by: Priit Laes <[email protected]>
> ---

This patch looks good to me. Thanks.

Cc: Stable <[email protected]> 3.4+
Acked-by: Larry Finger <[email protected]>

Larry

> drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> index 25db369..34ce064 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> @@ -1946,6 +1946,14 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
> rtl_write_word(rtlpriv, REG_RXFLTMAP2, *(u16 *)val);
> mac->rx_data_filter = *(u16 *)val;
> break;
> + case HW_VAR_KEEP_ALIVE:{
> + u8 array[2];
> + array[0] = 0xff;
> + array[1] = *((u8 *)val);
> + rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2,
> + array);
> + break;
> + }
> default:
> RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
> "switch case not processed\n");
>


2015-10-14 11:15:35

by Kalle Valo

[permalink] [raw]
Subject: Re: [RFC] rtlwifi: rtl8192cu: Add missing case in rtl92cu_get_hw_reg


> Driver was reporting 'switch case not processed' after association,
> so HW_VAR_KEEP_ALIVE was added and filled similarily to other drivers.
>
> Positive side effect to this seems to be a bit more stable connection.
>
> Signed-off-by: Priit Laes <[email protected]>
> Acked-by: Larry Finger <[email protected]>

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

Kalle Valo