aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wimax/i2400m/tx.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c
index a635fd720f3e..7c46c05a5866 100644
--- a/drivers/net/wimax/i2400m/tx.c
+++ b/drivers/net/wimax/i2400m/tx.c
@@ -474,10 +474,18 @@ void i2400m_tx_close(struct i2400m *i2400m)
474 struct i2400m_msg_hdr *tx_msg_moved; 474 struct i2400m_msg_hdr *tx_msg_moved;
475 size_t aligned_size, padding, hdr_size; 475 size_t aligned_size, padding, hdr_size;
476 void *pad_buf; 476 void *pad_buf;
477 unsigned num_pls;
477 478
478 if (tx_msg->size & I2400M_TX_SKIP) /* a skipper? nothing to do */ 479 if (tx_msg->size & I2400M_TX_SKIP) /* a skipper? nothing to do */
479 goto out; 480 goto out;
480 481 num_pls = le16_to_cpu(tx_msg->num_pls);
482 /* We can get this situation when a new message was started
483 * and there was no space to add payloads before hitting the
484 tail (and taking padding into consideration). */
485 if (num_pls == 0) {
486 tx_msg->size |= I2400M_TX_SKIP;
487 goto out;
488 }
481 /* Relocate the message header 489 /* Relocate the message header
482 * 490 *
483 * Find the current header size, align it to 16 and if we need 491 * Find the current header size, align it to 16 and if we need