From 5c9cb4422bec967ead4cdf084bc28a8bfb7ddc5c Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Wed, 20 May 2009 17:16:05 -0700 Subject: [PATCH] --- yaml --- r: 150874 b: refs/heads/master c: c56affafdd29eb9764b0e35e3434cc06f6bc3781 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/wimax/i2400m/tx.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 6fe5785b7117..0e15c6a6e6ee 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8593a1967fb9746d318dde88a0a39a36dbfc3445 +refs/heads/master: c56affafdd29eb9764b0e35e3434cc06f6bc3781 diff --git a/trunk/drivers/net/wimax/i2400m/tx.c b/trunk/drivers/net/wimax/i2400m/tx.c index a635fd720f3e..7c46c05a5866 100644 --- a/trunk/drivers/net/wimax/i2400m/tx.c +++ b/trunk/drivers/net/wimax/i2400m/tx.c @@ -474,10 +474,18 @@ void i2400m_tx_close(struct i2400m *i2400m) struct i2400m_msg_hdr *tx_msg_moved; size_t aligned_size, padding, hdr_size; void *pad_buf; + unsigned num_pls; if (tx_msg->size & I2400M_TX_SKIP) /* a skipper? nothing to do */ goto out; - + num_pls = le16_to_cpu(tx_msg->num_pls); + /* We can get this situation when a new message was started + * and there was no space to add payloads before hitting the + tail (and taking padding into consideration). */ + if (num_pls == 0) { + tx_msg->size |= I2400M_TX_SKIP; + goto out; + } /* Relocate the message header * * Find the current header size, align it to 16 and if we need