aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/phy_common.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-09-02 13:00:34 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-09-05 16:17:49 -0400
commitfb11137af83b7b66c7aab8dbc5f09d2c95684fed (patch)
tree08251ad486eb4c115f56ee4ddfb56a80c2d7c287 /drivers/net/wireless/b43/phy_common.h
parent7cb770729ba895f73253dfcd46c3fcba45d896f9 (diff)
b43: Split PHY alloc and init
This splits the PHY allocation from the PHY init. This is needed in order to properly support Analog handling. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_common.h')
-rw-r--r--drivers/net/wireless/b43/phy_common.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index a876e169cc8..4a1795f5fc2 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -74,11 +74,21 @@ enum b43_txpwr_result {
/**
* struct b43_phy_operations - Function pointers for PHY ops.
*
- * @prepare: Prepare the PHY. This is called before @init.
+ * @allocate: Allocate and initialise the PHY data structures.
+ * Must not be NULL.
+ * @free: Destroy and free the PHY data structures.
+ * Must not be NULL.
+ *
+ * @prepare_structs: Prepare the PHY data structures.
+ * The data structures allocated in @allocate are
+ * initialized here.
+ * Must not be NULL.
+ * @prepare_hardware: Prepare the PHY. This is called before b43_chip_init to
+ * do some early early PHY hardware init.
* Can be NULL, if not required.
* @init: Initialize the PHY.
* Must not be NULL.
- * @exit: Shutdown the PHY and free all data structures.
+ * @exit: Shutdown the PHY.
* Can be NULL, if not required.
*
* @phy_read: Read from a PHY register.
@@ -133,7 +143,9 @@ enum b43_txpwr_result {
struct b43_phy_operations {
/* Initialisation */
int (*allocate)(struct b43_wldev *dev);
- int (*prepare)(struct b43_wldev *dev);
+ void (*free)(struct b43_wldev *dev);
+ void (*prepare_structs)(struct b43_wldev *dev);
+ int (*prepare_hardware)(struct b43_wldev *dev);
int (*init)(struct b43_wldev *dev);
void (*exit)(struct b43_wldev *dev);
@@ -237,10 +249,15 @@ struct b43_phy {
/**
- * b43_phy_operations_setup - Initialize the PHY operations datastructure
- * based on the current PHY type.
+ * b43_phy_allocate - Allocate PHY structs
+ * Allocate the PHY data structures, based on the current dev->phy.type
+ */
+int b43_phy_allocate(struct b43_wldev *dev);
+
+/**
+ * b43_phy_free - Free PHY structs
*/
-int b43_phy_operations_setup(struct b43_wldev *dev);
+void b43_phy_free(struct b43_wldev *dev);
/**
* b43_phy_init - Initialise the PHY