b43: LCN-PHY add place for new PHY support
authorRafał Miłecki <zajec5@gmail.com>
Thu, 7 Jul 2011 13:25:27 +0000 (15:25 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Jul 2011 15:11:25 +0000 (11:11 -0400)
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>
drivers/net/wireless/b43/Kconfig
drivers/net/wireless/b43/Makefile
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/phy_lcn.c [new file with mode: 0644]
drivers/net/wireless/b43/phy_lcn.h [new file with mode: 0644]
drivers/net/wireless/b43/tables_phy_lcn.c [new file with mode: 0644]
drivers/net/wireless/b43/tables_phy_lcn.h [new file with mode: 0644]

index 21b079898eb8bb8415299169424cac75d83beb42..d2293dcc117ff93f652caf576b01ebf2e4291a90 100644 (file)
@@ -131,6 +131,14 @@ config B43_PHY_HT
 
          Say N, this is BROKEN and crashes driver.
 
+config B43_PHY_LCN
+       bool "Support for LCN-PHY devices (BROKEN)"
+       depends on B43 && BROKEN
+       ---help---
+         Support for the LCN-PHY.
+
+         Say N, this is BROKEN and crashes driver.
+
 # This config option automatically enables b43 LEDS support,
 # if it's possible.
 config B43_LEDS
index 1b25604be5472ec29e8535496bc2d61aa1ebb95a..4648bbf76abcb617d97d5a40aa4a4255b1228c74 100644 (file)
@@ -13,6 +13,7 @@ b43-$(CONFIG_B43_PHY_LP)      += tables_lpphy.o
 b43-$(CONFIG_B43_PHY_HT)       += phy_ht.o
 b43-$(CONFIG_B43_PHY_HT)       += tables_phy_ht.o
 b43-$(CONFIG_B43_PHY_HT)       += radio_2059.o
+b43-$(CONFIG_B43_PHY_LCN)      += phy_lcn.o tables_phy_lcn.o
 b43-y                          += sysfs.o
 b43-y                          += xmit.o
 b43-y                          += lo.o
index bff08707c430f58937412a5780559561249565dd..5a3454ab038d7e9dac567a299bbe1a4125a92053 100644 (file)
@@ -4204,6 +4204,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
                if (phy_rev > 1)
                        unsupported = 1;
                break;
+#endif
+#ifdef CONFIG_B43_PHY_LCN
+       case B43_PHYTYPE_LCN:
+               if (phy_rev > 1)
+                       unsupported = 1;
+               break;
 #endif
        default:
                unsupported = 1;
@@ -4285,6 +4291,10 @@ static int b43_phy_versioning(struct b43_wldev *dev)
                if (radio_ver != 0x2059)
                        unsupported = 1;
                break;
+       case B43_PHYTYPE_LCN:
+               if (radio_ver != 0x2064)
+                       unsupported = 1;
+               break;
        default:
                B43_WARN_ON(1);
        }
diff --git a/drivers/net/wireless/b43/phy_lcn.c b/drivers/net/wireless/b43/phy_lcn.c
new file mode 100644 (file)
index 0000000..9f7dbbd
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+
+  Broadcom B43 wireless driver
+  IEEE 802.11n LCN-PHY support
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; see the file COPYING.  If not, write to
+  the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+  Boston, MA 02110-1301, USA.
+
+*/
+
+#include <linux/slab.h>
+
+#include "b43.h"
+#include "phy_lcn.h"
+#include "tables_phy_lcn.h"
+#include "main.h"
+
+/**************************************************
+ * PHY ops struct.
+ **************************************************/
+
+const struct b43_phy_operations b43_phyops_lcn = {
+       /*
+       .allocate               = b43_phy_lcn_op_allocate,
+       .free                   = b43_phy_lcn_op_free,
+       .prepare_structs        = b43_phy_lcn_op_prepare_structs,
+       .init                   = b43_phy_lcn_op_init,
+       .phy_read               = b43_phy_lcn_op_read,
+       .phy_write              = b43_phy_lcn_op_write,
+       .phy_maskset            = b43_phy_lcn_op_maskset,
+       .radio_read             = b43_phy_lcn_op_radio_read,
+       .radio_write            = b43_phy_lcn_op_radio_write,
+       .software_rfkill        = b43_phy_lcn_op_software_rfkill,
+       .switch_analog          = b43_phy_lcn_op_switch_analog,
+       .switch_channel         = b43_phy_lcn_op_switch_channel,
+       .get_default_chan       = b43_phy_lcn_op_get_default_chan,
+       .recalc_txpower         = b43_phy_lcn_op_recalc_txpower,
+       .adjust_txpower         = b43_phy_lcn_op_adjust_txpower,
+       */
+};
diff --git a/drivers/net/wireless/b43/phy_lcn.h b/drivers/net/wireless/b43/phy_lcn.h
new file mode 100644 (file)
index 0000000..c046c2a
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef B43_PHY_LCN_H_
+#define B43_PHY_LCN_H_
+
+#include "phy_common.h"
+
+
+struct b43_phy_lcn {
+};
+
+
+struct b43_phy_operations;
+extern const struct b43_phy_operations b43_phyops_lcn;
+
+#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 (file)
index 0000000..40c1d09
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+
+  Broadcom B43 wireless driver
+  IEEE 802.11n LCN-PHY data tables
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; see the file COPYING.  If not, write to
+  the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+  Boston, MA 02110-1301, USA.
+
+*/
+
+#include "b43.h"
+#include "tables_phy_lcn.h"
+#include "phy_common.h"
+#include "phy_lcn.h"
+
+/**************************************************
+ * Tables ops.
+ **************************************************/
+
+void b43_phy_lcn_tables_init(struct b43_wldev *dev)
+{
+}
diff --git a/drivers/net/wireless/b43/tables_phy_lcn.h b/drivers/net/wireless/b43/tables_phy_lcn.h
new file mode 100644 (file)
index 0000000..5e31b15
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef B43_TABLES_PHY_LCN_H_
+#define B43_TABLES_PHY_LCN_H_
+
+void b43_phy_lcn_tables_init(struct b43_wldev *dev);
+
+#endif /* B43_TABLES_PHY_LCN_H_ */