Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195112
b: refs/heads/master
c: a40242f
h: refs/heads/master
v: v3
  • Loading branch information
Prasanna S. Panchamukhi authored and Inaky Perez-Gonzalez committed May 11, 2010
1 parent 8a45be1 commit 3ee9630
Show file tree
Hide file tree
Showing 2 changed files with 13 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: e6dd789af1823908ed3ccda26bf07faf5970bce1
refs/heads/master: a40242f2cde38ccb04d4c35cad66aab3c047fa6a
13 changes: 12 additions & 1 deletion trunk/drivers/net/wimax/i2400m/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ enum {
I2400M_TX_PLD_SIZE = sizeof(struct i2400m_msg_hdr)
+ I2400M_TX_PLD_MAX * sizeof(struct i2400m_pld),
I2400M_TX_SKIP = 0x80000000,
/*
* According to Intel Wimax i3200, i5x50 and i6x50 specification
* 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.
*/
Expand Down Expand Up @@ -682,7 +687,13 @@ int i2400m_tx(struct i2400m *i2400m, const void *buf, size_t buf_len,
}
if (i2400m->tx_msg == NULL)
goto error_tx_new;
if (i2400m->tx_msg->size + padded_len > I2400M_TX_BUF_SIZE / 2) {
/*
* Check if this skb will fit in the TX queue's current active
* TX message. The total message size must not exceed the maximum
* size of each message I2400M_TX_MSG_SIZE. If it exceeds,
* close the current message and push this skb into the new message.
*/
if (i2400m->tx_msg->size + padded_len > I2400M_TX_MSG_SIZE) {
d_printf(2, dev, "TX: message too big, going new\n");
i2400m_tx_close(i2400m);
i2400m_tx_new(i2400m);
Expand Down

0 comments on commit 3ee9630

Please sign in to comment.