1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
From pozega.tomislav@gmail.com Thu May 18 12:42:27 2017
Return-path: <pozega.tomislav@gmail.com>
Envelope-to: daniel@makrotopia.org
Delivery-date: Thu, 18 May 2017 12:42:27 +0200
Received: from mail by fudo.makrotopia.org with sa-checked (Exim 4.88)
(envelope-from <pozega.tomislav@gmail.com>)
id 1dBIsy-00088b-PU
for daniel@makrotopia.org; Thu, 18 May 2017 12:42:27 +0200
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on fudo.makrotopia.org
X-Spam-Level:
X-Spam-Status: No, score=-0.8 required=2.5 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW shortcircuit=no
autolearn=ham autolearn_force=no version=3.4.1
Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a])
by fudo.makrotopia.org with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
(Exim 4.88)
(envelope-from <pozega.tomislav@gmail.com>)
id 1dBIsv-00088Q-Dq
for daniel@makrotopia.org; Thu, 18 May 2017 12:42:24 +0200
Received: by mail-oi0-x22a.google.com with SMTP id w10so48782189oif.0
for <daniel@makrotopia.org>; Thu, 18 May 2017 03:42:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=mime-version:from:date:message-id:subject:to;
bh=9dF7PHDassYY74+N6dAhmsL/B9i5oG3SEuMzHuazhJo=;
b=cBGJ44v+o4ASyCPmHCBRMmRYnJCv4Gx6lzDiScKn0XqYmNHYpZTPg5cAY1GZFUhHdz
9QT5fzhJKFikBliSuJc/7/pI8KzvyEAdvawiWA7/5fbeiTZ+zjJnzRVGezqkYDKxjR6u
7TsoJxR2/oFwo7bOFlThhee+Nwf7qaX8AVal7JdkqovekX79JQ5vsKAa4LapDp7Cl0wr
KCh0WRUHGEgpTLJFyQ3ThPmLqc8bhmu+6/V/LJ53VOY7uksZHMhvaKkk9vDCoOuPnBMK
Cj2/c7z9RTErz/xlHg6HxnBe/pPc31XUsuPJUleOEdZASczPsreEEKacKCONVlP1wjAB
iOkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=9dF7PHDassYY74+N6dAhmsL/B9i5oG3SEuMzHuazhJo=;
b=LJAe4ZwS9aNJypROW7j+I9aNfRBWyDYy0c8ABnDbLrIoF9P2AA/Vs/Cli5f7GjaAxr
1JCx602ach+7R7QjQq/nqNmLuhRCfSvB0TGrq4R4v+CJ4ADO541+PddnFiU1dlIXQRP2
TE2FOydSO0FGJBMg+kY0eFiidBtYj1T5x7IHAhQzufiuiF6/1xZS8h61CYJjLzt/aR5y
JxOxsVvu3W2YQ0T5wKmAPlKtarFH6ZZgs446bRYt1MX5KAWzIoBM1+IPMMv7lSCpCaDR
fwH05aDyaJW2IzXH5R9Tq7gGYycYjx/SnO7JupJXJVvOzKgBJxp60JwJhCfqCwESDuuD
8nNA==
X-Gm-Message-State: AODbwcDOpdFZgbxAxFsVsqFdCBN3pRGDvEclZ1heVg2byNZ9BuG5kqJg
GvZ9x4NGt0v8lVGa3esDw0N1KiJENg==
X-Received: by 10.157.17.217 with SMTP id y25mr1310632oty.137.1495104134863;
Thu, 18 May 2017 03:42:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.0.105 with HTTP; Thu, 18 May 2017 03:42:14 -0700 (PDT)
From: Tom Psyborg <pozega.tomislav@gmail.com>
Date: Thu, 18 May 2017 12:42:14 +0200
Message-ID: <CAKR_QVJBSKw2uCY4RbHZPvbGkMcvnBh+j6F+9t93mG3BakjX3Q@mail.gmail.com>
Subject: [PATCH] rt2x00: remove unneccesary code
To: linux-wireless <linux-wireless@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Jes Sorensen <jes.sorensen@gmail.com>, Stanislaw Gruszka <sgruszka@redhat.com>,
David Miller <davem@davemloft.net>, Helmut Schaa <helmut.schaa@googlemail.com>,
Kalle Valo <kvalo@codeaurora.org>, Daniel Golle <daniel@makrotopia.org>,
Mathias Kresin <dev@kresin.me>, Johannes Berg <johannes.berg@intel.com>,
Serge Vasilugin <vasilugin@yandex.ru>, Roman Yeryomin <roman@advem.lv>,
Networking <netdev@vger.kernel.org>
Content-Type: multipart/alternative; boundary="94eb2c1905d2dc6361054fca0e62"
Status: RO
Content-Length: 11079
Lines: 178
--94eb2c1905d2dc6361054fca0e62
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Use chanreg and dccal helpers to reduce the size of ePA code.
Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: fixed white-space so patch applies]
---
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -4303,38 +4303,22 @@ static void rt2800_config_channel(struct
reg |= 0x00000101;
rt2800_register_write(rt2x00dev, RF_BYPASS3, reg);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 43, 0x73);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 43, 0x73);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 44, 0x73);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 44, 0x73);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 45, 0x73);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 45, 0x73);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 46, 0x27);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 46, 0x27);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 47, 0xC8);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 47, 0xC8);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 48, 0xA4);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 48, 0xA4);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 49, 0x05);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 49, 0x05);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 54, 0x27);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 54, 0x27);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 55, 0xC8);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 55, 0xC8);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 56, 0xA4);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 56, 0xA4);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 57, 0x05);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 57, 0x05);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 58, 0x27);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 58, 0x27);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 59, 0xC8);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 59, 0xC8);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 60, 0xA4);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 60, 0xA4);
- rt2800_rfcsr_write_bank(rt2x00dev, 4, 61, 0x05);
- rt2800_rfcsr_write_bank(rt2x00dev, 6, 61, 0x05);
- rt2800_rfcsr_write_bank(rt2x00dev, 5, 05, 0x00);
- rt2800_rfcsr_write_bank(rt2x00dev, 7, 05, 0x00);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0x73);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0x73);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0x73);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 46, 0x27);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0xC8);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xA4);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x05);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x27);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0xC8);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xA4);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 57, 0x05);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x27);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0xC8);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xA4);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x05);
+ rt2800_rfcsr_write_dccal(rt2x00dev, 05, 0x00);
rt2800_register_write(rt2x00dev, TX0_RF_GAIN_CORRECT,
0x36303636);
|