Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195119
b: refs/heads/master
c: 2750290
h: refs/heads/master
i:
  195117: a129546
  195115: 91d4ae0
  195111: 8a45be1
  195103: 4b225d7
v: v3
  • Loading branch information
Prasanna S. Panchamukhi authored and Inaky Perez-Gonzalez committed May 11, 2010
1 parent 52e99a2 commit fa3f4bd
Show file tree
Hide file tree
Showing 3 changed files with 17 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: 0809a7bbe8fbcb4e899b0a3224d8461bd74987e0
refs/heads/master: 27502908866ba37d03594e7f7ee7b649cb007330
6 changes: 6 additions & 0 deletions trunk/drivers/net/wimax/i2400m/i2400m.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ struct i2400m_barker_db;
* so we have a tx_blk_size variable that the bus layer sets to
* tell the engine how much of that we need.
*
* @bus_tx_room_min: [fill] Minimum room required while allocating
* TX queue's buffer space for message header. SDIO requires
* 224 bytes and USB 16 bytes. Refer bus specific driver code
* for details.
*
* @bus_pl_size_max: [fill] Maximum payload size.
*
* @bus_setup: [optional fill] Function called by the bus-generic code
Expand Down Expand Up @@ -573,6 +578,7 @@ struct i2400m {
wait_queue_head_t state_wq; /* Woken up when on state updates */

size_t bus_tx_block_size;
size_t bus_tx_room_min;
size_t bus_pl_size_max;
unsigned bus_bm_retries;

Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/net/wimax/i2400m/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fa3f4bd

Please sign in to comment.