Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255389
b: refs/heads/master
c: 505fb01
h: refs/heads/master
i:
  255387: 948ae5f
v: v3
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Jun 1, 2011
1 parent 35e9591 commit 1817bf6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 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: d48ae5c826f9af7d8b39867887d48e2a6f47af1f
refs/heads/master: 505fb019d4924e425bb1024eb603a7bc7fe7fe63
11 changes: 11 additions & 0 deletions trunk/drivers/net/wireless/b43/bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ struct b43_bus_dev {
u8 core_rev;
};

static inline bool b43_bus_host_is_pcmcia(struct b43_bus_dev *dev)
{
return (dev->bus_type == B43_BUS_SSB &&
dev->sdev->bus->bustype == SSB_BUSTYPE_PCMCIA);
}
static inline bool b43_bus_host_is_sdio(struct b43_bus_dev *dev)
{
return (dev->bus_type == B43_BUS_SSB &&
dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO);
}

struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev);

#endif /* B43_BUS_H_ */
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ static void b43_beacon_update_trigger_work(struct work_struct *work)
mutex_lock(&wl->mutex);
dev = wl->current_dev;
if (likely(dev && (b43_status(dev) >= B43_STAT_INITIALIZED))) {
if (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) {
if (b43_bus_host_is_sdio(dev->dev)) {
/* wl->mutex is enough. */
b43_do_beacon_update_trigger_work(dev);
mmiowb();
Expand Down Expand Up @@ -3955,7 +3955,7 @@ static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev)

/* Disable interrupts on the device. */
b43_set_status(dev, B43_STAT_INITIALIZED);
if (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) {
if (b43_bus_host_is_sdio(dev->dev)) {
/* wl->mutex is locked. That is enough. */
b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, 0);
b43_read32(dev, B43_MMIO_GEN_IRQ_MASK); /* Flush */
Expand All @@ -3968,7 +3968,7 @@ static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev)
/* Synchronize and free the interrupt handlers. Unlock to avoid deadlocks. */
orig_dev = dev;
mutex_unlock(&wl->mutex);
if (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) {
if (b43_bus_host_is_sdio(dev->dev)) {
b43_sdio_free_irq(dev);
} else {
synchronize_irq(dev->dev->irq);
Expand Down Expand Up @@ -4005,7 +4005,7 @@ static int b43_wireless_core_start(struct b43_wldev *dev)
B43_WARN_ON(b43_status(dev) != B43_STAT_INITIALIZED);

drain_txstatus_queue(dev);
if (dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) {
if (b43_bus_host_is_sdio(dev->dev)) {
err = b43_sdio_request_irq(dev, b43_sdio_interrupt_handler);
if (err) {
b43err(dev->wl, "Cannot request SDIO IRQ\n");
Expand Down Expand Up @@ -4405,8 +4405,8 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
/* Maximum Contention Window */
b43_shm_write16(dev, B43_SHM_SCRATCH, B43_SHM_SC_MAXCONT, 0x3FF);

if ((dev->sdev->bus->bustype == SSB_BUSTYPE_PCMCIA) ||
(dev->sdev->bus->bustype == SSB_BUSTYPE_SDIO) ||
if (b43_bus_host_is_pcmcia(dev->dev) ||
b43_bus_host_is_sdio(dev->dev) ||
dev->use_pio) {
dev->__using_pio_transfers = 1;
err = b43_pio_init(dev);
Expand Down

0 comments on commit 1817bf6

Please sign in to comment.