diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-05-19 09:11:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-01 15:12:27 -0400 |
commit | d48ae5c826f9af7d8b39867887d48e2a6f47af1f (patch) | |
tree | c47bae1c14509850215ee03c3f3c30ba527412bc /drivers/net/wireless/b43/main.c | |
parent | 02a0fbe4dcb4c318d09d97b19e51f48ba6d36ede (diff) |
b43: use new pointers path to access ssb_device in SSB specific places
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index bb82ddfa44f8..99411dadd100 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -1146,6 +1146,7 @@ void b43_power_saving_ctl_bits(struct b43_wldev *dev, unsigned int ps_flags) | |||
1146 | 1146 | ||
1147 | static void b43_ssb_wireless_core_reset(struct b43_wldev *dev, u32 flags) | 1147 | static void b43_ssb_wireless_core_reset(struct b43_wldev *dev, u32 flags) |
1148 | { | 1148 | { |
1149 | struct ssb_device *sdev = dev->dev->sdev; | ||
1149 | u32 tmslow; | 1150 | u32 tmslow; |
1150 | 1151 | ||
1151 | flags |= B43_TMSLOW_PHYCLKEN; | 1152 | flags |= B43_TMSLOW_PHYCLKEN; |
@@ -1156,15 +1157,15 @@ static void b43_ssb_wireless_core_reset(struct b43_wldev *dev, u32 flags) | |||
1156 | msleep(2); /* Wait for the PLL to turn on. */ | 1157 | msleep(2); /* Wait for the PLL to turn on. */ |
1157 | 1158 | ||
1158 | /* Now take the PHY out of Reset again */ | 1159 | /* Now take the PHY out of Reset again */ |
1159 | tmslow = ssb_read32(dev->sdev, SSB_TMSLOW); | 1160 | tmslow = ssb_read32(sdev, SSB_TMSLOW); |
1160 | tmslow |= SSB_TMSLOW_FGC; | 1161 | tmslow |= SSB_TMSLOW_FGC; |
1161 | tmslow &= ~B43_TMSLOW_PHYRESET; | 1162 | tmslow &= ~B43_TMSLOW_PHYRESET; |
1162 | ssb_write32(dev->sdev, SSB_TMSLOW, tmslow); | 1163 | ssb_write32(sdev, SSB_TMSLOW, tmslow); |
1163 | ssb_read32(dev->sdev, SSB_TMSLOW); /* flush */ | 1164 | ssb_read32(sdev, SSB_TMSLOW); /* flush */ |
1164 | msleep(1); | 1165 | msleep(1); |
1165 | tmslow &= ~SSB_TMSLOW_FGC; | 1166 | tmslow &= ~SSB_TMSLOW_FGC; |
1166 | ssb_write32(dev->sdev, SSB_TMSLOW, tmslow); | 1167 | ssb_write32(sdev, SSB_TMSLOW, tmslow); |
1167 | ssb_read32(dev->sdev, SSB_TMSLOW); /* flush */ | 1168 | ssb_read32(sdev, SSB_TMSLOW); /* flush */ |
1168 | msleep(1); | 1169 | msleep(1); |
1169 | } | 1170 | } |
1170 | 1171 | ||
@@ -2157,7 +2158,7 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
2157 | switch (dev->phy.type) { | 2158 | switch (dev->phy.type) { |
2158 | case B43_PHYTYPE_A: | 2159 | case B43_PHYTYPE_A: |
2159 | if ((rev >= 5) && (rev <= 10)) { | 2160 | if ((rev >= 5) && (rev <= 10)) { |
2160 | tmshigh = ssb_read32(dev->sdev, SSB_TMSHIGH); | 2161 | tmshigh = ssb_read32(dev->dev->sdev, SSB_TMSHIGH); |
2161 | if (tmshigh & B43_TMSHIGH_HAVE_2GHZ_PHY) | 2162 | if (tmshigh & B43_TMSHIGH_HAVE_2GHZ_PHY) |
2162 | filename = "a0g1initvals5"; | 2163 | filename = "a0g1initvals5"; |
2163 | else | 2164 | else |
@@ -2202,7 +2203,7 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
2202 | switch (dev->phy.type) { | 2203 | switch (dev->phy.type) { |
2203 | case B43_PHYTYPE_A: | 2204 | case B43_PHYTYPE_A: |
2204 | if ((rev >= 5) && (rev <= 10)) { | 2205 | if ((rev >= 5) && (rev <= 10)) { |
2205 | tmshigh = ssb_read32(dev->sdev, SSB_TMSHIGH); | 2206 | tmshigh = ssb_read32(dev->dev->sdev, SSB_TMSHIGH); |
2206 | if (tmshigh & B43_TMSHIGH_HAVE_2GHZ_PHY) | 2207 | if (tmshigh & B43_TMSHIGH_HAVE_2GHZ_PHY) |
2207 | filename = "a0g1bsinitvals5"; | 2208 | filename = "a0g1bsinitvals5"; |
2208 | else | 2209 | else |
@@ -2566,7 +2567,7 @@ out: | |||
2566 | */ | 2567 | */ |
2567 | static struct ssb_device *b43_ssb_gpio_dev(struct b43_wldev *dev) | 2568 | static struct ssb_device *b43_ssb_gpio_dev(struct b43_wldev *dev) |
2568 | { | 2569 | { |
2569 | struct ssb_bus *bus = dev->sdev->bus; | 2570 | struct ssb_bus *bus = dev->dev->sdev->bus; |
2570 | 2571 | ||
2571 | #ifdef CONFIG_SSB_DRIVER_PCICORE | 2572 | #ifdef CONFIG_SSB_DRIVER_PCICORE |
2572 | return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev); | 2573 | return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev); |
@@ -4231,16 +4232,21 @@ static void b43_bluetooth_coext_disable(struct b43_wldev *dev) | |||
4231 | 4232 | ||
4232 | static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) | 4233 | static void b43_imcfglo_timeouts_workaround(struct b43_wldev *dev) |
4233 | { | 4234 | { |
4234 | struct ssb_bus *bus = dev->sdev->bus; | 4235 | struct ssb_bus *bus; |
4235 | u32 tmp; | 4236 | u32 tmp; |
4236 | 4237 | ||
4238 | if (dev->dev->bus_type != B43_BUS_SSB) | ||
4239 | return; | ||
4240 | |||
4241 | bus = dev->dev->sdev->bus; | ||
4242 | |||
4237 | if ((bus->chip_id == 0x4311 && bus->chip_rev == 2) || | 4243 | if ((bus->chip_id == 0x4311 && bus->chip_rev == 2) || |
4238 | (bus->chip_id == 0x4312)) { | 4244 | (bus->chip_id == 0x4312)) { |
4239 | tmp = ssb_read32(dev->sdev, SSB_IMCFGLO); | 4245 | tmp = ssb_read32(dev->dev->sdev, SSB_IMCFGLO); |
4240 | tmp &= ~SSB_IMCFGLO_REQTO; | 4246 | tmp &= ~SSB_IMCFGLO_REQTO; |
4241 | tmp &= ~SSB_IMCFGLO_SERTO; | 4247 | tmp &= ~SSB_IMCFGLO_SERTO; |
4242 | tmp |= 0x3; | 4248 | tmp |= 0x3; |
4243 | ssb_write32(dev->sdev, SSB_IMCFGLO, tmp); | 4249 | ssb_write32(dev->dev->sdev, SSB_IMCFGLO, tmp); |
4244 | ssb_commit_settings(bus); | 4250 | ssb_commit_settings(bus); |
4245 | } | 4251 | } |
4246 | } | 4252 | } |