2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 00/16] rtl8xxxu prepare for splitting into multiple files

From: Jes Sorensen <[email protected]>

Hi,

This is the last set of patches I have in my queue for the rtl8xxxu
driver, as of today :)

Since the driver has grown to support quite a number of different
chips, I want to split it into multiple files. This will make it
easier to maintain and also eaiser to add support for more chips
without having to constantly touch the core files.

This set renames a bunch of functions to indicate that they are
generic rather than chip specific. I will look at doing the actual
moving around in a set right after the current merge window closes.

Please keep the test reports coming!

Cheers,
Jes


Jes Sorensen (16):
rtl8xxxu: Rename rtl8723bu_update_rate_mask() to
rtl8xxxu_gen2_update_rate_mask()
rtl8xxxu: Rename rtl8723bu_report_connect() to
rtl8xxxu_gen2_report_connect()
rtl8xxxu: Rename rtl8723au_report_connect() to
rtl8xxxu_gen1_report_connect()
rtl8xxxu: Rename rtl8723bu_config_channel() to
rtl8xxxu_gen2_config_channel()
rtl8xxxu: Rename rtl8723b_disable_rf() to rtl8xxxu_gen2_disable_rf()
rtl8xxxu: Rename rtl8723a_disable_rf() to rtl8xxxu_gen1_disable_rf()
rtl8xxxu: Rename rtl8723au_config_channel() to
rtl8xxxu_gen1_config_channel()
rtl8xxxu: Rename rtl8723au_update_rate_mask() to
rtl8xxxu_update_rate_mask()
rtl8xxxu: Rename rtl8723au_phy_iq_calibrate() to
rtl8xxxu_gen1_phy_iq_calibrate()
rtl8xxxu: Rename rtl8723au_init_phy_bb() to
rtl8xxxu_gen1_init_phy_bb()
rtl8xxxu: Rename rtl8723a_set_tx_power() to
rtl8xxxu_gen1_set_tx_power()
rtl8xxxu: Rename rtl8723a_enable_rf() to rtl8xxxu_gen1_enable_rf()
rtl8xxxu: Rename rtl8723a_mac_init_table to
rtl8xxxu_gen1_mac_init_table
rtl8xxxu: Rename rtl8723b_channel_to_group()
rtl8xxxu: Rename rtl8723bu_simularity_compare()
rtl8xxxu: Rename rtl8723au_iqk_phy_iq_bb_reg

drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 122 ++++++++++++-----------
1 file changed, 64 insertions(+), 58 deletions(-)

--
2.5.5



2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 06/16] rtl8xxxu: Rename rtl8723a_disable_rf() to rtl8xxxu_gen1_disable_rf()

From: Jes Sorensen <[email protected]>

All currently supported gen1 parts use the same disable_rf() routine,
so rename the function to reflect that.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 7a28b78..4aab4f5 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -2120,7 +2120,7 @@ static void rtl8723a_enable_rf(struct rtl8xxxu_priv *priv)
rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
}

-static void rtl8723a_disable_rf(struct rtl8xxxu_priv *priv)
+static void rtl8xxxu_gen1_disable_rf(struct rtl8xxxu_priv *priv)
{
u8 sps0;
u32 val32;
@@ -9882,7 +9882,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.config_channel = rtl8723au_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
.enable_rf = rtl8723a_enable_rf,
- .disable_rf = rtl8723a_disable_rf,
+ .disable_rf = rtl8xxxu_gen1_disable_rf,
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
.set_tx_power = rtl8723a_set_tx_power,
.update_rate_mask = rtl8723au_update_rate_mask,
@@ -9954,7 +9954,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.config_channel = rtl8723au_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
.enable_rf = rtl8723a_enable_rf,
- .disable_rf = rtl8723a_disable_rf,
+ .disable_rf = rtl8xxxu_gen1_disable_rf,
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
.set_tx_power = rtl8723a_set_tx_power,
.update_rate_mask = rtl8723au_update_rate_mask,
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 10/16] rtl8xxxu: Rename rtl8723au_init_phy_bb() to rtl8xxxu_gen1_init_phy_bb()

From: Jes Sorensen <[email protected]>

All gen1 parts use the same init_phy_bb() function, so rename it to
reflect this.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index d5c2117..5c86965 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -3810,7 +3810,7 @@ static int rtl8xxxu_init_phy_regs(struct rtl8xxxu_priv *priv,
return 0;
}

-static void rtl8723au_init_phy_bb(struct rtl8xxxu_priv *priv)
+static void rtl8xxxu_gen1_init_phy_bb(struct rtl8xxxu_priv *priv)
{
u8 val8, ldoa15, ldov12d, lpldo, ldohci12;
u16 val16;
@@ -9876,7 +9876,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.power_off = rtl8xxxu_power_off,
.reset_8051 = rtl8xxxu_reset_8051,
.llt_init = rtl8xxxu_init_llt_table,
- .init_phy_bb = rtl8723au_init_phy_bb,
+ .init_phy_bb = rtl8xxxu_gen1_init_phy_bb,
.init_phy_rf = rtl8723au_init_phy_rf,
.phy_iq_calibrate = rtl8xxxu_gen1_phy_iq_calibrate,
.config_channel = rtl8xxxu_gen1_config_channel,
@@ -9948,7 +9948,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.power_off = rtl8xxxu_power_off,
.reset_8051 = rtl8xxxu_reset_8051,
.llt_init = rtl8xxxu_init_llt_table,
- .init_phy_bb = rtl8723au_init_phy_bb,
+ .init_phy_bb = rtl8xxxu_gen1_init_phy_bb,
.init_phy_rf = rtl8192cu_init_phy_rf,
.phy_iq_calibrate = rtl8xxxu_gen1_phy_iq_calibrate,
.config_channel = rtl8xxxu_gen1_config_channel,
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 14/16] rtl8xxxu: Rename rtl8723b_channel_to_group()

From: Jes Sorensen <[email protected]>

This renames rtl8723b_channel_to_group() to
rtl8xxxu_gen2_channel_to_group() to reflect it is used by all
currently supported gen2 parts.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index fb13a77..bec2c4d 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -2201,7 +2201,7 @@ static int rtl8723a_channel_to_group(int channel)
/*
* Valid for rtl8723bu and rtl8192eu
*/
-static int rtl8723b_channel_to_group(int channel)
+static int rtl8xxxu_gen2_channel_to_group(int channel)
{
int group;

@@ -2613,7 +2613,7 @@ rtl8723b_set_tx_power(struct rtl8xxxu_priv *priv, int channel, bool ht40)
int group, tx_idx;

tx_idx = 0;
- group = rtl8723b_channel_to_group(channel);
+ group = rtl8xxxu_gen2_channel_to_group(channel);

cck = priv->cck_tx_power_index_B[group];
val32 = rtl8xxxu_read32(priv, REG_TX_AGC_A_CCK1_MCS32);
@@ -2652,7 +2652,7 @@ rtl8192e_set_tx_power(struct rtl8xxxu_priv *priv, int channel, bool ht40)
int group, tx_idx;

tx_idx = 0;
- group = rtl8723b_channel_to_group(channel);
+ group = rtl8xxxu_gen2_channel_to_group(channel);

cck = priv->cck_tx_power_index_A[group];

--
2.5.5


2016-04-18 15:56:45

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH 00/16] rtl8xxxu prepare for splitting into multiple files

On Mon, 2016-04-18 at 11:49 -0400, [email protected] wrote:
> From: Jes Sorensen <[email protected]>
>
> Hi,
>
> This is the last set of patches I have in my queue for the rtl8xxxu
> driver, as of today :)
>
> Since the driver has grown to support quite a number of different
> chips, I want to split it into multiple files. This will make it
> easier to maintain and also eaiser to add support for more chips
> without having to constantly touch the core files.
>
> This set renames a bunch of functions to indicate that they are
> generic rather than chip specific. I will look at doing the actual
> moving around in a set right after the current merge window closes.

It's a bit of a pity that the identifiers are all
quite long. ?Using these long identifiers makes
80 column content a bit right shifted and single
line statements unlikely.


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 05/16] rtl8xxxu: Rename rtl8723b_disable_rf() to rtl8xxxu_gen2_disable_rf()

From: Jes Sorensen <[email protected]>

At least for now, all gen2 parts use the same disable_rf() function

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 0928352..7a28b78 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -7659,7 +7659,7 @@ static void rtl8723b_enable_rf(struct rtl8xxxu_priv *priv)
rtl8723a_h2c_cmd(priv, &h2c, sizeof(h2c.ignore_wlan));
}

-static void rtl8723b_disable_rf(struct rtl8xxxu_priv *priv)
+static void rtl8xxxu_gen2_disable_rf(struct rtl8xxxu_priv *priv)
{
u32 val32;

@@ -9918,7 +9918,7 @@ static struct rtl8xxxu_fileops rtl8723bu_fops = {
.init_aggregation = rtl8723bu_init_aggregation,
.init_statistics = rtl8723bu_init_statistics,
.enable_rf = rtl8723b_enable_rf,
- .disable_rf = rtl8723b_disable_rf,
+ .disable_rf = rtl8xxxu_gen2_disable_rf,
.usb_quirks = rtl8xxxu_gen2_usb_quirks,
.set_tx_power = rtl8723b_set_tx_power,
.update_rate_mask = rtl8xxxu_gen2_update_rate_mask,
@@ -9989,7 +9989,7 @@ static struct rtl8xxxu_fileops rtl8192eu_fops = {
.config_channel = rtl8xxxu_gen2_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc24,
.enable_rf = rtl8192e_enable_rf,
- .disable_rf = rtl8723b_disable_rf,
+ .disable_rf = rtl8xxxu_gen2_disable_rf,
.usb_quirks = rtl8xxxu_gen2_usb_quirks,
.set_tx_power = rtl8192e_set_tx_power,
.update_rate_mask = rtl8xxxu_gen2_update_rate_mask,
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 03/16] rtl8xxxu: Rename rtl8723au_report_connect() to rtl8xxxu_gen1_report_connect()

From: Jes Sorensen <[email protected]>

Rename the function to reflect it is for all/most gen1 parts.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 0f2946d..a7f7031 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -8245,8 +8245,8 @@ static void rtl8xxxu_gen2_update_rate_mask(struct rtl8xxxu_priv *priv,
rtl8723a_h2c_cmd(priv, &h2c, sizeof(h2c.b_macid_cfg));
}

-static void rtl8723au_report_connect(struct rtl8xxxu_priv *priv,
- u8 macid, bool connect)
+static void rtl8xxxu_gen1_report_connect(struct rtl8xxxu_priv *priv,
+ u8 macid, bool connect)
{
struct h2c_cmd h2c;

@@ -9886,7 +9886,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
.set_tx_power = rtl8723a_set_tx_power,
.update_rate_mask = rtl8723au_update_rate_mask,
- .report_connect = rtl8723au_report_connect,
+ .report_connect = rtl8xxxu_gen1_report_connect,
.writeN_block_size = 1024,
.mbox_ext_reg = REG_HMBOX_EXT_0,
.mbox_ext_width = 2,
@@ -9958,7 +9958,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
.set_tx_power = rtl8723a_set_tx_power,
.update_rate_mask = rtl8723au_update_rate_mask,
- .report_connect = rtl8723au_report_connect,
+ .report_connect = rtl8xxxu_gen1_report_connect,
.writeN_block_size = 128,
.mbox_ext_reg = REG_HMBOX_EXT_0,
.mbox_ext_width = 2,
--
2.5.5


2016-04-26 09:27:34

by Kalle Valo

[permalink] [raw]
Subject: Re: [01/16] rtl8xxxu: Rename rtl8723bu_update_rate_mask() tortl8xxxu_gen2_update_rate_mask()


> From: Jes Sorensen <[email protected]>
>
> Update the name of rtl8723bu_update_rate_mask() to make it reflect
> it's applicable for all/most gen2 N parts.
>
> Signed-off-by: Jes Sorensen <[email protected]>

Thanks, 16 patches applied to wireless-drivers-next.git:

a8c8dfa59319 rtl8xxxu: Rename rtl8723bu_update_rate_mask() to rtl8xxxu_gen2_update_rate_mask()
32353a784f43 rtl8xxxu: Rename rtl8723bu_report_connect() to rtl8xxxu_gen2_report_connect()
beb5531619c6 rtl8xxxu: Rename rtl8723au_report_connect() to rtl8xxxu_gen1_report_connect()
3a56bf6aa13c rtl8xxxu: Rename rtl8723bu_config_channel() to rtl8xxxu_gen2_config_channel()
6a07b7915afe rtl8xxxu: Rename rtl8723b_disable_rf() to rtl8xxxu_gen2_disable_rf()
7eb1400c2479 rtl8xxxu: Rename rtl8723a_disable_rf() to rtl8xxxu_gen1_disable_rf()
e09718c2fddf rtl8xxxu: Rename rtl8723au_config_channel() to rtl8xxxu_gen1_config_channel()
c6e39da02e17 rtl8xxxu: Rename rtl8723au_update_rate_mask() to rtl8xxxu_update_rate_mask()
28466e921402 rtl8xxxu: Rename rtl8723au_phy_iq_calibrate() to rtl8xxxu_gen1_phy_iq_calibrate()
de7c189c342d rtl8xxxu: Rename rtl8723au_init_phy_bb() to rtl8xxxu_gen1_init_phy_bb()
42a3bc7a2a85 rtl8xxxu: Rename rtl8723a_set_tx_power() to rtl8xxxu_gen1_set_tx_power()
8396a41cf747 rtl8xxxu: Rename rtl8723a_enable_rf() to rtl8xxxu_gen1_enable_rf()
8db71451e5c4 rtl8xxxu: Rename rtl8723a_mac_init_table to rtl8xxxu_gen1_mac_init_table
5ac74145487d rtl8xxxu: Rename rtl8723b_channel_to_group()
85f466350abf rtl8xxxu: Rename rtl8723bu_simularity_compare()
04a74a9f8af0 rtl8xxxu: Rename rtl8723au_iqk_phy_iq_bb_reg

Kalle Valo

2016-04-18 16:19:15

by Jes Sorensen

[permalink] [raw]
Subject: Re: [PATCH 00/16] rtl8xxxu prepare for splitting into multiple files

Larry Finger <[email protected]> writes:
> On 04/18/2016 10:49 AM, [email protected] wrote:
>> From: Jes Sorensen <[email protected]>
>>
>> Hi,
>>
>> This is the last set of patches I have in my queue for the rtl8xxxu
>> driver, as of today :)
>>
>> Since the driver has grown to support quite a number of different
>> chips, I want to split it into multiple files. This will make it
>> easier to maintain and also eaiser to add support for more chips
>> without having to constantly touch the core files.
>>
>> This set renames a bunch of functions to indicate that they are
>> generic rather than chip specific. I will look at doing the actual
>> moving around in a set right after the current merge window closes.
>>
>> Please keep the test reports coming!
>
> I like the renaming of the routines to match the chip generation, but
> there should be some comments stating the gen to which each
> device/version belongs. Such comments are not needed now, but could be
> included when the files are split.

Larry,

I like that idea - I thought I did that when I pushed the enum for chip
versions in ba17d824783805235f317f79f2871b17bd679956 but somehow it
didn't get further than my head.

I have been thinking of putting some of it down in writing - probably in
rtl8xxxu.h or a README

Note the gen1/gen2 categorization is completely made up by me, it may be
that this is really gen6/gen7 within Realtek. Roughly I consider
8191su/8192su to be gen0, 8188cu/8188ru/8192cu/8723au as gen1, and
8192eu/8723bu/8812/8821 as gen2. I haven't looked closely enough at
8188eu and 8192du yet to determine where they really fit in.

Top priority on my list post splitting the driver into multiple files is
adding 8188eu and beacon support. If only there was 30 hours in a day...

Cheers,
Jes

2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 01/16] rtl8xxxu: Rename rtl8723bu_update_rate_mask() to rtl8xxxu_gen2_update_rate_mask()

From: Jes Sorensen <[email protected]>

Update the name of rtl8723bu_update_rate_mask() to make it reflect
it's applicable for all/most gen2 N parts.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 928ca56..4ec18a4 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -8219,8 +8219,8 @@ static void rtl8723au_update_rate_mask(struct rtl8xxxu_priv *priv,
rtl8723a_h2c_cmd(priv, &h2c, sizeof(h2c.ramask));
}

-static void rtl8723bu_update_rate_mask(struct rtl8xxxu_priv *priv,
- u32 ramask, int sgi)
+static void rtl8xxxu_gen2_update_rate_mask(struct rtl8xxxu_priv *priv,
+ u32 ramask, int sgi)
{
struct h2c_cmd h2c;
u8 bw = 0;
@@ -9921,7 +9921,7 @@ static struct rtl8xxxu_fileops rtl8723bu_fops = {
.disable_rf = rtl8723b_disable_rf,
.usb_quirks = rtl8xxxu_gen2_usb_quirks,
.set_tx_power = rtl8723b_set_tx_power,
- .update_rate_mask = rtl8723bu_update_rate_mask,
+ .update_rate_mask = rtl8xxxu_gen2_update_rate_mask,
.report_connect = rtl8723bu_report_connect,
.writeN_block_size = 1024,
.mbox_ext_reg = REG_HMBOX_EXT0_8723B,
@@ -9992,7 +9992,7 @@ static struct rtl8xxxu_fileops rtl8192eu_fops = {
.disable_rf = rtl8723b_disable_rf,
.usb_quirks = rtl8xxxu_gen2_usb_quirks,
.set_tx_power = rtl8192e_set_tx_power,
- .update_rate_mask = rtl8723bu_update_rate_mask,
+ .update_rate_mask = rtl8xxxu_gen2_update_rate_mask,
.report_connect = rtl8723bu_report_connect,
.writeN_block_size = 128,
.mbox_ext_reg = REG_HMBOX_EXT0_8723B,
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 02/16] rtl8xxxu: Rename rtl8723bu_report_connect() to rtl8xxxu_gen2_report_connect()

From: Jes Sorensen <[email protected]>

Make the name reflect this is for most/all gen2 parts.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 4ec18a4..0f2946d 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -8262,8 +8262,8 @@ static void rtl8723au_report_connect(struct rtl8xxxu_priv *priv,
rtl8723a_h2c_cmd(priv, &h2c, sizeof(h2c.joinbss));
}

-static void rtl8723bu_report_connect(struct rtl8xxxu_priv *priv,
- u8 macid, bool connect)
+static void rtl8xxxu_gen2_report_connect(struct rtl8xxxu_priv *priv,
+ u8 macid, bool connect)
{
struct h2c_cmd h2c;

@@ -9922,7 +9922,7 @@ static struct rtl8xxxu_fileops rtl8723bu_fops = {
.usb_quirks = rtl8xxxu_gen2_usb_quirks,
.set_tx_power = rtl8723b_set_tx_power,
.update_rate_mask = rtl8xxxu_gen2_update_rate_mask,
- .report_connect = rtl8723bu_report_connect,
+ .report_connect = rtl8xxxu_gen2_report_connect,
.writeN_block_size = 1024,
.mbox_ext_reg = REG_HMBOX_EXT0_8723B,
.mbox_ext_width = 4,
@@ -9993,7 +9993,7 @@ static struct rtl8xxxu_fileops rtl8192eu_fops = {
.usb_quirks = rtl8xxxu_gen2_usb_quirks,
.set_tx_power = rtl8192e_set_tx_power,
.update_rate_mask = rtl8xxxu_gen2_update_rate_mask,
- .report_connect = rtl8723bu_report_connect,
+ .report_connect = rtl8xxxu_gen2_report_connect,
.writeN_block_size = 128,
.mbox_ext_reg = REG_HMBOX_EXT0_8723B,
.mbox_ext_width = 4,
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 11/16] rtl8xxxu: Rename rtl8723a_set_tx_power() to rtl8xxxu_gen1_set_tx_power()

From: Jes Sorensen <[email protected]>

All gen1 parts use the same interface for setting TX power, so rename
the function to reflect this.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 5c86965..1499aa0 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -2472,7 +2472,7 @@ static void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
}

static void
-rtl8723a_set_tx_power(struct rtl8xxxu_priv *priv, int channel, bool ht40)
+rtl8xxxu_gen1_set_tx_power(struct rtl8xxxu_priv *priv, int channel, bool ht40)
{
struct rtl8xxxu_power_base *power_base = priv->power_base;
u8 cck[RTL8723A_MAX_RF_PATHS], ofdm[RTL8723A_MAX_RF_PATHS];
@@ -9884,7 +9884,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.enable_rf = rtl8723a_enable_rf,
.disable_rf = rtl8xxxu_gen1_disable_rf,
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
- .set_tx_power = rtl8723a_set_tx_power,
+ .set_tx_power = rtl8xxxu_gen1_set_tx_power,
.update_rate_mask = rtl8xxxu_update_rate_mask,
.report_connect = rtl8xxxu_gen1_report_connect,
.writeN_block_size = 1024,
@@ -9956,7 +9956,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.enable_rf = rtl8723a_enable_rf,
.disable_rf = rtl8xxxu_gen1_disable_rf,
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
- .set_tx_power = rtl8723a_set_tx_power,
+ .set_tx_power = rtl8xxxu_gen1_set_tx_power,
.update_rate_mask = rtl8xxxu_update_rate_mask,
.report_connect = rtl8xxxu_gen1_report_connect,
.writeN_block_size = 128,
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 08/16] rtl8xxxu: Rename rtl8723au_update_rate_mask() to rtl8xxxu_update_rate_mask()

From: Jes Sorensen <[email protected]>

All currently supported gen1 parts use the same function for updating
the rate mask, so rename it to reflect this.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index d0557ad..469bc9a 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -8199,8 +8199,8 @@ static void rtl8xxxu_sw_scan_complete(struct ieee80211_hw *hw,
rtl8xxxu_write8(priv, REG_BEACON_CTRL, val8);
}

-static void rtl8723au_update_rate_mask(struct rtl8xxxu_priv *priv,
- u32 ramask, int sgi)
+static void rtl8xxxu_update_rate_mask(struct rtl8xxxu_priv *priv,
+ u32 ramask, int sgi)
{
struct h2c_cmd h2c;

@@ -9885,7 +9885,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.disable_rf = rtl8xxxu_gen1_disable_rf,
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
.set_tx_power = rtl8723a_set_tx_power,
- .update_rate_mask = rtl8723au_update_rate_mask,
+ .update_rate_mask = rtl8xxxu_update_rate_mask,
.report_connect = rtl8xxxu_gen1_report_connect,
.writeN_block_size = 1024,
.mbox_ext_reg = REG_HMBOX_EXT_0,
@@ -9957,7 +9957,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.disable_rf = rtl8xxxu_gen1_disable_rf,
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
.set_tx_power = rtl8723a_set_tx_power,
- .update_rate_mask = rtl8723au_update_rate_mask,
+ .update_rate_mask = rtl8xxxu_update_rate_mask,
.report_connect = rtl8xxxu_gen1_report_connect,
.writeN_block_size = 128,
.mbox_ext_reg = REG_HMBOX_EXT_0,
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 15/16] rtl8xxxu: Rename rtl8723bu_simularity_compare()

From: Jes Sorensen <[email protected]>

This renames rtl8723bu_simularity_compare() to
rtl8xxxu_gen2_simularity_compare() to reflect it is used for all gen2
parts.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index bec2c4d..240b361 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -4591,8 +4591,8 @@ static bool rtl8xxxu_simularity_compare(struct rtl8xxxu_priv *priv,
return false;
}

-static bool rtl8723bu_simularity_compare(struct rtl8xxxu_priv *priv,
- int result[][8], int c1, int c2)
+static bool rtl8xxxu_gen2_simularity_compare(struct rtl8xxxu_priv *priv,
+ int result[][8], int c1, int c2)
{
u32 i, j, diff, simubitmap, bound = 0;
int candidate[2] = {-1, -1}; /* for path A and path B */
@@ -6233,7 +6233,8 @@ static void rtl8723bu_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
rtl8723bu_phy_iqcalibrate(priv, result, i);

if (i == 1) {
- simu = rtl8723bu_simularity_compare(priv, result, 0, 1);
+ simu = rtl8xxxu_gen2_simularity_compare(priv,
+ result, 0, 1);
if (simu) {
candidate = 0;
break;
@@ -6241,13 +6242,15 @@ static void rtl8723bu_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
}

if (i == 2) {
- simu = rtl8723bu_simularity_compare(priv, result, 0, 2);
+ simu = rtl8xxxu_gen2_simularity_compare(priv,
+ result, 0, 2);
if (simu) {
candidate = 0;
break;
}

- simu = rtl8723bu_simularity_compare(priv, result, 1, 2);
+ simu = rtl8xxxu_gen2_simularity_compare(priv,
+ result, 1, 2);
if (simu) {
candidate = 1;
} else {
@@ -6348,7 +6351,8 @@ static void rtl8192eu_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
rtl8192eu_phy_iqcalibrate(priv, result, i);

if (i == 1) {
- simu = rtl8723bu_simularity_compare(priv, result, 0, 1);
+ simu = rtl8xxxu_gen2_simularity_compare(priv,
+ result, 0, 1);
if (simu) {
candidate = 0;
break;
@@ -6356,13 +6360,15 @@ static void rtl8192eu_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
}

if (i == 2) {
- simu = rtl8723bu_simularity_compare(priv, result, 0, 2);
+ simu = rtl8xxxu_gen2_simularity_compare(priv,
+ result, 0, 2);
if (simu) {
candidate = 0;
break;
}

- simu = rtl8723bu_simularity_compare(priv, result, 1, 2);
+ simu = rtl8xxxu_gen2_simularity_compare(priv,
+ result, 1, 2);
if (simu)
candidate = 1;
else
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 16/16] rtl8xxxu: Rename rtl8723au_iqk_phy_iq_bb_reg

From: Jes Sorensen <[email protected]>

There is nothing 8723au specific about rtl8723au_iqk_phy_iq_bb_reg so
rename the array to rtl8xxxu_iqk_phy_iq_bb_reg.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 240b361..c48ca20 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -1743,7 +1743,7 @@ static struct rtl8xxxu_rfregs rtl8xxxu_rfregs[] = {
},
};

-static const u32 rtl8723au_iqk_phy_iq_bb_reg[RTL8XXXU_BB_REGS] = {
+static const u32 rtl8xxxu_iqk_phy_iq_bb_reg[RTL8XXXU_BB_REGS] = {
REG_OFDM0_XA_RX_IQ_IMBALANCE,
REG_OFDM0_XB_RX_IQ_IMBALANCE,
REG_OFDM0_ENERGY_CCA_THRES,
@@ -6201,7 +6201,7 @@ static void rtl8xxxu_gen1_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
rtl8xxxu_fill_iqk_matrix_b(priv, path_b_ok, result,
candidate, (reg_ec4 == 0));

- rtl8xxxu_save_regs(priv, rtl8723au_iqk_phy_iq_bb_reg,
+ rtl8xxxu_save_regs(priv, rtl8xxxu_iqk_phy_iq_bb_reg,
priv->bb_recovery_backup, RTL8XXXU_BB_REGS);

rtl8xxxu_prepare_calibrate(priv, 0);
@@ -6309,7 +6309,7 @@ static void rtl8723bu_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
rtl8xxxu_fill_iqk_matrix_b(priv, path_b_ok, result,
candidate, (reg_ec4 == 0));

- rtl8xxxu_save_regs(priv, rtl8723au_iqk_phy_iq_bb_reg,
+ rtl8xxxu_save_regs(priv, rtl8xxxu_iqk_phy_iq_bb_reg,
priv->bb_recovery_backup, RTL8XXXU_BB_REGS);

rtl8xxxu_write32(priv, REG_BT_CONTROL_8723BU, bt_control);
@@ -6420,7 +6420,7 @@ static void rtl8192eu_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
rtl8xxxu_fill_iqk_matrix_b(priv, path_b_ok, result,
candidate, (reg_ec4 == 0));

- rtl8xxxu_save_regs(priv, rtl8723au_iqk_phy_iq_bb_reg,
+ rtl8xxxu_save_regs(priv, rtl8xxxu_iqk_phy_iq_bb_reg,
priv->bb_recovery_backup, RTL8XXXU_BB_REGS);
}

--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 09/16] rtl8xxxu: Rename rtl8723au_phy_iq_calibrate() to rtl8xxxu_gen1_phy_iq_calibrate()

From: Jes Sorensen <[email protected]>

All supported gen1 parts use the same phy_iq_calibrate() function
(unlike their gen2 counterparts). Rename the function to reflect this.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 469bc9a..d5c2117 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -6103,7 +6103,7 @@ static void rtl8xxxu_prepare_calibrate(struct rtl8xxxu_priv *priv, u8 start)
rtl8723a_h2c_cmd(priv, &h2c, sizeof(h2c.bt_wlan_calibration));
}

-static void rtl8723au_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
+static void rtl8xxxu_gen1_phy_iq_calibrate(struct rtl8xxxu_priv *priv)
{
struct device *dev = &priv->udev->dev;
int result[4][8]; /* last is final result */
@@ -9878,7 +9878,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.llt_init = rtl8xxxu_init_llt_table,
.init_phy_bb = rtl8723au_init_phy_bb,
.init_phy_rf = rtl8723au_init_phy_rf,
- .phy_iq_calibrate = rtl8723au_phy_iq_calibrate,
+ .phy_iq_calibrate = rtl8xxxu_gen1_phy_iq_calibrate,
.config_channel = rtl8xxxu_gen1_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
.enable_rf = rtl8723a_enable_rf,
@@ -9950,7 +9950,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.llt_init = rtl8xxxu_init_llt_table,
.init_phy_bb = rtl8723au_init_phy_bb,
.init_phy_rf = rtl8192cu_init_phy_rf,
- .phy_iq_calibrate = rtl8723au_phy_iq_calibrate,
+ .phy_iq_calibrate = rtl8xxxu_gen1_phy_iq_calibrate,
.config_channel = rtl8xxxu_gen1_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
.enable_rf = rtl8723a_enable_rf,
--
2.5.5


2016-04-18 16:03:55

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH 00/16] rtl8xxxu prepare for splitting into multiple files

On 04/18/2016 10:49 AM, [email protected] wrote:
> From: Jes Sorensen <[email protected]>
>
> Hi,
>
> This is the last set of patches I have in my queue for the rtl8xxxu
> driver, as of today :)
>
> Since the driver has grown to support quite a number of different
> chips, I want to split it into multiple files. This will make it
> easier to maintain and also eaiser to add support for more chips
> without having to constantly touch the core files.
>
> This set renames a bunch of functions to indicate that they are
> generic rather than chip specific. I will look at doing the actual
> moving around in a set right after the current merge window closes.
>
> Please keep the test reports coming!

I like the renaming of the routines to match the chip generation, but there
should be some comments stating the gen to which each device/version belongs.
Such comments are not needed now, but could be included when the files are split.

Larry


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 12/16] rtl8xxxu: Rename rtl8723a_enable_rf() to rtl8xxxu_gen1_enable_rf()

From: Jes Sorensen <[email protected]>

All gen1 parts use the same enable_rf() function, so rename it to
reflect this.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 1499aa0..a2f5609 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -2076,7 +2076,7 @@ static void rtl8723bu_write_btreg(struct rtl8xxxu_priv *priv, u8 reg, u8 data)
rtl8723a_h2c_cmd(priv, &h2c, sizeof(h2c.bt_mp_oper));
}

-static void rtl8723a_enable_rf(struct rtl8xxxu_priv *priv)
+static void rtl8xxxu_gen1_enable_rf(struct rtl8xxxu_priv *priv)
{
u8 val8;
u32 val32;
@@ -9881,7 +9881,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.phy_iq_calibrate = rtl8xxxu_gen1_phy_iq_calibrate,
.config_channel = rtl8xxxu_gen1_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
- .enable_rf = rtl8723a_enable_rf,
+ .enable_rf = rtl8xxxu_gen1_enable_rf,
.disable_rf = rtl8xxxu_gen1_disable_rf,
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
.set_tx_power = rtl8xxxu_gen1_set_tx_power,
@@ -9953,7 +9953,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.phy_iq_calibrate = rtl8xxxu_gen1_phy_iq_calibrate,
.config_channel = rtl8xxxu_gen1_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
- .enable_rf = rtl8723a_enable_rf,
+ .enable_rf = rtl8xxxu_gen1_enable_rf,
.disable_rf = rtl8xxxu_gen1_disable_rf,
.usb_quirks = rtl8xxxu_gen1_usb_quirks,
.set_tx_power = rtl8xxxu_gen1_set_tx_power,
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 04/16] rtl8xxxu: Rename rtl8723bu_config_channel() to rtl8xxxu_gen2_config_channel()

From: Jes Sorensen <[email protected]>

Rename the function to indicate it is applicable to most/all gen2
parts.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index a7f7031..0928352 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -2341,7 +2341,7 @@ static void rtl8723au_config_channel(struct ieee80211_hw *hw)
}
}

-static void rtl8723bu_config_channel(struct ieee80211_hw *hw)
+static void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
{
struct rtl8xxxu_priv *priv = hw->priv;
u32 val32, rsr;
@@ -9913,7 +9913,7 @@ static struct rtl8xxxu_fileops rtl8723bu_fops = {
.init_phy_rf = rtl8723bu_init_phy_rf,
.phy_init_antenna_selection = rtl8723bu_phy_init_antenna_selection,
.phy_iq_calibrate = rtl8723bu_phy_iq_calibrate,
- .config_channel = rtl8723bu_config_channel,
+ .config_channel = rtl8xxxu_gen2_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc24,
.init_aggregation = rtl8723bu_init_aggregation,
.init_statistics = rtl8723bu_init_statistics,
@@ -9986,7 +9986,7 @@ static struct rtl8xxxu_fileops rtl8192eu_fops = {
.init_phy_bb = rtl8192eu_init_phy_bb,
.init_phy_rf = rtl8192eu_init_phy_rf,
.phy_iq_calibrate = rtl8192eu_phy_iq_calibrate,
- .config_channel = rtl8723bu_config_channel,
+ .config_channel = rtl8xxxu_gen2_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc24,
.enable_rf = rtl8192e_enable_rf,
.disable_rf = rtl8723b_disable_rf,
--
2.5.5


2016-04-18 16:07:16

by Jes Sorensen

[permalink] [raw]
Subject: Re: [PATCH 00/16] rtl8xxxu prepare for splitting into multiple files

Joe Perches <[email protected]> writes:
> On Mon, 2016-04-18 at 11:49 -0400, [email protected] wrote:
>> From: Jes Sorensen <[email protected]>
>>
>> Hi,
>>
>> This is the last set of patches I have in my queue for the rtl8xxxu
>> driver, as of today :)
>>
>> Since the driver has grown to support quite a number of different
>> chips, I want to split it into multiple files. This will make it
>> easier to maintain and also eaiser to add support for more chips
>> without having to constantly touch the core files.
>>
>> This set renames a bunch of functions to indicate that they are
>> generic rather than chip specific. I will look at doing the actual
>> moving around in a set right after the current merge window closes.
>
> It's a bit of a pity that the identifiers are all
> quite long.  Using these long identifiers makes
> 80 column content a bit right shifted and single
> line statements unlikely.

Well I do agree that some of the names are long and I try to keep them
as short as possible when I can. However I refuse to turn this into a
NetBSD driver :)

Jes

2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 13/16] rtl8xxxu: Rename rtl8723a_mac_init_table to rtl8xxxu_gen1_mac_init_table

From: Jes Sorensen <[email protected]>

All currently supported gen1 parts use the same mac_init_table, so
rename it to reflect this.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index a2f5609..fb13a77 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -128,7 +128,7 @@ static struct ieee80211_supported_band rtl8xxxu_supported_band = {
.n_bitrates = ARRAY_SIZE(rtl8xxxu_rates),
};

-static struct rtl8xxxu_reg8val rtl8723a_mac_init_table[] = {
+static struct rtl8xxxu_reg8val rtl8xxxu_gen1_mac_init_table[] = {
{0x420, 0x80}, {0x423, 0x00}, {0x430, 0x00}, {0x431, 0x00},
{0x432, 0x00}, {0x433, 0x01}, {0x434, 0x04}, {0x435, 0x05},
{0x436, 0x06}, {0x437, 0x07}, {0x438, 0x00}, {0x439, 0x00},
@@ -9899,7 +9899,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.trxff_boundary = 0x27ff,
.pbp_rx = PBP_PAGE_SIZE_128,
.pbp_tx = PBP_PAGE_SIZE_128,
- .mactable = rtl8723a_mac_init_table,
+ .mactable = rtl8xxxu_gen1_mac_init_table,
};

static struct rtl8xxxu_fileops rtl8723bu_fops = {
@@ -9971,7 +9971,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.trxff_boundary = 0x27ff,
.pbp_rx = PBP_PAGE_SIZE_128,
.pbp_tx = PBP_PAGE_SIZE_128,
- .mactable = rtl8723a_mac_init_table,
+ .mactable = rtl8xxxu_gen1_mac_init_table,
};

#endif
--
2.5.5


2016-04-18 15:49:38

by Jes Sorensen

[permalink] [raw]
Subject: [PATCH 07/16] rtl8xxxu: Rename rtl8723au_config_channel() to rtl8xxxu_gen1_config_channel()

From: Jes Sorensen <[email protected]>

All supported gen1 parts use the same config_channel() function, so
rename it to reflect this.

Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
index 4aab4f5..d0557ad 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
@@ -2219,7 +2219,7 @@ static int rtl8723b_channel_to_group(int channel)
return group;
}

-static void rtl8723au_config_channel(struct ieee80211_hw *hw)
+static void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw)
{
struct rtl8xxxu_priv *priv = hw->priv;
u32 val32, rsr;
@@ -9879,7 +9879,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
.init_phy_bb = rtl8723au_init_phy_bb,
.init_phy_rf = rtl8723au_init_phy_rf,
.phy_iq_calibrate = rtl8723au_phy_iq_calibrate,
- .config_channel = rtl8723au_config_channel,
+ .config_channel = rtl8xxxu_gen1_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
.enable_rf = rtl8723a_enable_rf,
.disable_rf = rtl8xxxu_gen1_disable_rf,
@@ -9951,7 +9951,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
.init_phy_bb = rtl8723au_init_phy_bb,
.init_phy_rf = rtl8192cu_init_phy_rf,
.phy_iq_calibrate = rtl8723au_phy_iq_calibrate,
- .config_channel = rtl8723au_config_channel,
+ .config_channel = rtl8xxxu_gen1_config_channel,
.parse_rx_desc = rtl8xxxu_parse_rxdesc16,
.enable_rf = rtl8723a_enable_rf,
.disable_rf = rtl8xxxu_gen1_disable_rf,
--
2.5.5