rtlwifi: rtl8192ce: Add code to set the keep-alive operation
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 18 Dec 2014 09:05:27 +0000 (03:05 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Dec 2014 16:29:32 +0000 (18:29 +0200)
This change helps the device maintain a connection.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.h
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c

index b64ae45dc6743869da3746a7382683936e86f88c..e9f4281f5067d9554ea22985ce9cc463a162a8e7 100644 (file)
@@ -37,6 +37,7 @@
 #define FW_8192C_POLLING_DELAY                 5
 #define FW_8192C_POLLING_TIMEOUT_COUNT         100
 #define NORMAL_CHIP                            BIT(4)
+#define H2C_92C_KEEP_ALIVE_CTRL                        48
 
 #define IS_FW_HEADER_EXIST(_pfwhdr)    \
        ((le16_to_cpu(_pfwhdr->signature)&0xFFF0) == 0x92C0 ||\
index 5c646d5f7bb83e9b3492c33401ae5de810ced7d5..b63b78b772b9e19a4b04923c81bf28e4caa36083 100644 (file)
@@ -544,8 +544,13 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
                                                (u8 *)(&fw_current_inps));
                        }
                break; }
-       case HW_VAR_KEEP_ALIVE:
-               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 %d not processed\n", variable);