summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ozwpan/ozpd.h
Commit message (Collapse)AuthorAgeFilesLines
* staging: ozwpan: Use slab cache for oz_tx_frame allocationChristoph Jaeger2014-08-161-2/+1Star
| | | | | | | Use a slab cache rather than rolling our own free list. Signed-off-by: Christoph Jaeger <email@christophjaeger.info> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: Use slab cache for oz_elt_info allocationChristoph Jaeger2014-08-161-0/+2
| | | | | | | Use a slab cache rather than rolling our own free list. Signed-off-by: Christoph Jaeger <email@christophjaeger.info> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: Simplify app interfaceChristoph Jaeger2014-08-161-2/+2
| | | | | | | | | | | Simplify the somewhat overcomplicated application interface; improves readability and saves a bunch of lines. Use designated struct initializers for clarity. Signed-off-by: Christoph Jaeger <email@christophjaeger.info> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/ozwpan: formatting coding styleJérôme Pinot2014-03-131-1/+1
| | | | | | | | | | | | | | | This fixes the following spacing issues detected by checkpatch.pl: WARNING: line over 80 characters #357: FILE: drivers/staging/ozwpan/ozhcd.c:357: +static struct oz_urb_link *oz_uncancel_urb(struct oz_hcd *ozhcd, struct urb *urb) ERROR: trailing whitespace #25: FILE: drivers/staging/ozwpan/ozpd.h:25: +/* $ Signed-off-by: Jerome Pinot <ngc891@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers:staging:ozwpan Replaced wrapper functions with actual spin lock functionSurendra Patil2014-03-051-0/+5
| | | | | | | | | | | | | * Replaced all the spin lock/unlock wrappers from oz_polling_lock_bh() and oz_polllin_unlock_bh() with spin_lock_bh(&g_polling_lock) and spin_unlock_bh(&g_polling_lock).Completely erased the wrappers defination and declaration. * declared g_polling_lock as global variable in header file and added comments to it. Module builded successfully with sparse without warnings. Signed-off-by: Surendra Patil <surendra.tux@gmail.com> Acked-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: Create deferred work to destroy PD object.Rupesh Gujare2013-08-221-0/+1
| | | | | | | | | | | | | | Currently we call oz_pd_destroy() from softirq context, where we try to destroy relevant data structures, as well we kill a tasklet which always result in following kernel warning. [12279.262194] Attempt to kill tasklet from interrupt [12279.262202] Attempt to kill tasklet from interrupt This patch defers deallocation of data structures to work queue. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: Fix farewell report.Rupesh Gujare2013-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fix following issues reported by Dan:- 1) There is no check limiting the size to 32 and it could be up to 253 bytes. 2) Use defines instead of magic numbers. 3) The oz_farewell struct is supposed to be a variable length struct but the variable part is put in the middle. It doesn't make any sense to put the length of the variable size array after then end of the array because we can never find it again! Put the variable size array at the end. Make it a zero length array. u8 len; u8 report[0]; 4) In oz_add_farewell() we do this: f = kmalloc(sizeof(struct oz_farewell) + len - 1, GFP_ATOMIC); The "- 1" refers to sizeof(f->report) but because it was a magic number then it was missed when the sizeof(f->report) changed. 5) In [patch 6/6] we set the ->len member. But because it is at the end of a variable length array with no limit check the remote attacker can just rewrite it using the memcpy() on the next line. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: Increase farewell report size.Rupesh Gujare2013-08-021-1/+1
| | | | | | | | Farewell report size can be bigger than one byte, increase array size to accomodate maximum 32 bytes of farewell report. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: High resolution timersRupesh Gujare2013-08-011-7/+11
| | | | | | | | | | | | | | | | | | Current implementation assumes HZ = 1000 for calculating all internal timer intervals, which creates problem on platforms where HZ != 1000. As well we need resolution of less than 10 mSec for heartbeat calculation, this creates problem on some platforms where HZ is configured as HZ = 100, or around, which restricts us to timer interval of 10 mSec. This is particularly found on embedded devices. This patch moves on to use high resolution timers to calculate all timer intervals as it allows us to have very small resolution of timer interval, removing dependency on HZ. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/ozwpan: Mark read only parameters and structs as constPeter Huewe2013-02-161-2/+2
| | | | | | | | This patch marks function parameters that are used read only as well as readonly structs (and corresponding pointers) as const. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: isoc latency for audio burstRupesh Gujare2012-08-141-0/+1
| | | | | | | | Set audio latency. This fixes issue where audio clips heard during link outage. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: ISOC transfer in triggered modeRupesh Gujare2012-06-211-1/+2
| | | | | | | | This patch implements ISOC frame transfer while PD is in triggered mode. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ozwpan: Added device state supportChris Kelly2012-02-241-0/+121
Added support for maintaining state and data buffering for devices connected via the network. Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>