aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-07-07 09:25:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-08 11:11:25 -0400
commit1d738e64f3d957d56c1b51e64ebdef986a8760e3 (patch)
tree15bc3db421bd44c031b58bd4953d69c91fc081eb
parent0cd20a278e1ef9da9f6a987942794c9d65af8c4d (diff)
b43: LCN-PHY add place for new PHY support
LCN-PHY was found in 14e4:4727 card. It uses LCN/1 and 0x2064/1 radio. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43/Kconfig8
-rw-r--r--drivers/net/wireless/b43/Makefile1
-rw-r--r--drivers/net/wireless/b43/main.c10
-rw-r--r--drivers/net/wireless/b43/phy_lcn.c52
-rw-r--r--drivers/net/wireless/b43/phy_lcn.h14
-rw-r--r--drivers/net/wireless/b43/tables_phy_lcn.c34
-rw-r--r--drivers/net/wireless/b43/tables_phy_lcn.h6
7 files changed, 125 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
index 21b079898eb8..d2293dcc117f 100644
--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
@@ -131,6 +131,14 @@ config B43_PHY_HT
131 131
132 Say N, this is BROKEN and crashes driver. 132 Say N, this is BROKEN and crashes driver.
133 133
134config B43_PHY_LCN
135 bool "Support for LCN-PHY devices (BROKEN)"
136 depends on B43 && BROKEN
137 ---help---
138 Support for the LCN-PHY.
139
140 Say N, this is BROKEN and crashes driver.
141
134# This config option automatically enables b43 LEDS support, 142# This config option automatically enables b43 LEDS support,
135# if it's possible. 143# if it's possible.
136config B43_LEDS 144config B43_LEDS
diff --git a/drivers/net/wireless/b43/Makefile b/drivers/net/wireless/b43/Makefile
index 1b25604be547..4648bbf76abc 100644
--- a/drivers/net/wireless/b43/Makefile
+++ b/drivers/net/wireless/b43/Makefile
@@ -13,6 +13,7 @@ b43-$(CONFIG_B43_PHY_LP) += tables_lpphy.o
13b43-$(CONFIG_B43_PHY_HT) += phy_ht.o 13b43-$(CONFIG_B43_PHY_HT) += phy_ht.o
14b43-$(CONFIG_B43_PHY_HT) += tables_phy_ht.o 14b43-$(CONFIG_B43_PHY_HT) += tables_phy_ht.o
15b43-$(CONFIG_B43_PHY_HT) += radio_2059.o 15b43-$(CONFIG_B43_PHY_HT) += radio_2059.o
16b43-$(CONFIG_B43_PHY_LCN) += phy_lcn.o tables_phy_lcn.o
16b43-y += sysfs.o 17b43-y += sysfs.o
17b43-y += xmit.o 18b43-y += xmit.o
18b43-y += lo.o 19b43-y += lo.o
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index bff08707c430..5a3454ab038d 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4205,6 +4205,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
4205 unsupported = 1; 4205 unsupported = 1;
4206 break; 4206 break;
4207#endif 4207#endif
4208#ifdef CONFIG_B43_PHY_LCN
4209 case B43_PHYTYPE_LCN:
4210 if (phy_rev > 1)
4211 unsupported = 1;
4212 break;
4213#endif
4208 default: 4214 default:
4209 unsupported = 1; 4215 unsupported = 1;
4210 }; 4216 };
@@ -4285,6 +4291,10 @@ static int b43_phy_versioning(struct b43_wldev *dev)
4285 if (radio_ver != 0x2059) 4291 if (radio_ver != 0x2059)
4286 unsupported = 1; 4292 unsupported = 1;
4287 break; 4293 break;
4294 case B43_PHYTYPE_LCN:
4295 if (radio_ver != 0x2064)
4296 unsupported = 1;
4297 break;
4288 default: 4298 default:
4289 B43_WARN_ON(1); 4299 B43_WARN_ON(1);
4290 } 4300 }
diff --git a/drivers/net/wireless/b43/phy_lcn.c b/drivers/net/wireless/b43/phy_lcn.c
new file mode 100644
index 000000000000..9f7dbbd5ced6
--- /dev/null
+++ b/drivers/net/wireless/b43/phy_lcn.c
@@ -0,0 +1,52 @@
1/*
2
3 Broadcom B43 wireless driver
4 IEEE 802.11n LCN-PHY support
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 <linux/slab.h>
24
25#include "b43.h"
26#include "phy_lcn.h"
27#include "tables_phy_lcn.h"
28#include "main.h"
29
30/**************************************************
31 * PHY ops struct.
32 **************************************************/
33
34const struct b43_phy_operations b43_phyops_lcn = {
35 /*
36 .allocate = b43_phy_lcn_op_allocate,
37 .free = b43_phy_lcn_op_free,
38 .prepare_structs = b43_phy_lcn_op_prepare_structs,
39 .init = b43_phy_lcn_op_init,
40 .phy_read = b43_phy_lcn_op_read,
41 .phy_write = b43_phy_lcn_op_write,
42 .phy_maskset = b43_phy_lcn_op_maskset,
43 .radio_read = b43_phy_lcn_op_radio_read,
44 .radio_write = b43_phy_lcn_op_radio_write,
45 .software_rfkill = b43_phy_lcn_op_software_rfkill,
46 .switch_analog = b43_phy_lcn_op_switch_analog,
47 .switch_channel = b43_phy_lcn_op_switch_channel,
48 .get_default_chan = b43_phy_lcn_op_get_default_chan,
49 .recalc_txpower = b43_phy_lcn_op_recalc_txpower,
50 .adjust_txpower = b43_phy_lcn_op_adjust_txpower,
51 */
52};
diff --git a/drivers/net/wireless/b43/phy_lcn.h b/drivers/net/wireless/b43/phy_lcn.h
new file mode 100644
index 000000000000..c046c2a6cab4
--- /dev/null
+++ b/drivers/net/wireless/b43/phy_lcn.h
@@ -0,0 +1,14 @@
1#ifndef B43_PHY_LCN_H_
2#define B43_PHY_LCN_H_
3
4#include "phy_common.h"
5
6
7struct b43_phy_lcn {
8};
9
10
11struct b43_phy_operations;
12extern const struct b43_phy_operations b43_phyops_lcn;
13
14#endif /* B43_PHY_LCN_H_ */ \ No newline at end of file
diff --git a/drivers/net/wireless/b43/tables_phy_lcn.c b/drivers/net/wireless/b43/tables_phy_lcn.c
new file mode 100644
index 000000000000..40c1d0915dd3
--- /dev/null
+++ b/drivers/net/wireless/b43/tables_phy_lcn.c
@@ -0,0 +1,34 @@
1/*
2
3 Broadcom B43 wireless driver
4 IEEE 802.11n LCN-PHY 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 "tables_phy_lcn.h"
25#include "phy_common.h"
26#include "phy_lcn.h"
27
28/**************************************************
29 * Tables ops.
30 **************************************************/
31
32void b43_phy_lcn_tables_init(struct b43_wldev *dev)
33{
34}
diff --git a/drivers/net/wireless/b43/tables_phy_lcn.h b/drivers/net/wireless/b43/tables_phy_lcn.h
new file mode 100644
index 000000000000..5e31b15b81ec
--- /dev/null
+++ b/drivers/net/wireless/b43/tables_phy_lcn.h
@@ -0,0 +1,6 @@
1#ifndef B43_TABLES_PHY_LCN_H_
2#define B43_TABLES_PHY_LCN_H_
3
4void b43_phy_lcn_tables_init(struct b43_wldev *dev);
5
6#endif /* B43_TABLES_PHY_LCN_H_ */