net: ieee802154: Auto ACK and CRC are always on

We have no use of configuring cc2520, at built time at least, in
promiscuous mode. So let's get rid of these options for the new driver.

Change-Id: I17611c43bc7ba7961831beaa47cc4e2371f8de61
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2016-09-21 18:34:27 +02:00 committed by Jukka Rissanen
commit 6790484ce2
2 changed files with 2 additions and 9 deletions

View file

@ -114,6 +114,7 @@ config TI_CC2520_CHANNEL
config TI_CC2520_AUTO_CRC
bool "Let the chip handling CRC on reception"
default y
depends on TI_CC2520_LEGACY
help
When receiving a packet, the hardware can verify the CRC by itself
and will provide a flag letting know the success - or not - on
@ -131,6 +132,7 @@ config TI_CC2520_LINK_DETAILS
config TI_CC2520_AUTO_ACK
bool "Let the chip handle TX/RX IEEE 802.15.4 ACK requests"
default n
depends on TI_CC2520_LEGACY
select TI_CC2520_AUTO_CRC
help
The chip is able to reply by itself to ACK requests as well as

View file

@ -54,14 +54,7 @@
*/
#if defined(CONFIG_TI_CC2520_AUTO_CRC) && defined(CONFIG_TI_CC2520_AUTO_ACK)
#define CC2520_AUTOMATISM (FRMCTRL0_AUTOCRC | FRMCTRL0_AUTOACK)
#elif defined(CONFIG_TI_CC2520_AUTO_CRC)
#define CC2520_AUTOMATISM (FRMCTRL0_AUTOCRC)
#else
#define CC2520_AUTOMATISM (0)
#endif
#define CC2520_TX_THRESHOLD (0x7F)
#define CC2520_FCS_LENGTH (2)
@ -632,12 +625,10 @@ static void cc2520_rx(int arg, int unused2)
goto out;
}
#ifdef CONFIG_TI_CC2520_AUTO_CRC
if (!(pkt_buf->data[pkt_len - 1] & CC2520_FCS_CRC_OK)) {
SYS_LOG_DBG("Bad packet CRC\n");
goto out;
}
#endif /* CONFIG_TI_CC2520_AUTO_CRC */
if (ieee802154_radio_handle_ack(cc2520->iface, buf) == NET_OK) {
SYS_LOG_DBG("ACK packet handled");