From patchwork Thu Dec 18 09:05:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 5511711 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C62D29F1D4 for ; Thu, 18 Dec 2014 09:06:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE80C209DD for ; Thu, 18 Dec 2014 09:06:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 20A66209AF for ; Thu, 18 Dec 2014 09:06:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752409AbaLRJGF (ORCPT ); Thu, 18 Dec 2014 04:06:05 -0500 Received: from mail-ob0-f172.google.com ([209.85.214.172]:57118 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbaLRJGA (ORCPT ); Thu, 18 Dec 2014 04:06:00 -0500 Received: by mail-ob0-f172.google.com with SMTP id va8so2354053obc.3 for ; Thu, 18 Dec 2014 01:05:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=poTyjh9miaL2FEkPm+vA879207XmX+ngdj3VXutSB2A=; b=emwJK7UiFgX0XsP+1rx8j2vYoLvsnzehet32xvk6dl1PWk9LXc0Zv1fA2qS6aRaJTp FFIfBx2mVCyy0VAkVE5iSwETVKgCg3EekHnpc2B6+CE7iYXl/5sXvEe7eVXoZXuPUx8F u6N5bDrTG/em7gV58ra7mvIACquS9BaORGrGT12QESy/Wn86xPDm05VskD6pbQA+XaOc wjaRY+e9uOoN5eEIPypemjnpr30SBGRoE5X1watA6QLofIYaKAXG5LW6VHlvV5cFUjql MX9rR/PLWScQ3cAMyGJmgihA5Osh6xLmkDQSZjNJ3UGHs28lCt4+CQ+vcXEBkKo7dSFy TG5A== X-Received: by 10.202.9.142 with SMTP id 136mr521842oij.89.1418893559642; Thu, 18 Dec 2014 01:05:59 -0800 (PST) Received: from linux.site ([69.76.245.152]) by mx.google.com with ESMTPSA id o93sm2962766oik.21.2014.12.18.01.05.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Dec 2014 01:05:59 -0800 (PST) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Larry Finger Subject: [PATCH 03/16] rtlwifi: rtl8192ce: Add code to set the keep-alive operation Date: Thu, 18 Dec 2014 03:05:27 -0600 Message-Id: <1418893540-19944-4-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1418893540-19944-1-git-send-email-Larry.Finger@lwfinger.net> References: <1418893540-19944-1-git-send-email-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This change helps the device maintain a connection. Signed-off-by: Larry Finger --- drivers/net/wireless/rtlwifi/rtl8192c/fw_common.h | 1 + drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.h b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.h index b64ae45..e9f4281 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.h +++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.h @@ -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 ||\ diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 5c646d5..b63b78b 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c @@ -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);