diff options
author | Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com> | 2010-04-13 16:36:19 -0700 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | 2010-05-11 14:08:50 -0700 |
commit | 27502908866ba37d03594e7f7ee7b649cb007330 (patch) | |
tree | f8f0518d5e2a8c08d0f2d14205415c81518f216b /drivers/net/wimax/i2400m/tx.c | |
parent | 0809a7bbe8fbcb4e899b0a3224d8461bd74987e0 (diff) | |
download | blackbird-obmc-linux-27502908866ba37d03594e7f7ee7b649cb007330.tar.gz blackbird-obmc-linux-27502908866ba37d03594e7f7ee7b649cb007330.zip |
wimax/i2400m: reserve additional space in the TX queue's buffer while allocating space for a new message header
Increase the possibilities of including at least one payload by reserving
some additional space in the TX queue while allocating TX queue's space
for new message header. Please refer the documentation in the code for details.
Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/tx.c')
-rw-r--r-- | drivers/net/wimax/i2400m/tx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c index 609f1ca6e9fc..3f819efc06b5 100644 --- a/drivers/net/wimax/i2400m/tx.c +++ b/drivers/net/wimax/i2400m/tx.c @@ -563,8 +563,17 @@ void i2400m_tx_new(struct i2400m *i2400m) struct i2400m_msg_hdr *tx_msg; bool try_head = 0; BUG_ON(i2400m->tx_msg != NULL); + /* + * In certain situations, TX queue might have enough space to + * accommodate the new message header I2400M_TX_PLD_SIZE, but + * might not have enough space to accommodate the payloads. + * Adding bus_tx_room_min padding while allocating a new TX message + * increases the possibilities of including at least one payload of the + * size <= bus_tx_room_min. + */ try_head: - tx_msg = i2400m_tx_fifo_push(i2400m, I2400M_TX_PLD_SIZE, 0, try_head); + tx_msg = i2400m_tx_fifo_push(i2400m, I2400M_TX_PLD_SIZE, + i2400m->bus_tx_room_min, try_head); if (tx_msg == NULL) goto out; else if (tx_msg == TAIL_FULL) { |