4 May 2010 16:48
[PATCH 1/5] ieee802154/cc2420: Fix packet length value.
This is an addition to the last fix for adding the length byte. With hardware FCS enabled we are obliged to set the length including the 2 bytes for the FCS. Our skb does only have the len for the data it contains so we need to adjust it for the length byte. Signed-off-by: Stefan Schmidt <stefan@...> --- drivers/ieee802154/cc2420.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/ieee802154/cc2420.c b/drivers/ieee802154/cc2420.c index fd072ce..3cc2724 100644 --- a/drivers/ieee802154/cc2420.c +++ b/drivers/ieee802154/cc2420.c <at> <at> -213,6 +213,8 <at> <at> static int cc2420_write_txfifo(struct cc2420_local *lp, u8 *data, u8 len) { int status; + /* Length byte must include FCS even if calculated in hardware */ + int len_byte = len + 2; struct spi_message msg; struct spi_transfer xfer_head = { .len = 1, <at> <at> -221,7 +223,7 <at> <at> cc2420_write_txfifo(struct cc2420_local *lp, u8 *data, u8 len) }; struct spi_transfer xfer_len = { .len = 1, - .tx_buf = &len, + .tx_buf = &len_byte, };(Continue reading)
RSS Feed