Date:2013-03-29 21:02:24 (6 years 3 months ago)
Author:Werner Almesberger
Commit:211280356d9487bf322bb7707beadec915b121fa
Message:atusb/fw/mac.c: check CRC and auto-discard bad frames

Files: atusb/fw/mac.c (2 diffs)

Change Details

atusb/fw/mac.c
9090        return 1;
9191
9292    spi_begin();
93    spi_send(AT86RF230_BUF_READ);
93    if (!(spi_io(AT86RF230_BUF_READ) & RX_CRC_VALID)) {
94        spi_end();
95        return 1;
96    }
9497    size = spi_recv();
9598    if (!size || (size & 0x80)) {
9699        spi_end();
...... 
181184    mac_irq = NULL;
182185    txing = 0;
183186    queued_tx_ack = 0;
187
188    /* enable CRC and PHY_RSSI (with RX_CRC_VALID) in SPI status return */
189    reg_write(REG_TRX_CTRL_1,
190        TX_AUTO_CRC_ON | SPI_CMD_MODE_PHY_RSSI << SPI_CMD_MODE_SHIFT);
184191}

Archive Download the corresponding diff file



interactive