Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79024
b: refs/heads/master
c: 00e0b8c
h: refs/heads/master
v: v3
  • Loading branch information
Stefano Brivio authored and David S. Miller committed Jan 28, 2008
1 parent 06464b0 commit 08807e5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 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: d8be11ee95be9ec9eabfec9f635e0feac972369b
refs/heads/master: 00e0b8cb74ed7c16b2bc41eb33a16eae5b6e2d5c
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/b43/b43.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ enum {
#define B43_DEFAULT_SHORT_RETRY_LIMIT 7
#define B43_DEFAULT_LONG_RETRY_LIMIT 4

#define B43_PHY_TX_BADNESS_LIMIT 1000

/* Max size of a security key */
#define B43_SEC_KEYSIZE 16
/* Security algorithms. */
Expand Down Expand Up @@ -548,6 +550,9 @@ struct b43_phy {
/* OFDM address read/write caching for hardware auto-increment. */
u16 ofdm_addr;
u8 ofdm_valid; /* 0: invalid, 1: read, 2: write */

/* PHY TX errors counter. */
atomic_t txerr_cnt;
};

/* Data structures for DMA transmission, per 80211 core. */
Expand Down
17 changes: 16 additions & 1 deletion trunk/drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,17 @@ static void b43_interrupt_tasklet(struct b43_wldev *dev)
if (unlikely(reason & B43_IRQ_MAC_TXERR))
b43err(dev->wl, "MAC transmission error\n");

if (unlikely(reason & B43_IRQ_PHY_TXERR))
if (unlikely(reason & B43_IRQ_PHY_TXERR)) {
b43err(dev->wl, "PHY transmission error\n");
rmb();
if (unlikely(atomic_dec_and_test(&dev->phy.txerr_cnt))) {
atomic_set(&dev->phy.txerr_cnt,
B43_PHY_TX_BADNESS_LIMIT);
b43err(dev->wl, "Too many PHY TX errors, "
"restarting the controller\n");
b43_controller_restart(dev, "PHY TX errors");
}
}

if (unlikely(merged_dma_reason & (B43_DMAIRQ_FATALMASK |
B43_DMAIRQ_NONFATALMASK))) {
Expand Down Expand Up @@ -2257,6 +2266,9 @@ static int b43_chip_init(struct b43_wldev *dev)
/* OFDM address caching. */
phy->ofdm_valid = 0;

/* PHY TX errors counter. */
atomic_set(&phy->txerr_cnt, B43_PHY_TX_BADNESS_LIMIT);

err = 0;
b43dbg(dev->wl, "Chip initialized\n");
out:
Expand Down Expand Up @@ -2341,6 +2353,9 @@ static void b43_periodic_every15sec(struct b43_wldev *dev)
}
b43_phy_xmitpower(dev); //FIXME: unless scanning?
//TODO for APHY (temperature?)

atomic_set(&phy->txerr_cnt, B43_PHY_TX_BADNESS_LIMIT);
wmb();
}

static void do_periodic_work(struct b43_wldev *dev)
Expand Down

0 comments on commit 08807e5

Please sign in to comment.