From: Larry Finger <Larry.Finger@lwfinger.net>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Larry Finger <Larry.Finger@lwfinger.net>,
netdev@vger.kernel.org, Stable <stable@vger.kernel.org>
Subject: [PATCH 08/12 NEXT] rtlwifi: rtl8192c: Add routines to save/restore power index registers
Date: Mon, 18 Nov 2013 11:11:32 -0600 [thread overview]
Message-ID: <1384794696-20314-9-git-send-email-Larry.Finger@lwfinger.net> (raw)
In-Reply-To: <1384794696-20314-1-git-send-email-Larry.Finger@lwfinger.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
---
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 36 +++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
index a4e9d33..aded51d 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
@@ -158,6 +158,42 @@ static const u8 cckswing_table_ch14[CCK_TABLE_SIZE][8] = {
{0x09, 0x08, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00}
};
+static u32 power_index_reg[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a};
+
+void dm_restorepowerindex(struct ieee80211_hw *hw)
+{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ u8 index;
+
+ for (index = 0; index < 6; index++)
+ rtl_write_byte(rtlpriv, power_index_reg[index],
+ rtlpriv->dm.powerindex_backup[index]);
+}
+EXPORT_SYMBOL_GPL(dm_restorepowerindex);
+
+void dm_writepowerindex(struct ieee80211_hw *hw, u8 value)
+{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ u8 index;
+
+ for (index = 0; index < 6; index++)
+ rtl_write_byte(rtlpriv, power_index_reg[index], value);
+}
+EXPORT_SYMBOL_GPL(dm_writepowerindex);
+
+void dm_savepowerindex(struct ieee80211_hw *hw)
+{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ u8 index;
+ u8 tmp;
+
+ for (index = 0; index < 6; index++) {
+ tmp = rtl_read_byte(rtlpriv, power_index_reg[index]);
+ rtlpriv->dm.powerindex_backup[index] = tmp;
+ }
+}
+EXPORT_SYMBOL_GPL(dm_savepowerindex);
+
static void rtl92c_dm_diginit(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
--
1.8.4
next prev parent reply other threads:[~2013-11-18 17:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 17:11 [PATCH 00/12] Fix various problems with the rtl8192cu driver Larry Finger
2013-11-18 17:11 ` [PATCH 01/12 NEXT] rtlwifi: rtl8192c: Prevent reconnect attempts if not connected Larry Finger
2013-11-18 17:11 ` [PATCH 02/12 NEXT] rtlwifi: rtl8192cu: Add new firmware Larry Finger
[not found] ` <1384794696-20314-1-git-send-email-Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2013-11-18 17:11 ` [PATCH 03/12 NEXT] rtlwifi: Redo register save locations Larry Finger
2013-11-18 17:11 ` [PATCH 10/12 NEXT] rtlwifi: rtl8192cu: Fix some code in RF handling Larry Finger
2013-11-18 17:11 ` [PATCH 11/12 NEXT] rtlwifi: Add missing code to PWDB statics routine Larry Finger
2013-11-18 17:11 ` [PATCH 04/12 NEXT] rtlwifi: Set the link state Larry Finger
2013-11-18 17:11 ` [PATCH 05/12 NEXT] rtlwifi: rtl8192c: Add new definitions in the dm_common header Larry Finger
2013-11-18 17:11 ` [PATCH 06/12 NEXT] rtlwifi: Increase the RX queue length for USB drivers Larry Finger
2013-11-18 17:11 ` [PATCH 07/12 NEXT] rtlwifi: Update beacon statistics for USB driver Larry Finger
2013-11-18 17:11 ` Larry Finger [this message]
2013-11-18 17:11 ` [PATCH 09/12 NEXT] rtlwifi: rtl8192cu: Update the power index registers Larry Finger
2013-11-18 17:11 ` [PATCH 12/12 NEXT] rtlwifi: rtl8192c: Update dynamic gain calculations Larry Finger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384794696-20314-9-git-send-email-Larry.Finger@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox