diff options
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/util.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/net/mac802154/util.c b/net/mac802154/util.c index 5fc979027919..150bf807e572 100644 --- a/net/mac802154/util.c +++ b/net/mac802154/util.c | |||
@@ -65,8 +65,19 @@ void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, | |||
65 | { | 65 | { |
66 | if (ifs_handling) { | 66 | if (ifs_handling) { |
67 | struct ieee802154_local *local = hw_to_local(hw); | 67 | struct ieee802154_local *local = hw_to_local(hw); |
68 | u8 max_sifs_size; | ||
68 | 69 | ||
69 | if (skb->len > 18) | 70 | /* If transceiver sets CRC on his own we need to use lifs |
71 | * threshold len above 16 otherwise 18, because it's not | ||
72 | * part of skb->len. | ||
73 | */ | ||
74 | if (hw->flags & IEEE802154_HW_TX_OMIT_CKSUM) | ||
75 | max_sifs_size = IEEE802154_MAX_SIFS_FRAME_SIZE - | ||
76 | IEEE802154_FCS_LEN; | ||
77 | else | ||
78 | max_sifs_size = IEEE802154_MAX_SIFS_FRAME_SIZE; | ||
79 | |||
80 | if (skb->len > max_sifs_size) | ||
70 | hrtimer_start(&local->ifs_timer, | 81 | hrtimer_start(&local->ifs_timer, |
71 | ktime_set(0, hw->phy->lifs_period * NSEC_PER_USEC), | 82 | ktime_set(0, hw->phy->lifs_period * NSEC_PER_USEC), |
72 | HRTIMER_MODE_REL); | 83 | HRTIMER_MODE_REL); |