Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255766
b: refs/heads/master
c: aec7ffd
h: refs/heads/master
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Jun 17, 2011
1 parent bad35be commit c65ace7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 545a8aa793e04bee7a7e2aa8caa70bed94fd7a5c
refs/heads/master: aec7ffdf4ff24df1fe85ed5bc9e050c4dd77617b
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/b43/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ config B43_BCMA
depends on B43 && BCMA && BROKEN
default y

config B43_SSB
bool
depends on B43 && SSB
default y

# Auto-select SSB PCI-HOST support, if possible
config B43_PCI_AUTOSELECT
bool
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/b43/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


/* SSB */

#ifdef CONFIG_B43_SSB
static inline int b43_bus_ssb_bus_may_powerdown(struct b43_bus_dev *dev)
{
return ssb_bus_may_powerdown(dev->sdev->bus);
Expand Down Expand Up @@ -124,3 +124,4 @@ struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev)

return dev;
}
#endif /* CONFIG_B43_SSB */
25 changes: 17 additions & 8 deletions trunk/drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ static const struct bcma_device_id b43_bcma_tbl[] = {
MODULE_DEVICE_TABLE(bcma, b43_bcma_tbl);
#endif

#ifdef CONFIG_B43_SSB
static const struct ssb_device_id b43_ssb_tbl[] = {
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 5),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 6),
Expand All @@ -136,8 +137,8 @@ static const struct ssb_device_id b43_ssb_tbl[] = {
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 16),
SSB_DEVTABLE_END
};

MODULE_DEVICE_TABLE(ssb, b43_ssb_tbl);
#endif

/* Channel and ratetables are shared for all devices.
* They can't be const, because ieee80211 puts some precalculated
Expand Down Expand Up @@ -5026,6 +5027,7 @@ static struct bcma_driver b43_bcma_driver = {
};
#endif

#ifdef CONFIG_B43_SSB
static
int b43_ssb_probe(struct ssb_device *sdev, const struct ssb_device_id *id)
{
Expand Down Expand Up @@ -5103,6 +5105,14 @@ static void b43_ssb_remove(struct ssb_device *sdev)
}
}

static struct ssb_driver b43_ssb_driver = {
.name = KBUILD_MODNAME,
.id_table = b43_ssb_tbl,
.probe = b43_ssb_probe,
.remove = b43_ssb_remove,
};
#endif /* CONFIG_B43_SSB */

/* Perform a hardware reset. This can be called from any context. */
void b43_controller_restart(struct b43_wldev *dev, const char *reason)
{
Expand All @@ -5113,13 +5123,6 @@ void b43_controller_restart(struct b43_wldev *dev, const char *reason)
ieee80211_queue_work(dev->wl->hw, &dev->restart_work);
}

static struct ssb_driver b43_ssb_driver = {
.name = KBUILD_MODNAME,
.id_table = b43_ssb_tbl,
.probe = b43_ssb_probe,
.remove = b43_ssb_remove,
};

static void b43_print_driverinfo(void)
{
const char *feat_pci = "", *feat_pcmcia = "", *feat_nphy = "",
Expand Down Expand Up @@ -5163,14 +5166,18 @@ static int __init b43_init(void)
if (err)
goto err_sdio_exit;
#endif
#ifdef CONFIG_B43_SSB
err = ssb_driver_register(&b43_ssb_driver);
if (err)
goto err_bcma_driver_exit;
#endif
b43_print_driverinfo();

return err;

#ifdef CONFIG_B43_SSB
err_bcma_driver_exit:
#endif
#ifdef CONFIG_B43_BCMA
bcma_driver_unregister(&b43_bcma_driver);
err_sdio_exit:
Expand All @@ -5185,7 +5192,9 @@ static int __init b43_init(void)

static void __exit b43_exit(void)
{
#ifdef CONFIG_B43_SSB
ssb_driver_unregister(&b43_ssb_driver);
#endif
#ifdef CONFIG_B43_BCMA
bcma_driver_unregister(&b43_bcma_driver);
#endif
Expand Down

0 comments on commit c65ace7

Please sign in to comment.