aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r--drivers/net/wireless/b43/main.c3
-rw-r--r--drivers/net/wireless/b43/phy_common.c5
-rw-r--r--drivers/net/wireless/b43/phy_common.h3
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 3d67e6b08e1c..bf279170b483 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -5164,6 +5164,7 @@ static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy,
5164static int b43_wireless_core_attach(struct b43_wldev *dev) 5164static int b43_wireless_core_attach(struct b43_wldev *dev)
5165{ 5165{
5166 struct b43_wl *wl = dev->wl; 5166 struct b43_wl *wl = dev->wl;
5167 struct b43_phy *phy = &dev->phy;
5167 int err; 5168 int err;
5168 u32 tmp; 5169 u32 tmp;
5169 bool have_2ghz_phy = false, have_5ghz_phy = false; 5170 bool have_2ghz_phy = false, have_5ghz_phy = false;
@@ -5181,6 +5182,8 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
5181 goto out; 5182 goto out;
5182 } 5183 }
5183 5184
5185 phy->do_full_init = true;
5186
5184 /* Try to guess supported bands for the first init needs */ 5187 /* Try to guess supported bands for the first init needs */
5185 switch (dev->dev->bus_type) { 5188 switch (dev->dev->bus_type) {
5186#ifdef CONFIG_B43_BCMA 5189#ifdef CONFIG_B43_BCMA
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index fb0ddddde16b..08244b3b327e 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -98,11 +98,14 @@ int b43_phy_init(struct b43_wldev *dev)
98 98
99 phy->ops->switch_analog(dev, true); 99 phy->ops->switch_analog(dev, true);
100 b43_software_rfkill(dev, false); 100 b43_software_rfkill(dev, false);
101
101 err = ops->init(dev); 102 err = ops->init(dev);
102 if (err) { 103 if (err) {
103 b43err(dev->wl, "PHY init failed\n"); 104 b43err(dev->wl, "PHY init failed\n");
104 goto err_block_rf; 105 goto err_block_rf;
105 } 106 }
107 phy->do_full_init = false;
108
106 /* Make sure to switch hardware and firmware (SHM) to 109 /* Make sure to switch hardware and firmware (SHM) to
107 * the default channel. */ 110 * the default channel. */
108 err = b43_switch_channel(dev, ops->get_default_chan(dev)); 111 err = b43_switch_channel(dev, ops->get_default_chan(dev));
@@ -114,6 +117,7 @@ int b43_phy_init(struct b43_wldev *dev)
114 return 0; 117 return 0;
115 118
116err_phy_exit: 119err_phy_exit:
120 phy->do_full_init = true;
117 if (ops->exit) 121 if (ops->exit)
118 ops->exit(dev); 122 ops->exit(dev);
119err_block_rf: 123err_block_rf:
@@ -127,6 +131,7 @@ void b43_phy_exit(struct b43_wldev *dev)
127 const struct b43_phy_operations *ops = dev->phy.ops; 131 const struct b43_phy_operations *ops = dev->phy.ops;
128 132
129 b43_software_rfkill(dev, true); 133 b43_software_rfkill(dev, true);
134 dev->phy.do_full_init = true;
130 if (ops->exit) 135 if (ops->exit)
131 ops->exit(dev); 136 ops->exit(dev);
132} 137}
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index 47b55855c37d..4ad6240d9ff4 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -234,6 +234,9 @@ struct b43_phy {
234 /* Is GMODE (2 GHz mode) bit enabled? */ 234 /* Is GMODE (2 GHz mode) bit enabled? */
235 bool gmode; 235 bool gmode;
236 236
237 /* After power reset full init has to be performed */
238 bool do_full_init;
239
237 /* Analog Type */ 240 /* Analog Type */
238 u8 analog; 241 u8 analog;
239 /* B43_PHYTYPE_ */ 242 /* B43_PHYTYPE_ */