diff options
author | Rupesh Gujare <rgujare@ozmodevices.com> | 2012-06-20 12:36:09 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-20 23:05:35 (GMT) |
commit | 00ec12b827d2f99202e0c9d804514aef2febf8d6 (patch) | |
tree | 5fd30f1018173afb91501564825b642150bc37ee /drivers/staging | |
parent | fec9f24b6269dc5fb4b1212a970c089461ec7ff2 (diff) | |
download | linux-fsl-qoriq-00ec12b827d2f99202e0c9d804514aef2febf8d6.tar.xz |
staging: ozwpan: set last_pkt_nb
In case of trigeered ISOC mode set last_pkt_nb only when
we are ready to send data.
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/ozwpan/ozpd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 6c566f5..25a8a08 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -420,6 +420,14 @@ void oz_set_more_bit(struct sk_buff *skb) oz_hdr->control |= OZ_F_MORE_DATA; } /*------------------------------------------------------------------------------ + * Context: softirq-serialized + */ +void oz_set_last_pkt_nb(struct oz_pd *pd, struct sk_buff *skb) +{ + struct oz_hdr *oz_hdr = (struct oz_hdr *)skb_network_header(skb); + oz_hdr->last_pkt_num = pd->trigger_pkt_num & OZ_LAST_PN_MASK; +} +/*------------------------------------------------------------------------------ * Context: softirq */ int oz_prepare_frame(struct oz_pd *pd, int empty) @@ -537,6 +545,7 @@ static int oz_send_next_queued_frame(struct oz_pd *pd, int more_data) spin_unlock(&pd->tx_frame_lock); if (more_data) oz_set_more_bit(skb); + oz_set_last_pkt_nb(pd, skb); if ((int)atomic_read(&g_submitted_isoc) < OZ_MAX_SUBMITTED_ISOC) { if (dev_queue_xmit(skb) < 0) { |