mac80211: rt2x00: replace patches with v3 of pending series
[openwrt/staging/ldir.git] / package / kernel / mac80211 / patches / rt2x00 / 011-rt2x00-move-helper-functions-up-in-file.patch
1 From patchwork Sat Sep 17 20:28:58 2022
2 Content-Type: text/plain; charset="utf-8"
3 MIME-Version: 1.0
4 Content-Transfer-Encoding: 7bit
5 X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
6 X-Patchwork-Id: 12979252
7 X-Patchwork-Delegate: kvalo@adurom.com
8 Return-Path: <linux-wireless-owner@kernel.org>
9 Date: Sat, 17 Sep 2022 21:28:58 +0100
10 From: Daniel Golle <daniel@makrotopia.org>
11 To: linux-wireless@vger.kernel.org, Stanislaw Gruszka <stf_xl@wp.pl>,
12 Helmut Schaa <helmut.schaa@googlemail.com>
13 Cc: Kalle Valo <kvalo@kernel.org>,
14 "David S. Miller" <davem@davemloft.net>,
15 Eric Dumazet <edumazet@google.com>,
16 Jakub Kicinski <kuba@kernel.org>,
17 Paolo Abeni <pabeni@redhat.com>,
18 Johannes Berg <johannes.berg@intel.com>
19 Subject: [PATCH v3 11/16] rt2x00: move helper functions up in file
20 Message-ID:
21 <c27baa8efd5c29e2bcb2432925d9cdc5c913a125.1663445157.git.daniel@makrotopia.org>
22 References: <cover.1663445157.git.daniel@makrotopia.org>
23 MIME-Version: 1.0
24 Content-Disposition: inline
25 In-Reply-To: <cover.1663445157.git.daniel@makrotopia.org>
26 Precedence: bulk
27 List-ID: <linux-wireless.vger.kernel.org>
28 X-Mailing-List: linux-wireless@vger.kernel.org
29
30 Move register access helper functions up to the head of the file so
31 they can be used in all functions.
32
33 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
34 Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
35 ---
36 .../net/wireless/ralink/rt2x00/rt2800lib.c | 40 +++++++++----------
37 1 file changed, 20 insertions(+), 20 deletions(-)
38
39 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
40 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
41 @@ -198,6 +198,26 @@ static void rt2800_rfcsr_write_dccal(str
42 rt2800_rfcsr_write_bank(rt2x00dev, 7, reg, value);
43 }
44
45 +static void rt2800_bbp_dcoc_write(struct rt2x00_dev *rt2x00dev,
46 + const u8 reg, const u8 value)
47 +{
48 + rt2800_bbp_write(rt2x00dev, 158, reg);
49 + rt2800_bbp_write(rt2x00dev, 159, value);
50 +}
51 +
52 +static u8 rt2800_bbp_dcoc_read(struct rt2x00_dev *rt2x00dev, const u8 reg)
53 +{
54 + rt2800_bbp_write(rt2x00dev, 158, reg);
55 + return rt2800_bbp_read(rt2x00dev, 159);
56 +}
57 +
58 +static void rt2800_bbp_glrt_write(struct rt2x00_dev *rt2x00dev,
59 + const u8 reg, const u8 value)
60 +{
61 + rt2800_bbp_write(rt2x00dev, 195, reg);
62 + rt2800_bbp_write(rt2x00dev, 196, value);
63 +}
64 +
65 static u8 rt2800_rfcsr_read(struct rt2x00_dev *rt2x00dev,
66 const unsigned int word)
67 {
68 @@ -6947,26 +6967,6 @@ static void rt2800_init_bbp_5592(struct
69 rt2800_bbp_write(rt2x00dev, 103, 0xc0);
70 }
71
72 -static void rt2800_bbp_glrt_write(struct rt2x00_dev *rt2x00dev,
73 - const u8 reg, const u8 value)
74 -{
75 - rt2800_bbp_write(rt2x00dev, 195, reg);
76 - rt2800_bbp_write(rt2x00dev, 196, value);
77 -}
78 -
79 -static void rt2800_bbp_dcoc_write(struct rt2x00_dev *rt2x00dev,
80 - const u8 reg, const u8 value)
81 -{
82 - rt2800_bbp_write(rt2x00dev, 158, reg);
83 - rt2800_bbp_write(rt2x00dev, 159, value);
84 -}
85 -
86 -static u8 rt2800_bbp_dcoc_read(struct rt2x00_dev *rt2x00dev, const u8 reg)
87 -{
88 - rt2800_bbp_write(rt2x00dev, 158, reg);
89 - return rt2800_bbp_read(rt2x00dev, 159);
90 -}
91 -
92 static void rt2800_init_bbp_6352(struct rt2x00_dev *rt2x00dev)
93 {
94 u8 bbp;