Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158935
b: refs/heads/master
c: a7eee06
h: refs/heads/master
i:
  158933: 2f222ec
  158931: 288fe7d
  158927: 346ca1e
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Jul 10, 2009
1 parent 2d89c98 commit f3abba7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 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: 6c230c02700f9d2aebe6edf9f571835c06707940
refs/heads/master: a7eee06b874a02e2de75727ab21a8747ca6309ff
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/p54/fwio.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,9 @@ int p54_tx_cancel(struct p54_common *priv, __le32 req_id)
{
struct sk_buff *skb;
struct p54_txcancel *cancel;
u32 _req_id = le32_to_cpu(req_id);

if (unlikely(req_id < priv->rx_start || req_id > priv->rx_end))
if (unlikely(_req_id < priv->rx_start || _req_id > priv->rx_end))
return -EINVAL;

skb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*cancel),
Expand Down
11 changes: 5 additions & 6 deletions trunk/drivers/net/wireless/p54/p54spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ static const struct p54spi_spi_reg p54spi_registers_array[] =
{ SPI_ADRS_DMA_WRITE_BASE, 32, "DMA_RD_BASE " }
};

static int p54spi_wait_bit(struct p54s_priv *priv, u16 reg, __le32 bits)
static int p54spi_wait_bit(struct p54s_priv *priv, u16 reg, u32 bits)
{
int i;

for (i = 0; i < 2000; i++) {
__le32 buffer = p54spi_read32(priv, reg);
u32 buffer = p54spi_read32(priv, reg);
if ((buffer & bits) == bits)
return 1;
}
Expand All @@ -179,8 +179,7 @@ static int p54spi_wait_bit(struct p54s_priv *priv, u16 reg, __le32 bits)
static int p54spi_spi_write_dma(struct p54s_priv *priv, __le32 base,
const void *buf, size_t len)
{
if (!p54spi_wait_bit(priv, SPI_ADRS_DMA_WRITE_CTRL,
cpu_to_le32(HOST_ALLOWED))) {
if (!p54spi_wait_bit(priv, SPI_ADRS_DMA_WRITE_CTRL, HOST_ALLOWED)) {
dev_err(&priv->spi->dev, "spi_write_dma not allowed "
"to DMA write.\n");
return -EAGAIN;
Expand Down Expand Up @@ -333,7 +332,7 @@ static int p54spi_wakeup(struct p54s_priv *priv)

/* And wait for the READY interrupt */
if (!p54spi_wait_bit(priv, SPI_ADRS_HOST_INTERRUPTS,
cpu_to_le32(SPI_HOST_INT_READY))) {
SPI_HOST_INT_READY)) {
dev_err(&priv->spi->dev, "INT_READY timeout\n");
return -EBUSY;
}
Expand Down Expand Up @@ -444,7 +443,7 @@ static int p54spi_tx_frame(struct p54s_priv *priv, struct sk_buff *skb)
goto out;

if (!p54spi_wait_bit(priv, SPI_ADRS_HOST_INTERRUPTS,
cpu_to_le32(SPI_HOST_INT_WR_READY))) {
SPI_HOST_INT_WR_READY)) {
dev_err(&priv->spi->dev, "WR_READY timeout\n");
ret = -EAGAIN;
goto out;
Expand Down

0 comments on commit f3abba7

Please sign in to comment.