Skip to contentSkip to conversation

rtlwifi: rtl8192cu: Add missing case in rtl92cu_get_hw_reg

RFC PATCH Applied Priit Laes 3 participants 3 messages Sep 15, 2015 – Oct 14, 2015 Networking drivers (wireless)

lore
Share & tools
lore

Priit Laes

author
#0 lore raw

RFC PATCH 1/1 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.

---
 drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +8 -0
index 25db369..34ce064 100644
@@ -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");
Signature · 1 line
2.5.2
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Priit Laes

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.

---

This patch looks good to me. Thanks.

Larry

Quoted 23 lines
  drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 8 ++++++++
  1 file changed, 8 insertions(+)
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +8 -0
index 25db369..34ce064 100644
@@ -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");