hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c
....@@ -1,27 +1,5 @@
1
-/******************************************************************************
2
- *
3
- * Copyright(c) 2009-2014 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-2014 Realtek Corporation.*/
253
264 #include "../wifi.h"
275 #include "../pci.h"
....@@ -63,7 +41,7 @@
6341 u32 page_nums, remain_size;
6442 u32 page, offset;
6543
66
- RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, "FW size is %d bytes,\n", size);
44
+ rtl_dbg(rtlpriv, COMP_FW, DBG_TRACE, "FW size is %d bytes,\n", size);
6745
6846 rtl_fill_dummy(bufferptr, &size);
6947
....@@ -85,7 +63,7 @@
8563 page = page_nums;
8664 rtl_fw_page_write(hw, page, (bufferptr + offset), remain_size);
8765 }
88
- RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE, "FW write done.\n");
66
+ rtl_dbg(rtlpriv, COMP_FW, DBG_TRACE, "FW write done.\n");
8967 }
9068 EXPORT_SYMBOL_GPL(rtl8723_write_fw);
9169
....@@ -131,8 +109,8 @@
131109 u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1);
132110 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, (u1b_tmp | BIT(2)));
133111
134
- RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
135
- " _8051Reset8723be(): 8051 reset success .\n");
112
+ rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
113
+ "_8051Reset8723be(): 8051 reset success .\n");
136114 }
137115 EXPORT_SYMBOL_GPL(rtl8723be_firmware_selfreset);
138116
....@@ -165,9 +143,9 @@
165143 do {
166144 value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
167145 if (value32 & WINTINI_RDY) {
168
- RT_TRACE(rtlpriv, COMP_FW, DBG_TRACE,
169
- "Polling FW ready success!! REG_MCUFWDL:0x%08x .\n",
170
- value32);
146
+ rtl_dbg(rtlpriv, COMP_FW, DBG_TRACE,
147
+ "Polling FW ready success!! REG_MCUFWDL:0x%08x .\n",
148
+ value32);
171149 err = 0;
172150 goto exit;
173151 }
....@@ -210,10 +188,10 @@
210188 else
211189 max_page = 8;
212190 if (rtlpriv->cfg->ops->is_fw_header(pfwheader)) {
213
- RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD,
214
- "Firmware Version(%d), Signature(%#x), Size(%d)\n",
215
- pfwheader->version, pfwheader->signature,
216
- (int)sizeof(struct rtlwifi_firmware_header));
191
+ rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD,
192
+ "Firmware Version(%d), Signature(%#x), Size(%d)\n",
193
+ pfwheader->version, pfwheader->signature,
194
+ (int)sizeof(struct rtlwifi_firmware_header));
217195
218196 pfwdata = pfwdata + sizeof(struct rtlwifi_firmware_header);
219197 fwsize = fwsize - sizeof(struct rtlwifi_firmware_header);
....@@ -245,7 +223,6 @@
245223 struct rtl8192_tx_ring *ring;
246224 struct rtl_tx_desc *pdesc;
247225 struct sk_buff *pskb = NULL;
248
- u8 own;
249226 unsigned long flags;
250227
251228 ring = &rtlpci->tx_ring[BEACON_QUEUE];
....@@ -255,9 +232,6 @@
255232 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);
256233
257234 pdesc = &ring->desc[0];
258
- own = (u8)rtlpriv->cfg->ops->get_desc(hw, (u8 *)pdesc, true,
259
- HW_DESC_OWN);
260
-
261235 rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *)pdesc, 1, 1, skb);
262236
263237 __skb_queue_tail(&ring->queue, skb);