diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-10-14 15:16:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-15 15:57:40 -0400 |
commit | 5161bec5a8b3509b8cf69418129a191cf90bbd87 (patch) | |
tree | 6a77bedbc09f5e3c52fa6452eb4e4b2c85123739 /drivers | |
parent | 886b42bf5e54098061c8bae3d5e292a8b6897401 (diff) |
b43: N-PHY: put 2056-radio's specific code in separated file
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/Makefile | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43/radio_2056.c | 43 | ||||
-rw-r--r-- | drivers/net/wireless/b43/radio_2056.h | 42 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.h | 11 |
6 files changed, 88 insertions, 30 deletions
diff --git a/drivers/net/wireless/b43/Makefile b/drivers/net/wireless/b43/Makefile index 0398c7cd2d15..69d4af09a6cb 100644 --- a/drivers/net/wireless/b43/Makefile +++ b/drivers/net/wireless/b43/Makefile | |||
@@ -2,6 +2,7 @@ b43-y += main.o | |||
2 | b43-y += tables.o | 2 | b43-y += tables.o |
3 | b43-$(CONFIG_B43_NPHY) += tables_nphy.o | 3 | b43-$(CONFIG_B43_NPHY) += tables_nphy.o |
4 | b43-$(CONFIG_B43_NPHY) += radio_2055.o | 4 | b43-$(CONFIG_B43_NPHY) += radio_2055.o |
5 | b43-$(CONFIG_B43_NPHY) += radio_2056.o | ||
5 | b43-y += phy_common.o | 6 | b43-y += phy_common.o |
6 | b43-y += phy_g.o | 7 | b43-y += phy_g.o |
7 | b43-y += phy_a.o | 8 | b43-y += phy_a.o |
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 284b54fde41d..1bdf20c8c43b 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "phy_n.h" | 30 | #include "phy_n.h" |
31 | #include "tables_nphy.h" | 31 | #include "tables_nphy.h" |
32 | #include "radio_2055.h" | 32 | #include "radio_2055.h" |
33 | #include "radio_2056.h" | ||
33 | #include "main.h" | 34 | #include "main.h" |
34 | 35 | ||
35 | struct nphy_txgains { | 36 | struct nphy_txgains { |
diff --git a/drivers/net/wireless/b43/radio_2056.c b/drivers/net/wireless/b43/radio_2056.c new file mode 100644 index 000000000000..d8563192ce56 --- /dev/null +++ b/drivers/net/wireless/b43/radio_2056.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | |||
3 | Broadcom B43 wireless driver | ||
4 | IEEE 802.11n 2056 radio device data tables | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; see the file COPYING. If not, write to | ||
18 | the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, | ||
19 | Boston, MA 02110-1301, USA. | ||
20 | |||
21 | */ | ||
22 | |||
23 | #include "b43.h" | ||
24 | #include "radio_2056.h" | ||
25 | #include "phy_common.h" | ||
26 | |||
27 | static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = { | ||
28 | }; | ||
29 | |||
30 | const struct b43_nphy_channeltab_entry_rev3 * | ||
31 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) | ||
32 | { | ||
33 | const struct b43_nphy_channeltab_entry_rev3 *e; | ||
34 | unsigned int i; | ||
35 | |||
36 | for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) { | ||
37 | e = &(b43_nphy_channeltab_rev3[i]); | ||
38 | if (e->freq == freq) | ||
39 | return e; | ||
40 | } | ||
41 | |||
42 | return NULL; | ||
43 | } | ||
diff --git a/drivers/net/wireless/b43/radio_2056.h b/drivers/net/wireless/b43/radio_2056.h new file mode 100644 index 000000000000..fda6dafecb8c --- /dev/null +++ b/drivers/net/wireless/b43/radio_2056.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | |||
3 | Broadcom B43 wireless driver | ||
4 | |||
5 | Copyright (c) 2010 Rafał Miłecki <zajec5@gmail.com> | ||
6 | |||
7 | This program is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2 of the License, or | ||
10 | (at your option) any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, | ||
20 | Boston, MA 02110-1301, USA. | ||
21 | |||
22 | */ | ||
23 | |||
24 | #ifndef B43_RADIO_2056_H_ | ||
25 | #define B43_RADIO_2056_H_ | ||
26 | |||
27 | #include <linux/types.h> | ||
28 | |||
29 | #include "tables_nphy.h" | ||
30 | |||
31 | struct b43_nphy_channeltab_entry_rev3 { | ||
32 | /* The channel number */ | ||
33 | u8 channel; | ||
34 | /* The channel frequency in MHz */ | ||
35 | u16 freq; | ||
36 | /* Radio register values on channelswitch */ | ||
37 | /* TODO */ | ||
38 | /* PHY register values on channelswitch */ | ||
39 | struct b43_phy_n_sfo_cfg phy_regs; | ||
40 | }; | ||
41 | |||
42 | #endif /* B43_RADIO_2056_H_ */ | ||
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c index cff7bd379ad8..d60db078eae2 100644 --- a/drivers/net/wireless/b43/tables_nphy.c +++ b/drivers/net/wireless/b43/tables_nphy.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Broadcom B43 wireless driver | 3 | Broadcom B43 wireless driver |
4 | IEEE 802.11n PHY and radio device data tables | 4 | IEEE 802.11n PHY data tables |
5 | 5 | ||
6 | Copyright (c) 2008 Michael Buesch <mb@bu3sch.de> | 6 | Copyright (c) 2008 Michael Buesch <mb@bu3sch.de> |
7 | 7 | ||
@@ -27,24 +27,6 @@ | |||
27 | #include "phy_common.h" | 27 | #include "phy_common.h" |
28 | #include "phy_n.h" | 28 | #include "phy_n.h" |
29 | 29 | ||
30 | static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev3[] = { | ||
31 | }; | ||
32 | |||
33 | const struct b43_nphy_channeltab_entry_rev3 * | ||
34 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) | ||
35 | { | ||
36 | const struct b43_nphy_channeltab_entry_rev3 *e; | ||
37 | unsigned int i; | ||
38 | |||
39 | for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) { | ||
40 | e = &(b43_nphy_channeltab_rev3[i]); | ||
41 | if (e->freq == freq) | ||
42 | return e; | ||
43 | } | ||
44 | |||
45 | return NULL; | ||
46 | } | ||
47 | |||
48 | static const u8 b43_ntab_adjustpower0[] = { | 30 | static const u8 b43_ntab_adjustpower0[] = { |
49 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, | 31 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, |
50 | 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, | 32 | 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, |
diff --git a/drivers/net/wireless/b43/tables_nphy.h b/drivers/net/wireless/b43/tables_nphy.h index cb06d397ea2d..4ec593ba3eef 100644 --- a/drivers/net/wireless/b43/tables_nphy.h +++ b/drivers/net/wireless/b43/tables_nphy.h | |||
@@ -12,17 +12,6 @@ struct b43_phy_n_sfo_cfg { | |||
12 | u16 phy_bw6; | 12 | u16 phy_bw6; |
13 | }; | 13 | }; |
14 | 14 | ||
15 | struct b43_nphy_channeltab_entry_rev3 { | ||
16 | /* The channel number */ | ||
17 | u8 channel; | ||
18 | /* The channel frequency in MHz */ | ||
19 | u16 freq; | ||
20 | /* Radio register values on channelswitch */ | ||
21 | /* TODO */ | ||
22 | /* PHY register values on channelswitch */ | ||
23 | struct b43_phy_n_sfo_cfg phy_regs; | ||
24 | }; | ||
25 | |||
26 | struct b43_wldev; | 15 | struct b43_wldev; |
27 | 16 | ||
28 | struct nphy_txiqcal_ladder { | 17 | struct nphy_txiqcal_ladder { |