forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c
....@@ -1,27 +1,5 @@
1
-/******************************************************************************
2
- *
3
- * Copyright(c) 2009-2012 Realtek Corporation.
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of version 2 of the GNU General Public License as
7
- * published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- * more details.
13
- *
14
- * The full GNU General Public License is included in this distribution in the
15
- * file called LICENSE.
16
- *
17
- * Contact Information:
18
- * wlanfae <wlanfae@realtek.com>
19
- * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20
- * Hsinchu 300, Taiwan.
21
- *
22
- * Larry Finger <Larry.Finger@lwfinger.net>
23
- *
24
- *****************************************************************************/
1
+// SPDX-License-Identifier: GPL-2.0
2
+/* Copyright(c) 2009-2012 Realtek Corporation.*/
253
264 #include "../wifi.h"
275 #include "../core.h"
....@@ -33,7 +11,6 @@
3311 #include "fw.h"
3412 #include "../rtl8723com/fw_common.h"
3513 #include "hw.h"
36
-#include "sw.h"
3714 #include "trx.h"
3815 #include "led.h"
3916 #include "table.h"
....@@ -89,7 +66,7 @@
8966 rtlpci->const_support_pciaspm = rtlpriv->cfg->mod_params->aspm_support;
9067 }
9168
92
-int rtl8723e_init_sw_vars(struct ieee80211_hw *hw)
69
+static int rtl8723e_init_sw_vars(struct ieee80211_hw *hw)
9370 {
9471 struct rtl_priv *rtlpriv = rtl_priv(hw);
9572 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
....@@ -101,9 +78,9 @@
10178
10279 rtlpriv->btcoexist.btc_ops = rtl_btc_get_ops_pointer();
10380
104
- rtlpriv->dm.dm_initialgain_enable = 1;
81
+ rtlpriv->dm.dm_initialgain_enable = true;
10582 rtlpriv->dm.dm_flag = 0;
106
- rtlpriv->dm.disable_framebursting = 0;
83
+ rtlpriv->dm.disable_framebursting = false;
10784 rtlpriv->dm.thermalvalue = 0;
10885 rtlpci->transmit_config = CFENDFORM | BIT(12) | BIT(13);
10986
....@@ -151,10 +128,6 @@
151128 rtlpriv->psc.swctrl_lps = rtlpriv->cfg->mod_params->swctrl_lps;
152129 rtlpriv->psc.fwctrl_lps = rtlpriv->cfg->mod_params->fwctrl_lps;
153130 rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support;
154
- rtlpriv->cfg->mod_params->sw_crypto =
155
- rtlpriv->cfg->mod_params->sw_crypto;
156
- rtlpriv->cfg->mod_params->disable_watchdog =
157
- rtlpriv->cfg->mod_params->disable_watchdog;
158131 if (rtlpriv->cfg->mod_params->disable_watchdog)
159132 pr_info("watchdog disabled\n");
160133 rtlpriv->psc.reg_fwctrl_lps = 3;
....@@ -175,7 +148,7 @@
175148 return 1;
176149 }
177150
178
- if (IS_81xxC_VENDOR_UMC_B_CUT(rtlhal->version))
151
+ if (IS_81XXC_VENDOR_UMC_B_CUT(rtlhal->version))
179152 fw_name = "rtlwifi/rtl8723fw_B.bin";
180153
181154 rtlpriv->max_fw_size = 0x6000;
....@@ -192,7 +165,7 @@
192165 return 0;
193166 }
194167
195
-void rtl8723e_deinit_sw_vars(struct ieee80211_hw *hw)
168
+static void rtl8723e_deinit_sw_vars(struct ieee80211_hw *hw)
196169 {
197170 struct rtl_priv *rtlpriv = rtl_priv(hw);
198171
....@@ -203,7 +176,7 @@
203176 }
204177
205178 /* get bt coexist status */
206
-bool rtl8723e_get_btc_status(void)
179
+static bool rtl8723e_get_btc_status(void)
207180 {
208181 return true;
209182 }
....@@ -266,8 +239,8 @@
266239 static struct rtl_mod_params rtl8723e_mod_params = {
267240 .sw_crypto = false,
268241 .inactiveps = true,
269
- .swctrl_lps = false,
270
- .fwctrl_lps = true,
242
+ .swctrl_lps = true,
243
+ .fwctrl_lps = false,
271244 .aspm_support = 1,
272245 .debug_level = 0,
273246 .debug_mask = 0,
....@@ -395,8 +368,8 @@
395368 bool, 0444);
396369 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
397370 MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
398
-MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
399
-MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n");
371
+MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 1)\n");
372
+MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 0)\n");
400373 MODULE_PARM_DESC(msi, "Set to 1 to use MSI interrupts mode (default 0)\n");
401374 MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
402375 MODULE_PARM_DESC(debug_level, "Set debug level (0-5) (default 0)");