Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195113
b: refs/heads/master
c: 718e949
h: refs/heads/master
i:
  195111: 8a45be1
v: v3
  • Loading branch information
Prasanna S. Panchamukhi authored and Inaky Perez-Gonzalez committed May 11, 2010
1 parent 3ee9630 commit 6b69651
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 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: a40242f2cde38ccb04d4c35cad66aab3c047fa6a
refs/heads/master: 718e94907d79e74bbc7cfdb3cda2266079c5e993
20 changes: 5 additions & 15 deletions trunk/drivers/net/wimax/i2400m/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,19 +287,6 @@ enum {
* documents, the maximum size of each message can be up to 16KiB.
*/
I2400M_TX_MSG_SIZE = 16384,
/*
* 16 byte aligned MAX_MTU + 4 byte payload prefix.
*/
I2400M_MAX_MTU_ALIGN = 16,
I2400M_TX_PDU_SIZE = I2400M_MAX_MTU % I2400M_MAX_MTU_ALIGN
+ I2400M_MAX_MTU + sizeof(struct i2400m_pl_data_hdr),
/*
* 256 byte aligned toal size of 12 PDUs including msg header,
*/
I2400M_TX_PDU_ALIGN = 256,
I2400M_TX_PDU_TOTAL_SIZE = ((I2400M_TX_PDU_SIZE * I2400M_TX_PLD_MAX
+ sizeof(struct i2400m_msg_hdr))/I2400M_TX_PDU_ALIGN + 1)
* I2400M_TX_PDU_ALIGN * 2,
};

#define TAIL_FULL ((void *)~(unsigned long)NULL)
Expand Down Expand Up @@ -915,8 +902,11 @@ int i2400m_tx_setup(struct i2400m *i2400m)
goto error_kmalloc;
}

/* Warn if the calculated buffer size exceeds I2400M_TX_BUF_SIZE. */
BUILD_BUG_ON(I2400M_TX_PDU_TOTAL_SIZE > I2400M_TX_BUF_SIZE);
/*
* Fail the build if we can't fit at least two maximum size messages
* on the TX FIFO [one being delivered while one is constructed].
*/
BUILD_BUG_ON(2 * I2400M_TX_MSG_SIZE > I2400M_TX_BUF_SIZE);
spin_lock_irqsave(&i2400m->tx_lock, flags);
i2400m->tx_sequence = 0;
i2400m->tx_in = 0;
Expand Down

0 comments on commit 6b69651

Please sign in to comment.