summaryrefslogtreecommitdiff
path: root/net/mac802154/util.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-03-14 14:29:45 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-14 14:29:45 -0400
commit5f1764ddfeb038decfe2b2fda030d0bed43fa36a (patch)
treea42d36330758ccce3becb22b96c8c748b89a837a /net/mac802154/util.c
parent2801be4a0ea4cd0965f9c12ff813a91892a8e157 (diff)
parentb6d595e3f74fe0dd9edc0d5bf30cd6e6fe29f023 (diff)
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says: ==================== Here's another set of Bluetooth & ieee802154 patches intended for 4.1: - Added support for QCA ROME chipset family in the btusb driver - at86rf230 driver fixes & cleanups - ieee802154 cleanups - Refactoring of Bluetooth mgmt API to allow new users - New setting for static Bluetooth address exposed to user space - Refactoring of hci_dev flags to remove limit of 32 - Remove unnecessary fast-connectable setting usage restrictions - Fix behavior to be consistent when trying to pair already paired device - Service discovery corner-case fixes Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac802154/util.c')
-rw-r--r--net/mac802154/util.c13
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,
{
if (ifs_handling) {
struct ieee802154_local *local = hw_to_local(hw);
+ u8 max_sifs_size;
- if (skb->len > 18)
+ /* If transceiver sets CRC on his own we need to use lifs
+ * threshold len above 16 otherwise 18, because it's not
+ * part of skb->len.
+ */
+ if (hw->flags & IEEE802154_HW_TX_OMIT_CKSUM)
+ max_sifs_size = IEEE802154_MAX_SIFS_FRAME_SIZE -
+ IEEE802154_FCS_LEN;
+ else
+ max_sifs_size = IEEE802154_MAX_SIFS_FRAME_SIZE;
+
+ if (skb->len > max_sifs_size)
hrtimer_start(&local->ifs_timer,
ktime_set(0, hw->phy->lifs_period * NSEC_PER_USEC),
HRTIMER_MODE_REL);