aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_common.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-09-02 07:00:34 -0400
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 a876e169cc87..4a1795f5fc21 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 {
74/** 74/**
75 * struct b43_phy_operations - Function pointers for PHY ops. 75 * struct b43_phy_operations - Function pointers for PHY ops.
76 * 76 *
77 * @prepare: Prepare the PHY. This is called before @init. 77 * @allocate: Allocate and initialise the PHY data structures.
78 * Must not be NULL.
79 * @free: Destroy and free the PHY data structures.
80 * Must not be NULL.
81 *
82 * @prepare_structs: Prepare the PHY data structures.
83 * The data structures allocated in @allocate are
84 * initialized here.
85 * Must not be NULL.
86 * @prepare_hardware: Prepare the PHY. This is called before b43_chip_init to
87 * do some early early PHY hardware init.
78 * Can be NULL, if not required. 88 * Can be NULL, if not required.
79 * @init: Initialize the PHY. 89 * @init: Initialize the PHY.
80 * Must not be NULL. 90 * Must not be NULL.
81 * @exit: Shutdown the PHY and free all data structures. 91 * @exit: Shutdown the PHY.
82 * Can be NULL, if not required. 92 * Can be NULL, if not required.
83 * 93 *
84 * @phy_read: Read from a PHY register. 94 * @phy_read: Read from a PHY register.
@@ -133,7 +143,9 @@ enum b43_txpwr_result {
133struct b43_phy_operations { 143struct b43_phy_operations {
134 /* Initialisation */ 144 /* Initialisation */
135 int (*allocate)(struct b43_wldev *dev); 145 int (*allocate)(struct b43_wldev *dev);
136 int (*prepare)(struct b43_wldev *dev); 146 void (*free)(struct b43_wldev *dev);
147 void (*prepare_structs)(struct b43_wldev *dev);
148 int (*prepare_hardware)(struct b43_wldev *dev);
137 int (*init)(struct b43_wldev *dev); 149 int (*init)(struct b43_wldev *dev);
138 void (*exit)(struct b43_wldev *dev); 150 void (*exit)(struct b43_wldev *dev);
139 151
@@ -237,10 +249,15 @@ struct b43_phy {
237 249
238 250
239/** 251/**
240 * b43_phy_operations_setup - Initialize the PHY operations datastructure 252 * b43_phy_allocate - Allocate PHY structs
241 * based on the current PHY type. 253 * Allocate the PHY data structures, based on the current dev->phy.type
254 */
255int b43_phy_allocate(struct b43_wldev *dev);
256
257/**
258 * b43_phy_free - Free PHY structs
242 */ 259 */
243int b43_phy_operations_setup(struct b43_wldev *dev); 260void b43_phy_free(struct b43_wldev *dev);
244 261
245/** 262/**
246 * b43_phy_init - Initialise the PHY 263 * b43_phy_init - Initialise the PHY