Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195104
b: refs/heads/master
c: 570eb0e
h: refs/heads/master
v: v3
  • Loading branch information
Prasanna S. Panchamukhi authored and Inaky Perez-Gonzalez committed May 11, 2010
1 parent 4b225d7 commit 3fa6ed3
Show file tree
Hide file tree
Showing 2 changed files with 19 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: 080de04e6229c49be41b811f5d5429afd6ed736d
refs/heads/master: 570eb0ea65db625e0b11ca97f4ae857bc1193250
19 changes: 18 additions & 1 deletion trunk/drivers/net/wimax/i2400m/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@ enum {
* Doc says maximum transaction is 16KiB. If we had 16KiB en
* route and 16KiB being queued, it boils down to needing
* 32KiB.
* 32KiB is insufficient for 1400 MTU, hence increasing
* tx buffer size to 64KiB.
*/
I2400M_TX_BUF_SIZE = 32768,
I2400M_TX_BUF_SIZE = 65536,
/**
* Message header and payload descriptors have to be 16
* aligned (16 + 4 * N = 16 * M). If we take that average sent
Expand All @@ -274,6 +276,19 @@ enum {
I2400M_TX_PLD_SIZE = sizeof(struct i2400m_msg_hdr)
+ I2400M_TX_PLD_MAX * sizeof(struct i2400m_pld),
I2400M_TX_SKIP = 0x80000000,
/*
* 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 @@ -874,6 +889,8 @@ int i2400m_tx_setup(struct i2400m *i2400m)
INIT_WORK(&i2400m->wake_tx_ws, i2400m_wake_tx_work);

i2400m->tx_sequence = 0;
/* Warn if the calculated buffer size exceeds I2400M_TX_BUF_SIZE. */
BUILD_BUG_ON(I2400M_TX_PDU_TOTAL_SIZE > I2400M_TX_BUF_SIZE);
i2400m->tx_buf = kmalloc(I2400M_TX_BUF_SIZE, GFP_KERNEL);
if (i2400m->tx_buf == NULL)
result = -ENOMEM;
Expand Down

0 comments on commit 3fa6ed3

Please sign in to comment.